Forum Discussion
PÃ¥l Eilertsen
Feb 14, 2017Copper Contributor
Uploading files via SPO REST API failing when having a workflow on the library
Hi, We are using the SPO REST API to PUT files into SPO document library. We are also doing a PATCH to update content and metadata. On the document library we have a SP Designer workflow that sta...
- Feb 20, 2017Is it possible that the workflow is 'updating' the item in the form of updating the workflow status column?
Try configure the workflow and not set the workflow status in the column, this means when workflow starts it doesn't modify the list item.
Then it shouldn't cause problems for the Patch op.
Brent Ellis
Feb 14, 2017Silver Contributor
maybe add a Pause (1 to 5 minutes) at the beginning of your workflow, give the PATCH time to settle in. Or you could set a "Wait until field is" action and have a boolean "Ready to update" field, that gets set to TRUE when your PATCH completes.
- PÃ¥l EilertsenFeb 14, 2017Copper Contributor
I have actually tried this. I added a 5 minute "Pause" at the start of the workflow. This did not help. The thing is that the workflow doesn't actually do anything with the list item. It checks to see if certain metadata is set and on the time of the PUT and PATCH these metadata is not set so the workflow ends staight away.
We are using FilesConnect in Salesforce to move files in SharePoint. I fwe turn off the workflow everything works fine!
- John LiuFeb 20, 2017MVPIs it possible that the workflow is 'updating' the item in the form of updating the workflow status column?
Try configure the workflow and not set the workflow status in the column, this means when workflow starts it doesn't modify the list item.
Then it shouldn't cause problems for the Patch op.- PÃ¥l EilertsenFeb 21, 2017Copper Contributor
Thanks a bunch! That seemed to be it. I will test some more and give and update later.