cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BenjaminMartin
Helper I
Helper I

Insert row in Excel from Email

Hi Everyone,

I'm trying to insert dynamic text from new hire emails into an Excel spreadsheet. 

 

Here's the format of the email I'm trying to pull from:

 

Name: John Doe

Start: 1/18

Position: ISS

Please set up email as: john.doe@acmeco.com

 

I can't figure out which expression to use to insert it. I'm using the template for Insert row in Excel (Business) when a new email arrives in a shared mailbox .

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @BenjaminMartin,

 

You could following these steps to approach that:

1. I store the email body into a Compose action.

2. Initialize a string variable, store a blank line into it, click "Enter" button once.

3. use split() function separate the email body by using the blank row as a separator;

split(outputs('Compose'),variables('BlankRow'))

4. Use Filter array action to filter out rows contains ":";

5. use split() function again, to extract line 1's name, line 2's Start, etc. Store in their respective variables.

split(body('Filter_array')[0],': ')[1]
split(body('Filter_array')[1],': ')[1]
split(body('Filter_array')[2],': ')[1]
split(body('Filter_array')[3],': ')[1]

Screenshot 2020-12-17 145109.jpg

 

Screenshot 2020-12-17 145142.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-litu-msft
Community Support
Community Support

Hi @BenjaminMartin,

 

You could following these steps to approach that:

1. I store the email body into a Compose action.

2. Initialize a string variable, store a blank line into it, click "Enter" button once.

3. use split() function separate the email body by using the blank row as a separator;

split(outputs('Compose'),variables('BlankRow'))

4. Use Filter array action to filter out rows contains ":";

5. use split() function again, to extract line 1's name, line 2's Start, etc. Store in their respective variables.

split(body('Filter_array')[0],': ')[1]
split(body('Filter_array')[1],': ')[1]
split(body('Filter_array')[2],': ')[1]
split(body('Filter_array')[3],': ')[1]

Screenshot 2020-12-17 145109.jpg

 

Screenshot 2020-12-17 145142.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your help, i'm making progress.

 

What do I put in the filter array step? You put From Outputs, item contains ...., I keep getting errors on that step

 

v-litu-msft
Community Support
Community Support

Hi @BenjaminMartin,

 

On the left side, it is expression "item()", get current item; on the right side, it is a colon ":".

Its function is to filter out rows contains key-value.

Screenshot 2020-12-23 154236.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Rweiss
New Member

Please Help!

Sample email below.  

 

NAME:  First Last

TITLE:  Airframe Technician 

POS 3435-024

GRADEY-56 

EMAIL: adress 

CELL:   12345628 

INTERVIEW BY:   FIrst Last  

AVAILABILITY: Now 

PASSPORT VALID FOR ONE YEAR: Yes 

FULLY VACCINATE: Yes  

IF YES-TYPE & DATE OF LAST DOSE:   xxxxxxxx 

IF NO:  

WHEN WILL THEY BE COMPLETE WITH BTH DOSES: Need Booster 

NOTE:  New hire, meets qualifications

OFFER:   $00000

 

The hiring manager receives multiple emails from various division hiring managers with the above format.  Subject lines can be standardized, but they are not there yet. (How to look for various words in the subject line)

 

I have set up the flow so far to react to an email in outlook with specific words in the subject(see comment above)

 

However, I do not get the correct information into the proper columns in the excel table.  Here is what I've tried so far.

Screenshot 2022-07-30 194559.pngScreenshot 2022-07-30 194643.pngScreenshot 2022-07-30 194501.png

`

first(skip(split(first(split(body('Html_to_text'),'Name')),':'),1))

 

I do not know how to 1. adjust the above expression so the word "Title" is not placed in the table (see excel screenshot below)

2. How to adjust the above code to pull the different data that I want and place it in the right table.

 
I know this is where I am ignorant of coding.  I don't understand the split function and how to manage it for each row in the table.
 
I know it may seem like this question was answered already....but after searching for a couple of days I just can't seem to crack it..
Here is the result in excel
Rweiss_2-1659199374909.png

 

Thank you!

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,418)