Forum Discussion
DeanOfReply
May 03, 2023Copper Contributor
Provisioning SiteScript generation changes causing errors in execution.
On Tuesday evening 4/25 after 6pm CST I noticed an error with power automate running the SharePoint HTTP control to call the API _api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptU...
DeanOfReply
May 09, 2023Copper Contributor
I was able to get everything working again by including the new bindings property that was added when generating the JSON. There also doesn't appear to be an issue with including the $schema property so the entire generated JSON can be used now.
Stephen600
May 09, 2023Copper Contributor
Do you have any more detailed instructions on how you resolved this? Trying to resolve this for a client and it's time sensitive.
EDIT: Thanks to your hint pointing me in the right direction, I figured it out. For anyone who finds this topic later:
Instead of a request body like this:
{"script": "{\"actions\":@{replace(replace(string(variables('GetSiteScriptFromList')?['actions']),'\','\\'),'"','\"')}}"}
It should now look like this:
{"script": "@{replace(replace(string(variables('GetSiteScriptFromList')),'\','\\'),'"','\"')}"}
Note that the entire getSiteScriptFromList object can now be referenced between the quotes in the script property, instead of referencing a specific property, and the {} are no longer needed as they are included in the object:
{"script": "YourFormattedGetSiteScriptFromListStringHere"}