cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mpanggabean
Frequent Visitor

Map Excel attachment fields from Outlook to Excel OneDrive Business File Table

 

Hello,

I'm putting together a basic flow that should take certain excel email attachments and add rows to an Excel OneDrive Table with the same column headers.  The flow can pick up the email and pass the basic subject and from info.  I'm not clear how to extract the fields from the excel attachment into the fields/columns w/in Excel OneDrive Table.

 

I have tried to use the "Current Item", "Attachment Content" both which aren't magically returning a map to the right fields.

 

Expert users kindly provide some guidance/tips in terms of syntax or how to best approach this. 

 

Thanks!

10 REPLIES 10
efialttes
Super User
Super User

Hi!

Did you have a look to this thread?

https://powerusers.microsoft.com/t5/Building-Flows/Copy-excel-contents-from-email-attachment-to-anot...

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi,

The example you pointed me does provide some useful information but not able to bridge the gap yet.

 

The first link suggests to important 1st step is to save off the attached excel file to sharepoint (or onedrive). 

Trying to be direct about the immediate issue:

I don't know how to reference a filename to use the "Create table in Excel"  when that filename will change based on the incoming file from email that's saved in sharepoint. 

 

Power Automate._creating_table_excel_online_after_saving_excel_to_sharepoint.pngPower Automate_Challenge_create_table_filename_not_known_or_list_rows_in_table_and_table_doesnt_exist.png

Please let me know if you have any other details to guide.

 

 

Replying to my last post. I think can use the "File Identifier" as dynamic content for the filename and define a table name.

 

Currently, I think that's not an issue (subject to further validation) but now steps further in the flow might not be running since no new sharepoint item is being created. 

 

Posting the overall flow so that experts can point out anything that either appears to be wrong logically or other clever simple ideas to implement instead.Power_Automate_Overall_flow_current_branching_status.png

Hi!
Not sure what's the point in 'Create table' and then 'List rows present in a table' unless both are pointing to different excel files or different tables in the same excel file
I mean, if you try to read rows from the table created in the previous step, the output will be empty (no rows yet).
Thanx!


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi 

 

Good point, I'm likely making several poor decision in the process of trying to put together the pieces from various examples

 

My goal is the following:

Take emails with attachments that have some key subject. Use the attached excel file to update a master excel table (OneDrive) which has same columns.

 

Here is the latest that I have and uses O365, Sharepoint, and Excel OneDrive for Business.

 

1. When a new email arrives (V3) using O365.

    Applied to a folder and filtered by subject

2. Create item using SharePoint.

    This is placed in a List Name & Title'd by

    Subject.

3. Apply to each Attachment

4. Add Attachment using SharePoint

    Now I have a SharePoint ID from #2.

    Nor sure if I really need the SharePoint item, but idea was to have a table from attachment  excel to map to a table in master Excel OneDrive table.  

 

Do these steps seem logical and what might be the next step? My understanding is both data sets need to be in an excel table. Once we have a table from attachment I need clarity on how to pass the rows from this file into the master excel file table by column names.  

 

Appreciate the help and tips so far..Power Automate._creating_table_excel_online_after_saving_excel_to_sharepoint_2.png

 
"Good point, I'm likely making several poor decision in the process"
So, current approach discarded, right? THis means we are close to a happy ending!

Now, let's talk about your challenge... and let me see if I understood the Excel related logic.
It looks like you have an excel doc, with one 'main table' you use to add one row per attachment received. And, also you want to create one 'extra table' per attachment . IS my assumption right? If so, what do you want to store in this 'extra table' that you are not adding to the 'main table'?
Hope this makes sense
.


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi 

 

>>It looks like you have an excel doc, with one 'main table' you use to add one row per attachment received.

You are correct, but I'm not able to figure out yet how to update this 'main table' using the attachment received.

 

My understanding was that both the data sets (Master Excel & attached Excel) had to be in the form of a Table. So I created a table even from the attached Excel sheet so that I could get back the names of the columns.  

 

Maybe you have some suggestions on how to do the update to the main table?

For example if the main table has a column "Part ID" what needs to go in that field so that the newly added row from excel attachment matches under that column (which also has a "Part ID" column but it doesn't propagate as a clear column/field to put there).

 

Thanks a lot for the help so far! I did give one thumbs up for now..

Power Automate_latest_steps.png

Hi again!
it's still unclear to me why you need.... Wait, wait, wait
"created a table even from the attached Excel sheet so that I could get back the names of the columns"
So the attachments are excel files, now on your main table you store attachmente related info, and on the table you create per attachment, you copy the rows from the attachment, right?
So each excel attachment with N rows inside is represented by 1 row in the 'main table' and N rows in the particular table, right?
If so, in order to match 'main table' row and 'particular table' I would suggest to store the name of the particular table in a column of the 'main table'
Hope this makes sense


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi again also,

 

>>So the attachments are excel files, now on your main table you store attachmente related info, and on the table you create per attachment, you copy the rows from the attachment, right?

[mpanggabean] you are right. main table is just appended info from individual excel attached files.


>>So each excel attachment with N rows inside is represented by 1 row in the 'main table' and N rows in the particular table, right?

[mpanggabean] close, since main table is just cumulative entries of all rows in particular table/excel attachment. 


If so, in order to match 'main table' row and 'particular table' I would suggest to store the name of the particular table in a column of the 'main table'

[mpanggabean] Hmm.. would you happen to have any example that you can point to as far as storing the names of the columns from the excel attachment or converted version in a table?.  

 

Thanks again.

 

Thanks,

Hi again!
"[mpanggabean] Hmm.. would you happen to have any example that you can point to as far as storing the names of the columns from the excel attachment or converted version in a table?"

Sorry I got lost here. I am afraid am not an Excel guy, so maybe I am nissing something very simple in your explanation

Thanx!


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,341)