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 / Creating a list in Sha...
Power Automate
Answered

Creating a list in Sharepoint

(0) ShareShare
ReportReport
Posted on by 103

Hi guys,

 

I'm trying to create a list in sharepoint using http action in Power Automate, it saves down fine but when I run it then I get the error message. Please see below:

Amaya2013_0-1711544517814.png

I've used the below values in HTTP action. Can anyone please help me to fix this? Thanks.

Amaya2013_1-1711544630354.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,742 Most Valuable Professional on at

    Hi @Amaya2013,


    This could be a case of a small typo. The error suggests that what you used in the Body is invalid json. Can you share the whole payload of the Body field? 

     

    Normally the payload should be something like the below. Can you make sure every line ends with a comma except the last one?

     

     

     

    { 
    "AllowContentTypes": true, 
    "BaseTemplate": 100,
    "ContentTypesEnabled": true, 
    "Description": "My Lunch List", 
    "Title": "Weekly Lunch"
    }

     

     

     

    Also double check that in the headers the word nometadata is one word, not with a space in it.

     

     

     

    {
     "Accept": "application/json;odata=nometadata",
     "Content-Type": "application/json;odata=nometadata"
    }

     

     

     

    createlist_json.png

  • Amaya2013 Profile Picture
    103 on at

    Thanks @Expiscornovus - It worked 🙂 . Managed to create a new list in sharepoint using Power automate. 

    Just wondering how we can delete a list from sharepoint? Can you please help me with that? Thanks 

  • Verified answer
    Expiscornovus Profile Picture
    33,742 Most Valuable Professional on at

    Hi @Amaya2013,

     

    You can use another HTTP request for that. That would use the X-HTTP-Method with a DELETE value.

     

    Below is an example

    In this case I am using the getbytitle method to find the list based on the title. You can also use the guid using the lists(guid'{list_guid}') approach to find the matching list. 

     

    URI

    _api/web/lists/getbytitle('@{variables('ListName')}')

     

    Headers

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "If-Match": "*",
     "X-HTTP-Method": "DELETE"
    }

     

    deletelist.png

     

  • Amaya2013 Profile Picture
    103 on at

    @Expiscornovus - I'm getting an error message as below when trying to delete a list

     

    Amaya2013_1-1712152163228.png

     

     

    Amaya2013_0-1712151946889.png

     

  • Expiscornovus Profile Picture
    33,742 Most Valuable Professional on at

    Hi @Amaya2013,

     

    I see in the screenshot the Headers values are stored in the Body field. Can you use those in the Headers field instead and try again?

  • Amaya2013 Profile Picture
    103 on at

    Yes it worked. Thanks for all your help 🙂

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
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard