Learn how to automate adding Facebook Lead Ads leads to MongoDB with Pabbly Connect in this detailed tutorial. Follow our step-by-step guide for seamless integration.

Watch Step By Step Video Tutorial Below


1. Introduction to Pabbly Connect for Facebook Lead Ads

In this section, we will explore how Pabbly Connect serves as the central platform for integrating Facebook Lead Ads with MongoDB. This integration allows you to automate the process of adding new leads directly into your MongoDB database.

By using Pabbly Connect, you can ensure that every lead generated from your Facebook ads is captured efficiently. This eliminates the need for manual data entry and streamlines your workflow significantly.


2. Creating a Workflow in Pabbly Connect

To get started, log in to your Pabbly Connect account and navigate to the dashboard. Click on the ‘Create Workflow’ button to initiate a new automation.

  • Name your workflow, for example, ‘Facebook Lead Ads to MongoDB’.
  • Select the appropriate folder for your workflow.
  • Click on the ‘Create’ button to set up the workflow.

After creating the workflow, you will see two windows: the trigger window and the action window. The trigger window is where you will connect your Facebook Lead Ads account to Pabbly Connect.


3. Connecting Facebook Lead Ads to Pabbly Connect

In the trigger window, search for ‘Facebook Lead Ads’ and select it. Then, choose the trigger event as ‘New Lead Instant’ from the dropdown menu.

Click on the ‘Connect’ button and select ‘Add New Connection’. To connect your Facebook Lead Ads account, click on the ‘Connect with Facebook Lead’ button. This will prompt you to log in to your Facebook account if you haven’t done so already.

  • Select the Facebook page where your ads are running.
  • Choose the lead generation form you want to use.
  • Click on ‘Save and Send Test Request’ to capture a test lead.

Once you have set this up, Pabbly Connect will wait for a new lead to be generated through your Facebook ads.


4. Adding Leads to MongoDB Using Pabbly Connect

After capturing a test lead, scroll down to the action step and search for ‘MongoDB’. Select it and choose the action event as ‘Create Record’.

Click on the ‘Connect’ button and select ‘Add New Connection’. Here, you will need to enter your MongoDB connection string, which you can obtain from your MongoDB account.

Add your current IP address to MongoDB’s network access settings. Copy the connection string from the cluster section in MongoDB. Paste it into Pabbly Connect and enter your database name.

Once you have connected MongoDB, specify the collection name where you want to store the lead details. In this case, it will be the ‘leads’ collection.


5. Testing the Integration with Pabbly Connect

After setting up the connection and specifying the collection name, you need to create a JSON body to format the data. Click on the ‘Custom JSON’ button and enter the lead details you want to save.

Map the responses from the Facebook Lead Ads trigger to the JSON body. Include fields such as name, email, phone number, and zip code. This ensures that the correct data is sent to MongoDB.

Click on ‘Save and Send Test Request’ to finalize the setup. Verify that the lead details appear in your MongoDB database. Repeat the process to ensure everything works seamlessly.

Once confirmed, your automation is complete! Every new lead generated from Facebook will be automatically added to your MongoDB database via Pabbly Connect.


Conclusion

In this tutorial, we demonstrated how to use Pabbly Connect to automate the process of adding Facebook Lead Ads leads to MongoDB. This integration enhances your workflow by ensuring that all lead data is captured efficiently and accurately.

Ensure you check out Pabbly Connect to create business automation workflows and reduce manual tasks. Pabbly Connect currently offer integration with 2,000+ applications.

By following the steps outlined above, you can set up this automation easily and start benefiting from streamlined data management.