Basically, im comparing the list email templates with incoming email and if its matches then it parses metadata as per below flow ,but issue even my incoming email is in proper format as per email template sharepoint list it returns no matches.
Incoming email
Flow
Many thanks for your great help. Much appreciated
Hi @Veblitz
There is way to do with regular expression, so few changes need to be made.
I am assuming your email format looks like this
Now in the sharepoint list- i have set the subject and content pattern like this
I am using a regular pattern here for mail and subject. Also i hav excluded extra lines that comes in email body as it may be sometimes more lines coming up than expected, i have made the flow to remove the empty lines so that content looks exactly as per the pattern shown above
Email subject
Contractor Request- [A-Za-z]+
Email body
Hi [A-Za-z]+,
Please find the details below
Title: [A-Za-z]+
Location: [A-Za-z]+
Note: This email is autogenerated. Do not reply to this email.
Thanks,
Support Team
Now create an office script in excel file which helps to validate the email subject & body patterns using regex.
For that create an excel file and then write the following office script
Now coming to the flow
1. Use trigger when email arrives which triggers the process when email arrives in Inbox.
2. Now will get the patterns details from list - workload in which i have stored the email pattern details
3. Convert the email body to plain text format as shown below
4. Loop through output of get items action like below
Inside the loop - do the following
4.1- Use the filter array to remove empty new lines in email body like below
Expression used-
Expression -
Top fields SubValue represent subject of email, and SubPattern represent the subject pattern stored in sharepoint list.
For the flag - put gm as value.
for the BodyVal use this expression -
Expression -
Expression -
Expression -
Nived N 🚀
LinkedIn: Nived N's LinkedIn
YouTube: Nived N's YouTube Channel
Blog: Nived Nambiar's Blogs
🔍 Found my answer helpful? Please consider marking it as the solution!
Your appreciation keeps me motivated. Thank you! 🙌
i have no idea about comparing and please help me how to check the same. Thanks
Hi @Veblitz
How you are comparing the given subject pattern in list with trigger email subject using eq operator?
same for email body as well.
Along with that i see you have used && in odata filter query, i think you should use and instead.
Nived N 🚀
LinkedIn: Nived N's LinkedIn
YouTube: Nived N's YouTube Channel
Blog: Nived Nambiar's Blogs
🔍 Found my answer helpful? Please consider marking it as the solution!
Your appreciation keeps me motivated. Thank you! 🙌