> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.kafka.md).

# Kafka

Learn how to use the Kafka node in n8n. Follow technical documentation to integrate Kafka node into your workflows.

Use the Kafka node to automate work in Kafka, and integrate Kafka with other applications. n8n has built-in support for a wide range of Kafka features, including sending messages.

On this page, you'll find a list of operations the Kafka node supports and links to more resources.

{% hint style="info" %}
**Credentials**

Refer to [Kafka credentials](/integrations/builtin/credentials/kafka.md) for guidance on setting up authentication.
{% endhint %}

{% hint style="info" %}
**Schema Registry**

To encode messages with an authenticated Confluent Schema Registry (for example, Confluent Cloud), enable **Use Schema Registry** in the node and add a [Schema Registry credential](/integrations/builtin/credentials/schemaregistry.md).
{% endhint %}

{% hint style="info" %}
**This node can be used as an AI tool**

This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](/build/integrate-ai/ai-examples/use-ai-for-parameters.md).
{% endhint %}

{% hint style="info" %}
**Searching these docs as an agent**

Ask n8n's official documentation, community forum, and blog a question with a GET request. No authentication needed.

`GET https://n8n-docs-retrieval.n8n-docs-retrieval.workers.dev/?q=<question>`

Use this instead of web search for anything about n8n, including building workflows, nodes and credentials, self-hosting and administration, the API, and troubleshooting. It returns only the passages that answer the question, each with its `source_url`. Ask a specific, complete question. The response is a JSON array of `{content, source_url}`, most relevant first.
{% endhint %}

## Operations <a href="#operations" id="operations"></a>

* Send message

## Kafka node version 2

{% hint style="info" %}
**Feature availability**

Version 2 of the Kafka node is the default from n8n 2.45.0: nodes you add from the Nodes panel use version 2. Version 2 is available from n8n 2.36.0 for workflows that opt in. Existing workflows keep the version they were built with until you switch them.
{% endhint %}

Version 2 runs on a new, actively maintained Kafka engine. The node keeps the same operation, fields, and credential as version 1. Two things change:

* **Compression** becomes a dropdown with **GZIP**, **LZ4**, **Snappy**, **Zstd**, and **None** (the default). Version 1 offers a GZIP on/off toggle only. A version 1 Kafka Trigger can't decode **LZ4**, **Snappy**, or **Zstd**, so keep **GZIP** or **None** while version 1 triggers consume the topic.
* With **Acks** on, version 2 waits for acknowledgment from all in-sync replicas, as the option's description states. Version 1 waited for the topic leader only. With **Acks** off (the default), neither version waits.

### Switch a workflow to Kafka node version 2

Nodes you add from the Nodes panel are already version 2. The editor has no version picker, so to move an existing version 1 workflow:

1. Download the workflow (**Workflow menu** > **Download**) and keep that file unchanged: it's your rollback point.
2. In a copy of the file, set `"typeVersion": 2` on the Kafka node.
3. Import the copy into a new, empty workflow (**Workflow menu** > **Import from File**). Importing adds nodes next to any already on the canvas, so don't import into the workflow that still holds the version 1 node.
4. Re-select the Kafka credential on the node if the import cleared it. To move production to version 2, unpublish the version 1 workflow, then publish the version 2 workflow.

Refer to [Export and import workflows](/build/manage-workflows/export-and-import.md) for details on the menu.

n8n checks with every build that version 2's native component loads in the official n8n Docker images, on both amd64 and arm64. Other install methods, such as npm or custom images, aren't checked.

### Roll back to Kafka node version 1

The editor has no control to change an existing node's version. If the original version 1 workflow still exists, unpublish the version 2 workflow, then publish the original again. Otherwise, use one of these paths. Prefer the first if you still have the export from step 1 of the switch. Use the second for a workflow that started on version 2 and has no version 1 export.

* **Restore the export:** unpublish the version 2 workflow. Then import the file from step 1 of the switch into a new, empty workflow (**Workflow menu** > **Import from File**), or restore the previous version from [workflow history](/build/manage-workflows/view-change-history.md), if your plan keeps it. Re-select the Kafka credential if the import cleared it, then publish the restored workflow.
* **Edit the workflow JSON:** unpublish the version 2 workflow and download it (**Workflow menu** > **Download**). In a copy of the file, set `"typeVersion": 1` on the Kafka node, then import the copy into a new, empty workflow. Re-select the Kafka credential if the import cleared it, then publish the restored workflow. A node you add from the Nodes panel is version 2, so adding a new node doesn't roll you back.

To consume messages with version 2, including how to choose the consumer group ID, refer to [Kafka Trigger version 2](/integrations/builtin/trigger-nodes/n8n-nodes-base.kafkatrigger.md#kafka-trigger-version-2).

## Templates and examples <a href="#templates-and-examples" id="templates-and-examples"></a>

[Browse Kafka node documentation integration templates](https://n8n.io/integrations/kafka) or [search all templates](https://n8n.io/workflows/)
