Forum Discussion
JSON formatting to call a flow when a new item is created on a SharePoint list
- May 12, 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
- 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)
Hi Warwick,
having a normal flow as suggested implies actually 3 flows per site (Project Site), I have three lists (Risks, Issues and Lessons) per site, multiplied by the number of Projects (+400) is unbearable. On top of that flows are not saved on a site template used when a new project is created, so we should create the flows right after the project site is created with each project.
So I am looking for only one flow, like a Site Collection flow, that works for all lists, on all existing sites (Project Sites) and on future sites created with each new project.
If there is an option to use any type of condition in JSON to trigger a "universal" flow then all current and future project sites lists will benefit from it. I am aware of having a button to trigger a flow but I want to cover the "what if" case when the Project Manager created the item but did not click on the button, so triggered automatically once created would be the best solution. That is why I am looking at conditions like Created equals Modified to call that Site Collection flow but not clear how to build this in JSON at the item list level.
- Warwick WardMay 12, 2022Bronze Contributorah 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
- XimoMay 12, 2022Brass ContributorThank you Warwick for the hint, much appreciated! 😉