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

# n8n

> Doconda in your n8n workflows: as an agent tool or with an HTTP request.

## As an AI Agent tool

1. Add an **AI Agent** node and, on its **Tool** input, an **MCP Client Tool** node.
2. **Endpoint**: `https://api.eu.doconda.com/mcp`.
3. **Server Transport**: `HTTP Streamable`.
4. **Authentication**: `Bearer Auth`, with a new credential where you paste your API key (without "Bearer").
5. **Tools to Include**: `All`, or only the ones you want (for example `create_document`).

Now you can ask the agent for things like *"When an order comes in, generate its invoice as a PDF"*.

## With an HTTP request

For workflows without an agent (always the same document with data from the workflow), use an **HTTP Request** node:

* **Method**: `POST` · **URL**: `https://api.eu.doconda.com/v1/documents`
* **Authentication**: `Bearer Auth` with your API key.
* **Body** (JSON):

```json theme={null}
{
  "format": "docx",
  "content": { "markdown": "# Hello {{ $json.name }}\n\nThank you for your order {{ $json.order }}." }
}
```

The response contains the finished document with its links in `outputs`.


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