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 / Writing content from E...
Power Automate
Unanswered

Writing content from Excel to Google Sheets

(2) ShareShare
ReportReport
Posted on by 9
Hello everyone, 

I am struggling to get the last steps of my flow to work correctly. What I am attempting to create is a flow that will take an Excel document from a regularly scheduled email, take the content from it and the write it to a specified Google Sheet document. I have got it about 90% of the way, the flow will write to the sheet, but it only writes to the __PowerAppsId__ column in my Google sheet and does not write the actual content from the Excel table.

My flow so far:
-When a new email arrives (V3) (working)
-For Each Attachment Loop
-- Get attachment (V2) (working)
-- Create File (Onedrive for business) (Working)
-- Delay 10s
-- Get file metadata (Onedrive for business) (Working)
-- Create table (Excel online business)
-- List rows present in a table (Excel online Business)
-- Apply to each loop
---Insert Row (Google Sheets)

I believe the issue is with the insert row step. I cannot select the names of the columns I specified in the create table step.
For the create table step, my inputs are - 
Location - OneDrive for Business
Document Library - OneDrive
File - Id (from get metadata step)
Table Range - A1:D800
Column Names: Mail Name, Number, Year Of Birth, Primary Email

For the list column steps, my inputs are - 
Location - OneDrive for Business
Document Library - OneDrive
File - Id (from get metadata step)
Table - body/name (From the create table step)

For my Apply to each loop, my input is body/value from the List rows step

For the Insert row step, my inputs are - 
File - Google Sheet file location
Worksheet - Sheet1

I have advanced parameters for Name, Membership Number, Year of Birth and Primary Email, but I cannot dynamically select the column names stated in the Create tables step, they are not options when I look through the list provided.

Ideally, I'd like the new content to override any current content in the Google Sheet as well so that the content does not just get added to the end.
 
Can anyone please give me any advice on what I should do to fix this issue?
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    since you need to select the column details of each row using apply to each (each row), you can try like this
     
    items('Apply_to_each')?['columnname'] where items('Apply_to_each') represent row and columnname represent the column name which you need to retrieve.
     
    Also what i see that you need to update current row not need to add a new row at the end, so you can try with update row action in google sheets
     
     
    Here to update a row, you need to get its row id so u need to use get rows first, get the row id value based on filtering/checking the values and then use that in update row action.
     
     
    Hope it helps !
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • BP-08100012-0 Profile Picture
    9 on at
    ?Thank you for your reply Nived.
     
    Apologies, but I am a beginner user of Power Automate. Which step do I put the items('Apply_to_each')?['columnname'] and into which input? Do I need to put it in multiple times for each column?

    Additionally, to use the update row, do I need to put the get row step in the Apply to each loop? I assume I need to use the Google Sheet Get Row step, if it is in the loop, do I use "Current Item" from the loop as the Row Id?
  • BP-08100012-0 Profile Picture
    9 on at
    I am not sure if Nived has seen my further questions, is anyone else who has seen this post able to guide me through the instructions they provided?
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Seems like Notifications in power automate not working, so due to that i didn't get your response.
     
    Coming to your doubts
     
    1. items('Apply_to_each')?['columnname'] : This should be used for insert operations/update operations as you have mentioned that you cannot select dynamic contents from create table step. You can use the above expression to get same values.
     
    2. Update row is used when you need to override any existing data present in google sheet. So to update the row in google sheet you need to get row id> and for that you have to use Get rows action, filter out the necessary row and get its row id, then use it in update row action.
     
     
    Hope it helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     

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