Forum Discussion
Provisioning SiteScript generation changes causing errors in execution.
My error on step "Send_an_ HTTP_request_to_Sharepoint_-_ExecuteTemplateScript":
Action 'Send_an_HTTP_request_to_SharePoint_-_ExecuteTemplateScript' failed
Error Details are:
Action 1 (createSPList) is invalid. Parameter addNavLink has an invalid value.
When researching the output of the successful "Send_an_HTTP_request_to_SharePoint_-_get_list_structure" step, of the flow that had completed successfully, I find this:
\"actions\": [\r\n {\r\n \"verb\": \"createSPList\",\r\n \"listName\": \"Onboarding Team Tasks Template_LST\",
And when I research the flow that ran the next day, I find this:
\"actions\": [\r\n {\r\n \"verb\": \"createSPList\",\r\n \"listName\": \"[[LOnboarding_Team_Task0001_listName]]\",
Again, nothing on my end changed. Something in Microsoft world must have changed.
Thank you!
- DeanOfReplyMay 09, 2023Copper ContributorI 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.
- Stephen600May 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"}