Connect n8n
Let an n8n AI agent work in Liteo, send records to Liteo from any workflow, and start a workflow when something changes in Liteo.
n8n connects Liteo to the other apps you use. There are 3 ways to use it, and you can combine them in one workflow.
- AI agent. An n8n AI agent finds and updates your contacts, businesses, and deals.
- Send records to Liteo. Any workflow adds leads, deals, and tasks to Liteo.
- Start a workflow from Liteo. A Liteo automation calls n8n when a deal moves, a contact is added, or an owner changes.
These steps work on n8n Cloud and on your own n8n.
Connect an AI agent
- In n8n, open your AI Agent node and add the MCP Client Tool as a tool.
- Set Endpoint to
https://app.liteo.io/api/mcp. - Set Authentication to MCP OAuth2, then create a new credential.
- Leave Register Client Automatically on. Set Server URL to
https://app.liteo.io/api/mcp. - Select Connect. Sign in to Liteo, pick a workspace, and select Approve.
The agent now works as you, within the permissions of that connection.
To run a single Liteo tool as a normal step instead, use the MCP Client node with the same settings. For a tool without inputs, such as get_workspace, set Input Mode to JSON and enter {}.
If you run n8n yourself, it needs an HTTPS address or must run on localhost. Liteo only returns a sign-in to those addresses.
Send records to Liteo
First create a connection code in Liteo:
- Open Settings in Liteo.
- Choose Integrations, then n8n.
- Select Connect n8n.
- Choose who should own new contacts and deals, then select Create connection.
- Copy the connection code before you close the dialog.
Important
Keep the connection code private. It allows reads and writes in this workspace. Liteo only shows it once, but it keeps working until you revoke it.
Then add an HTTP Request node in n8n:
- Set Authentication to Generic Credential Type, then Generic Auth Type to Bearer Auth.
- Create a credential and paste the connection code as the Bearer Token.
- Pick a request from the table below. For requests that send data, turn on Send Body, then set Body Content Type to JSON and Specify Body to Using JSON.
| To do this | Method and URL |
|---|---|
| Add or match a lead | POST https://elated-rat-401.convex.site/v1/inbound/leads |
| Create a deal | POST https://elated-rat-401.convex.site/v1/deals |
| Create a task | POST https://elated-rat-401.convex.site/v1/tasks |
| Find a contact by email | GET https://elated-rat-401.convex.site/v1/contacts?email=ada@example.com |
| List pipelines and stages | GET https://elated-rat-401.convex.site/v1/pipelines |
The API reference lists every request and its fields.
Add leads without duplicates
Add or match a lead adds a contact, or uses the existing contact with the same email. It needs a first name and an email or phone.
It also needs a unique ID from an earlier step, such as a form entry ID. Turn on Send Headers and send the ID as Liteo-Idempotency-Key.
{
"contact": { "firstName": "Ada", "lastName": "Lovelace", "email": "ada@example.com" },
"source": "n8n"
}If n8n sends the same item twice, Liteo recognizes the ID and returns the first result. Two different items need two different IDs.
Start a workflow from Liteo
- In n8n, add a Webhook node. Set HTTP Method to POST and copy the Production URL.
- In Liteo, open Automations and create a rule, such as A deal moves to a stage.
- Add the action Send a webhook and paste the n8n address.
- Select Publish in n8n, then move a test deal to check that the workflow runs.
Liteo only sends to public HTTPS addresses. n8n's Test URL works only while n8n is listening, so put the Production URL in Liteo.
Each request carries a Liteo-Signature header. To check that a request came from Liteo, see verify the signature.
Disconnect n8n
- AI agent: open Settings, choose AI & MCP, then Connected apps, and disconnect n8n.
- Connection code: open Settings, choose Integrations, then n8n. Find the key, select Disconnect, then Revoke key.
- Webhook: turn off the automation rule in Liteo.
Disconnecting doesn't delete records that were already added to Liteo.
Related guides
Last updated on