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 / Extracting data from e...
Power Automate
Unanswered

Extracting data from email to excel

(0) ShareShare
ReportReport
Posted on by 5

hi guys, i have been trying to automate a process where i receive a payment and enter the payment into an excel sheet, details that need to be entered are name, amount paid, transaction ID, and the time and date of payment. below is a sample of the confirmation message i receive after a payment is made.

 

Incoming - +263164 (Contact undefined)
Message text: You have received RTGS$900 from FUNGIRAI CHIGOMBE. Approval Code: MP211119.1735.K22953. New wallet balance: RTGS$66494.59. (11/19/21 17:35

 

i used power automate (im new to it) to automate the process, but the problem is that i cant seem to get the html code right to extract the info that i need, can anyone help?,

Categories:
I have the same question (0)
  • BruKn0ws Profile Picture
    11 on at

    Hi! I had the same issue you are having and the best way I solved it was by using an API to extract all the data you need. Depending on the platform you are using, I'd highly recommend looking into this as you can extract all your sales data in one go.

     

    For my example, I use Shopify and automate.io to extract the data into an excel or google sheets worksheet.

    https://www.youtube.com/watch?v=OfwBu1FRHS8&t=293s - using API connnector and Google Sheets

    https://www.youtube.com/watch?v=rT9BWhOJk7g - Shopify API extraction using automate.io

     

    hope it helps.

     

     

    Sending a

  • petermachacha Profile Picture
    5 on at

    @BruKn0wsthanks for the feedback. I checked out automate.io, added outlook and excel to my bot, got email from excel and set to add row, but the problem is that is there a way to get specific data from the email body. Im lost help, tried and failed.

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @petermachacha 

    I set up a flow, you can refer to the screenshots below to see if it helps.

    This is my test email content.

    vLilyWmsft_9-1637633801547.png

    Trigger flow when the subject contains specific content.

    vLilyWmsft_0-1637633409519.png

    vLilyWmsft_1-1637633502697.png

    Add Compose action, and change the name of the action to Incoming.

    vLilyWmsft_2-1637633530773.png

    Expression:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Incoming -')),'Message text')))

    vLilyWmsft_3-1637633548058.png

    Expression:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Message text:')),'Approval Code')))

    vLilyWmsft_4-1637633597553.png

    Expression:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Approval Code:')),'New wallet balance')))

    vLilyWmsft_5-1637633624971.png

    Expression:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'New wallet balance:')),'Payment Date')))

    vLilyWmsft_7-1637633690323.png

    Expression:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Payment Date:')),'Best Regards')))

    vLilyWmsft_6-1637633660035.png

    vLilyWmsft_10-1637633846287.png

    When I receive the email, the info will be added into excel.

    vLilyWmsft_11-1637633903851.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • walky Profile Picture
    on at

    I am having problems extracting specific data from the email and upload to excel.

    I used the code:

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'OE: ')),'Line#')))

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Line#:')),'Product')))

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Product:')),'Qty Ordered')))

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Qty Ordered:')),'Transaction Type')))

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Transaction Type:')),'Warehouse')))

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'Warehouse:')),'OperatorOE')))

     

    The first and second columns upload all data from the body. Column 3 gets the product and description. Column 4 should get only the qty ordered but it gets taken by info. How to get only what I need?

    The email body is attached. 

     

    Thank you for the help

  • Sree7181 Profile Picture
    4 on at

    What expression should we use when my column heading is one line and content to capture to the column is in next line below the heading in the mail body?

     

    Eg: PO Number
          12345


     

  • markhenryishere Profile Picture
    4 on at

    Take the help from Advik Email Backup Wizard. This application can extract all emails from 200+ email servers into Excel Sheet. The software will preserve and hold the information like cc, bcc, date, time, signature, message, hyperlinks, attachments, etc. Try the software for free from official website.

     

    Steps to export Emails to Excel

    1. Run Advik Email Backup Wizard in your PC.
    2. Select your email source and sign in.
    3. Select mailbox folders.
    4. Choose CSV as saving option.
    5. Click Backup button.

    The software will start exporting emails into Excel Sheet. 

    email-to-excel-converter-3.png

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard