cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

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

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
Highlighted
Frequent Visitor

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,393)