cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrAl
Level: Power Up

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
Level: Power Up

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
MrAl
Level: Power Up

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,761)