n8n Beginner Course (5/9) - Core workflow concepts
Core Workflow Concepts in NEN
Introduction to Workflow Elements
- The video introduces core workflow concepts essential for building workflows in NEN, emphasizing the importance of understanding these elements before starting.
- Key components of the canvas include the workflow menu, activation settings, version history, and specific settings located at the top right corner.
- Activating a workflow is crucial as it allows deployment to production and automatic execution; this will be discussed further later.
Understanding Nodes and Their Functions
- Nodes are fundamental building blocks of workflows; they can be created by users who become default owners upon creation.
- The video explains how nodes are connected within a workflow, starting with a trigger node that initiates the process. Trigger nodes have only an output branch and are identifiable by an orange lightning icon.
Branching in Workflows
- Branching is vital for creating complex workflows that handle various conditions through different paths or actions based on specified criteria.
- Two methods for creating branches: using nodes with multiple outputs (e.g., if nodes with true/false outputs) or dragging multiple output lines from a single node to duplicate items across paths.
Practical Application in NEN
- Demonstration of triggers and activation shows how to set up scheduled executions (e.g., daily at 8 AM), highlighting the need for activation confirmation after setup.
- Emphasizes that once activated, workflows save automatically; thus, ensuring readiness before activation is critical.
Filtering Data in Workflows
Filtering Email Addresses in Data Processing
Understanding the Initial Condition
- The discussion begins with the observation that even if an email field is empty, it still registers as an empty value. Thus, the condition should check for non-equality to an empty string rather than existence.
- After filtering out items with empty emails, only eight valid items remain from an initial ten. This sets the stage for further processing based on email types.
Differentiating Email Types
- The next step involves categorizing emails into professional, work, and personal addresses. An
ifnode is introduced to facilitate this differentiation.
- A specific condition is established: emails containing "gmail.com" are filtered out to focus on other types of addresses. This simplifies the filtering process by removing any address that includes "gmail".
Combining Conditions for Filtering
- To refine the filter further, another condition is added to exclude emails containing "hotmail". The logical operator used here is crucial; initially considered as
or, it was determined thatandwould be more appropriate.
- By using
and, both conditions must be satisfied for an email to be classified as a professional address—meaning it cannot contain either "gmail" or "hotmail".
Testing and Branching Logic
- Upon testing these conditions, five items successfully navigate one branch while three go down another. This branching allows each item to follow a distinct path based on its characteristics.
- The final execution shows how multiple outputs can stem from a single node when conditional branches are created effectively, demonstrating a clear separation of data paths.
Conclusion of Workflow Concepts