Inbox - Mail - Emails - Tools - Create a Mail Scraper Template


Scraper templates allow you to extract data from your emails to a CSV or to view in the Scraper Data tab. You do this by creating a template of values that are extracted from similar emails.

Setup & Recommendations

  • Before using the Create Mail Scraper Template Tool, you must have synced mail to Inbox.
  • You can customize your Mail Scraper Template to extract any data you wish.

Create a Mail Scraper Template

1. Navigate over to the Emails section of Inbox in Mail. This section has an envelope icon titled Emails when you hover over it.

2. Select the email you want to Create a Mail Scraper from in the table.

3. Click on the Tools button at the top right of the view or right-click the email from the table and click on Tools. This will bring up the Tools dialog for Inbox.

4. Click the dropdown and choose Create Mail Scraper Template.

5. Click Start.

6. This will open the Create Inbox Scraper Template Dialog. Here you can begin configuring the template with a unique name to identify it.

7. To add an Element to Export, mouse over the email and click the specific element which contains the data you want to extract. You can also click on the subject to find elements in the subject. The subject only supports the Text content type. You can extract specific information from the subject just like you would the email by following the instructions below.

8. The Add Template Element dialog will appear, and you can select a Name for the element to be displayed as the column header in the Scraper Data view or exported CSV.

9. The Content Type is how the data should be parsed. Usually, you will want to use Text. You can also use Link to extract links or Html to extract data that isn't available as text.

10. The Format Type is how the data should be formatted. Depending on what the data is, you can choose a number of formats to suit your needs.

11. The Regex AI section allows you to generate regex using ChatGPT to find more complicated or dynamic text that you can't easily parse or is not consistent. For example, If you are looking for the color in a big block of text but can't use any of the available format types to narrow it down, you can use Regex AI. Describe what you want to find and click Generate. This will use your configured ChatGPT provider, AYCD or OpenAI, to generate a Regex expression to find what you are looking for.

For example, I want to find the size of the selected text. Using numbers won't allow me to do this as there are too many other numbers that may appear.

By using "size" for the Text to Find and clicking Generate, following the prompts, and waiting for the output, it has generated a regex expression to narrow it down to what you need, all without having to know Regex!

Furthermore, you can narrow the output using the Format Type to get more refined data. In this case, I want to extract the second word after Size. However, you can also use the format type Numbers, but this will not include any standard sizing like Small, Medium, etc.

12. After you are happy with your element selection and formatting, click the Add button.

13. You can repeat the Add Template Element process until you have completely configured the Inbox Scraper Template. 

14. After you have selected all of your elements to Export, you can also add filters to the template to filter emails by the subject, sender, or specific body elements, which will help to ensure you are only exporting certain emails. You can confirm your filter is valid by clicking the Add Filter button. 

15. You can include Extra Fields to be exported as separate columns in the Scraper Data view. 

16. To automatically monitor your emails and input matching data from your Scraper Template to the Scraper Data view, click the Automatically scrape inboxes and send webhook notifications on the matching mail checkbox. To receive a webhook notification, you must have a webhook added in Inbox Settings.

17. After you have confirmed all of the template details, click Create.


18. This will add the Template to Scraper Templates. You can use the Run Email Scraper Tool on all your emails or just a selection of emails to extract the selected data to the Scraper Data view. You can learn more about how to use the Run Email Scraper Tool here.


Was this article helpful?
0 out of 2 found this helpful



Article is closed for comments.