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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send HTTP Request to S...
Power Automate
Unanswered

Send HTTP Request to Sharepoint: Quirks!

(0) ShareShare
ReportReport
Posted on by 21

Starting this thread here to share some of the quirks I've come across with the "Send an HTTP Request to Sharepoint" Action. I'll add to it as more things pop up.

 

  1. Create Sharepoint List POST request:
    1. Headers:
      1. If you use...
        1. content-type: application/json;odata=verbose
      2. ...you must specify the __metadata object in the JSON body...
        1. {
           '__metadata': { 'type': 'SP.List' }, 
           'AllowContentTypes': true,
           'BaseTemplate': 100,
           'ContentTypesEnabled': true, 
           'Description': 'My first test list', 
           'Title': 'The coolest list ever'
          }
      3. If you use...(notice the colon and the double quotes)
        1. content-type: "application/json;odata=verbose"
      4. You must remove the __metadata object from the body!!
        1. {
           'AllowContentTypes': true,
           'BaseTemplate': 100,
           'ContentTypesEnabled': true, 
           'Description': 'My first test list', 
           'Title': 'The coolest list ever'
          }
        2. Otherwise the Flow will fail with the message: Status 400, Bad Request...
        3. {
           "message": "The property '__metadata' does not exist on type 'SP.List'. Make sure to only use property names that are defined by the type.\r\nclientRequestId: 4c16565b-cf95-42d9-9d9e-ddc2a5b01dec\r\nserviceRequestId: 2c680f9f-0032-0000-4762-24578c3e6a56",
           "status": 400,
           "source": "https://powerappers.sharepoint.com/_api/web/lists/",
           "errors": [
           "-1",
           "Microsoft.SharePoint.Client.InvalidClientQueryException"
           ]
          }

Hows that for quirky?

Categories:
I have the same question (0)
  • Gristy Profile Picture
    2,429 on at

    I have a quirky one when trying to add to sharepoint navigation:

     

    _api/Web/Navigation/GetNodeById(2031)/Children

     

    It only works with the following which ends up meaning i need to go back in and delete junk out of the URL if you put the full url i.e. https:// flow does some funky stuff and trys to be too smart ! 😞

     

    {
    "__metadata": { type: "SP.NavigationNode" },
     'IsExternal': false,
     'Title': "@{triggerBody()?['Title']}",
     'Url': "//tenant.sharepoint.com/sites/Customers/Lists/Customers/DispForm.aspx?ID=@{triggerBody()?['ID']}"
     }
  • v-bacao-msft Profile Picture
    on at

     

    Hi @yapper ,

     

    Thank you for your sharing!

    Please check this blog and get more details about SharePoint / Microsoft Flow – Maintain List details for no-code developers:

    https://veenstra.me.uk/2018/08/28/sharepoint-microsoft-flow-maintain-list-details-for-no-code-developers/

     

    The interaction between Headers and JSON Body is not specified by MS Flow. Send HTTP Request to SharePoint action only provides a configurable interface to help users edit the request. The specific configuration needs to be referenced in the SharePoint REST API.

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints

     

    Best Regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard