Connect with the API

Get Facebook Lead Ads into GuardenerAI.

Leads from Facebook Lead Ads can reach GuardenerAI in three ways, and none of them is a native integration: export a CSV from Meta and import it, let an automation tool such as Zapier or Make pick up each new lead and send it to the GuardenerAI API, or write your own code against Meta’s Graph API. Meta keeps leads available for 90 days, so whichever you choose, run it well inside that window.

Not a native integration. Leads move from Meta into GuardenerAI. GuardenerAI sends nothing back to Meta.

What you need

  • Access to the Facebook Page and ad account that run the lead form.
  • For the import route: a GuardenerAI user who can import records.
  • For the automation or code routes: a GuardenerAI API key with the Member role and Read and write scope, created by an admin under Settings, API keys.

Step by step

  1. Simplest: export a CSV and import it

    Download your leads from the lead form’s leads view in Meta Business Suite as a CSV, then load the file with the CSV importer in GuardenerAI and map the columns to lead fields. Choose CSV, not Excel: the importer reads CSV only. It suits a weekly routine or a short campaign.

  2. Hands-off: an automation tool

    In Zapier, start a Zap with the Facebook Lead Ads New Lead trigger and check that your Zapier plan includes it. In Make, use Watch Leads; Make needs Leads Access granted to it in your Meta business settings, and the form needs at least one submission before Make can load it. Then follow the same steps as any API connection: search GuardenerAI for the email, update the lead you find or create a new one.

    The create request your automation sends
    POST https://YOUR-ORG.guardenerai.com/api/leads
    X-Api-Key: <your key>
    Content-Type: application/json
    
    {
      "firstName": "Priya",
      "lastName": "Nolan",
      "email": "priya@harborbakery.example",
      "phone": "+1 555 0177",
      "message": "Interested in: spring catering menu",
      "sourceMedium": "facebook lead ad",
      "sourceCampaign": "spring catering"
    }
  3. Your own code: the Graph API

    Meta’s Graph API can notify your server through a webhook on the Page’s leadgen field. The notification carries only the lead id, so your code then fetches the lead itself, which needs a Meta app with the leads_retrieval permission and a Page access token. Map the answers to the lead fields and call GuardenerAI as in the other routes. This route has no third tool in between, but you run and maintain the code.

Before you rely on it

What to know about this connection.

With Facebook Lead Ads

  • Meta keeps lead form submissions retrievable for 90 days from when they were created. Leads older than that cannot be pulled, so do not let exports or failed automations sit.
  • Meta’s Leads Access settings can restrict which tools see your leads. If an automation tool sees nothing, check that it has been granted access there.
  • Lead form questions arrive as answer text. Anything beyond name, email, phone and company goes in message or in a custom field your admin has created.
  • The CSV importer skips real-time duplicate checks; the nightly duplicate scan flags repeats afterwards, and they can be merged from the review queue.

With every API connection

  • The key must have the Member role and Read and write scope. A Read only key gets a 403 on every write.
  • There is no upsert. Search for the record by email first, then create it or update the one you found.
  • There are no outbound webhooks. Data flows into GuardenerAI; nothing tells the other tool when a record changes, so anything reading back has to ask on a schedule.
  • Each key allows 10 requests per second. Above that the API answers 429 with Retry-After: 1, so wait a second and retry.
  • An update with PUT replaces the whole record. Send every field you want to keep, not only the one that changed.
  • If one of your duplicate rules blocks it, a create answers 409 duplicate_blocked with the matching records. Update the match instead of forcing a second copy.

Checked against Facebook Lead Ads’s own documentation: Meta: retrieving leads, Zapier Facebook Lead Ads, Make Facebook Lead Ads. Their plans and features change, so confirm the current details there.

Where it lands

The modules this feeds.

FAQ

Fair questions.

Does GuardenerAI connect to Facebook Lead Ads natively?
No. There is no built-in Facebook connector. You move the leads with a CSV import, an automation tool calling the public API, or your own code.
Which route should a small business pick?
If leads come in a few at a time and you want them within minutes, an automation tool. If you review leads once a week, the CSV export and import costs nothing extra. Write your own code only if you have someone to maintain it.
Will GuardenerAI tell my sales team when a Facebook lead arrives?
No. The lead is saved without an alert, so whoever owns follow-up should work the Leads list or a saved view. Your automation tool can notify your team itself if you add that step there.