I have a SharePoint list called "Community" that contains a column named "Region", with three possible values: A, B, and C. Each region corresponds to around 30 association items, totaling 90 items. I want to split these into three separate lists — one for each region — located on different SharePoint sites but having the same schema (same columns as the Community list). To achieve this, I’ve built a Power Automate flow that triggers whenever an item in the Community list is created or modified.
I also maintain a configuration list, where each row contains the site URL, list name, and associated region (A, B, or C). When the flow is triggered, I use the Region value from the triggered item to filter the configuration list (Region eq '<triggered region>'
) and retrieve the corresponding target site URL and list name.
Using this information, I then query the region-specific list (A, B, or C) to check if an item with the same Community list ID (refID) already exists. If the item does not exist (i.e., the length of results is 0), I use an HTTP action to create a new item. If the item does exist, I use another HTTP action to update the existing item. These HTTP requests are built dynamically using the site URL and list name from the configuration list.
The challenge I’m facing is in the creation and update of items via the HTTP actions, since the items contain multiple data types (single line, multiline, choice, hyperlink, people picker (multi selection enabled), etc.), and I’m dynamically constructing the request payload based on the triggered item’s values.
Can someone help me with this?