Integrations
/
Facebook

Send your Facebook Lead Ads data to Attio

How to use Zapier to transfer your historical Facebook Lead Ads data over to your Attio collection, and automatically create new entries for all future leads.

Prep: Connect Facebook Lead Ads to Zapier

Log in to your Zapier dashboard and click My Apps. Click Add Connection in the top-right and search for Facebook Lead Ads. If you get stuck, check out Zapier's guide to connecting Facebook Lead Ads.

Note: You can send up to 25,000 records per transfer. Keep in mind that each record that you migrate uses 1 Zapier task - how many tasks you can use per month depends on your Zapier plan.

Prep: Connect Attio to Zapier

Follow our guide on how to connect Attio to Zapier, making sure you've set up your API key for all permissions.

1. Migrate your data with Zapier Transfer

Zapier Transfer is a tool that sends existing data from one app to another. Learn more about Zapier Transfer.

To get started, head to Zapier Transfer and set up your transfer like this:

Use Zapier's Transfer tool to send data from Facebook to Attio

Progress to the Select your data source step and pick your Facebook Page and form (ad campaign) from the dropdowns. Next, select your Attio account and progress to the Map data from Facebook Lead Ads to Attio step.

In the Let’s take a look at your data step, filter down your data or choose all entries to send them to Attio. Confirm your selection and wait for Zapier Transfer to do the heavy lifting! You'll receive an email when the transfer is complete.

2. Build a custom Zap for new leads

Head to your Zapier dashboard and click the Create Zap button in the top left. Search Facebook Lead Ads from the App Event dialogue box and New Lead from the Trigger Event box that follows. Then select your Facebook Lead Ads account from the dropdown.

Next, pick your Facebook Page and Form (ad campaign) from the Set up trigger dropdowns. You can choose Any Form if you want leads from every ad you're running to be sent to Attio.

Click Continue and test your trigger.

Set the action you'd like to trigger your Zap

3. Format your data

Because Facebook collects full names as one text field, we'll tell Zapier to split that data in two (first and last name) before creating a new contact in Attio.

To do this, click the plus icon and pick Format from the options on the right of the Action box.

Next, choose Text from the Action Event dropdown. Select Continue and for Transform search for Split Text from the dropdown. From the Input dropdown we want to pick 1. Full Name. You can leave the Separator field blank. For Segment Index, pick First.

Use Zapier's Formatter tool to split first and last names into separate values

After you’ve tested it, add another Format action. Repeat the process again, but for the final step choose Last for Segment Index. Learn more about splitting text in Zapier.

4. Send new leads to Attio

a)

Next we'll tell Zapier to automatically create new contacts in Attio for every new lead. Add another action step and choose Attio from the App Event dropdown. Choose Find or Create Person and proceed to select your Attio account. In the Set up action step, you'll want to set it up like this:

Locate an existing person or create a new one in your Attio workspace

b)

To bring across your lead's company name, we'll need to add a step to create a company in Attio.

Add an action step and choose Attio. Pick Find or Create Company from the dropdown and when prompted, choose your Attio account. In the Set up Action step, scroll to 1. Company name in the Name dropdown. You can leave Domains blank. Test your action and click Continue.

5. Link your contact with their company

Next, we'll tell Zapier to link everything together in Attio. Add an action step and choose Attio. For Action Event, pick Link Person and Company. Choose your Attio account when prompted, and set your action up like this:

Attio treats people and companies differently - use this step to link the two records

Note: The string of characters that follows both Company and Person Record ID fields will differ from those pictured in this guide.

6. Add your contact to a collection

Finally, we'll send your contact (complete with split names and their company) to your Attio collection.

Add one final action step and once again pick Attio from the dropdown. Choose Find or Create Entry from the Action Event dropdown and pick your Attio account when prompted. Next, you'll want to set your action like this:

Create a new entry in your Attio collection using values from previous steps

Once your trigger is tested, your Zap is ready to go. Head to the top of the page to name your Zap, and turn it on with the switch on the top right.

Not only have you transferred all your existing Facebook Lead Ads data to your Attio collection, but now every new lead will be added too.

Steps