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 / Need an elegant way to...
Power Automate
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".

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at

    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

  • tinkerbellpixie Profile Picture
    13 on at

    @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


     

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard