Hi! I need to extract specific informations (name, email & phone number) from a gmail body, and send it to specific gsheet rows.
I am stuck where I need to extract the correct informations. Here are some screenshots with the informations I need to extract (red arrows) and where they need to go :
When reaching out for assistance with your regex pattern for a Text Parser module, it would be super helpful if you could share the actual text you’re trying to match. Screenshots of text can be a bit tricky, so if you could please copy and paste the text directly here, that would be awesome! It ensures we can run it against test patterns effectively. If there’s any sensitive info, feel free to change it to something fictional yet still valid by keeping the format intact.
Providing clear text examples saves time on both ends and helps us give you the best possible solution. Without proper examples, we might end up playing a guessing game, and nobody wants that as it is a waste of time! You are more likely to get a correct answer faster. So, help us help you by sharing those text snippets. Thanks a bunch!
2 Likes
No problem. Here is the texte I would like to match
Name : Lead name
Email : lead@email.com
Phone : 45012345678
Message : test
Have a nice day
So I need the 3 first variables (Name, Email & Phone) to be sent in my Gsheet.
Welcome to the Make community!
You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):
Name : (?<name>[^\n]+)\s+Email : (?<email>[^\n]+)\s+Phone : (?<phone>[^\n]+)
Proof
https://regex101.com/r/XR7Mw5
Important Info
- Global match must be set to NO!
For more information, see Text Parser in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
Hope this helps!
3 Likes
Thank you so much, looks like it’s now working!
Yohan
2 Likes