cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SharePoint REST API - copy list item to multiple sites

Hello Cat Happy

 

I'm building a flow that triggers when a new item is added to the Events SharePoint list in one SharePoint site.
The Flow is supposed to copy this Event (item) to multiple sites.

There is no Copy item so I'm wondering if I can use the Send an HTTP Request to SharePoint using the REST API to copy item from one site to another site. 

I managed to get the item using the ID.

 

Flow - Get and Post itemFlow - Get and Post item


(I can't use the Create Item because the URL to the sites I'm going to copy the item to is coming from a list, so Flow doesn't understand which list I'm creating an item in - the columns isn't showing up.)

 

Appreciate any thoughts and answers!

4 REPLIES 4
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @Anonymous

Tbh, I think you could do both.

You say that create item depends on "the URL to the sites I'm going to copy the item to is coming from a list".

Couldn't you get these URL's from each list using the get item connector in advance, then move on to create each new list item having assigned the previous URL to a variable or using dynamic data to suit perhaps?

 

Please say thanks with thumbs up.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Anonymous
Not applicable

createitem.PNG

If I save the URL in a variable I still get the same error message. If this was what you meant I should do? 

Hi @Anonymous,

 

The you could "Enter custom value" to the List Name field of "Create item" action.

 

Best regards,

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

 

Anonymous
Not applicable

createitem.PNG

It seems like I'm not able to get the fields/columns, even though I write the list name as a custom value.
If i do it like that Flow will make an empty item in the Events calendar, with no info about timedate/location etc.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,240)