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

# n8n

> An n8n community node: customer context, turns, history search, verification, handoff and the end of the conversation, before and after your AI Agent.

`n8n-nodes-niadra` is an n8n community node. Put it before and after your AI Agent node (or give it to the agent as a tool) so the agent starts every conversation knowing what the customer already told your other agents, and so what it says reaches them too.

## Install

In n8n, **Settings > Community Nodes > Install** and enter `n8n-nodes-niadra`. The package lives in `packages/n8n-nodes-niadra` of the TypeScript SDK repository and reaches npm when it is published, together with `@niadra/sdk` 0.3.0; until then, build it from the repository (`pnpm check` in the package folder). Built and tested against `n8n-workflow` 2.16.

## The operations

| Operation      | What it does                                                                                                                                                   |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Get Context    | The customer's context for the agent's prompt: `text` (after your system message) and `suffix` (the live turns from other channels, for the end of the prompt) |
| Track Turn     | Records what the customer or the agent said, keyed by the provider's message id so a retried step is recorded once                                             |
| Search History | Searches past conversations, promises, actions and business objects; **When** takes the period in the customer's words ("last week", "semana passada")         |
| Verify         | Records that the customer proved who they are (an OTP, a login, the carrier's attestation)                                                                     |
| Handoff        | Records a transfer to a person or to another agent                                                                                                             |
| End            | Records that the conversation ended                                                                                                                            |

The five primitives are all there: Get Context (context), Track Turn (turns), Search History (the tool), Verify (verification) and Handoff (handoff).

## The credential

**Niadra API**: a source key of your space (`nia_sk_...`). The key names the region and the space, so the address comes from it; set **Base URL** only for a local emulator.

## Limits

* Every operation fails open by default: when Niadra is slow or down, the node returns an empty result with an `error` field and the workflow goes on. Turn **Fail Open** off to stop the workflow instead.
* Bind **Customer Handle** to your trigger's data (the WhatsApp `wa_id`, the caller's number, your user id), never to a value the model writes: the customer is never something the model chooses.
* The node carries neither agent memory nor the timeline; for those, use the SDK or the MCP server.
* The layout of the node and its credential follows Mem0's n8n node (MIT), credited in `NOTICE`.

## Next steps

<CardGroup cols={2}>
  <Card title="Flowise" href="/en/integrations/flowise">
    the Flowise memory and tool nodes.
  </Card>

  <Card title="Quickstart" href="/en/quickstart">
    the key, the sandbox space and the first context.
  </Card>
</CardGroup>
