cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrAl
Frequent Visitor

Creating a Flow to create subsite using a template - Send an HTTP Request to Sharepoint

I have a Flow with the "Send an HTTP Request to SharePoint" action where I need to create a subsite using a custom template.  When I test it, I get the following error:

{
"message": "Invalid JSON. More than one value was found at the root of the JSON content. JSON content can only have one value at the root level, which is an array, an object or a primitive value.\r\nclientRequestId: bb846147-95bd-4190-8e97-616c870d2e8a\r\nserviceRequestId: 9a12109f-b0fd-a000-89f2-6cced1f9e6b7",
"status": 400,
"source": "https://xxxxxxx.sharepoint.com/sites/xxxxxxxx/_api/web/webinfos/add",
"errors": [
"-1",
"Microsoft.Data.OData.ODataException"
]
}

 

Here's the info I'm sending:
Method: Post
Uri: /api/web/webinfos/add
Headers:
{
"Accept":"application/json;oData=verbose",
"Content-Type":"application/json;oData=verbose"
}
Body:
{ 'parameters':
{ '__metadata':
{ 'type': 'SP.WebInfoCreationInformation' },
'Url':'test',
'Title':'test',
'Description':'test',
'Language':'1033',
'WebTemplate':'{5DE10BE9-0119-4B26-B630-5B35D969F4FB}#Test Template',
'UseUniquePermissions':false
}
}​

 

Any ideas? TIA

1 ACCEPTED SOLUTION

Accepted Solutions
MrAl
Frequent Visitor

Weird...I deleted the body of the json and re-typed it, now it works.  Must have had something extra in there that I didn't see.

 

All is good, carry on.

View solution in original post

1 REPLY 1
MrAl
Frequent Visitor

Weird...I deleted the body of the json and re-typed it, now it works.  Must have had something extra in there that I didn't see.

 

All is good, carry on.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,113)