Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Copying email data into a new row in Excel

Like (0) ShareShare
ReportReport
Posted on 5 May 2023 06:02:04 by 8

Hi all,

 

I'm struggling in my first attempt to create a flow that will trigger when an email is received into a shared mailbox, and will then copy the sender's name and email subject, and append them to the next available row in a specific Excel worksheet.

As per the image below, if we receive an email into our mailbox, the sender's name and email subject are added to the highlighted row below:

smorty_0-1683266315065.png

And then when the next email arrives, the same thing occurs...it adds the next sender's name and email subject to the next row.

Is something like this possible to do?  The spreadsheet is kept in Sharepoint.

 

TIA, Smorty.

  • smorty Profile Picture
    8 on 09 May 2023 at 01:11:31
    Re: Copying email data into a new row in Excel

    Perfect and thanks for all your help, I can see the fields now, and also know for next time that any updates need to going into a worksheet that has been formatted as a table.

  • Verified answer
    v-zhoqian-msft Profile Picture
    Microsoft Employee on 08 May 2023 at 02:56:13
    Re: Copying email data into a new row in Excel

    Hi @smorty ,

     

    If you have set the worksheet to table, you will see that all columns appear automatically in the "Add a row into a table" action.

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • smorty Profile Picture
    8 on 08 May 2023 at 02:30:38
    Re: Copying email data into a new row in Excel

    Sorry, what I mean is, I don't know how to setup the flow so it takes the information from the email, and outputs that information into specific cells in the worksheet.

     

    As an example (see below), when the email comes into the shared mailbox, how do I add a new row and capture the:

    • date and add that into column A
    • the sender's name and add that into column I
    • the email subject and add that into column J

    smorty_0-1683512812810.png

     

    Apologies if I am not explaining it correctly.

     

    Also, this worksheet is not setup as a table.  Does it need to be to allow this flow to work?

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on 08 May 2023 at 01:54:40
    Re: Copying email data into a new row in Excel

    Hi @smorty ,

     

    I don't understand what you mean. Why not set column I to 'sender' and column J to 'subject' in the excel file beforehand?

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • smorty Profile Picture
    8 on 07 May 2023 at 22:50:34
    Re: Copying email data into a new row in Excel

    Is it also possible to specify the column that I need to have the data in as well?

     

    In our file, the 'sender' information needs to be added into column I, and the 'subject' information into column J.

     

    Is that also possible?  Or do I need to look at swapping the columns around.  Swapping them around would be the last option though.

  • v-zhoqian-msft Profile Picture
    Microsoft Employee on 05 May 2023 at 07:48:01
    Re: Copying email data into a new row in Excel

    Hi @smorty ,

     

    You can create flows like this:

    vzhoqianmsft_0-1683272527447.png

     

    The result of the example flow is like:

    vzhoqianmsft_1-1683272618159.png

     

    The first column is a value include date and time.

    "sender" column is the email address of sender.

    To get the same data format as in your picture, we need to use some formulas.

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,751 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started