Speed Run Code
Tracks/Automation & Workflows/n8n: JSON, Code Nodes & AI Integration
Level 3

n8n: JSON, Code Nodes & AI Integration

Master data transformation, JavaScript nodes, and connecting AI to your workflows.

Lesson Notes

The Code node in n8n lets you write JavaScript to transform data in any way — no limitations. The key pattern: items.map(item => ({ json: { ...item.json, newField: transform(item.json.oldField) } })). For AI integration, the OpenAI node (or HTTP Request node) lets you send prompts and receive completions inside any workflow. n8n with AI is the foundation of most "AI agent" systems — a trigger fires, data is fetched, AI processes it, results are stored or sent somewhere. This is the infrastructure layer that makes AI products work.

Your Challenge

+25 XP

Build an n8n workflow that: (1) receives a webhook with a JSON body, (2) uses a Code node to extract and transform specific fields, (3) calls the OpenAI API to summarize a text field, (4) inserts the result into a Supabase table. Test end-to-end with a real webhook payload.