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

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,189 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,189 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,189 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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard