Resources · n8n integration

n8n AI Transform nodeConfigure AI Transform in n8n.

The AI Transform node writes the code so you do not have to. Describe the change you want in plain English, click Generate code, and the n8n AI Transform node fills a JavaScript snippet that runs on every item reaching it. Two parameters, nothing to authenticate.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n AI Transform node do?

AI Transform takes a prompt written in plain English and turns it into a JavaScript snippet that reshapes the data passing through your workflow. The AI is context-aware: it reads the workflow's nodes and the data types they output, so the code it writes already knows the shape of your items. The node does not start a workflow, it sits after a trigger and runs on each incoming item.

First scenario, tidying contact data before it is stored. A form or an import gives you firstname and lastname in separate fields, and the sheet you feed expects one column. The placeholder in the node says it plainly: merge firstname and lastname into a field details.name and sort by email. Generate the code once, and every run of your Google Sheets append gets the same clean payload.

Second scenario, flattening an API response. A call made with HTTP Request comes back with values buried two levels down. Instructions use dot notation to reach them, the way the node's own description asks: refer to a nested field as address.street. The generated snippet pulls those values up to the top level, and the nodes after it can read them with a plain expression such as {{ $json.street }}, the n8n syntax for reusing a field from the item at hand.

Third scenario, preparing a message body. Before an Gmail send, you want the subject built from two fields and the empty ones dropped. Writing that by hand is five minutes of fiddling with string concatenation. Describing it is one sentence, and the result is readable code you can inspect before the workflow goes live.

When to prefer the alternative. The Code node is the better choice as soon as you want to keep editing the logic: the snippet AI Transform produces is read-only inside the node, and the only ways forward are rewriting the prompt or copying the code into a Code node. Loops you tune by hand, helper functions, anything you expect to revisit in three months, start there.

The limits are worth knowing before you build on it. The prompt stays in plain English and under 500 characters, which rules out a full specification and rewards one clear instruction at a time. The node is at version 1, with those two parameters and nothing else to set. And it runs downstream only: a Schedule Trigger, a Webhook or the trigger of a tool has to open the workflow first.

Parameters

Which parameters does AI Transform expose?

The AI Transform node has 2 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Instructions

instructions

What you see in n8n

Notes & use cases

This is where the whole node happens. You type what the data should look like, click the Generate code button, and n8n populates the Transformation Code below with a JavaScript snippet built for the items your workflow carries.

Key parameters

  • Instructions: the prompt itself, written in plain English and kept under 500 characters; use dot notation to point at a nested field, for example address.street.
Use cases
merging two name fields into details.name and sorting the result by email, the example n8n suggests in the field placeholder. Anything you can state in one sentence about the shape of an item belongs here.
02

Generated JavaScript

jsCode

What you see in n8n

Notes & use cases

Below the prompt sits the snippet the node produced. Reading it is the point: it shows exactly what will run against each item, so nothing is hidden behind the prompt you typed.

Key parameters

  • Generated JavaScript: read-only inside AI Transform; to change what it does, adjust the instructions, or copy and paste the code into a Code node and keep going from there.
Use cases
a review step before a workflow handles customer records, and an escape hatch when a prompt gets you close to the logic you need but the last detail is quicker to type by hand.
Need help

Need help automating AI Transform with n8n?

A person reads every message.

FAQ

AI Transform in n8n, common questions

01Is the AI Transform node included in n8n?
Yes. AI Transform is a core node, shipped with n8n, so there is nothing to install and no extra cost on the n8n side. One detail is worth checking against your setup: the official node documentation states that AI Transform is available on n8n Cloud, on all plans, and that it is not available on self-hosted n8n. Everything else about the node behaves the same way as any core node. It appears in the node panel, it belongs to the Development and Core Nodes categories, and the workflow around it is the workflow you already know.
02What do you need to set up before using it?
Nothing on the account side. AI Transform has no credential and no Authentication selector, which means there is no key to paste, no scope to grant and no connection to test. You open the node, you write the prompt, you generate the code. The only prerequisite is upstream: the node runs on each incoming item and does not open a workflow by itself, so something has to feed it first. A Schedule Trigger, a Webhook, or the trigger of whichever tool starts the process.
03What are the limits of the n8n AI Transform node?
Three, and they are all worth knowing. The prompt has to be plain English and under 500 characters, so one instruction at a time works far better than a paragraph of requirements. The generated code is read-only inside the node: changing it means rewriting the instructions, or copying the snippet into a Code node. And the node is at version 1, with two parameters and no options collection, so there is no batching setting, no error option and nothing else to tune. An older workflow may show an earlier version with fewer options, and a node never changes version on its own.
04AI Transform or the Code node?
It depends on how often the logic will change. Take AI Transform when the transformation is easy to say out loud and you want it running now: merge two fields, rename a nested value, sort a list. Take the Code node when you expect to come back to the logic, because that is where editing happens anyway once the snippet is copied over. A practical middle path exists too. Start in AI Transform, read what it generated, then paste it into a Code node and refine it there.
05n8n or Make for this kind of data reshaping?
Both do the job, and the choice is about hosting, data control and cost model rather than features. Make is a hosted automation platform with no self-hosting option, billed per operation, with a visual logic that many teams find quick to pick up. n8n runs on n8n Cloud or on your own infrastructure through Docker or npm, and a workflow behaves the same in both cases, which matters when the data passing through the transformation cannot leave your servers. Note the exception on this specific node: its own documentation restricts AI Transform to n8n Cloud.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.