How to get particular text from outlook mail body

Hi All, Please help me in getting text from the body of the mail. Below is the attached email i want to get only the highlighted value into a variables to pass into database.



It is giving me entire body of the mail i want only two values.

Hi @manjusree_R_N_manju

Use this:

Input = item.Body.ToString

VCApplied = System.Text.RegularExpressions.Regex.Match(Input,"(?<=Period of VC Applied\:\s+).*").Value.Trim()

Input = item.Body.ToString

AmendmentValue =  System.Text.RegularExpressions.Regex.Match(Input,"(?<=Amendment Value\:\s+).*").Value.Trim()

Regards

Hi @manjusree_R_N_manju

Try this

(?<=Amendment Value: ).*

image

(?<=Period of VC Applied: ).*

image

If Regex serves the purpose for static fixed pattern based content, then good, or else for too much dynamic emails, you may need Communications Mining, which can cost additional AI units. Another alternative approach could be using GenAI prompt with input mail message as data via integration service which also cost GenAI tokens.

Thank you, I am able to get the data.

You’re Welcome @manjusree_R_N_manju

Happy Automation!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.