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
Solved! Go to Solution.
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
Proud to be a Flownaut!
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,
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
Proud to be a Flownaut!
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,
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
42 | |
37 | |
36 | |
36 | |
25 |
User | Count |
---|---|
39 | |
37 | |
33 | |
31 | |
25 |