cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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 III
Dual Super User III

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

Highlighted
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 III
Dual Super User III

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

Highlighted
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

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,051)