Forum Discussion
JSON formatting to call a flow when a new item is created on a SharePoint list
- May 11, 2022ah ok I see what you are trying to do now. JSON formatting will never be able to do this for you, I would look into webhooks to possible archive the functionality you're looking for https://docs.microsoft.com/en-us/sharepoint/dev/apis/webhooks/lists/overview-sharepoint-list-webhooks
Thank you OldWarwick,
The whole idea is to have a unique ID for Risks, Issues and Lessons in Project Online, without JavaScript as it is not supported OOB in modern SPO.
If the user registers a Risk it would trigger a call to a flow that would compose the unique ID for that item in that list and that flow would work for any list, in any subsite in the site collection.
For that purpose the flow accepts parameters to later on be able to update the specific item.
If the user has to click a button it will not click it, this is kind of left as possible human error so I am looking at something that is triggered in the backend calling that flow via http request when the user creates the item.
The idea comes from: https://www.inspiribytes.com/power-automate/deploying-a-single-flow-to-multiple-sharepoint-libraries-lists/ but my next step is figuring out a condition in JSON like if Modified equals Created then call the flow, because this will only happen once when a new item is created.
Hope it is better illustrated this way
- Why can't you just use a normal flow that triggers on item creation and then calls the HTTP to set the unique ID (no reason you can't pass through the parameters to the HTTP endpoint using this)
- Yes you would need to configure this on every list that you require the unique ID to be used (or use 3rd party solutions to duplicate)