Skip to main content

How to Get a SharePoint List Item by ID in Power Automate

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

SharePoint's Get item reads one item from a list by its ID. Give it the site, the list and the ID, and every column of that item becomes dynamic content for the rest of the flow. The ID often comes from another item, such as a department's ID stored on an overtime entry.

Microsoft's SharePoint connector reference describes it as: Gets a single item by its id from a SharePoint list.

The example is the approval flow of the Overtime Timesheet app. Each overtime entry stores its department's ID in DepartmentId, and the flow reads that department to find its approvers.

Prerequisites​

Step 1: Add Get Item​

Add an action, search for Get item, and choose the SharePoint one. Get items, with an s, is a different action that returns many items.

Step 2: Choose the Site and the List​

FieldValue here
Site AddressThe Overtime Timesheet Site environment variable
List NameThe Departments environment variable

Step 3: Give It the ID​

Select Id, open the dynamic content list, and search for the column that holds the ID. Here, the trigger's DepartmentId:

The Get the department pane with Site Address and List Name set to environment variables and Id empty, marked 'Id' is required., and the dynamic content list searched for DepartmentId, showing When an item is created or modified with DepartmentId, The ID of the department's item in the Departments list., outlined

The finished action, renamed Get the department so its outputs read well later:

The Get the department pane with Site Address set to the Overtime Times… token, List Name set to the Departments (d… token, Id set to the DepartmentId token, Advanced parameters Showing 0 of 1, and the line Connected to Overtime Timesheet SharePoint.

Step 4: Use Its Outputs​

Every column of the item is now in the dynamic content list under the action's name. Get the department gives the department's Approvers, a Person column that allows several people, which the next action turns into a list of emails:

The dynamic content list with the Approver emails group showing Output, outlined, and Output Item, and the Get the department group showing Approvers, The people who approve overtime for this department.

In expressions, read them with outputs('Get_the_department')?['body/...']. For example, the department's name:

Expression
outputs('Get_the_department')?['body/Department']

Another Use: Read an Item Again Later​

The trigger's outputs are the item as it was when the flow started. When a flow waits, for an approval for example, the item may change. A second Get item on the same list with the trigger's ID, here Get the entry now, reads its latest values. In one run, the trigger had version 4.0 and Get the entry now read version 5.0, because the person had edited the entry while it waited (How to Check an Item Hasn't Changed During an Approval in Power Automate).

Common Mistakes​

MistakeWhat happensDo this instead
Choosing Get itemsYou get a list, and a loop to go with itGet item, singular
An ID from the wrong listThe wrong item, or an errorUse the ID stored for this list
Leaving the name Get itemTwo actions named alike are hard to tell apartRename it to say what it gets
An apostrophe in the new nameExpressions that read it breakLetters and spaces only

Troubleshooting​

SymptomLikely causeFix
'Id' is required.No ID chosenPick the column that holds it
The action fails in a runNo item has that ID in this listCheck the ID and the list
A column isn't in dynamic contentIt's in another listRead that list with its own Get item

FAQ​

What if I don't know the ID?​

Use Get items with a filter on a column you know, such as a title or an email, and take the item from its results.

Does Get item return Person columns?​

Yes. A Person column comes back with each person's details, such as Email and DisplayName; one that allows several people comes back as an array.

Conclusion​

Get item reads one SharePoint item by its ID: choose the site and list, pick the ID from dynamic content, and rename the action after what it gets. Use it again after a wait to read the item's latest values.

Additional Resources​