Files
n8n-docs/_snippets/code/ai-how-to.md
2024-04-08 08:02:11 +01:00

654 B

/// info | Feature availability AI assistance in the Code node is available to Cloud users. It isn't available in self-hosted n8n. ///

/// note | AI generated code overwrites your code If you've already written some code on the Code tab, the AI generated code will replace it. n8n recommends using AI as a starting point to create your initial code, then editing it as needed. ///

To use ChatGPT to generate code in the Code node:

  1. In the Code node, set Language to JavaScript.
  2. Select the Ask AI tab.
  3. Write your query.
  4. Select Generate Code. n8n sends your query to ChatGPT, then displays the result in the Code tab.