Master data transformation in n8n using the powerful Set node. Learn expressions, complex objects, conditional logic, and clean output formatting with this essential n8n workflow.
Download this n8n workflow template and start using it instantly.
n8n developers seeking to master data manipulation.
Automation specialists needing to clean and reshape complex API payloads.
Users looking for comprehensive n8n templates focused on core logic.
Anyone needing to understand expressions and conditional branching within an n8n workflow.
The Set n8n node is arguably the most fundamental tool for data transformation within any n8n workflow. This comprehensive guide provides an invaluable n8n templates resource designed specifically to teach you its full potential.
Automations frequently receive data that is messy, poorly structured, or needs computation before being used in a downstream system. This n8n workflow addresses this by demonstrating six key functionalities:
{{ $json.field }}).This n8n workflow is initiated by a manual n8n trigger and proceeds through a series of specialized Set n8n nodes:
1. Set Basic Values) establishes initial parameters like username, userage, and isactive.2. Set with Expressions) demonstrates dynamic data creation. It uses expressions to double the score and calculate a timestamp, showing how powerful expressions are within the n8n node environment.3. Set Complex Data) structures the previously simple fields into nested JSON objects (userprofile) and lists (arrays).4. Set Clean Output) activates the "Keep Only Set" option. It selectively pulls necessary information from the complex structure, ensuring only essential, clean data continues in the n8n workflow, dramatically simplifying the payload.Age Check If n8n node evaluates the initial user_age. The flow splits into two paths: 5a. Set Adult Data (True) and 5b. Set Young Adult Data (False), demonstrating how conditional logic allows different Set n8n nodes to execute.6. Tutorial Summary) compiles the results, confirming all aspects of the Set node have been covered.To use this educational n8n workflow, follow these standard steps:
Start (Manual Trigger) / When clicking ‘Execute workflow’: Serves as the initial n8n trigger point to manually start the demonstration. It passes a welcome payload.
0. Test Data Input (Set n8n node): An optional starting point that allows users to easily input sample test data (like changing userage) to test the conditional branches of the n8n workflow.
1. Set Basic Values (Set n8n node):
Function: Establishes initial simple fields (strings, numbers, booleans).
Key Configuration: Sets static values like username (string) and userage (number).
2. Set with Expressions (Set n8n node):
Function: Demonstrates the power of n8n expressions.
Key Configuration: Uses ={{ $json.score 2 }} to perform arithmetic and utilizes $now expressions for date formatting.
3. Set Complex Data (Set n8n node):
Function: Builds nested data structures—defining new object fields (userprofile) and arrays (scorehistory).
4. Set Clean Output (Set n8n node):
Function: Crucial for data cleanup.
Key Configuration: The 'Keep Only Set' option is enabled, ensuring all previous inputs are discarded and only the three newly defined, clean output fields remain in the n8n workflow.
Age Check (If n8n node):
Function: Splits the flow based on a condition ($json.userage > 25). This shows how to drive conditional actions using the Set n8n node in subsequent steps.
5a/5b. Conditional Set Data (Set n8n node):
Function: Sets unique, conditional values (e.g., offer_type) depending on which branch of the n8n workflow is executed.
Use this powerful n8n workflow template to automate weekly and monthly KPI reporting. It collects data from Google Analytics, CRM, and Ad Platforms, calculates LTV/CAC, and distributes reports via Google Slides and Gmail. Perfect for scaling your marketing operations.

Use this comprehensive n8n workflow to automate complex market research. It uses the n8n trigger to start the process, defining scope with GPT-4o, conducting deep research with Perplexity, and generating a 1500-word business case using Anthropic Claude, saving the final document via an n8n node to Google Docs.

Use this n8n workflow template to automatically identify and mark outdated n8n node versions within your active n8n workflows, sending a comprehensive summary via Gmail. Perfect for maintenance automation.

Automate matching CVE threats to internal IT assets using an n8n workflow. Get daily email summaries, manage asset databases, and archive results efficiently.

Use this advanced n8n workflow to compare a candidate's CV (PDF) against any online job posting using the Gemini AI model. Get structured fit analysis and optimization tips via email. Easy-to-deploy n8n templates.


I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - [email protected]







































