web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help building Dynamic ...
Power Automate
Unanswered

Help building Dynamic SharePiont HTTP body for /_api/web/$batch

(0) ShareShare
ReportReport
Posted on by 87

I am attempting to build a child flow to update various SharePoint lists using HTTP and the $batch APIs.  I have successfully created a flow that will update a single SP list however I require updating 8 lists.  I don't want to build individual flows for each list.

 

This is inspired by @takolota post  found here.

 

I can successfully pass a JSON formatted string to a child flow that describes the mapping between the new data and the SharePoint columns.  Like: (The number of fields varies between SP lists.)

[
 {
 "SourceField": "Field_x0020_1",
 "DestField": "TextFieldOne"
 },
 {
 "SourceField": "Number_x0020_Field_x0020_2",
 "DestField": "NumberFieldOne"
 }
]

 

What I wan to do is then use this mapping data to create the body of the update or insert JSON for the select step.  It should look like:

{
 "__metadata": @{json(concat('{"type":"SP.Data.', replace(outputs('settings')['listName'], ' ', '_x0020_'), 'ListItem"}'))},
 "ID": @{xpath(xml(outputs('XMLDestSPArray')),concat('string(//Array[Title/text()="', item()['Title'],'"]/ID/text())'))},
 "TextFieldOne": @{item()?['Field_x0020_1']},
 "NumberFieldOne": @{item()?['Number_x0020_Field_x0020_2']},
 "": "",
 "": ""
}

 

If this was a standard Algol language (C, Pascal, etc...) I would have a loop inside a look to create the JSON.

 

Any suggestions on how to accompanist this?

 

Thank you for your time.

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard