How to automate copy selection from body from email to excel file?

I’d like to automate the following actions in a sequence:

  1. Scan e-mail folder for mails for specific content (subject or body, both are possible);
  2. If found, I want to search through the body of the e-mail for a specific string which is unique per e-mail;
  3. Copy the unique and specific string;
  4. Paste it into a cell but which cell is depended on the information in the row.

Both Outlook and Excel are of Microsoft 365.

Any ideas how to do this?
I’m fairly new to IT so not really familiar with programming.

Hi @Wilich,

Follow below,

  1. Use read outlook mail activity to read the emails.
    Use the properties to filter the emails based on subject or body
  2. Once you extract the content of email, use the regex to extract the specific data from in it.
  3. Use write excel activity to write a extracted information.
  1. Do you mean the Get Outlook Mail Message? Cause I don’t see the activity Read Outlook Mail.

  2. Did I extract the content of the email already with what I did above? I don’t think I did.
    I’ve Googled regex. It says regular expression. Is this a VB kind of thing?

Hello @Wilich

You can refer to the below post to get clarity on the o365 package. Also you can use Get Oulook mail message to get the emails.

Then you can get the body of email and use regex or string manipulation to get the required value from it.

1 Like