Facebook Lead Ads Integration in WordPress Using Bit Flows

Estimated reading: 8 minutes 31 views

Facebook Lead Ads trigger lets you start a workflow when someone submits a lead form from your Facebook Page. It helps you collect lead data such as name, email, phone number, form ID, page ID, and submission time.

With Bit Flows, you can capture Facebook Lead Ads data and send it to your preferred tools automatically. You can store leads in a spreadsheet, create CRM contacts, send notifications, or pass the data to another app without manual work.

Step 01: Create a Flow in Bit Flows

First, install and activate Bit Flows on your WordPress site. After activation, go to the Bit Flows dashboard from your WordPress admin panel.

Click Create Flow to create a new workflow. Give the flow a clear name so you can identify it later. For example, you can name it Facebook Lead Ads to CRM or Facebook Lead Ads Automation.

Next, select Facebook Lead Ads as the trigger app. Then choose the New Lead trigger event. This trigger will start the workflow whenever a new lead is submitted through the selected Facebook Lead Form.

After selecting the trigger event, click Add Webhook. Then click Add Connection to create a new Facebook Lead Ads connection.

A connection popup will appear. Bit Flows will show the Callback URL in this popup. Copy this URL, because you will need to add it inside the Meta App settings. The same popup will also ask for the Client ID and Client Secret, which you will collect from your Meta App.

Note: The Facebook Lead Ads trigger is available in Bit Flows Pro. Make sure Bit Flows Pro is installed and activated before setting up this integration.

Step 02: Create a Meta App

Go to Meta for Developers and open My Apps. Click Create App to start creating a new app.

Enter an app name and contact email. You can use a simple name such as Ads Lead or Facebook Lead Ads. Then click Next to continue.

Step 03: Select the App Type

Now, select the other from the next screen and click Next to continue.

Select Business as the app type. This option is suitable because Facebook Lead Ads works with business assets such as Pages, ads, and lead forms. Click Next.

Note: Meta may show a use case screen before the app type screen. If you see that screen, select Other or Create an app without a use case, then continue.

Step 04: Confirm the App Details

Review the app name and contact email. If Meta asks for a Business Portfolio, select the correct one if available. If it is optional, you can continue without selecting one.

Click Create app. Meta may ask you to confirm your Facebook password before creating the app.

Step 05: Add the Required Products

After the app is created, go to the add products to your app section. And add these products:

  • Marketing API
  • Webhooks
  • Facebook Login for Business

Note: If the Marketing API opens a Quickstart page, you do not need to create an ad campaign there. Adding the product is enough for this setup.

Step 06: Add and Verify the OAuth Callback URL

Go to Bit Flows and open the workflow where you want to use Facebook Lead Ads.

Copy the Bit Flows Callback URL.

Now go back to your Meta App Dashboard and open Facebook Login for Business → Settings.

Find the Valid OAuth Redirect URIs field and paste the Bit Flows callback URL there.

Now use the Redirect URI Validator on the same page. Paste the same callback URL into the validator field and click Check URI. If Meta shows the URL as valid, continue to the next step. Keep these settings enabled:

  • Client OAuth login
  • Web OAuth login
  • Enforce HTTPS
  • Use Strict Mode for redirect URIs

Note: The callback URL must match exactly. A missing slash, wrong domain, or HTTP instead of HTTPS can cause a connection error.

Step 07: Complete the Basic App Settings

Go to App settings → Basic. Add your app domain without https://.

Example: yourdomain.com

Add your Privacy Policy URL and Terms of Service URL. You should also add a data deletion instructions URL under the User data deletion field. All pages links should be valid.

Select a relevant category, such as Business and Pages. Upload an app icon if you plan to use the app publicly. The recommended size is 1024 × 1024.

If the Data Protection Officer section applies to your business, fill it in. Otherwise, leave it blank.

Click Save changes after updating the page.

Step 08: Copy the App ID and App Secret

On the App settings → Basic page, you will see the App ID. Then click Show beside App Secret in Meta.

Copy the APP ID and App Secret and paste them into the Bit Flows Client ID and Client Secret fields.

Add a clear connection name, such as: Facebook Lead Ads connection. Then click Connect.

Note: Keep your App Secret private. Do not share it.

After clicking Connect, Facebook will open an authorization screen. Continue with your Facebook account. Select the Page you want to connect, or allow access to all current and future Pages if needed.

If Facebook asks for business access, select the related business assets and continue. After the connection is complete, Facebook will show a confirmation message. Click Got it. After a successful connection, it will redirect you to Bit Flows.

Step 09: Select the Page and Lead Form

In the Bit Flows Facebook Lead Ads trigger, select the Facebook Page that contains your lead form. Then select the Lead Form you want to use.

After selecting the Page and Lead Form, click Subscribe to Webhook. This connects the selected Facebook Lead Form with the Bit Flows webhook callback URL. After this, Facebook can send new lead events to Bit Flows.

If the Page or Lead Form does not appear, click the refresh icon beside the field and try again.

Note: Facebook allows only one webhook callback URL per app. If you create a new webhook for the same Meta app, it can replace the previous callback URL. Older workflows using a different callback URL may stop receiving lead events.

Step 10: Create a Lead Form for Testing

If you do not already have a Lead Form, create one from Meta Business Suite. Go to Meta Business Suite → All tools → Lead ads forms.

Click Create form and create a simple test form. Add fields such as full name, email, and phone number. Add your valid privacy policy URL, then publish the form.

After creating the form, return to Bit Flows and refresh the Lead Form field.

Note: If the Meta app is in Development Mode, Bit Flows may connect successfully but may not capture lead data. Switch the Meta app to Live Mode before testing lead capture.

enable the app mode to live

Step 11: Test the Lead Capture

Open the Facebook Lead Ads trigger in Bit Flows and click Listen Response. Now open the Meta Lead Ads Testing Tool.

Select the same Page, app, and Lead Form. Set the product to Lead Retrieval. Click Create lead.

If a test lead already exists, click Delete lead first, then create a new test lead.

Return to Bit Flows. If everything is set up correctly, Bit Flows will show Response captured and display the captured lead data.

The response may include values such as created_time, leadgen_id, page_id, form_id, and more details.

You can now add the next action to the workflow, such as sending the lead to Google Sheets, creating a CRM contact, sending an email notification, or passing the data to another app.

Troubleshooting

If Pages are not showing in Bit Flows, make sure the connected Facebook account has access to the Page. Reconnect the Facebook account if needed.

If Lead Forms are not showing, make sure the selected Page has a published Lead Form. Then click the refresh icon beside the Lead Form field.

If Bit Flows does not capture the response, check that you selected the correct Page and Lead Form, clicked Subscribe to Webhook, clicked Listen Response, and submitted a fresh test lead.

If the Meta app is still in Development Mode, Bit Flows may connect successfully but may not receive lead data. Switch the app to Live Mode and test again.

If the Lead Ads Testing Tool does not create a new lead, delete the previous test lead first and then create a new one.

If you see an OAuth redirect error, check the callback URL in Facebook Login for Business → Settings → Valid OAuth Redirect URIs. The URL must exactly match the callback URL shown in Bit Flows.

Share this Doc

Facebook Lead Ads Integration in WordPress Using Bit Flows

Or copy link

CONTENTS

Subscribe

×
Cancel