Facebook Lead Ads Source Beta

Ingest your event data from Facebook Lead Ads into RudderStack.

Facebook Lead Ads is a popular lead generation marketing tool. It helps you generate leads at scale through forms, calling, and messaging solutions.

This guide will help you set up Facebook Lead Ads as a source in RudderStack.

Prerequisites

  • A Facebook business account.
  • You must have created a form for your Facebook page from where you want RudderStack to ingest the leads data.

Setup

  1. Go to your RudderStack dashboard and click Add Source. From the list of sources, select Facebook Lead Ads.
  2. Specify a name for your source and click Continue.
  3. Your Facebook Lead Ads source is now configured. Go to the Setup tab of the source and note the Webhook URL:
Facebook Lead Ads webhook URL

Configure webhook

  1. Go to your Business Tools page and click All Tools > Instant Forms.
Facebook Lead Ads setup
  1. Go to the CRM setup tab and search for Webhook.
Facebook Lead Ads CRM setup
  1. Under Select source, select the source from where you want to ingest the lead data. Then, select the required Ad Account, Page, and Form under Choose settings.
Facebook Lead Ads CRM setup source settings
  1. Under Select destination, click Create a new integration.
Facebook Lead Ads CRM setup destination settings
  1. Configure the below settings in the resulting window. You can also configure the other settings as per your requirement. Then, click Authorize to proceed.
SettingNotes
URLYour source webhook URL obtained in the Setup section.
MethodSet it to POST.
Facebook Lead Ads CRM setup webhook settings
  1. Specify a name for the integration and click Continue.
Facebook Lead Ads CRM setup specify integration name
  1. Go back to the CRM setup page where you will see the integration set up above. Click Continue to proceed.
Facebook Lead Ads CRM setup complete
  1. Optional: Add mappings and filters for incoming leads.

  2. Click Test connection to test this integration. Make any changes to the setup as required, then click Save & publish.

Facebook Lead Ads CRM setup complete

Supported mappings

RudderStack ingests the following Facebook Lead Ads properties as identify traits:

Facebook Lead Ads propertyRudderStack property
id
facebook_lead_id
userId
created_timeoriginalTimestamp
ISO 8601 format
full_namecontext.traits.name
first_namecontext.traits.firstName
last_namecontext.traits.lastName
date_of_birthcontext.traits.birthday
phone_numbercontext.traits.phone
emailcontext.traits.email
gendercontext.traits.gender
zip_codecontext.traits.address.zipCode
post_codecontext.traits.address.postalCode
statecontext.traits.address.state
citycontext.traits.address.city
countrycontext.traits.address.country
provincecontext.traits.address.province
street_addresscontext.traits.address.street
company_namecontext.traits.company.name

RudderStack maps any other fields apart from the above mappings directly into the context.traits object, for example, marital_status, job_title, work_email, military_status, custom_field_1, etc.

Sample payload and transformation

This section details how RudderStack receives the data from Facebook Lead Ads and creates the resulting payload.

A sample payload sent by Facebook Lead Ads is shown:

POST /v1/webhook?writeKey=<source_write_key> HTTP/1.1
Host: <webhook-domain>
content-type: application/x-www-form-urlencoded
accept: */*

id=3960271960958574&created_time=02%2F01%2F2025%2010%3A20&first_name=First&last_name=Last&phone_number=%2B910123456789&custome_field=custom&street_address=Blue%20Street&city=Bengaluru&state=Karnataka&country=IN&date_of_birth=01%2F01%2F2000 

RudderStack transforms the above payload into the following identify payload:

{
  "context": {
    "integration": {
      "name": "FacebookLeadAds"
    },
    "library": {
      "name": "unknown",
      "version": "unknown"
    },
    "traits": {
      "address": {
        "city": "Bengaluru",
        "country": "IN",
        "state": "Karnataka",
        "street": "Blue Street"
      },
      "birthday": "01/01/2000",
      "city": "Bengaluru",
      "country": "IN",
      "created_time": "02/01/2025 10:20",
      "custome_field": "custom",
      "date_of_birth": "01/01/2000",
      "firstName": "First",
      "first_name": "First",
      "id": "3960271960958574",
      "lastName": "Last",
      "last_name": "Last",
      "phone": "+910123456789",
      "phone_number": "+910123456789",
      "state": "Karnataka",
      "street_address": "some street"
    }
  },
  "integrations": {
    "FacebookLeadAds": false
  },
  "messageId": "message-id",
  "originalTimestamp": "2025-02-01T10:20:00.000Z",
  "receivedAt": "2025-03-12T04:36:59.001Z",
  "rudderId": "rudder-id",
  "type": "identify",
  "userId": "3960271960958574"
}

Questions? Contact us by email or on Slack