How to Get First Item ID from SharePoint List in Power Automate?

Do you want to know how to get first item ID from SharePoint List in Power Automate? Yes, then don’t worry!

Follow this Power Automate tutorial; I will explain how to get the first item ID from a SharePoint ID column using Power Automate.

Also, I will show how to get the first item ID from a SharePoint custom column using Power Automate.

Get items action retrieves all the item information from a SharePoint list. It also allows you to filter items based on condition while retrieving items from the SharePoint list.

How to Get First Item ID from SharePoint List in Power Automate

Follow the instructions below to get the first item ID from a SharePoint ID column using Power Automate.

I have taken a SharePoint List named ‘Subscription Details’ with a few columns and their data types.

ColumnsData Types
IDNumber
Subscriber NameSingle line of text
Subscription Renewable DateDate and Time
Subscription Expire DateDate and Time
Subscription StatusChoice
Subscriber Email IDSingle line of text
Get first SharePoint item ID from SharePoint ID column in Power Automate

Example:

Suppose I want to retrieve the first item ID from a SharePoint list, so I have created a Power Automate cloud flow that will get triggered when an item is created or modified in a SharePoint List.

The screenshot below shows the SharePoint List ID column, and the second image shows the first item ID that we retrieved after the flow ran successfully in an email.

Get first item ID from SharePoint ID column using Power Automate
How to get first item ID from SharePoint ID column using Power Automate

To achieve this, follow the steps below.

1. Navigate to https://make.powerautomate.com in your browser to open the Power Automate home page; click on + Create -> Select the Automated cloud flow -> Provide the flow name and choose trigger’s flow (When an item is created and modified).

  • Provide the Site Address and List Name for this trigger.
Get first item ID from SharePoint ID column in Power Automate

2. To filter items based on condition while retrieving from the SharePoint list, add the ‘Get items’ flow action and set the required fields.

  • Site Address: Provide the SharePoint site address.
  • List Name: Enter the name of the SharePoint List.
How to get first item ID from SharePoint ID column in Power Automate

3. Next, add the ‘Compose’ flow action to retrieve the SharePoint first item ID from the ID column and set the required fields.

first(outputs('Get_items')?['body/value'])?['ID']
Get SharePoint first item ID from SharePoint column using Power Automate

4. Then add the ‘Send an email(V2)’ to send the details of the SharePoint first item with the ID. Set all the required fields.

  • To: I gave the Subscriber Email ID from Dynamic Content [from SharePoint list].
  • Subject: Enter the purpose of this email.
  • Body: I have selected the Output of compose flow action from Dynamic content here. Also, to provide the Link to the Item, use an expression in Code view (</>) mode.
How to get SharePoint first item ID using Power Automate

5. Now, it’s time to Save and Test. Click on Test and test it Manually -> The Send an email(V2) flow action will display the output below.

Get SharePoint first item ID using Power Automate

This is how to get the first item ID from a SharePoint ID column using Power Automate.

Get First Item ID from a SharePoint Custom Column in Power Automate

Let’s find out how to get the first item ID from a SharePoint custom column using Power Automate.

For this, I have created a SharePoint list named ‘Project List’ with a few columns and their data type.

Columns Data Types
Project IDSingle line of text
Project Name (renamed title column)Single line of text
Project StatusChoice
Project Start DateDate and Time

Example:

Here, I have created a SharePoint list with a custom ID column. Now, I want to retrieve the first item ID from the SharePoint list and reflect that details in an email.

Get First SharePoint Item ID from SharePoint Custom Column using Power Automate

The below screenshot shows the ID of a SharePoint List and the second image shows the ID we retrieved after the flow ran successfully in an email.

How to get SharePoint first item ID from a SharePoint custom column using Power Automate
How to get first item ID from a SharePoint list custom column using Power Automate

To work around this, follow the steps below.

1. Open the Power Automate home page, click + Create -> Select the automated cloud flow -> Enter the flow name and choose the trigger’s flow (When an item is created and modified).

  • In this trigger, provide the Site Address and List Name.
Get first item ID from SharePoint custom column in Power Automate

2. Next, add the ‘Get items’ flow action to filter items based on condition while retrieving items from the SharePoint list. And set all the details.

  • Site Address: Provide the SharePoint site address.
  • List Name: Select the name of the SharePoint list.
How to get first item ID from SharePoint custom column using Power Automate

3. Add the ‘Compose’ flow action to get the first item ID from a SharePoint list using the first function.

first(outputs('Get_items')?['body/value'])['ProjectID']

Where the ‘Project ID’ field is a string, and the data returned by outputs(‘Get_items’)? [‘body/value’] is an array of items, each with a ‘Project ID’ field.

Get first item ID from SharePoint List ID column using Power Automate

4. Add the ‘Send an email(V2)’ to send the details of the SharePoint last item with the ID. Set all the required fields.

  • To: Give the user an email address. I have given the Project Lead from Dynamic Content.
  • Subject: Provide the purpose of this email.
  • Body: I have selected the Output of compose flow action from Dynamic content here. Also, to provide the Link to the Item, use an expression in Code view (</>) mode.
Get SharePoint first item ID from SharePoint custom column in Power Automate

5. Now, click on Save and Test. Then test it Manually -> The Send an email(V2) flow action will display the output below.

Get SharePoint first item ID from SharePoint List ID column using Power Automate

This is how to get the first item ID from a SharePoint custom column using Power Automate.

Conclusion

I hope this Power Automate tutorial helps you to learn and understand the step-by-step procedure to get the first item ID from a SharePoint ID column using Power Automate.

Moreover, I have explained how to get the first item ID from a SharePoint custom column using Power Automate.

Additionally, you may like some more Power Automate tutorials: