Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Suggested answer

Power Auotmate Extract Table Column Names

(2) ShareShare
ReportReport
Posted on by 51
 
Hi all - I have a power automate and I would like to automatically extract all the column names from an excel file formatted as table. I don't know in advance the column names as the ecel file will change each time. I managed to get the names of the column as the array below:
 
{
  "body": {
    "@odata.etag""",
    "ItemInternalId""4b864-f0ca-4bc8-7beae93-0622c47a00e0",
    "Name""Luca",
    "Surname""Russo",
    "Birth Date""27406",
    "City""Milan"
  }
}
 
Ans so the column names would be Name, Surname, Birth Date, City - basically everything apart from odata.etag and iteminternalid. 
 
Can you suggest a way to just extract everything apart from odata.etag and iteminternalid and so in this example just ame, Surname, Birth Date, City ?
 
Keep in mind that in anohter case I could have other colums. 
 
  • lbendlin Profile Picture
    8,041 Super User 2025 Season 1 on at
    Power Auotmate Extract Table Column Names
    "  The template function 'keys' is not defined or not valid. "
  • hugojesus Profile Picture
    23 on at
    Power Auotmate Extract Table Column Names
    Hi everyone,
     
    Hope to found you well. 
     
    Assume your Excel row is stored in a variable or part of a previous step (like Get a row, List rows present in a table, etc.).
     
    Add a "Compose" action:
     
    Use this expression to extract the keys (column names) and remove unwanted ones.
     
    Expression:
     
    join(
        filter(
            keys(body('YourExcelStep')),
            item() != '@odata.etag' and item() != 'ItemInternalId'
        ),
        ','
    )
     
    - Replace 'YourExcelStep' with the name of the step that returns the row object (you can use Dynamic Content to select the output).
    - The join(...) will return a single comma-separated string like:
     
    Name,Surname,Birth Date,City
     
    If you prefer it as an array, remove join(...) and just use:
     
    filter(
        keys(body('YourExcelStep')),
        item() != '@odata.etag' and item() != 'ItemInternalId'
    )
     
    Best Regards,
    Hugo Jesus
  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Power Auotmate Extract Table Column Names
    You only need to know the names of the columns you want to remove, not all the columns.  The extra ones you want to get rid of will always be 
    "@odata.etag" and "ItemInternalId".
     
    The Table name may not be the same across all the files either. But you'll need that retrieve the columns anyway.
     
    Not sure what you mean by "Next Step". 
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • lbendlin Profile Picture
    8,041 Super User 2025 Season 1 on at
    Power Auotmate Extract Table Column Names
     I don't know in advance the column names as the ecel file will change each time.
    Will the table name be the same across files?
     
    Once you have the column names, what is the next step?
  • Suggested answer
    Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Power Auotmate Extract Table Column Names
    Since you know the names of the two fields you want to remove you can use the removeProperty() function to remove those properties from the Body object.  here's the documentation on how to use it.  Reference guide for expression functions - Azure Logic Apps | Microsoft Learn

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     

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

Featured topics

Restore a deleted flow