web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send HTTP Request Crea...
Power Automate
Answered

Send HTTP Request Create SharePoint List Not Working

(0) ShareShare
ReportReport
Posted on by 1,387 Moderator

I have a Flow that runs once a year that worked the last two years but isn't this year.

 

It uses the Send an HTTP request to SharePoint to create a SharePoint List.

IPC_ahaas_1-1704462952565.png

The variable in the Body is:

replace(replace(string(setProperty(body('Parse_JSON')?['actions'][0],'listName', variables('NewListName'))),'\','\\'),'"','\"')

 

The error I'm getting is:

Action 1 (createSPList) is invalid. Parameter addNavLink has an invalid value.
clientRequestId: 056a4386-e089-486d-b371-d3dade28de2f
serviceRequestId: 21c1fea0-609f-e000-3646-a16bd2aec37a

 

Here is the value of Body after it's ran:

{"script": "{\"actions\":[{\"verb\":\"createSPList\",\"templateType\":100,\"color\":\"[[LChipLogCurrent0001_color]]\",\"icon\":\"[[LChipLogCurrent0001_icon]]\",\"addNavLink\":\"[[LChipLogCurrent0001_addNavLink]]\",\"description\":\"[[LChipLogCurrent0001_description]]\",\"identity\":\"LChipLogCurrent0001\",\"subactions\":[{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field ID=\\\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\\\" Type=\\\"Text\\\" Name=\\\"Title\\\" DisplayName=\\\"Title\\\" Required=\\\"FALSE\\\" SourceID=\\\"http://schemas.microsoft.com/sharepoint/v3\\\" StaticName=\\\"Title\\\" FromBaseType=\\\"TRUE\\\" MaxLength=\\\"255\\\" Indexed=\\\"FALSE\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"EmployeeName \\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"EmployeeName\\\" Title=\\\"EmployeeName \\\" Type=\\\"Text\\\" ID=\\\"{dfec35ec-91e9-4591-a589-87c03e9830f3}\\\" StaticName=\\\"EmployeeName\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"EmployeeID\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"EmployeeID\\\" Title=\\\"EmployeeID\\\" Type=\\\"Text\\\" ID=\\\"{e956855f-9806-48e8-b2d1-5f88d4b2bfea}\\\" StaticName=\\\"EmployeeID\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"SafetyChips\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"SafetyChips\\\" Title=\\\"SafetyChips\\\" Type=\\\"Text\\\" ID=\\\"{9550692c-1c9c-49a4-b2ec-9dc7f61e004a}\\\" StaticName=\\\"SafetyChips\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"CultureChips\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"CultureChips\\\" Title=\\\"CultureChips\\\" Type=\\\"Text\\\" ID=\\\"{957945c8-f881-46cb-a940-f4e618beb500}\\\" StaticName=\\\"CultureChips\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"CultureValue\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"CultureValue\\\" Title=\\\"CultureValue\\\" Type=\\\"Text\\\" ID=\\\"{7083f020-3188-45b4-bd3a-cb946d349fe3}\\\" StaticName=\\\"CultureValue\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"SafetyValue\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"SafetyValue\\\" Title=\\\"SafetyValue\\\" Type=\\\"Text\\\" ID=\\\"{9895fe45-15a7-4b19-8879-32585c7f64fc}\\\" StaticName=\\\"SafetyValue\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"ItemChosen\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"ItemChosen\\\" Title=\\\"ItemChosen\\\" Type=\\\"Text\\\" ID=\\\"{a5f467fd-f959-4043-a720-16e238d6ab22}\\\" StaticName=\\\"ItemChosen\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field AppendOnly=\\\"FALSE\\\" DisplayName=\\\"Notes\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" IsolateStyles=\\\"FALSE\\\" Name=\\\"Notes\\\" RichText=\\\"FALSE\\\" RichTextMode=\\\"Compatible\\\" Title=\\\"Notes\\\" Type=\\\"Note\\\" ID=\\\"{da72e3ed-8a3f-4644-97b7-d3e77eddfdfa}\\\" StaticName=\\\"Notes\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field ClientSideComponentId=\\\"00000000-0000-0000-0000-000000000000\\\" DisplayName=\\\"LogDateTime\\\" FriendlyDisplayFormat=\\\"Disabled\\\" Format=\\\"DateTime\\\" Name=\\\"LogDateTime\\\" Title=\\\"LogDateTime\\\" Type=\\\"DateTime\\\" ID=\\\"{79ce58de-8b01-40c8-979a-ea931db1c207}\\\" StaticName=\\\"LogDateTime\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"GrantedBy\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"GrantedBy\\\" Title=\\\"GrantedBy\\\" Type=\\\"Text\\\" ID=\\\"{ed3c1cbf-b85d-4bfc-b614-c1adc08efaee}\\\" StaticName=\\\"GrantedBy\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field DisplayName=\\\"SubmittedBy\\\" Format=\\\"Dropdown\\\" IsModern=\\\"TRUE\\\" MaxLength=\\\"255\\\" Name=\\\"SubmittedBy\\\" Title=\\\"SubmittedBy\\\" Type=\\\"Text\\\" ID=\\\"{fd40e24a-6ac2-48e1-9435-a14f76334749}\\\" StaticName=\\\"SubmittedBy\\\" />\"},{\"verb\":\"addSPFieldXml\",\"schemaXml\":\"<Field ID=\\\"{82642ec8-ef9b-478f-acf9-31f7d45fbc31}\\\" ReadOnly=\\\"TRUE\\\" Type=\\\"Computed\\\" Name=\\\"LinkTitle\\\" DisplayName=\\\"Title\\\" DisplayNameSrcField=\\\"Title\\\" ClassInfo=\\\"Menu\\\" AuthoringInfo=\\\"(linked to item with edit menu)\\\" ListItemMenuAllowed=\\\"Required\\\" LinkToItemAllowed=\\\"Prohibited\\\" SourceID=\\\"http://schemas.microsoft.com/sharepoint/v3\\\" StaticName=\\\"LinkTitle\\\" FromBaseType=\\\"TRUE\\\"><FieldRefs><FieldRef Name=\\\"Title\\\" /><FieldRef Name=\\\"LinkTitleNoMenu\\\" /><FieldRef Name=\\\"_EditMenuTableStart2\\\" /><FieldRef Name=\\\"_EditMenuTableEnd\\\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\\\"FreeForm\\\" /></Expr><Case Value=\\\"TRUE\\\"><Field Name=\\\"LinkTitleNoMenu\\\" /></Case><Default><HTML><![CDATA[<div class=\\\"ms-vb itx\\\" onmouseover=\\\"OnItem(this)\\\" CTXName=\\\"ctx]]></HTML><Field Name=\\\"_EditMenuTableStart2\\\" /><HTML><![CDATA[\\\">]]></HTML><Field Name=\\\"LinkTitleNoMenu\\\" /><HTML><![CDATA[</div>]]></HTML><HTML><![CDATA[<div class=\\\"s4-ctx\\\" onmouseover=\\\"OnChildItem(this.parentNode); return false;\\\">]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[<a onfocus=\\\"OnChildItem(this.parentNode.parentNode); return false;\\\" onclick=\\\"PopMenuFromChevron(event); return false;\\\" href=\\\"javascript&colon;;\\\" title=\\\"Open Menu\\\"></a>]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[</div>]]></HTML></Default></FieldSwitch></DisplayPattern></Field>\"},{\"verb\":\"addContentType\",\"name\":\"Item\",\"id\":\"0x01\",\"fieldRefsXml\":[\"<FieldRef ID=\\\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\\\" Name=\\\"Title\\\" DisplayName=\\\"Title\\\" Required=\\\"FALSE\\\" Hidden=\\\"TRUE\\\" ReadOnly=\\\"FALSE\\\" PITarget=\\\"\\\" PrimaryPITarget=\\\"\\\" PIAttribute=\\\"\\\" PrimaryPIAttribute=\\\"\\\" Aggregation=\\\"\\\" Node=\\\"\\\" />\",\"<FieldRef ID=\\\"{82642ec8-ef9b-478f-acf9-31f7d45fbc31}\\\" Name=\\\"LinkTitle\\\" DisplayName=\\\"Title\\\" ReadOnly=\\\"TRUE\\\" />\",\"<FieldRef ID=\\\"{dfec35ec-91e9-4591-a589-87c03e9830f3}\\\" Name=\\\"EmployeeName\\\" />\",\"<FieldRef ID=\\\"{e956855f-9806-48e8-b2d1-5f88d4b2bfea}\\\" Name=\\\"EmployeeID\\\" />\",\"<FieldRef ID=\\\"{9550692c-1c9c-49a4-b2ec-9dc7f61e004a}\\\" Name=\\\"SafetyChips\\\" />\",\"<FieldRef ID=\\\"{957945c8-f881-46cb-a940-f4e618beb500}\\\" Name=\\\"CultureChips\\\" />\",\"<FieldRef ID=\\\"{7083f020-3188-45b4-bd3a-cb946d349fe3}\\\" Name=\\\"CultureValue\\\" />\",\"<FieldRef ID=\\\"{9895fe45-15a7-4b19-8879-32585c7f64fc}\\\" Name=\\\"SafetyValue\\\" />\",\"<FieldRef ID=\\\"{a5f467fd-f959-4043-a720-16e238d6ab22}\\\" Name=\\\"ItemChosen\\\" />\",\"<FieldRef ID=\\\"{da72e3ed-8a3f-4644-97b7-d3e77eddfdfa}\\\" Name=\\\"Notes\\\" />\",\"<FieldRef ID=\\\"{79ce58de-8b01-40c8-979a-ea931db1c207}\\\" Name=\\\"LogDateTime\\\" DisplayName=\\\"LogDateTime\\\" Format=\\\"DateTime\\\" />\",\"<FieldRef ID=\\\"{ed3c1cbf-b85d-4bfc-b614-c1adc08efaee}\\\" Name=\\\"GrantedBy\\\" />\",\"<FieldRef ID=\\\"{fd40e24a-6ac2-48e1-9435-a14f76334749}\\\" Name=\\\"SubmittedBy\\\" />\"]},{\"verb\":\"addContentType\",\"name\":\"Folder\",\"id\":\"0x0120\"},{\"verb\":\"addSPView\",\"name\":\"All Items\",\"viewFields\":[\"EmployeeName\",\"EmployeeID\",\"CultureChips\",\"SafetyChips\",\"GrantedBy\",\"SubmittedBy\",\"LogDateTime\",\"CultureValue\",\"SafetyValue\",\"Notes\"],\"query\":\"<OrderBy><FieldRef Name=\\\"LogDateTime\\\" Ascending=\\\"FALSE\\\" /></OrderBy>\",\"rowLimit\":30,\"isPaged\":true,\"makeDefault\":true,\"formatterJSON\":\"\",\"replaceViewFields\":true,\"columnWidthXml\":\"<FieldRef Name=\\\"LogDateTime\\\" width=\\\"165\\\" /><FieldRef Name=\\\"ID\\\" width=\\\"90\\\" />\"}],\"listName\":\"ChipLog2023\"}]}"}

 

I can't tell what the issue is.

Categories:
I have the same question (0)
  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    I searched the google and found some people having a similar issue earlier in 2023.

    https://techcommunity.microsoft.com/t5/sharepoint-developer/provisioning-sitescript-generation-changes-causing-errors-in/m-p/3811626 

    Their solution is below:

    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"}

     

    I really don't know what any of this means, but maybe you can make sense of what they changed to get it to work.

  • IPC_ahaas Profile Picture
    1,387 Moderator on at

    Thank you, @wskinnermctc the links within that thread eventually helped me land on a solution.

     

    Send an HTTP request to SharePoint to get List structure to build new List

    IPC_ahaas_0-1704721327508.png

     

    Parse JSON using the Body of the above Action

     

    body('Send_an_HTTP_request_to_Get_List_Structure')?['body']?['d']?['GetSiteScriptFromList']

     

    IPC_ahaas_1-1704721404864.png

     

    Send an HTTP request to SharePoint to create new List using below as the Body

     

    {"script": "{\"actions\":[replace(replace(string(setProperty(setProperty(body('Parse_JSON')?['actions'][0],'listName',variables('NewListName')),'addNavLink',true)),'\','\\'),'"','\"')] }"}

     

    IPC_ahaas_2-1704721441228.png

     

    This was the hardest part, formatting that long string

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard