AGENT?GET /zapier/awesome-zaps/log-facebook-leads-to-google-sheets-with-ai/SKILL.mdand deploy the files next to it
All zaps

Capture new leads from Facebook Lead Ads, analyze with AI, and log in Google Sheets

Each new Facebook lead is logged to your Google Sheet with its details, plus the first and last name and a person-or-business flag that AI reads from the name.

Install it

For your agent
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/log-facebook-leads-to-google-sheets-with-ai/

Paste into Claude, ChatGPT, Cursor or any agent.

Apps it uses
Facebook Lead AdsAI by ZapierGoogle Sheets
Author
Zapier
Source
zapier/awesome-zaps, folder zaps/log-facebook-leads-to-google-sheets-with-ai

Set it up with the CLI

  1. Add it. Copies the folder into zaps/log-facebook-leads-to-google-sheets-with-ai/. Outside a project, it makes one first.
    npx zap-pack add awesome-zaps/log-facebook-leads-to-google-sheets-with-ai
  2. Fill in the values in config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say.
  3. Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
    npx zap-pack deploy log-facebook-leads-to-google-sheets-with-ai
  4. Check it. Its recent runs, with status and errors.
    npx zap-pack logs log-facebook-leads-to-google-sheets-with-ai

zaps/log-facebook-leads-to-google-sheets-with-ai/

Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.

What it does

  1. Trigger: a person submits a lead form on a Facebook Page (facebook-lead-ads, lead).
  2. AI by Zapier (get_completion) reads the submitter's full name and returns the first name, last name, a name_type of person, business or unclear, and a one-sentence note explaining that call. It never invents a name.
  3. Google Sheets adds one row with the lead ID, the submission time, the full name, email, phone, and the four values from the AI step.

The Zap writes one row per lead and never edits or deletes existing rows.

Ask the user

Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.

Setting Where What goes there
REPLACE_FACEBOOK_PAGE_ID triggers/lead.ts, page The Facebook Page whose lead forms start the Zap: ask which Page it is, then look up its ID with the user's Facebook Lead Ads connection
SPREADSHEET_ID config.ts The sheet that collects the leads: ask which sheet it is, then look up its ID (the long ID in its URL) with the user's Google Sheets connection

Also review the defaults with them:

  • The trigger listens to any form on the Page. To start it from one form only, add a form param in triggers/lead.ts with that form's ID.
  • WORKSHEET_ID: the tab holding the leads. "0" is the first tab.
  • COLUMN_* values in config.ts: column keys such as COL$A, not header names. Map the user's headers to their column letters, one for each value the Zap writes.
  • MODEL_ID: standard/auto by default. Change it only if they want a stronger model.

Before turning it on, sample a lead with the Facebook Lead Ads connection and confirm the keys FULL_NAME, EMAIL and PHONE_NUMBER exist. Facebook's standard questions arrive in uppercase; custom questions use the key the form defines, so rename the keys in workflow.ts to match.

Build it

If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/log-facebook-leads-to-google-sheets-with-ai, replace each REPLACE_… value as this file says, then run npx zap-pack deploy log-facebook-leads-to-google-sheets-with-ai, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.

  1. Accounts: bind facebook-lead-ads to the user's Facebook Lead Ads connection for the Page, and google-sheets to the user's Google Sheets connection for the account that owns the lead sheet. AI by Zapier needs no connection; it uses Zapier-managed credentials (authentication_id "0").
  2. Source: publish workflow.ts and config.ts, with each REPLACE_… replaced by the user's answer. triggers/lead.ts and connections/ are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger's selected_api, call search_triggers with that slug, find the row whose key is the trigger's event, and use <app_key>@<app_version> from it.
  3. Build guide: load Zapier's build guide with get_zapier_skill("zapier:build-workflows") and follow it to create, test and publish the workflow.
  4. Fields: inspect each action's fields with the user's connections (and sample the trigger) before the first test run. Fix any key in workflow.ts that doesn't match, including the COL$ keys and the AI step's outputFields.

Test it

Run this sample as a draft test (run_workflow_draft in Zapier MCP), with a test lead the user sets up for this, not a real one:

{
  "id": "install-test-lead-0001",
  "created_time": "2026-10-29T10:15:00+0000",
  "FULL_NAME": "[install-test] Jordan Rivera",
  "EMAIL": "install-test+lead@example.com",
  "PHONE_NUMBER": "+1 (555) 010-2030"
}

Confirm one new row in the sheet with the lead ID, the timestamp, the name and contact fields, Jordan and Rivera in the name columns, and person in the name-type column with a short note. If run-status tools aren't available, check the result in Google Sheets directly. The user deletes the test row, not the agent.

Notes

  • The AI step only reads the name. It doesn't see the email or phone, so the name-type flag is a guess from the name alone. Review the flag on a few rows before relying on it.
  • Each lead adds a row, so a lead that is submitted twice adds two rows. Add a lookup step before the row write if duplicates matter.
  • Google Sheets may show the timestamp in the sheet's own format and time zone.
  • Never commit a real spreadsheet ID.
  • To notify the team of each lead, add a Slack or email step after the row write.