Parse an Email Address into PDF – Step-by-step Guide
- PDF Sample for the Task
- Set up Zapier Action
- Document Parser Configuration
- Zap Test & Review
- Parsed Email Address Output
- Create the Email Address Parser Template
Step 1: PDF Sample for the Task
In this tutorial, we will show you how to parse an email address in a PDF using the PDF.co Document Parser and Zapier. We will use this sample PDF and parse the only email address that is added to it.
Screenshot of Sample PDF to Parse Email Address
Step 2: Set up Zapier Action
First, let’s set up the Zapier action. Let’s choose PDF.co as the App and the Document Parser as the Action Event.
Step 3: Document Parser Configuration
Next, let’s configure the Document Parser.
- In the Input field, enter or select the link to the PDF source file.
- In the Template Id field, enter the Template Id that you made to parse the email address. After you have created the template, you can get the Id here.
NOTE: You can check out our template creation guide for this template below.
Step 4: Zap Test & Review
Then, let’s send our Document Parser configuration to PDF.co to Test & Review.
Step 5: Parsed Email Address Output
Great! We have successfully parsed the email address from the PDF. PDF.co returned the value that you can use in your next action.
Create the Email Address Parser Template
In the PDF.co Document Parser Online Template Editor, click on the Load Test PDF or Image and select the PDF document. To follow along, you can get the sample PDF here.
Then, click on the +Add Object button and select the Add FIELD from RECTANGLE selection. This will allow us to select a specific area where we want to extract the email address. Resize the rectangle to fit the selection area.
In the Expression field, enter this Regex to extract the email address [a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
and tick off the Regex check box.
Run the template to see the result. Then click on the Save Template and Return button to get the Template Id.
In this tutorial, we learned how to set up the PDF.co Document in PDF.co to parse an email address from a PDF file. We also learned how to create a template to extract an email address in a specific area.