Use this foundational n8n workflow template to understand core logic, utilizing the Interval n8n trigger, Function n8n node, and Set n8n node for scheduled data generation and transformation.
Download this n8n workflow template and start using it instantly.
New users eager to understand the basics of building an n8n workflow.
Developers needing a scheduled base structure for periodic tasks.
Users looking for practical examples of the Function and Set n8n node functionality.
Anyone interested in mastering data manipulation within n8n templates.
This fundamental n8n workflow serves as an excellent starting point for learning data flow and control. It addresses the need for periodic execution of simple logic tasks. The workflow demonstrates how to schedule an operation using the powerful Interval n8n trigger, inject custom data using the Function n8n node, and refine the resulting data structure using the Set n8n node. By analyzing this n8n workflow, users gain valuable insights into how data items flow between different n8n node types, making it an indispensable example among n8n templates for core logic.
The logic of this n8n workflow is straightforward and focuses on data handling:
myVariable and myVariable2) to the incoming data item, demonstrating basic data enrichment.myVariable2 (which contains the string 'this is exciting') from the output of the previous FunctionItem n8n node. It sets this value to a new property named data and uses the 'Keep Only Set' configuration to ensure only this newly created data property is passed to the next stage of the n8n workflow, effectively cleaning the data item.To deploy this n8n workflow template, follow these steps:
This n8n workflow utilizes three essential core nodes:
2 hours Interval (n8n trigger)
Function: Acts as the starting n8n trigger for the n8n workflow, executing the automation on a fixed time basis.
Key Configuration: Set to execute every 2 hours (unit: hours, interval: 2).
FunctionItem (n8n node)
Function: Executes JavaScript code to modify the data item. It injects custom variables for downstream use.
Key Configuration: Defines item.myVariable = 1; and item.myVariable2 = "this is exciting"; to enrich the data payload.
Set (n8n node)
Function: Transforms and filters the data structure. It selectively passes data from previous n8n nodes.
* Key Configuration: Sets a new property named data using an expression ={{$node["FunctionItem"].data["myVariable2"]}}. Crucially, keepOnlySet is enabled, ensuring only the new data property remains in the output item.
Secure your AI agents against jailbreaking, PII leakage, and toxic content. This advanced n8n workflow implements multiple security guardrails using specialized n8n node logic, ideal for enterprise deployments.

Deploy an advanced customer support chatbot using an n8n workflow. It uses GPT-4o agents and n8n node tools to check Google Sheets inventory and process sales orders automatically.

Use an advanced n8n workflow to categorize Lemlist email replies using OpenAI, automatically manage leads in HubSpot (create deals/tasks), and send instant Slack alerts. Leverage these powerful n8n templates.

Analyze your n8n instance dependency structure. This n8n workflow automatically generates a visual dependency graph and applies tags to subworkflows based on their callers, streamlining maintenance.

Use this robust n8n workflow to capture and log all execution errors to Google Sheets, instantly notify your team via Telegram, and send comprehensive alerts via Gmail. This powerful n8n template ensures high reliability and quick incident response.









































