cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Flow Update SharePoint Item

I have a scenario where I am updating many column values in SharePoint using the update item.  This occurs across 10 different SharePoint sites that all contain a unique library where the columns are being updates.  I have tried using variables and Ask In PowerApps to populate the Site Address and list name however not surprisingly the columns do not retrieve so you are stuck with hard coding the site and list name via the drop downs to return the available fields. 

Due to this I have had to create a switch and an update item action for every library which was a lot of work and results in a large amount of redundancy.  Is there a better way to do this where the update item can retrieve the columns and I can get this down to a single action?  Any ideas is appreciated.

 

case2.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Flow Update SharePoint Item

Hi @Dudditz 

 

Site the site urls are dynamically provided you would have to use the send an http request to sharepoint to update your list item (post action) 

 

here is an example

https://powerusers.microsoft.com/t5/Building-Flows/Send-an-HTTP-request-to-Sharepoint-to-Update-List...

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User II
Dual Super User II

Re: Flow Update SharePoint Item

Hi @Dudditz 

 

Site the site urls are dynamically provided you would have to use the send an http request to sharepoint to update your list item (post action) 

 

here is an example

https://powerusers.microsoft.com/t5/Building-Flows/Send-an-HTTP-request-to-Sharepoint-to-Update-List...

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Flow Update SharePoint Item

Hi Reza, to be more specific I am updating columns for a document set and folders.  I am starting with the Document set and while I have made progress researching the links provided I am getting an error.

 

"status": 400,
"message": "The property '__metadata' does not exist on type 'SP.Data.Shared_x0020_DocumentsItem'. Make sure to only use property names that are defined by the type.

 

Here is the flow send http request.  Any guidance on issues you see with my config is appreciated.

http1.jpg

Highlighted
Post Patron
Post Patron

Re: Flow Update SharePoint Item

Thanks for all your help, its now working with the following action to update columns for both modern doc sets and folders.

 

update metadata.jpg

Highlighted
Dual Super User II
Dual Super User II

Re: Flow Update SharePoint Item

Hi @Dudditz 

 

Glad to know it worked out

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Microsoft
Microsoft

Re: Flow Update SharePoint Item

Tried everything nothing working. Finally the below code worked for me: 

Error: The property '__metadata' does not exist on type 

 

Solution:  

1. Use Send a HTTP Request to SharePoint 

 

2.  Method as PATCH

 

3.  Headers: 

 

{
  "Accept": "application/json;odata=nometadata",
  "IF-MATCH": "*",
  "X-HTTP-Method": "MERGE",
  "contentType": "application/json;odata=nometadata"
}

 

 

4.  Body i.e I am changing the Title of the Item:

 

{"Title": "Hello" }

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (6,879)