Creating Workflows
This guide walks you through creating your first workflow in NetPad's visual workflow editor.
Creating a New Workflowโ

You can create a workflow in two ways:
Method 1: Start from Template (Recommended)โ
-
Navigate to Workflows:
- Click "New Workflow" from dashboard, or
- Navigate to
/workflows
-
Open Template Gallery:
- Click the "Templates" tab
- Browse templates by category or search
-
Preview Template:
- Click a template card to see details
- Review nodes, edges, and metadata
-
Use Template:
- Click "Use Template" to apply
- Name your workflow
- Workflow editor opens with template loaded
-
Customize:
- Modify nodes and connections
- Configure node settings
- Add or remove nodes as needed
Templates provide pre-configured workflows for common use cases. See the Workflow Templates guide for details.
Method 2: Start from Scratchโ
-
Navigate to Workflows:
- Click "New Workflow" from dashboard, or
- Navigate to
/workflows
-
Name Your Workflow:
- Enter a descriptive name
- Add optional description
-
Open Workflow Editor:
- Visual canvas opens
- Node palette on the left
- Properties panel on the right
Building a Workflowโ
Step 1: Add a Triggerโ
Every workflow starts with a trigger:
-
Drag Trigger Node:
- Find trigger nodes in the palette
- Drag onto canvas
- Common triggers: Form Trigger, Webhook Trigger, Schedule Trigger
-
Configure Trigger:
- Click trigger node
- Configure settings in properties panel
- Example: Select form for Form Trigger
Step 2: Add Processing Nodesโ
Add nodes to process data:
-
Drag Nodes:
- Logic nodes (If/Else, Switch, Loop)
- Data nodes (Transform, Filter, Aggregate)
- Integration nodes (HTTP Request, MongoDB Query)
-
Connect Nodes:
- Click output handle of source node
- Drag to input handle of target node
- Connection shows data flow
-
Configure Nodes:
- Click each node
- Set properties in right panel
- Map data from previous nodes
Step 3: Configure Data Flowโ
Map data between nodes:
-
View Data Structure:
- Click node to see input/output data
- Data structure shown in properties panel
-
Map Fields:
- Select source field
- Map to target field
- Use expressions for transformations
-
Test Data Flow:
- Use test execution
- Verify data passes correctly
- Check transformations
Example: Form Submission Workflowโ
Let's build a workflow that sends an email when a form is submitted:
Step 1: Add Form Triggerโ
- Drag "Form Trigger" node
- Select your form
- Configure: Trigger on "Form Submitted"
Step 2: Add Email Nodeโ
- Drag "Email Send" node
- Connect from Form Trigger
- Configure email:
- To:
{{trigger.data.email}} - Subject: "Thank you for your submission"
- Body: Include form data
- To:
Step 3: Add MongoDB Writeโ
- Drag "MongoDB Write" node
- Connect from Email node
- Configure:
- Collection:
submissions - Operation: Insert
- Data: Form submission data
- Collection:
Step 4: Activate Workflowโ
- Click "Activate" button
- Workflow is now live
- Test by submitting the form
Workflow Best Practicesโ
Organizationโ
- Name Nodes Clearly: Use descriptive names
- Add Comments: Document complex logic
- Group Related Nodes: Organize visually
- Use Colors: Color-code node types
Error Handlingโ
- Add Error Nodes: Handle errors gracefully
- Configure Retries: Set retry policies
- Log Errors: Track error occurrences
- Notify on Failure: Send alerts
Performanceโ
- Optimize Node Count: Keep workflows focused
- Use Parallel Execution: When possible
- Limit Data Size: Filter early
- Set Timeouts: Prevent hanging workflows
Testingโ
- Test Each Node: Verify individual nodes
- Test Data Flow: Check data transformations
- Test Error Cases: Handle failures
- Monitor Execution: Watch first few runs
Workflow Settingsโ
Execution Modeโ
- Sequential: Execute nodes one at a time
- Parallel: Execute independent nodes simultaneously
- Auto: NetPad determines best mode
Timeout Configurationโ
- Max Execution Time: Overall workflow timeout
- Node Timeout: Per-node timeout
- Retry Policy: Retry failed nodes
Error Handlingโ
- Stop on Error: Halt workflow on error
- Continue on Error: Skip failed nodes
- Rollback: Undo changes on error
Variablesโ
Defining Variablesโ
Store values for use across workflow:
-
Add Set Variable Node:
- Drag "Set Variable" node
- Define variable name
- Set variable value
-
Use Variables:
- Reference with
{{variableName}} - Available in all subsequent nodes
- Scoped to workflow execution
- Reference with
Variable Typesโ
- String: Text values
- Number: Numeric values
- Boolean: True/false
- Object: Complex data structures
- Array: Lists of values
Conditional Logicโ
If/Else Nodeโ
Route workflow based on conditions:
-
Add If/Else Node:
- Drag "If/Else" node
- Configure condition
-
Set Condition:
- Field:
{{trigger.data.status}} - Operator: equals
- Value: "approved"
- Field:
-
Connect Branches:
- True branch: Approved path
- False branch: Rejected path
Switch Nodeโ
Multi-branch routing:
-
Add Switch Node:
- Drag "Switch" node
- Configure switch field
-
Add Cases:
- Case 1: Value "option1"
- Case 2: Value "option2"
- Default: Other values
Testing Workflowsโ
Manual Testingโ
-
Click "Test" Button:
- Opens test execution dialog
- Enter test data
- Execute workflow
-
View Execution:
- See node-by-node execution
- Check data at each step
- Verify results
Execution Historyโ
-
View Past Executions:
- Click "Executions" tab
- See all workflow runs
- Filter by status, date
-
View Execution Details:
- Click execution
- See node execution order
- Check data at each node
- View error logs
Activating Workflowsโ
Activate Workflowโ
-
Click "Activate":
- Workflow status changes to "Active"
- Begins listening for triggers
- Executes on trigger events
-
Monitor Execution:
- Watch real-time execution
- Check execution history
- Review error logs
Pausing Workflowsโ
- Click "Pause":
- Workflow stops executing
- Configuration preserved
- Can reactivate anytime
Next Stepsโ
- Templates - Use pre-built workflow templates
- Node Types - Learn about all node types
- Execution - Understand workflow execution