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

How do I extract data from a table in an email (where the data is underneath the header row) and update a row in an excel file?

Hi! 

 

I am building a flow where I have sent an automatic email and want to extract the following data from the replies: 

 

This is an example of a reply and the data I would like to extract: 

 

megmi_0-1668385705968.png

 

I do have the update row portion down pat but am unsure how to extract the email data from the table. 

 

The HTML to plain text looks like this for the table: 

 

Application Name

Log in Time (HH:MM)

Did you receive an MFA challenge?

Any issues?

Access Location (e.g. WFH, Name of Office location)

Blah

10:18

Yes

No

Australia

 

Thanks a lot!!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @megmi ,

 

Yes. But you need to set the correct delimiter.

vbofengmsft_0-1668403177591.png

 

Best Regards,

Bof

 

 

 

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @megmi ,

 

I've made a test for your reference:
I assume there is a compose

vbofengmsft_0-1668393418370.png

 

you could use this formula to get blah

split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[1]

 

you could use this formula to get 10:18

 

split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[2]

 

 

you could use this formula to get yes

 

 

split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[3]

 

 

you could use this formula to get no

 

 

split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[4]

 

 

you could use this formula to get Australia

 

 

split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[5]

 

 

 

Best Regards,

Bof

 

megmi
Frequent Visitor

Hi @v-bofeng-msft

 

Thanks a lot for your help! 

 

I tried using the statements you suggested but I got the following error: 

 

Unable to process template language expressions in action 'Update_a_row' inputs at line '0' and column '0': 'The template language expression 'split(split(outputs('Compose'),'Name of Office location)')[1],decodeUriComponent('%0A'))[3]' cannot be evaluated because array index '3' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.

 

Here's what my flow looks like: 

 

megmi_0-1668394705984.png

megmi_1-1668394734540.png

 

Hi @megmi ,

 

Please use the plain text returned by the 'HTML to plain text' action :

vbofengmsft_0-1668394855765.png

 

Best Regards,

Bof

megmi
Frequent Visitor

@v-bofeng-msft thanks a lot!! that worked 🙂 Just wanted to ask - if this table has multiple rows would i be able to edit the integer at the end of each expression accordingly? 

Hi @megmi ,

 

Yes. But you need to set the correct delimiter.

vbofengmsft_0-1668403177591.png

 

Best Regards,

Bof

 

 

 

megmi
Frequent Visitor

Thankyou!! @v-bofeng-msft 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,091)