AI agents with n8n and LangGraph: workflows that start the work, agents that do the judging
Flowlayers builds AI infrastructure for businesses: a structured workspace where AI agents work the way a team does, with their own tasks, records and reviews inside your systems. n8n is the plumbing: it starts work when something happens and moves data between systems that do not talk to each other, and an agent does the part that needs judgement. We built a whole client onboarding on n8n and handed it over. LangGraph is covered here as an agent framework, from its own documentation, not from a project of ours.
AI agents that work with n8n webhooks and workflows, which we used to build a client's whole onboarding, with LangGraph described as an open-source agent framework and covered as design only.
What n8n and an agent can do together
What a workflow built on n8n can do around an agent. The last one is work we have shipped.
Start when something happens
An n8n workflow can start when something happens, such as a request arriving at a webhook, and hand the work to an agent with the details attached.
Read a document into fields
A workflow can read a document, such as a supplier invoice photo, into structured fields with an AI step, and pass the fields to the next system.
Hold an action until a person says yes
A workflow can hold an action until a named person says yes, before anything is sent to a customer or a supplier.
Send WhatsApp confirmations and updates
A workflow can send WhatsApp order confirmations and delivery updates. This is work we have shipped.
How the connection works
An agent and a workflow call each other through webhooks, and each gets only the access it needs.
- n8n's Webhook node lets an outside system, or an agent, call a URL, and the call starts a workflow. It accepts DELETE, GET, HEAD, PATCH, POST and PUT.
- A webhook has a test URL for building and a production URL once the workflow is published. Its maximum payload is 16 MB, which a self-hosted n8n can change.
- A webhook can require Basic auth, Header auth or JWT auth with a credential, can be limited to logged-in users of the n8n instance, and can restrict callers by IP address. It can also be left with no authentication, which we do not do for a workflow that reaches a business system.
- Each workflow gets only the credentials for the systems it touches, and an agent gets its own access to each system it calls, read-only first. The credentials stay in your n8n or in the agent's own environment, and are never written in a task, a comment, a file in git or a message.
- LangGraph is an open-source, low-level orchestration framework and runtime for long-running, stateful agents. Its own documentation lists durable execution, streaming and human-in-the-loop among its core capabilities. These are the framework's capabilities, not our results.
- Each workflow run is visible step by step in n8n, so a failed or odd run can be traced. An approval step holds an action until a named person says yes, and you get a one-page runbook at handover.
Example payload (made up to show the shape): an n8n workflow tells an agent that a supplier invoice arrived
{
"example": true,
"source": "n8n",
"event": "supplier_invoice.received",
"document": {
"type": "pdf",
"name": "example-invoice.pdf"
},
"request": "read the fields and queue the invoice for approval",
"note": "Invented example. Not from a real system."
}Arabic and English data
A webhook body is JSON, and a workflow passes whatever text it receives, in Arabic or English, to the next step unchanged. An AI step that reads a document or writes a message can work in Arabic and English. Names, numbers and dates are read into fields, and we test them on your real documents before launch, because messy or inconsistent data makes the job bigger.
What we confirm before we promise
n8n and LangGraph change quickly, so we check the documentation for the version you run, and then these:
- Where n8n runs: on your infrastructure or ours, which decides who holds the credentials and who updates it.
- The n8n edition and licence for your use. n8n says its Community edition runs without a licence key and has almost the full feature set, and that projects, SSO, Git version control and external secrets are in the paid plans.
- Which systems the workflow touches. One workflow fits at most two systems and one AI step, and a third system moves it to a bigger product.
- Whether you want an agent framework such as LangGraph at all: a fixed set of steps is better in n8n alone, and we say so on the call.
- Who approves what, and who runs the workflow after handover.
Where it fits
Workflows and agents built with n8n are part of these services:
Related case studies
Related integrations
Questions about n8n, LangGraph and AI agents
Do we still need n8n if we have AI agents?
Often yes. n8n is the plumbing: it starts work when something happens and moves data between systems that do not talk to each other, and an agent does the part that needs judgement.
Who holds the credentials, and where does n8n run?
n8n runs on your infrastructure or ours, and you can see each step of a flow. We agree where before the build, because it decides who holds the credentials and who keeps it updated.
How do you keep a webhook from being called by anyone?
n8n's Webhook node can require Basic, Header or JWT authentication, limit callers to an allowed list of IP addresses, or restrict a call to logged-in users of your n8n. We do not leave a workflow that reaches a business system with no authentication.
What can a webhook call carry?
A call can use DELETE, GET, HEAD, PATCH, POST or PUT. It has a test URL while we build and a production URL once the workflow is published, and the payload can be up to 16 MB, which a self-hosted n8n can change.