The following steps demonstrate how to extract data from monthly reports and send it via Gmail using PDF.co and Make.
- Create a Make Scenario
- Module Configuration
- Run the Module
- Gmail Module Set Up
- Gmail Module Configuration
- Run the Scenario
- Ways to Create a Template
For tutorial purposes, we will be using the analytics report below wherein we will extract from the table the highlighted value.
Screenshot of Sample Analytics Report
1. Create a Make Scenario
For starters, we will create a Make Scenario wherein we will be adding the PDF.co Parse a Document module.
2. Module Configuration
Now, we are going to configure the Document Parser module step-by-step:
- First, select Import a File from URL in the Input File field.
- This will be followed by entering the source link file in the URL field.
- The last step in this phase is to type in the template ID in the Document Parser Template ID field.
You can jump to the 3 Ways to Create the Document Parser Template section if you want to quickly see how we made the template to extract value in the table for this file.
NOTE: If you are new to PDF.co Document Parser, you can check out our guides here.
3. Run the Module
At this point, we will run the module and so it will automatically extract the selected value in the table.
4. Gmail Module Set Up
In this phase, we will set up the Gmail Send an email module in PDF.co.
5. Gmail Module Configuration
At this point, we will configure the Send Email module using the steps below and the image of our guide:
- First, tick the check box for Show advanced settings.
- Next, we will choose the email address we will use for sending the email in the From.
- Then, we will input the recipient’s email address in the To field.
- Now, type in the email’s subject in the Subject field.
- Finally, we will type in the message and incorporate the PDF.co parsed value in the Content field.
6. Run the Scenario
The email will be sent to the recipient once we run the Scenario, and it will appear as you see below:
Screenshot of the email sent to the recipient
3 Ways to Create the Document Parser Template
We will show you how to parse the value in the table using each of the three (3) different ways listed above. You can follow along with the process by getting the sample Monthly Report here.
Method 1: Using The Virtual Grid
Of the three methods in parsing a table value, the Virtual Grid object is considered the easiest way. We will start by clicking on the Add Object button in the Document Parser Online Template Editor, and then we will select the Add FIELD mapped from VIRTUAL GRID.
Now, click the Target icon button beside the Select Cell text field to open the table where the values appear in individual cells.
Next, we will select from the table the desired Value and click on the Use Selected Cell button.
Finally, the value we selected will be returned after we click on the Run Template button.
Method 2: Using The Macros
The second method for parsing a value in a table is by using the PDF.co Document Parser Macros. The Macros is composed of Regular Expressions and is designed to streamline search pattern creation.
We start with this option by clicking the Add Object button in the Document Parser Online Template Editor. Then, we will pick Add FIELD based on TEXT SEARCH.
Next, we will input the search pattern in the Expression field. To find the Organic Search, you can copy and paste this expression Organic Search{{Spaces}}(?{{Number}})
but it will only display the value 410. Then, on the Regex check box, put a checkmark.
The extracted value will be displayed after we click on the Run Template button.
Method 3: Using The Regex
As for the final option for parsing a table value, we will be using the Regular Expression or Regex. The same Add FIELD based on TEXT SEARCH object will be used in this 3rd method.
Paste this Organic Search\s+(\d+)
search pattern in the Expression field to get the value 410 in the table. Then, tick the Regex check box and Run the template.
You just learned how to use the PDF.co Document Parser to parse PDF data, as well as how to use the parsed text and email it via Gmail. Awesome! We also saw how each of the three (3) parsing techniques works in the Online Template Editor.