cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
silvana1
Regular Visitor

How to pass SharePoint Item ID from one flow to another using HTTP

I want users to click on an item in a SharePoint List and run a flow. I want this 1st flow to trigger a second flow to run. 
Can someone direct me to/share the code for how to pass the item ID from one flow to another using HTTP?

 

Here's what I tried. However I could not get an items in 2nd flow:
1st flow:

Trigger: "For a Selected Item".
I entered values for SP site and list.
Action: HTTP:
Method = POST
URI: copied from trigger in 2nd flow
Body: 
{
"ID": "@{triggerBody()?['entity']?['ID']}"
]
2nd flow:

 Trigger: "When a HTTP request is received".
Request Body:
{
"type": "object",
"properties": {
"ID": {
"type": "string"
}
}
}

Action: Get Item
ID: ID field from the trigger. 


Thanks!

Silvana

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: How to pass SharePoint Item ID from one flow to another using HTTP

Hi

In your HTTP request from your first flow, you should use this instead

"@{string(triggerBody()?['entity']?['ID'])}"

or

declare ID as integer on your second flow's trigger, and remove the doublequotes surrounding @triggerBody()?['entity']?['ID'] on your first flow

I tend to use the second approach

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Community Support
Community Support

Re: How to pass SharePoint Item ID from one flow to another using HTTP

 

Hi @silvana1 ,

 

Have you had an opportunity to apply @efialttes 's recommendations to adapt your Flow?

In the second Flow, when defining the request body, you need to change the ID type to integer.

The type of Item ID is actually Number instead of String.

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: How to pass SharePoint Item ID from one flow to another using HTTP

Hi

In your HTTP request from your first flow, you should use this instead

"@{string(triggerBody()?['entity']?['ID'])}"

or

declare ID as integer on your second flow's trigger, and remove the doublequotes surrounding @triggerBody()?['entity']?['ID'] on your first flow

I tend to use the second approach

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Community Support
Community Support

Re: How to pass SharePoint Item ID from one flow to another using HTTP

 

Hi @silvana1 ,

 

Have you had an opportunity to apply @efialttes 's recommendations to adapt your Flow?

In the second Flow, when defining the request body, you need to change the ID type to integer.

The type of Item ID is actually Number instead of String.

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,807)