Introduction
Extracting email addresses from text strings is a common requirement in data automation, whether you’re processing user input, scraping data, or organising contact lists. Manually sorting through large amounts of text can be tedious and error-prone. I’ll introduce you to a concept called regular expression and how we can use it in make.com.
See the below code block? Looks intimidating, right? Don’t panic. You’ll understand what this is and where to use it in make.com. If you know what you are doing, then just go ahead and copy it, and add it to a text parser module!
([a-zA-Z0-0_.]*@[a-zA-Z0-0_.]*\.[a-zA-Z0-0_.]*)
The Video Guide
Watch the video below for a step-by-step guide, or keep reading if you’d rather follow the written instructions!
Use Cases 🤔
Extracting email addresses from text strings has numerous practical applications across different industries. For businesses, it can streamline lead generation, automatically pulling emails from enquiry forms, chat logs, or support tickets to build a contact list.
In marketing automation, extracting emails from customer feedback, surveys, or social media interactions allows for better audience segmentation and targeted campaigns. Customer support teams can use this method to capture email addresses from unstructured data, such as support tickets or website submissions, ensuring quick and efficient responses.
My personal favourite is for sales representatives by integrating an email address within a channel on Slack or Microsoft Teams.
Image this – you’ve got a sales team that are out on the road generating leads. We all know that sales people aren’t great at updating a CRM system! Why not create a Slack channel where they can just fire their email address in a channel, extract it and then create an automated follow up. 🔥
Web Scraping
Web scraping is a powerful technique for collecting data from websites, and one of its most common applications is extracting email addresses. Businesses and researchers often use web scraping to gather contact details from directories, forums, and publicly available web pages. This can be particularly useful for lead generation, competitor analysis, or customer outreach.
By integrating web scraping with Make.com, you can automate the process of pulling email addresses from structured or unstructured web data. Using tools like the Text Parser module and regular expressions (regex), you can filter and extract only valid email addresses while ignoring irrelevant content.
However, it’s important to follow ethical and legal guidelines when scraping data. Always ensure you have permission to collect email addresses and comply with data protection laws such as GDPR and CAN-SPAM. Responsible web scraping, when done correctly, can significantly enhance automation workflows and data collection strategies. 🚀
Regular Expression
Regular expressions (regex) are a powerful tool for identifying and extracting specific patterns within text. When it comes to email extraction, regex allows you to accurately locate email addresses within large text blocks, ensuring precise and automated data retrieval.
In Make.com, you can use regex within the Text Parser module to define a pattern that matches valid email addresses. My preferred regex for email extraction is:
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}This pattern breaks down as follows:
[a-zA-Z0-9._%+-]+– Matches the username part of the email, allowing letters, numbers, and special characters like.,_,%,+, and-.@– Ensures that the extracted text includes the “@” symbol, which is required in email addresses.[a-zA-Z0-9.-]+– Matches the domain name, allowing letters, numbers, and dots.\.[a-zA-Z]{2,}– Ensures the domain extension (e.g., .com, .org, .uk) is at least two characters long.
If you are interesting in delving a little further, visit regex101.com to test out your own regular expression.
The Steps
- Open a new scenario in make.com.
- Select your data source (e.g a HTTP request that visits a website you want to scrape or a Slack channel where users post email addresses and text).
- Grab a ‘Text Parser – Match Pattern’ module.
- In the ‘pattern’ box, enter the regular expression (further up this page – in the code box).
- Map your data source field in the ‘text’ box.
- Test and enjoy!
Once you complete this initial process, your brain should start working and start to think of exciting use cases for your business 🙌
Conclusion
Extracting email addresses from text strings is a crucial task for businesses, marketers, and data analysts looking to streamline workflows and automate data collection. By leveraging Make.com and its powerful Text Parser module, you can efficiently identify and extract emails using regular expressions (regex), eliminating the need for manual data processing.
Throughout this guide, we’ve explored how to set up Make.com, configure the Text Parser module, and apply regex patterns to accurately extract email addresses. Whether you’re processing form submissions, scraping web data, or automating lead generation, these techniques will help you save time, reduce errors, and improve efficiency.
📺 Watch the tutorial: Extracting Email Addresses from a Text String | Make.com