I am new to Use StudioX . How to extract Email content by StudioX and input into the excel

Dear All,
I am new to use StudioX. Every day I will received customer email. For example the email subject is : ABC company machine report:

The email has 10 machines fault logs in the daily email from customer, I would like to extract such fault log to excel

Below is excel formats
|Machine Name |date ||Log details |Postion |

Please advise Thank you very much
|

Hi @chikan.lau,

Welcome to the community.

A common approach would be:

  1. Use Use Desktop Outlook / Gmail and For Each Email to read incoming emails.
  2. Filter emails by subject (e.g., “ABC company machine report”).
  3. Extract the email body.
  4. If the fault logs follow a consistent format you can use Text Extraction / Regular Expressions.
  5. Store the extracted data in a Data Table .
  6. Use Write Range to write the Data Table into Excel.

Thanks

Hi @chikan.lau

Please give a try on the following

  • Use “Get Emails” (Outlook activity) and filter by subject like “ABC company machine report”
  • Loop through each email using “For Each Email”

CurrentMail.Body

  • Inside the loop, take the email body and split it into lines (since your email contains multiple machine logs)
  • From each line, extract the values like Machine Name, Date, Log details, Position (you can use “Split Text” if the format is consistent)

lines = CurrentMail.Body.Split({Environment.NewLine}, StringSplitOptions.None)

  • Store this data in a DataTable
  • Finally, use “Write Range” to write everything into Excel.

Thanks,
Christopher

Hi @chikan.lau

Welcome to UiPath Community!!

In StudioX, you can use Use Outlook 365/Gmail → For Each Email Message to read emails, then extract the email body and use Write to Excel to populate your columns.

If the machine logs follow a consistent format, you can use Text/Regex extraction to parse the Machine Name, Date, Log Details, and Position before writing them to Excel.

Reference:

Happy Automation!

Hi @iampnkz

I don’t see any regular expression in Studio

I had this error message when locating the Outlook “Folder”, do you know how to resolve. Thank you .

Good evening.@chikan.lau

“Regular expressions” do not refer to the name of an activity.
They are a powerful string‑processing syntax used within the Assign activity.

Because regular expression syntax is difficult for humans to understand, it’s perfectly fine to ask a generative AI if you’re unsure.

The following resource may be helpful for learning how to use regular expressions:


Regards,

gorby