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 / Insert row in Excel fr...
Power Automate
Answered

Insert row in Excel from Email

(0) ShareShare
ReportReport
Posted on by 44

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 .

 

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    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.

  • BenjaminMartin Profile Picture
    44 on at

    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 Profile Picture
    on at

    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 Profile Picture
    2 on at

    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!

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard