Inbox - Mail - Emails - Tools - Create AI Scraper / Mail Scraper Template

Introduction

Scraper templates allow you to extract data from your emails to a CSV or view it in the Scraper Data tab. You can scrape various data from emails, such as order confirmations, product names, order totals, raffle wins, purchase links, verification links, and more. 

Setup & Recommendations

Create AI Mail Scraper Template

1. Navigate to the Emails section of Inbox in Mail. When you hover over it, you will see an envelope icon titled Emails.

2. Select the email from which you want to create an AI Mail Scraper in the tableview. 

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. Select the Create Mail Scraper Template option. 

5. Select the Scraper AI Template Type.

6. Click the Next button.

7. The Create Mail Scraper template will appear. Specify a Name for the Scraper Template.

8. Specify which element(s) you want to scrape. You should write them similarly to how they are listed in the email. For example, if you want to scrape the Color from Supreme Order Confirmation emails, they refer to the Color as Style, so instead of writing color, you should write Style.

9. Repeat this process for each element you want to scrape. 

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

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

12. You can configure a Webhook Format to receive webhook notifications when your emails are scraped, which can include elements in your scraper template. Click here to learn how to configure webhook format.

13. After configuring the AI scraper template, click the Save button.

14. Click here to learn how to run your newly created scraper template.

Create Standard Mail Scraper Template

1. Navigate to the Emails section of Inbox in Mail. When you hover over it, you will see an envelope icon titled Emails.

2. Select the email from which you want to create an AI Mail Scraper in the tableview. 

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. Select the Create Mail Scraper Template option. 

5. Select the Standard template type. 

6. Click the Next button.

7. The Create Mail Scraper template will appear. Specify a Name for the Scraper Template.

8. To select an element you want to scrape, mouse over the email and click the specific element that contains the data you want to extract.

  • You can also click on the subject to find elements in the subject.

9. 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.

10. 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 is unavailable as text.

11. Text Format Type is how the data should be formatted. Depending on the data, you can choose various formats to suit your needs.

12. The Regex AI section allows you to use ChatGPT to find more complicated or dynamic text that Content Type cannot easily parse or is inconsistent. For example, you can use Regex AI if you are looking for the color in a big block of text but cannot use any of the available format types to narrow it down. 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 want.

For example, I want to find the size in the graphic below. Using the content type Text and the format type Numbers will not allow me to do this, as too many other numbers 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.

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. You can also use the format type Numbers, but this will not include any standard sizing like Small, Medium, etc.

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

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

15. 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. This will help ensure you are only exporting certain emails. You can confirm that your filter is valid by clicking the Add Filter button. 

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

17. 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 to Inbox Settings.

18. You can configure a Webhook Format to receive webhook notifications when your emails are scraped, which can include elements in your scraper template. Click here to learn how to configure webhook format.

19. After you have confirmed all of the scraper template details, click the Create button.

20. 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. Click here to learn how to run your newly created scraper template.

 

Was this article helpful?
1 out of 4 found this helpful

Comments

0 comments

Article is closed for comments.