# Facebook Lead Ads + Gestión Plagas Integrations: Connect with Zapier MCP
> zapier.com/apps/facebook-lead-ads/integrations/gestion-plagas
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate Facebook Lead Ads and Gestión Plagas 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).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## 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**: connect each app through mcp.zapier.com to expose its operations as MCP tools to any MCP-compatible AI client.
- **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**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · api_request`.
- **SDK**:

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

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "gestion-plagas", owner: "me" });

const { data } = await zapier.runAction({
  app: "gestion-plagas",
  actionType: "write",
  action: "api_request",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action gestion-plagas write api_request \
  --inputs '{}'
```

## Facebook Lead Ads

### 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
- Operations published here: 3 (1 event, 1 function, 1 query)

### Authentication
Zapier connects to Facebook Lead Ads 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.112.6 and @zapier/zapier-sdk-cli v0.84.6; 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
```

### Capabilities

#### Events (1)

Events fire when something happens in Facebook Lead Ads. Use them to start a run.

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

- Type: read · Key: `lead`
- Requires: page
- Optional: FBLA_copy, form, conversions_copy
- SDK: `runAction({ app: "facebook-lead-ads", actionType: "read", action: "lead" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads read lead`

#### Functions (1)

Functions change something in Facebook Lead Ads.

##### Send Funnel Event
Publishes lead updates from your funnel to Meta Conversions API.

- Type: write · Key: `send_funnel_event`
- Requires: business, event_destination, lifecycle_stage_name, lead_event_source
- Optional: conversions_api_help, event_timestamp, customer_info_help, lead_id, email, phone_number, fbc, custom_data_help, value, currency, content_id, content_name, content_category, additional_data, test_event_code
- SDK: `runAction({ app: "facebook-lead-ads", actionType: "write", action: "send_funnel_event" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads write send_funnel_event`

#### Queries (1)

Queries read from Facebook Lead Ads and return data. They change nothing.

##### Get Leads
Gets leads submitted to a lead form in the last 90 days, optionally filtered by the date they were created.

- Type: search · Key: `lead`
- Requires: page, form
- Optional: copy, created_after, created_before
- SDK: `runAction({ app: "facebook-lead-ads", actionType: "search", action: "lead" })`
- CLI: `npx zapier-sdk run-action facebook-lead-ads search lead`

## Gestión Plagas

### Identity
Gestión Plagas is a pest control management platform for customers, appointments, service reports, contracts, stock and invoicing.

- App slug: gestion-plagas
- Operations published here: 76 (42 events, 24 functions, 10 queries)

### Authentication
Zapier connects to Gestión Plagas via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; 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 gestion-plagas
```

### Capabilities

#### Events (42)

Events fire when something happens in Gestión Plagas. Use them to start a run.

##### New Product
Triggers when a new product is created.

- Type: read · Key: `evento_articulo_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_articulo_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_articulo_creado`

##### Updated Product
Triggers when a product is updated.

- Type: read · Key: `evento_articulo_modificado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_articulo_modificado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_articulo_modificado`

##### Appointment Attended
Triggers when an appointment is marked as attended.

- Type: read · Key: `evento_cita_atendida`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_atendida" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_atendida`

##### Appointment Cancelled
Triggers when an appointment is cancelled.

- Type: read · Key: `evento_cita_cancelada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_cancelada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_cancelada`

##### Appointment Confirmed
Triggers when an appointment is confirmed.

- Type: read · Key: `evento_cita_confirmada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_confirmada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_confirmada`

##### New Appointment
Triggers when a new appointment is created.

- Type: read · Key: `evento_cita_creada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_creada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_creada`

##### Sales Appointment Done
Triggers when a sales appointment is marked as done.

- Type: read · Key: `evento_cita_hecha`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_hecha" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_hecha`

##### Updated Appointment
Triggers when an appointment is changed, such as its date, time or technicians.

- Type: read · Key: `evento_cita_modificada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cita_modificada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cita_modificada`

##### New Customer
Triggers when a new customer is created.

- Type: read · Key: `evento_cliente_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cliente_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cliente_creado`

##### Updated Customer
Triggers when a customer is updated.

- Type: read · Key: `evento_cliente_modificado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cliente_modificado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cliente_modificado`

##### Contract Activated
Triggers when a contract becomes active.

- Type: read · Key: `evento_contrato_activado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_activado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_activado`

##### Contract Cancelled
Triggers when a contract is cancelled.

- Type: read · Key: `evento_contrato_cancelado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_cancelado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_cancelado`

##### New Contract
Triggers when a new contract is created.

- Type: read · Key: `evento_contrato_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_creado`

##### Contract Delivered
Triggers when a contract is delivered to the customer.

- Type: read · Key: `evento_contrato_entregado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_entregado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_entregado`

##### Contract Sent for Signature
Triggers when a contract is sent for signature.

- Type: read · Key: `evento_contrato_enviado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_enviado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_enviado`

##### Contract in Progress
Triggers when a contract moves to in progress.

- Type: read · Key: `evento_contrato_en_curso`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_en_curso" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_en_curso`

##### Contract Finished
Triggers when a contract is finished or terminated.

- Type: read · Key: `evento_contrato_finalizado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_finalizado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_finalizado`

##### Contract Signed
Triggers when a contract is signed by both parties.

- Type: read · Key: `evento_contrato_firmado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_firmado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_firmado`

##### Contract Renewed
Triggers when a contract is renewed.

- Type: read · Key: `evento_contrato_renovado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_renovado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_renovado`

##### Contract Expiring Soon
Triggers when a contract is about to expire.

- Type: read · Key: `evento_contrato_vence_pronto`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_contrato_vence_pronto" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_contrato_vence_pronto`

##### Any Event
Triggers when the event you choose happens.

- Type: read · Key: `evento_cualquiera`
- Requires: evento
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_cualquiera" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_cualquiera`

##### New Sales Document
Triggers when a new sales document is created.

- Type: read · Key: `evento_documento_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_documento_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_documento_creado`

##### Updated Sales Document
Triggers when a sales document is updated.

- Type: read · Key: `evento_documento_modificado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_documento_modificado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_documento_modificado`

##### Invoice Voided
Triggers when an invoice is voided.

- Type: read · Key: `evento_factura_anulada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_factura_anulada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_factura_anulada`

##### Invoice Paid
Triggers when an invoice is paid in full.

- Type: read · Key: `evento_factura_cobrada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_factura_cobrada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_factura_cobrada`

##### Invoice Issued
Triggers when an invoice is issued and gets its number.

- Type: read · Key: `evento_factura_emitida`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_factura_emitida" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_factura_emitida`

##### Invoice Sent
Triggers when an invoice is sent to the customer.

- Type: read · Key: `evento_factura_enviada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_factura_enviada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_factura_enviada`

##### Invoice Overdue
Triggers when an unpaid invoice becomes overdue.

- Type: read · Key: `evento_factura_vencida`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_factura_vencida" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_factura_vencida`

##### New Expense
Triggers when a new expense or supplier invoice is recorded.

- Type: read · Key: `evento_gasto_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_gasto_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_gasto_creado`

##### Expense Paid
Triggers when an expense is paid in full.

- Type: read · Key: `evento_gasto_pagado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_gasto_pagado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_gasto_pagado`

##### Incident Closed
Triggers when an incident is closed.

- Type: read · Key: `evento_incidencia_cerrada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_incidencia_cerrada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_incidencia_cerrada`

##### New Incident
Triggers when a new incident is created.

- Type: read · Key: `evento_incidencia_creada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_incidencia_creada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_incidencia_creada`

##### Incident Scheduled
Triggers when an incident is scheduled as an appointment.

- Type: read · Key: `evento_incidencia_programada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_incidencia_programada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_incidencia_programada`

##### Batch Expiring Soon
Triggers when a batch with stock is 30 days from its expiry date.

- Type: read · Key: `evento_lote_caduca`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_lote_caduca" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_lote_caduca`

##### New Opportunity
Triggers when a new opportunity is created.

- Type: read · Key: `evento_oportunidad_creada`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_oportunidad_creada" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_oportunidad_creada`

##### Opportunity Stage Changed
Triggers when an opportunity is moved to another stage.

- Type: read · Key: `evento_oportunidad_etapa`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_oportunidad_etapa" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_oportunidad_etapa`

##### Quote Accepted
Triggers when a quote is accepted by the customer.

- Type: read · Key: `evento_presupuesto_aceptado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_presupuesto_aceptado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_presupuesto_aceptado`

##### New Service Document
Triggers when a new service document is created.

- Type: read · Key: `evento_servicio_creado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_servicio_creado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_servicio_creado`

##### Service Document Delivered
Triggers when a service document is delivered to the customer.

- Type: read · Key: `evento_servicio_entregado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_servicio_entregado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_servicio_entregado`

##### Service Document Signed
Triggers when a service document is signed by the customer.

- Type: read · Key: `evento_servicio_firmado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_servicio_firmado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_servicio_firmado`

##### Low Stock
Triggers when a product falls below its minimum stock.

- Type: read · Key: `evento_stock_bajo`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_stock_bajo" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_stock_bajo`

##### Stock Changed
Triggers when the stock of a product changes.

- Type: read · Key: `evento_stock_cambiado`
- Requires: nothing
- SDK: `runAction({ app: "gestion-plagas", actionType: "read", action: "evento_stock_cambiado" })`
- CLI: `npx zapier-sdk run-action gestion-plagas read evento_stock_cambiado`

#### Functions (24)

Functions change something in Gestión Plagas.

##### API Request
Makes a raw request to the API using the authentication of this connection, except to payment, refund and banking endpoints.

- Type: write · Key: `api_request`
- Requires: metodo, ruta
- Optional: datos
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "api_request" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write api_request`

##### Attend Appointment
Marks an appointment as attended.

- Type: write · Key: `atender_cita`
- Requires: id
- Optional: generar_documento, lat, lng
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "atender_cita" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write atender_cita`

##### Cancel Appointment
Cancels an appointment.

- Type: write · Key: `cancelar_cita`
- Requires: id
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "cancelar_cita" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write cancelar_cita`

##### Convert Sales Document
Converts a sales document into an order, a delivery note or an invoice.

- Type: write · Key: `convertir_documento`
- Requires: id
- Optional: tipo
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "convertir_documento" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write convertir_documento`

##### Create Product
Creates a new product.

- Type: write · Key: `crear_articulo`
- Requires: nombre
- Optional: codigo, categoria, descripcion, codigo_barras, ref_proveedor, proveedor, fabricante, unidad, coste, margen, precio, descuento, tipo_iva, es_servicio, con_numero_serie, almacen_por_defecto, aviso_stock, stock_objetivo, activo, stock_seguridad, vender_sin_stock, es_pack, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_articulo" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_articulo`

##### Create Appointment
Creates a new appointment.

- Type: write · Key: `crear_cita`
- Requires: fecha
- Optional: hora, duracion_min, tipo_cita, cliente, direccion, contrato, tecnicos, estado, extra, detalles, notas_privadas, zonas_a_tratar, referencia, direccion_texto, telefono, poblacion, sede, hora_fija, ventana_desde, ventana_hasta, repetir, repetir_cada, periodicidad, fin, n_citas, fecha_fin, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_cita" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_cita`

##### Create Sales Appointment
Creates a new sales appointment.

- Type: write · Key: `crear_cita_comercial`
- Requires: titulo, fecha
- Optional: tipo, hora, duracion_min, usuario, cliente, contacto_nombre, contacto_telefono, contacto_email, oportunidad, presupuesto, contrato, lugar, notas, recordatorio_min, recordatorio_por, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_cita_comercial" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_cita_comercial`

##### Create Customer
Creates a new customer.

- Type: write · Key: `crear_cliente`
- Requires: razon_social
- Optional: nombre_comercial, nif, email, telefono, actividad, idioma, agente, sede, grupos, forma_pago, vencimiento_dias, plazos, dia_pago, tarifa, descuento, tipo_iva, irpf, recargo_equivalencia, no_comercial, iban, mandato_referencia, mandato_fecha, observaciones, direcciones, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_cliente" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_cliente`

##### Create Contract
Creates a new contract.

- Type: write · Key: `crear_contrato`
- Requires: cliente
- Optional: direccion, sede, fecha_inicio, fecha_fin, duracion_meses, gestionado_por, agente, comision_tipo, comision_valor, responsable, descripcion_breve, zonas_a_tratar, aviso_vencimiento_dias, autorrenovado, indicaciones_privadas, plantilla_clausulas, clausulas, banco_abono, serie, notas_privadas, texto_posterior, titulo, texto, plantilla, renovacion_automatica, lineas__articulo, lineas__concepto, lineas__descripcion, lineas__cantidad, lineas__precio, lineas__descuento, lineas__iva, lineas__tipo_iva, repetir_cada, periodicidad, forma_pago, metodo_pago, irpf, ciclo, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_contrato" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_contrato`

##### Create Sales Document
Creates a new sales document.

- Type: write · Key: `crear_documento`
- Requires: cliente
- Optional: tipo, fecha, estado, serie, direccion, sede, forma_pago, metodo_pago, agente, contrato, descripcion, irpf, vencimiento_dias, plazos, notas_privadas, banco_abono, emitir, vencimientos_manuales, vencimientos__fecha, vencimientos__importe, vencimientos__porcentaje, lineas__articulo, lineas__variante, lineas__concepto, lineas__descripcion, lineas__cantidad, lineas__precio, lineas__descuento, lineas__iva, lineas__tipo_iva, lineas__lote, lineas__numeros_serie, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_documento" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_documento`

##### Create Expense
Creates a new expense.

- Type: write · Key: `crear_gasto`
- Requires: proveedor, fecha
- Optional: tipo, numero_proveedor, fecha_vencimiento, base_imponible, tipo_iva, total_iva, irpf, tipo_gasto, descripcion, forma_pago, sede, pedido, almacen, lineas__articulo, lineas__concepto, lineas__cantidad, lineas__precio, lineas__iva, lineas__tipo_gasto, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_gasto" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_gasto`

##### Create Incident
Creates a new incident.

- Type: write · Key: `crear_incidencia`
- Requires: cliente, descripcion
- Optional: direccion, tipo_cita, fecha_deseada, hora_deseada, estado, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_incidencia" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_incidencia`

##### Create Opportunity
Creates a new opportunity.

- Type: write · Key: `crear_oportunidad`
- Requires: titulo
- Optional: cliente, contacto_nombre, contacto_empresa, contacto_email, contacto_telefono, direccion, poblacion, origen, servicio, importe, etapa, proxima_accion, proxima_fecha, responsable, sede, notas, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_oportunidad" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_oportunidad`

##### Create Service Document
Creates a new service document.

- Type: write · Key: `crear_servicio`
- Requires: cliente
- Optional: tipo, tipo_trabajo, direccion, fecha, tecnico, contrato, cita, tipo_documento, plantilla, segundo_tecnico, texto_previo, texto_posterior, materiales, con_diagnosis, con_certificado, con_parte, responsable_tecnico, datos_extra
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_servicio" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_servicio`

##### Create Contract Visits
Creates the appointments for the planned visits of a contract.

- Type: write · Key: `crear_visitas_contrato`
- Requires: id
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "crear_visitas_contrato" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write crear_visitas_contrato`

##### Issue Sales Document
Issues a draft sales document and assigns its number.

- Type: write · Key: `emitir_documento`
- Requires: id
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "emitir_documento" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write emitir_documento`

##### Mark Service Document as Delivered
Marks a service document as delivered to the customer.

- Type: write · Key: `entregar_servicio`
- Requires: id
- Optional: notificar
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "entregar_servicio" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write entregar_servicio`

##### Email Sales Document
Sends a sales document to the customer by email with its PDF.

- Type: write · Key: `enviar_email_documento`
- Requires: id
- Optional: mensaje
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "enviar_email_documento" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write enviar_email_documento`

##### Invoice Service Document
Creates a draft invoice from a service document.

- Type: write · Key: `facturar_servicio`
- Requires: id
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "facturar_servicio" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write facturar_servicio`

##### Generate Service Document From Appointment
Generates the service document of an appointment.

- Type: write · Key: `generar_documento_cita`
- Requires: id
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "generar_documento_cita" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write generar_documento_cita`

##### Complete Sales Appointment
Marks a sales appointment as done with its outcome.

- Type: write · Key: `hecha_cita_comercial`
- Requires: id
- Optional: resultado
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "hecha_cita_comercial" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write hecha_cita_comercial`

##### Move Opportunity to Stage
Moves an opportunity to another stage.

- Type: write · Key: `mover_oportunidad`
- Requires: id, etapa
- Optional: texto
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "mover_oportunidad" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write mover_oportunidad`

##### Schedule Incident as Appointment
Schedules an incident as an appointment.

- Type: write · Key: `programar_incidencia`
- Requires: id
- Optional: fecha, hora, duracion_min, tecnicos, tipo_cita
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "programar_incidencia" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write programar_incidencia`

##### Request Signature on Service Document
Sends the customer a link to sign a service document.

- Type: write · Key: `solicitar_firma_servicio`
- Requires: id
- Optional: email, canal
- SDK: `runAction({ app: "gestion-plagas", actionType: "write", action: "solicitar_firma_servicio" })`
- CLI: `npx zapier-sdk run-action gestion-plagas write solicitar_firma_servicio`

#### Queries (10)

Queries read from Gestión Plagas and return data. They change nothing.

##### Find Product
Finds a product by name, number or other text.

- Type: search · Key: `buscar_articulo`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_articulo" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_articulo`

##### Find Appointment
Finds an appointment by name, number or other text.

- Type: search · Key: `buscar_cita`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_cita" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_cita`

##### Find Sales Appointment
Finds a sales appointment by name, number or other text.

- Type: search · Key: `buscar_cita_comercial`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_cita_comercial" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_cita_comercial`

##### Find Customer
Finds a customer by name, number or other text.

- Type: search · Key: `buscar_cliente`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_cliente" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_cliente`

##### Find Contract
Finds a contract by name, number or other text.

- Type: search · Key: `buscar_contrato`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_contrato" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_contrato`

##### Find Sales Document
Finds a sales document by name, number or other text.

- Type: search · Key: `buscar_documento`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_documento" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_documento`

##### Find Expense
Finds an expense by name, number or other text.

- Type: search · Key: `buscar_gasto`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_gasto" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_gasto`

##### Find Incident
Finds an incident by name, number or other text.

- Type: search · Key: `buscar_incidencia`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_incidencia" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_incidencia`

##### Find Opportunity
Finds an opportunity by name, number or other text.

- Type: search · Key: `buscar_oportunidad`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_oportunidad" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_oportunidad`

##### Find Service Document
Finds a service document by name, number or other text.

- Type: search · Key: `buscar_servicio`
- Requires: q
- SDK: `runAction({ app: "gestion-plagas", actionType: "search", action: "buscar_servicio" })`
- CLI: `npx zapier-sdk run-action gestion-plagas search buscar_servicio`

## Frequently asked questions about automating with Facebook Lead Ads and Gestión Plagas

### 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
- Facebook Lead Ads integrations: zapier.com/apps/facebook-lead-ads/integrations.md
- Gestión Plagas integrations: zapier.com/apps/gestion-plagas/integrations.md
- Full page: zapier.com/apps/facebook-lead-ads/integrations/gestion-plagas
- SDK: npmjs.com/package/@zapier/zapier-sdk