🚀 New: Run requests via webhooks. Learn more
In this easy-to-follow guide, we'll use Data Fetcher and the Clearbit API to enrich a list of email leads (taken from a contact form) with extra information about the person and the company they work for.
For each email, we'll look up attributes such as the person's name, their LinkedIn handle and the industry of their company. You can then use this information to tailor your outreach to the leads.
We'll be using the Clearbit API, and this tutorial has no need for code.
Clearbit is sales intelligence software. It combines public and private data from the web about companies and makes this available through an API. Data Fetcher integrates with Clearbit, so there is no need to understand APIs to use their data.
First, create a new table in your Airtable base called 'Leads'. Keep the existing 'Name' field and add a new field called 'Email' with type 'Email'. Next, add a new field called 'Message' with type 'Long text'.
Enter the leads/ emails that you want to enrich, one in each record, in the 'Email' field.
Next, use the Create menu to generate a new Contact Form.
Remove the 'Name' field from the contact form.
Then set both the 'Email' and 'Message' fields to Required.
Next, you'll need to add Data Fetcher to your base from the Airtable marketplace. This free extension enables you to import many different types of data into Airtable.
After you have added the Data Fetcher extension to your Airtable base, either create a free Data Fetcher account or sign in to your existing account using the 'Have an account?' button on the bottom left of the screen.
It's also easy to sign-up to Data Fetcher with your Google account by selecting 'Continue with Google'.
Select 'Create your first request' from the Data Fetcher home screen. Data Fetcher requests enable us to import our data. You can create multiple requests for each Airtable base within Data Fetcher, although you can only add one extension per base on the Airtable Free plan.
On the create request screen, select 'Clearbit' for Application.
Under Authorization Copy and paste your (secret) API key into Data Fetcher.
For Endpoint select 'Look up person & company info from email address(es)'
Enter a Name for your request such as 'Enrich Email Leads' and click 'Save & Continue'.
On the next screen, click the + button and add a reference to your Email field then click 'Confirm'.
The Email field should now contain a reference to your output table. Click 'Save & Run'.
The Response field mapping modal will open, where you are able to configure how the available fields from Clearbit will map to fields in your output table.
For each field name from Clearbit, you can either import it or filter it. For an imported field, you can either map it to an existing field or create a new field in your output table. You can also set the field type for each new field.
Click filter all to remove any pre-selected fields, then use the Find field search bar to locate the fields you want to import.
Map the 'Person name full name' field to the existing 'Name' field by clicking 'Existing field' and then selecting 'Name'.
Map 'Person linkedin handle' and 'Company name' to new fields.
Map 'Company domain' to a new URL field.
Map 'Company category industry' to a new field called 'Company industry' and 'Company metric employees' to a new field called Employees
Click 'Save & Run'.
Data Fetcher will create any fields that need to be created in the output table, then run the request and enrich the email leads with company and person information from the Clearbit API.
In order to run this request and enrich the email leads every time an email address is submitted from the contact form, we'll need to create an automation in Data Fetcher.
To do this, under Schedule, 'Turn on webhook for request' and then copy the URL.
Then click on Automations at the top of the screen and select 'When a form is submitted.
Under CONFIGURATION Select your table and contact form.
Then select 'Run script' from the Run actions menu.
Then paste the webhook into the Edit Script window.
Copy this script:
And paste it above the webhook in the script window in Airtable.
Next, replace YOUR_WEBHOOK_URL with your webhook URL.
Next, we want to replace
input.config().record_id with the Record Id from the trigger of the form being submitted.
Click on + Add input variable.
Add record_id into the Name box.
For Value select 'Record (from Step 1: When a form is submitted)'.
Insert 'Airtable record ID'.
Click 'Test' in order to Test output.
You should now see 'Test ran successfully'.
Next, turn on your Automation.
Now you can test your contact form by selecting 'Open form'.
Add an Email address and Message and click 'Submit'.
A new record will now be created in your output table, and the corresponding fields populated with the data available on your new contact.
Aug 9, 2022•
Rosie Threlfall•Currency ConversionWebhook