> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lancer-erp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n and Make

> Import ready-made flows for lead intake, verified webhooks and client + payment request creation.

Lancer has no marketplace app for n8n or Make. You don't need one: the [REST API](https://docs.lancer-erp.com/api-reference/introduction.md) and [webhooks](https://docs.lancer-erp.com/guides/webhooks.md) cover the common flows, and the templates below are ready to import.

> [!NOTE]
>
> Not running n8n or Make? Many of these flows exist as built-in rules under Automations ("אוטומציות") in the app, with nothing to host.

## Templates

### API and webhooks

| Template | Tool | What it does |
| - | - | - |
| [`n8n-webhook-verified.json`](https://docs.lancer-erp.com/examples/n8n-webhook-verified.json) | n8n | Receives Lancer webhooks, verifies the signature and branches on `payment.succeeded` |
| [`n8n-client-and-payment-request.json`](https://docs.lancer-erp.com/examples/n8n-client-and-payment-request.json) | n8n | Creates a client, then a payment request with a pay link. Swap the manual trigger for a form, a sheet row or a CRM event |
| [`make-new-lead-to-sheet.json`](https://docs.lancer-erp.com/examples/make-new-lead-to-sheet.json) | Make | `lead.created` webhook → a new Google Sheets row |
| [`make-client-and-payment-request.json`](https://docs.lancer-erp.com/examples/make-client-and-payment-request.json) | Make | A custom webhook (your form) → `POST /v1/clients` → `POST /v1/payment-requests` with `createLink` |

### Lead intake through a lead form

| Template | Tool | What it does |
| - | - | - |
| [`n8n-meta-lead-ads.json`](https://docs.lancer-erp.com/examples/n8n-meta-lead-ads.json) | n8n | Facebook Lead Ads trigger → Lancer lead form (`format=meta`) |
| [`n8n-website-form-relay.json`](https://docs.lancer-erp.com/examples/n8n-website-form-relay.json) | n8n | Any site builder's webhook → Lancer lead form (shape auto-detected) |
| [`make-meta-lead-ads.json`](https://docs.lancer-erp.com/examples/make-meta-lead-ads.json) | Make | Facebook Lead Ads "Watch leads" → Lancer lead form (`format=meta`) |
| [`make-website-form-relay.json`](https://docs.lancer-erp.com/examples/make-website-form-relay.json) | Make | Custom webhook → Lancer lead form |

> [!TIP]
>
> Facebook / Instagram Lead Ads, Google Ads lead forms and Webflow can also connect **directly**, with no n8n or Make in between. See [Lead sources](https://docs.lancer-erp.com/integrations/facebook-leads.md).

## Import into n8n

**1. Import the file**

Workflows → **Import from File**, then pick the JSON.

**2. Add your API key as a credential**

Create a **Header Auth** credential named `Lancer API key`: name `Authorization`, value `Bearer lk_…`. Select it on every HTTP Request node. Give the key only the [scopes](https://docs.lancer-erp.com/guides/authentication.md#scopes) the flow needs.

**3. Set the webhook secret**

In the signature-check Code node, the secret comes from the `LANCER_WEBHOOK_SECRET` environment variable. Self-hosted n8n must also allow the `crypto` module: `NODE_FUNCTION_ALLOW_BUILTIN=crypto`.

**4. Point Lancer at the flow**

Copy the Webhook node's **production** URL into a new webhook in Settings → "API ו-Webhooks", activate the workflow and click **Test** in Lancer.

> [!NOTE]
>
> The n8n Code node checks the signature against the re-serialised body. That works because Lancer sends compact `JSON.stringify` output, so the bytes match.

## Import into Make

**1. Import the blueprint**

Scenarios → **Create** → **⋯** → **Import Blueprint**, then pick the JSON.

**2. Reconnect the modules**

Open each module and choose your own connections (Google Sheets, Facebook) or webhook.

**3. Add your key**

On the HTTP modules, replace `lk_YOUR_KEY` with a key that has the right scopes. Better: keep it in a Make data store or scenario variable.

> [!WARNING]
>
> Make's custom webhooks can't verify HMAC signatures. Give the webhook URL only to Lancer, and turn on IP restrictions if your Make plan has them.

## Lead forms: a URL per form

The lead intake templates post to a **lead form** rather than to the API. Every lead form (Settings → Sales → Lead forms) has its own webhook URL, and the token in it is the only credential:

```text theme={null}
POST https://api.lancer-erp.com/webhooks/leads/<form token>[?format=meta|google|elementor|wix|wordpress|generic]
```

* It accepts JSON or a form post. Without `format`, Lancer detects the shape.
* The lead gets the form's stage and owner; its source is `meta_ads`, `google_ads` or `website`.
* Fields are matched by key in Hebrew or English (`full_name`, `שם מלא`, `your-email`, `טלפון`, `company`, …). Anything unrecognised lands in the lead's notes as `label: value`.
* Replies: `201 { ok, leadId }`; `404` for an unknown or disabled form; `422` when there is no name, email or phone; `400` for an unknown `format`.

Use this instead of the API when the sender can't keep a secret header, for example a site builder's built-in webhook:

| Platform | Where | `format` |
| - | - | - |
| Google Ads lead forms | Lead form → Lead delivery → webhook URL (the `key` can be anything) | `google` |
| Elementor Pro | Form → Actions After Submit → Webhook, with Advanced Data on | `elementor` |
| Wix | Automations → Form submitted → Send HTTP request (POST, JSON) | `wix` |
| WordPress | Contact Form 7 (CF7 to Webhook), WPForms (Webhooks addon) or Gravity Forms (Webhooks add-on) | `wordpress` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.