Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Answered

Need an elegant way to create a Sharepoint List headers

(1) ShareShare
ReportReport
Posted on by 13

Hi folks,

I'm trying to move data from Excel to a new Sharepoint List with PowerAutomate.

To get there, I first need to create a new Sharepoint List with headers that match the Excel headers. Currently, my dummy dataset has five columns. I can manually type in the headers in Sharepoint List and select their datatype.

In the actual dataset, I have 50 columns in my Excel. Is there an elegant way to create Sharepoint List headers without typing in each column?

Thank you so much for your time! 

-K (newbie) 

 

Updates (10.25.23) - Complementary with the solution provided in this thread, I followed this Youtube video from @CFernandes for "HTTP Request to Sharepoint List".

  • tinkerbellpixie Profile Picture
    13 on at
    Re: Need an elegant way to create a Sharepoint List headers

    @FLMike Thank you for sharing the original post and the additional comment on "Send HTTP request to Sharepoint". I was able to follow along until the last piece - "Send HTTP request to Sharepoint". 

    I did a test run and it ran without any errors. When I tried to look for the newly created Sharepoint List, I didn't see it on the Sharepoint site. Any ideas what went wrong here? 

    last step of the flow and outputlast step of the flow and output


     

     

     

  • Verified answer
    Michael E. Gernaey Profile Picture
    44,280 Super User 2025 Season 1 on at
    Re: Need an elegant way to create a Sharepoint List headers

    Hi @tinkerbellpixie 

     

    You can do. 

    1. You need to read the headers from Excel first, you get them like this.

    Add a Select action

    a) From Field 

    split(string(first(outputs('List_rows_present_in_a_table')?['body/value'])),'",')

    b) Map Field

    split(replace(replace(replace(item(), '"', ''), '}', ''), '{', ''), ':')[0]

    Originally Here:Solved: Re: Is there any way to get the column headers fro... - Power Platform Community (microsoft.com)

     

    This will give you an Array of headers, BUT it will have 2 additional things which you dont want

    [
     "@odata.etag",
     "ItemInternalId",
     "Heading 1 ",
     "Heading 2",
     "Heading 3"
    ]

    c) add a compose

    -

    skip(OutputArrayFromSelect, 2)
    
    This will create an array output, that has SKIPPED the first 2 items in your header list, so that they wont be used to create the SharePoint lists.

     

    2. You need to use the Send an HTTP request to SharePoint to create the list as there are no actions to do it directly.

     

    The only issue I am not sure how you plan to know the Column Types. This code gives you the headers, but not the Types etc.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1