I have a ‘Watch Emails’ module set up and I am trying to extract these 6 fields from the body of text. Example below:
Name: Mark Stephenson
Email: mark@msconsult.com
Telephone: 01564776441
Country: United Kingdom
I’m Enquiring About:: Coaching Offer
Message: I would like to explore your services
The desired result is to fill 6 column fields into Monday.com (Name, Email, etc). I’m fine with that part but need help with the extraction.
Hi there @dom_1, that should be pretty straight forward as long as the content appears in the email is exactly as you’ve described it here. The titles I mean (name, phone, etc). You can use regular expressions to extract the information after each of those titles. Here’s How
Input a text parser (pattern match) into your scenario
In the section “Pattern” input : Name:\s*(.?)\sEmail:\s*(.?)\sTelephone:\s*(.?)\sCountry:\s*(.?)\sI’m Enquiring About::\s*(.?)\sMessage:\s*(.*) NOTE - I’m Enquiring About:: has two colons since that’s what you’ve shown your email has above, if that is not actually how the email is formatted remove one colon.
Then in the “text” section at the bottom of the text parser input the variable you want to parse from.
Thank you so much for your reply @KinderTech . I have followed the instructions but its recieving an empty output bundle. Any ideas what I’m doing wrong?
P.S.: Always search first, Check Make Academy. If this is helpful, mark it as a solution and Need expert help or have questions? Contact or comment below!
Please import and let us know if it works for you as well. blueprint (69).json (12.6 KB)
Other way around to do this is using functions. I have attcahed snapshot to get the name. You can do the same for other variables inside monday module. this will just save you one operation.
@dilipborad I think it might be because I am missing the ‘Set multiple variables’ module like you do in your screenshot. I am taking it directly from the ‘Watch Emails’ module. Is that wrong?
If so, please can you share a screenshot of what you have inside that module?
Hello @dilipborad thanks again. I believed I’ve followed everything as you instructed. I’ve attached a more complete video showing the scenario. I must be doing something wrong still but can’t figure out what as it looks like the setup is the same as yours:
Hey @dilipborad sorry for the late reply, I’ve downloaded the output bundle into this text file. Please see attached. Anything you’re able to see there?
I can’t tell you what the funny issue is.
It was a different single quote (') used in the text I’m Enquiring About
See the single quote (') difference between I’m Enquiring About and I'm Enquiring About.
I’ve updated it slightly because I’ve noticed the possibility of the string coming with just \n without a line break.
Now it works with both of them. See the Proof regex101: build, test, and debug regex