Build a Lead Generator in 5 Minutes with Typeform, Clearbit, Airtable and Standard Library
Tags: node, javascript, marketing, software
Published: 2018-09-27 07:55:49

---
title: Build a Lead Generator in 5 Minutes with Typeform, Clearbit, Airtable and Standard Library
published: true
description: Looking to generate leads for your business, or qualify them after you've received some information from a service like TypeF=form? This tutorial is for you! We're going to be using Typeform as a lead intake form, and then use Standard Library to both connect to the Clearbit API to qualify those leads and store the updated lead information in AirTable.
tags: nodejs, javascript, marketing, software
---

[Looking to generate leads for your business](https://medium.com/@janeth_10755/build-a-lead-generator-in-5-minutes-with-typeform-clearbit-airtable-and-standard-library-2d8847846839), or qualify them after you've received some information from a service like Typeform? This tutorial is for you! We're going to be using Typeform as a lead intake form, and then use Standard Library to both connect to the Clearbit API to qualify those leads and store the updated lead information in AirTable.


[![](https://thepracticaldev.s3.amazonaws.com/i/q7jkbb3afwzfs4j0q1n9.png)](https://www.youtube.com/watch?v=doSjS1SR1Ss) 

When a lead submits a Typeform your Airtable Base is instantly populated with lead's data gathered by Clearbit.

To do this, we'll be using [Standard Library's](https://stdlib.com) simple API-centric cloud platform and the online editor for APIs, [Code.xyz](https://code.xyz) - if you're not familiar with APIs yet, don't fret! All we mean is you'll be writing a little bit of your own custom business logic.

Marketers, CSMs, Sales Executives, this one's for you! 😉


# **What You'll Need Beforehand**

1x [Typeform](https://www.typeform.com/) free account - A platform for building dynamic online forms including landing pages, polls, quizzes and more.
1x [Clearbit](https://clearbit.com/)free account - Clearbit's Enrichment API takes an e-mail and returns a person's employment, title, website, Linkedin and more.
1x [Airtable](https://airtable.com/) free account - AirTable is a combination of a spreadsheet & database.
1x [Standard Library](https://stdlib.com) free account - A Platform for building and deploying APIs, linking software tools, powering Slack apps, automating tasks, and more. 
5x minutes (300x seconds) of your time - These tools, used together, will save you hours of work!

# **How it Works**🤓

When a lead submits his/her e-mail via your embedded Typeform, a webook will trigger an API you've built on Standard Library that sends a notification via **HTTP POST** request. The request body (containing the response data from Clearbit's Enrichment API) will be sent in **JSON** format to populate your Airtable base.

So let's get to it!

# **Minute 1: Fire Up Code.xyz From your Browser**

We will link Typeform, Clearbit, and Airtable via [Code.xyz](https://code.xyz) - the online API editor built by the team at [Standard Library](https://stdlib.com). You'll be deploying your function to Standard Library with zero setup or installations on your local machine.

Once you've logged in to Code.xyz, click on the "**Community API Sources.**"

![](https://cdn-images-1.medium.com/max/1440/1*hM5zE24oT2HbZAb9W6iVpA.png)

Find and select **"typeform-clearbit-airtable by @JanethL."**

![](https://cdn-images-1.medium.com/max/1440/1*nSLAmpmSIdmOLHWOgmkJ3g.png) 

Make sure to give your API a unique name, for example:

![](https://cdn-images-1.medium.com/max/1440/1*C-bNQRRahmG9Yam48ccUYA.png)

Once loaded, you will be taken to the `__main__.js` located under the `functions` directory (folder). This is the code that will connect your Typeform to Clearbit's Enrichment API and to Airtable. Once it is deployed live onto Standard Library, an https url endpoint is generated. You'll need the endpoint to set your webhook on Typeform. But let's not get too far ahead - first, we need to finish setting up your Standard Library API with your unique Clearbit and Airtable keys.

![](https://cdn-images-1.medium.com/max/1440/1*pOBjISuRJVILN8NifFWTlg.png)

Open up the `env.json` file. You'll see three different variables:

![](https://cdn-images-1.medium.com/max/1440/1*4JLUOz19Jz6inbmtoKQnBw.png)

Let's start by finding your Clearbit API key.

**Minute 2: Copy and Paste Your Clearbit API Key**

First you'll want to log in, or sign up for a free Clearbit account at https://clearbit.com/.

![](https://cdn-images-1.medium.com/max/1440/1*Bx13Ecsu3PWON6hnP7Uk3Q.png)

*Note that below your keys, Clearbit has suppression settings to exclude certain contacts from your enrichment project to satisfy **(GDPR)**.*

Now return to Code.xyz and populate the `"CLEARBIT_API_KEY":` variables inside `env.json.` We now have two remaining variables to populate. 

**Minute 3: Find Your API Keys on Airtable**

Once you've logged in or signed up for Airtable, select the account icon on the top right corner to see your account information. Click generate API key and copy and paste that key into `"AIRTABLE_API_KEY": ""` inside your `env.json` file.

![](https://cdn-images-1.medium.com/max/1440/1*lNdaApMIRho5IyPZ6X8ttw.png) 

Now, for the last variable, click the link below and once routed to my Airtable Base sample, select **Copy base** on the upper right corner. It's your base now!

https://airtable.com/invite/l?inviteId=invcdodb7YgOFx7uS&inviteToken=540e9ae9d02ff30b0c089aab4efa8db6d426cdcd42c61f67b25a820fa98ca3ce

Once you've added a copy of my base onto your workspace, enter your "LeadGenerator" base. On the upper right corner click **Help** and then select **API documentation.**

![](https://cdn-images-1.medium.com/max/1440/1*Tys9RsG-Yhan_rmMoGMcVg.png)

Find and select your Airtable base key as I have done in the screenshot:

![](https://cdn-images-1.medium.com/max/1440/1*utQxzm-5_MQgjcwFNthvrA.png)

After you've copied and pasted your Base's key into your env.json, your env.json file should look like this:

![](https://cdn-images-1.medium.com/max/1440/1*58V8YFdm5r1KIHCumdXwyw.png)

You are finally ready to deploy your API to Standard Library. Return to the `__main__.js` file and hit the green "Run" button on the bottom right corner.

![](https://cdn-images-1.medium.com/max/1800/1*uKg6qMsYPlKpV7tpH4i-8Q.png)

We see a Parameter Error. Don't worry - this is normal. This notification means that we expect this API / webhook response to accept parameters we haven't provided in this test run (event_type and form_response). They'll be provided by the Typeform Webhook automatically.

Notice that Standard Library has automatically generated an API endpoint url underneath the **RESULTS** area.

![](https://cdn-images-1.medium.com/max/1440/1*nv3udRNPqSF--UyxM0C6Yw.png)

Copy that https endpoint, we will need it to set a web-hook on Typeform.

**Minute 4: Set a Webhook on Typeform **

Head over to Typeform to bring your lead generator to Life.

![](https://cdn-images-1.medium.com/max/1440/1*QIwEoMWzwYoKhWX6x_bfmw.png)

Once you've logged in or signed up, select ** "New typeform" ** from the dashboard. Find and select the **"Contact Form"** template.

For now, let's use this template as is; you can return at anytime to modify the style and questions to your liking. Select **"Integrate"** on the top menu.

![](https://cdn-images-1.medium.com/max/1440/1*MHK4AJ3nLg52h0IJDMaIyA.png)

Navigate to the upper middle tab and select "Integrate" and then ** "WEBHOOKS".**  

Input your API's endpoint url onto the Destination URL and toggle the **"Webhooks"** button on.

![](https://cdn-images-1.medium.com/max/1440/1*X_yUt2_J_PiT8DdtFfYAUQ.png)

**Minute 5: Test Your Lead Generator** 

Your Lead Generator is ready to test!  Select the "View" button on the upper right corner of your Typeform. 


Input a valid e-mail to test it out and answer the sample questions. If you've linked up Typeform, Clearbit, and Airtable properly your Airtable Base should automatically populate:

[![](https://thepracticaldev.s3.amazonaws.com/i/q7jkbb3afwzfs4j0q1n9.png)](https://www.youtube.com/watch?v=doSjS1SR1Ss)

**That's it! **  🤗
Thank you for taking the time to read and try this out! If you found this tutorial helpful please let me know! If you'd like to connect Clearbit, Typeform, and Airtable to any other tools or software, please reach out- I'd love to help. Just drop your name, e-mail, and request in the Typeform below and I'll get back to you as soon as possible!

[Click here to be routed to my Typeform](https://janeth24.typeform.com/to/JNUy9O)

*Janeth is the Community Manager for Standard Library and UC Berkeley grad- go bears! 🐻 She speaks Spanish, English, Arabic and a little JavaScript 😉*