cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dogemaster
Level: Powered On

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.PNGFlow - 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
Super User
Super User

Re: SharePoint REST API - copy list item to multiple sites

Hi @dogemaster

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!


dogemaster
Level: Powered On

Re: SharePoint REST API - copy list item to multiple sites

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? 

Community Support Team
Community Support Team

Re: SharePoint REST API - copy list item to multiple sites

Hi @dogemaster,

 

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.

 

dogemaster
Level: Powered On

Re: SharePoint REST API - copy list item to multiple sites

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 417 members 6,058 guests
Please welcome our newest community members: