---
agent:
  instructions: "Use this search API to find a ready-to-deploy Next Gen Zap for what the user wants to automate, with keywords or a natural-language description, instead of reading every zap. Results are returned in Markdown, each with the zap's SKILL.md install guide."
  endpoint: "https://zapier.sh/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://zapier.sh/developers/"
---

# Deputy + Facebook Lead Ads (for Business admins) Integrations: Connect with Zapier MCP
> zapier.com/apps/deputy/integrations/facebook-lead-ads-beta
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate Deputy and Facebook Lead Ads (for Business admins) in minutes. Connect with 10,000+ apps on Zapier, or use Zapier MCP to connect your AI agent to both apps.

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).

## Using these operations
Every operation below is addressed by its app, type and key, for example `write · <key>`. Events from one app can start a run that calls functions in the other.

- **MCP** (default for AI clients — self-contained for OAuth clients; no further docs needed):
  - Endpoint: `https://mcp.zapier.com/api/v1/connect` (Streamable HTTP only; SSE is not supported).
  - Auth: OAuth 2.0 + PKCE + Dynamic Client Registration. Do not create a server at `mcp.zapier.com` or ask for an API token; Zapier auto-provisions the server during browser sign-in.
  - Client setup: Claude Code `claude mcp add --transport http zapier https://mcp.zapier.com/api/v1/connect`; Cursor `mcp.json` `{ "type": "http", "url": "https://mcp.zapier.com/api/v1/connect" }`; VS Code and other clients `mcp.json` `{ "type": "http", "url": "https://mcp.zapier.com/api/v1/connect" }`; OpenCode `opencode.json` `{ "type": "remote", "url": "https://mcp.zapier.com/api/v1/connect" }`; Terminal auto-installer `npx @zapier/install-zapier`.
  - Setup guides: Claude https://docs.zapier.com/mcp/get-started/connect/claude.md; Claude Code https://docs.zapier.com/mcp/get-started/connect/claude-code.md; ChatGPT https://docs.zapier.com/mcp/get-started/connect/chatgpt.md; Cursor https://docs.zapier.com/mcp/get-started/connect/cursor.md; Codex https://docs.zapier.com/mcp/get-started/connect/codex.md.
  - After sign-in: call `discover_zapier_actions` for `deputy` and `facebook-lead-ads-beta`, then `enable_zapier_action`. If Deputy or Facebook Lead Ads (for Business admins) isn't connected in Zapier yet, running an action returns a browser OAuth link for the user.
- **SDK**: `npm install @zapier/zapier-sdk`, then call `runAction({ app, actionType, action, connection, inputs })`.
- **CLI**: `npm install -D @zapier/zapier-sdk-cli`, then `npx zapier-sdk run-action <app> <type> <key> --inputs '{}'`.

### Example
- **MCP**: once Create Lead Ad is enabled, call `facebook_lead_ads_for_business_admins_create_lead_`. Each operation below lists its MCP tool name.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: connection } = await zapier.findFirstConnection({ app: "facebook-lead-ads-beta", owner: "me" });

const { data } = await zapier.runAction({
  app: "facebook-lead-ads-beta",
  actionType: "write",
  action: "leadAd",
  connection: connection.id,
  inputs: {
    adName: "", // Ad Name
    adset_id: "",
    creativeName: "", // Creative Name
    message: "", // Message
    link: "", // Link
    form: "",
    action_type: "", // Call to action
    status: "", // Status
  },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action facebook-lead-ads-beta write leadAd \
  --inputs '{"adName":"","adset_id":"","creativeName":"","message":"","link":"","form":"","action_type":"","status":""}'
```

## Deputy

### Identity
Deputy is an all-in-one employee scheduling, timesheets, tasking and communication platform. Used by thousands of businesses around the world it will improve profitability, staff culture and operational accountability.

- App slug: deputy
- Operations published here: 28 (15 events, 11 functions, 2 queries)

### Authentication
Zapier connects to Deputy via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.130.2 and @zapier/zapier-sdk-cli v0.93.2; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection deputy
```

### Capabilities

#### Events (15)

Events fire when something happens in Deputy. Use them to start a run.

##### New Colleague
Triggers when a new individual is added to your workplace, you can see them here. This is subject to you have workplace visibility.

- Type: read · Key: `mycolleague`
- Requires: nothing
- MCP tool: `deputy_new_colleague` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "mycolleague" })`
- CLI: `npx zapier-sdk run-action deputy read mycolleague`

##### New Area/Department
Triggers when there is a new area or department created.

- Type: read · Key: `mydepartment`
- Requires: nothing
- MCP tool: `deputy_new_area_department` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "mydepartment" })`
- CLI: `npx zapier-sdk run-action deputy read mydepartment`

##### New Post
Triggers when a new newsfeed post arrives.

- Type: read · Key: `mymemo`
- Requires: nothing
- MCP tool: `deputy_new_post` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "mymemo" })`
- CLI: `npx zapier-sdk run-action deputy read mymemo`

##### New My Schedule
Triggers when there is a new schedule for me.

- Type: read · Key: `myroster`
- Requires: nothing
- MCP tool: `deputy_new_my_schedule` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "myroster" })`
- CLI: `npx zapier-sdk run-action deputy read myroster`

##### New My Timesheet
Triggers when there is a new timesheet that has been saved for me.

- Type: read · Key: `mytimesheet`
- Requires: nothing
- MCP tool: `deputy_new_my_timesheet` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "mytimesheet" })`
- CLI: `npx zapier-sdk run-action deputy read mytimesheet`

##### Break Started or Finished
Triggers when a employee starts or ends their break.

- Type: read · Key: `newbreak`
- Requires: event
- MCP tool: `deputy_break_started_or_finished` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newbreak" })`
- CLI: `npx zapier-sdk run-action deputy read newbreak`

##### New Location
Triggers when there is a new location or company.

- Type: read · Key: `newcompany`
- Requires: nothing
- MCP tool: `deputy_new_location` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newcompany" })`
- CLI: `npx zapier-sdk run-action deputy read newcompany`

##### New Employee
Triggers when there is a new employee created.

- Type: read · Key: `newemp`
- Requires: nothing
- MCP tool: `deputy_new_employee` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newemp" })`
- CLI: `npx zapier-sdk run-action deputy read newemp`

##### Forgot to End Shift (Timesheet Incomplete)
Triggers when a timesheet needs to be completed, because an employee has forgotten to end their shift.

- Type: read · Key: `newforgotfinish`
- Requires: nothing
- MCP tool: `deputy_forgot_to_end_shift_timesheet_incomplete` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newforgotfinish" })`
- CLI: `npx zapier-sdk run-action deputy read newforgotfinish`

##### New Late Employee
Triggers when someone is late to start their shift.

- Type: read · Key: `newlate`
- Requires: nothing
- MCP tool: `deputy_new_late_employee` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newlate" })`
- CLI: `npx zapier-sdk run-action deputy read newlate`

##### New Leave
Triggers when a new Leave request is submitted

- Type: read · Key: `newleave`
- Requires: nothing
- MCP tool: `deputy_new_leave` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newleave" })`
- CLI: `npx zapier-sdk run-action deputy read newleave`

##### New Notification
Triggers when there is a new notification for you.

- Type: read · Key: `newnotification`
- Requires: nothing
- MCP tool: `deputy_new_notification` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newnotification" })`
- CLI: `npx zapier-sdk run-action deputy read newnotification`

##### New Role
Triggers when New Role/Persmission set.

- Type: read · Key: `newrole`
- Requires: nothing
- MCP tool: `deputy_new_role` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newrole" })`
- CLI: `npx zapier-sdk run-action deputy read newrole`

##### New Schedule
Triggers when there is a new schedule

- Type: read · Key: `newroster`
- Requires: nothing
- MCP tool: `deputy_new_schedule` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "newroster" })`
- CLI: `npx zapier-sdk run-action deputy read newroster`

##### Get New Timesheets
Lists all the new timesheets

- Type: read · Key: `timesheets`
- Requires: nothing
- MCP tool: `deputy_get_new_timesheets` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "read", action: "timesheets" })`
- CLI: `npx zapier-sdk run-action deputy read timesheets`

#### Functions (11)

Functions change something in Deputy.

##### Create Employee
Creates a new staff member.

- Type: write · Key: `createemp`
- Requires: intCompanyId, strFirstName, strLastName, strEmail, blnSendInvite
- Optional: intRoleId, strMobilePhone, strPayrollId
- MCP tool: `deputy_create_employee` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "createemp" })`
- CLI: `npx zapier-sdk run-action deputy write createemp`

##### Create Location
Creates a new location.

- Type: write · Key: `createlocation`
- Requires: strWorkplaceName, strAddress
- Optional: strWorkplaceCode, strAddressNotes, strPayrollExportCode, strTimezone
- MCP tool: `deputy_create_location` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "createlocation" })`
- CLI: `npx zapier-sdk run-action deputy write createlocation`

##### Create Announcement
Creates a new announcement

- Type: write · Key: `creatememo`
- Requires: strContent
- Optional: arrAssignedCompanyIds, arrAssignedUserIds
- MCP tool: `deputy_create_announcement` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "creatememo" })`
- CLI: `npx zapier-sdk run-action deputy write creatememo`

##### Create Area/Department
Creates an area or department.

- Type: write · Key: `createopunit`
- Requires: Company, OperationalUnitName
- Optional: PayrollExportCode
- MCP tool: `deputy_create_area_department` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "createopunit" })`
- CLI: `npx zapier-sdk run-action deputy write createopunit`

##### Create Shift
Creates a new shift.

- Type: write · Key: `createshift`
- Requires: intStartTimestamp, intEndTimestamp
- Optional: intRosterEmployee, blnPublish, intMealbreakMinute, intOpunitId, blnForceOverwrite, blnOpen, strComment, intConfirmStatus
- MCP tool: `deputy_create_shift` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "createshift" })`
- CLI: `npx zapier-sdk run-action deputy write createshift`

##### Create My Unavailability
Adds your unavailability to the calendar.

- Type: write · Key: `empavailability`
- Requires: intStartHour, intEndHour
- Optional: strComment
- MCP tool: `deputy_create_my_unavailability` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "empavailability" })`
- CLI: `npx zapier-sdk run-action deputy write empavailability`

##### Create Task
Creates a new task for the specificed employee

- Type: write · Key: `newmytask`
- Requires: strQuestion
- Optional: intUserResponsible, strComment, strDueDate
- MCP tool: `deputy_create_task` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "newmytask" })`
- CLI: `npx zapier-sdk run-action deputy write newmytask`

##### Create Sales Data
Creates a new sales data. Ideally this is an invoice or a transaction at it's most granular level. We overlay this data for schedule charting and other reporting.

- Type: write · Key: `salesdata`
- Requires: OperationalUnit, Timestamp, SalesRef, SalesQty, SalesAmount
- Optional: SalesType, Employee
- MCP tool: `deputy_create_sales_data` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "salesdata" })`
- CLI: `npx zapier-sdk run-action deputy write salesdata`

##### End Shift
Ends a shift that is in progress.

- Type: write · Key: `shiftend`
- Requires: intTimesheetId
- Optional: intMealbreakMinute
- MCP tool: `deputy_end_shift` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "shiftend" })`
- CLI: `npx zapier-sdk run-action deputy write shiftend`

##### Start Shift
Starts a shift for your staff.

- Type: write · Key: `shiftstart`
- Requires: intOpunitId, intEmployeeId
- MCP tool: `deputy_start_shift` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "shiftstart" })`
- CLI: `npx zapier-sdk run-action deputy write shiftstart`

##### Update Shift
Updates an existing Deputy shift.

- Type: write · Key: `updateshift`
- Requires: shiftId
- Optional: startDateTime, endDateTime, employeeId, publish, mealBreakMinutes, workAreaId, forceOverwrite, note
- MCP tool: `deputy_update_shift` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "write", action: "updateshift" })`
- CLI: `npx zapier-sdk run-action deputy write updateshift`

#### Queries (2)

Queries read from Deputy and return data. They change nothing.

##### Find Employee
Finds an employee by first and last name, with an optional email match

- Type: search · Key: `find_employee`
- Requires: firstName, lastName
- Optional: email
- MCP tool: `deputy_find_employee` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "search", action: "find_employee" })`
- CLI: `npx zapier-sdk run-action deputy search find_employee`

##### Find Shift
Finds shifts by employee, open status, earliest start, and latest end.

- Type: search · Key: `find_shift`
- Requires: nothing
- Optional: employeeId, startDateTime, endDateTime, isOpen
- MCP tool: `deputy_find_shift` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "deputy", actionType: "search", action: "find_shift" })`
- CLI: `npx zapier-sdk run-action deputy search find_shift`

## Facebook Lead Ads (for Business admins)

### Identity
Facebook lead ads make signing up for business information easy for people and more valuable for businesses. The Facebook lead ad app is useful for marketers who want to automate actions on their leads.

- App slug: facebook-lead-ads-beta
- Operations published here: 5 (2 events, 2 functions, 1 query)

### Authentication
Zapier connects to Facebook Lead Ads (for Business admins) via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.130.2 and @zapier/zapier-sdk-cli v0.93.2; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection facebook-lead-ads-beta
```

### Capabilities

#### Events (2)

Events fire when something happens in Facebook Lead Ads (for Business admins). Use them to start a run.

##### New Comment on Ad
Triggers when a new comment on an Ad is created.

- Type: read · Key: `comment_on_ad`
- Requires: ad_id
- MCP tool: `facebook_lead_ads_for_business_admins_new_comment_` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "facebook-lead-ads-beta", actionType: "read", action: "comment_on_ad" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads-beta read comment_on_ad`

##### New Lead
Triggers when a new lead is created.

- Type: read · Key: `lead`
- Requires: nothing
- Optional: form, FBLA_copy
- MCP tool: `facebook_lead_ads_for_business_admins_new_lead` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "facebook-lead-ads-beta", actionType: "read", action: "lead" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads-beta read lead`

#### Functions (2)

Functions change something in Facebook Lead Ads (for Business admins).

##### Create Lead Ad
Creates a new Lead Ad.

- Type: write · Key: `leadAd`
- Requires: adName, adset_id, creativeName, message, link, form, action_type, status
- Optional: description
- MCP tool: `facebook_lead_ads_for_business_admins_create_lead_` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "facebook-lead-ads-beta", actionType: "write", action: "leadAd" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads-beta write leadAd`

##### Create Ad Statistics Report
Creates a report of Ad Statistics

- Type: write · Key: `report_adstatistics`
- Requires: date_preset
- Optional: action_attribution_windows, breakdowns, level, fields
- MCP tool: `facebook_lead_ads_for_business_admins_create_ad_st` (before it's enabled, `execute_zapier_write_action` runs it)
- SDK: `runAction({ app: "facebook-lead-ads-beta", actionType: "write", action: "report_adstatistics" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads-beta write report_adstatistics`

#### Queries (1)

Queries read from Facebook Lead Ads (for Business admins) and return data. They change nothing.

##### Find Ad
Find Ad based on name.

- Type: search · Key: `find_ad`
- Requires: name
- MCP tool: `facebook_lead_ads_for_business_admins_find_ad` (before it's enabled, `execute_zapier_read_action` runs it)
- SDK: `runAction({ app: "facebook-lead-ads-beta", actionType: "search", action: "find_ad" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads-beta search find_ad`

## Frequently asked questions about automating with Deputy and Facebook Lead Ads (for Business admins)

### My AI agent already connects to my apps. Why add Zapier?

Your AI agent’s built-in or native connectors cover a limited set of popular apps. Zapier reaches 10,000+ apps and 90,000+ triggers and actions. Zapier also adds what your AI agent can’t: one place to manage logins and credentials, so you never paste an API key; automations that keep running after the chat closes, with fixes you can review when a run hits a snag; and the freedom to switch agent interfaces without starting over.

### Can’t my AI agent already run tasks on a schedule?

Most popular AI agents can run scheduled tasks. And for simple recurring jobs, that might be all you need. Automations that run on Zapier can run on a schedule too, but they can also start the moment something happens in your apps—like when a new lead/ticket comes in or you get an email reply. Zapier also uses AI only in the steps that need judgment, so routine steps like posting to Slack or updating Salesforce don’t burn model tokens.

### Why not have my AI agent write me a script?

You can, and the first version will probably work. The trouble comes later: a script needs somewhere to run, a way to hear about events, and someone to keep it going. If an API changes or a login expires, your script can quietly stop until you notice. It also holds your keys, often in a repo, where a leak can expose your accounts. With Zapier, your agent builds the automation, and you publish it. Zapier hosts it, handles your logins and credentials, and records every run. If a run fails, Zapier diagnoses what went wrong and prepares a fix you can review. Or you can decide which fixes Zapier can apply for you.

## Links
- Deputy integrations: zapier.com/apps/deputy/integrations.md
- Facebook Lead Ads (for Business admins) integrations: zapier.com/apps/facebook-lead-ads-beta/integrations.md
- Full page: zapier.com/apps/deputy/integrations/facebook-lead-ads-beta
- MCP quickstart (non-OAuth / connection-token clients): docs.zapier.com/mcp/get-started/quickstart.md
- SDK: npmjs.com/package/@zapier/zapier-sdk