🎓 Learn Code Node (JavaScript) with an Interactive Hands-On Tutorial — Workflow n8n

Moyen complexité⚥ DĂ©clencheur7 nƓudsđŸ·ïž Miscellaneous👁 39,490 vuespar Lucas Peyrin

Aperçu

How it works

This workflow is a hands-on tutorial for the Code node in n8n, covering both basic and advanced concepts through a simple data processing task.

Provides Sample Data: The workflow begins with a sample list of users. Processes Each Item (Run Once for Each Item): The first Code node iterates through each user to calculate their fullName and age. This demonstrates basic item-by-item data manipulation using $input.item.json. Fetches External Data (Advanced): The second Code node showca

NƓuds utilisĂ©s

Code

Aperçu du workflow

▶ STARTING POINT: Sample Data
These nodes prepare our data for the tutorial.
1. `1. Sample Data`: Creates a list of users. Feel fre
2. `2. Split
⚙ LESSON 1: Processing Each Item
This node is in "Run Once for Each Item" mode. It execu
Goal: Enrich each user's data.
Key Concepts:
* `$input.item.json
🚀 ADVANCED LESSON 2: Using Helpers
This node also runs for each item, but demonstrates a p
Goal: Enrich data by calling an external API from code.
Key Concepts:
⚙ LESSON 3: Processing All Items at Once
This node is in "Run Once for All Items" mode. It runs
Goal: Aggregate data to create a summary.
📄 EXPERT LESSON 4: Creating Files
Goal: Aggregate all items and generate a binary file (l
Mode: `Run Once for All Items`
Key Concepts:
* `$("4. Fetch Exter
Was this helpful? Let me know!
![clic](https://workflows.ac/form)
I really hope this template helped you. You
đŸ€– Mastering the n8n Code Node: The Ultimate
Unlock the full potential of custom logic in n8n with t
1
1. Sample Data
2
2. Split Out Users
3. Process Each User
5. Calculate Average Age
4. Fetch External Data (

6. Create a Binary File 

⚡
S
Start Tutorial
7 nodes6 edges

Comment ça fonctionne

  1. 1

    Déclencheur

    Le workflow démarre avec un déclencheur déclencheur.

  2. 2

    Traitement

    Les donnĂ©es transitent par 7 nƓuds, connecting code, manualtrigger, set.

  3. 3

    Sortie

    Le workflow termine son automatisation et livre le résultat à la destination configurée.

DĂ©tails des nƓuds (7)

CO

Code

code

#1

Comment importer ce workflow

  1. 1Cliquez sur le bouton Télécharger JSON à droite pour enregistrer le fichier du workflow.
  2. 2Ouvrez votre instance n8n. AccĂ©dez Ă  Workflows → Nouveau → Importer depuis un fichier.
  3. 3Sélectionnez le fichier learn-code-node-javascript-with-an-interactive-hands-on-tutorial téléchargé et cliquez sur Importer.
  4. 4Configurez les identifiants pour chaque nƓud de service (clĂ©s API, OAuth, etc.).
  5. 5Cliquez sur Tester le workflow pour vérifier que tout fonctionne, puis activez-le.

Ou collez directement dans n8n → Importer depuis JSON :

{ "name": "🎓 Learn Code Node (JavaScript) with an Interactive Hands-On Tutorial", "nodes": [...], ...}

Intégrations

codemanualtriggersetsplitout

Obtenir ce workflow

Téléchargez et importez en un clic

Télécharger JSONVoir sur n8n.io
NƓuds7
Complexitémedium
Déclencheurtrigger
Vues39,490
CatégorieMiscellaneous

Créé par

Lucas Peyrin

Lucas Peyrin

@lucaspeyrin

Tags

codemanualtriggersetsplitout
⚡

Nouveau sur n8n ?

n8n est un outil d'automatisation de workflows gratuit et open-source. HĂ©bergez-le vous-mĂȘme ou utilisez la version cloud.

Obtenir n8n gratuitement →

Related Miscellaneous Workflows