Your First Workflow
Build an automated lead processing workflow in 10 minutes
Build your first workflow in under 10 minutes! This tutorial will guide you through creating an automated lead processing workflow.
What We'll Build
A workflow that:
- Receives data via webhook
- Validates the input
- Sends a notification to Slack
- Stores the data
[Webhook] → [Validate] → [Notify Slack] → [Store Data]
Prerequisites
- Arcanflows account (free tier works)
- Basic understanding of webhooks (optional)
Step 1: Create a New Workflow
- Navigate to Workflows in the sidebar
- Click Create Workflow
- Enter a name: "Lead Processing Workflow"
- Click Create
You'll be taken to the visual workflow builder.
Step 2: Add a Webhook Trigger
Every workflow starts with a trigger. We'll use a webhook to receive data from external sources.
- The canvas shows an empty workflow
- Click Add Trigger or drag "Webhook" from the palette
- Configure the trigger:
json{ "name": "Receive Lead", "method": "POST", "authentication": { "type": "bearer", "token": "your-secret-token" } }
- Click Save
Your webhook URL will be displayed:
https://hooks.arcanflows.io/v1/workflows/{your-workflow-id}/webhook
Step 3: Add Input Validation
Let's validate that incoming data has the required fields.
- Click the + button on the trigger's output
- Select Condition from Logic nodes
- Configure:
json{ "name": "Validate Input", "conditions": [ { "field": "{{ input.body.email }}", "operator": "is_not_empty" }, { "field": "{{ input.body.name }}", "operator": "is_not_empty" } ], "logic": "and" }
This creates two branches:
- True: Data is valid, continue processing
- False: Data is invalid, we'll handle this later
Step 4: Send Slack Notification
When we have valid data, let's notify the team.
- Click + on the True branch
- Select Send Notification
- Configure:
json{ "name": "Notify Team", "channel": "slack-webhook", "message": "🎉 New lead received!\n\nName: {{ input.body.name }}\nEmail: {{ input.body.email }}\nCompany: {{ input.body.company ?? 'Not provided' }}" }
Note: You'll need to set up a Slack notification channel first. Go to Settings > Notification Channels to add one.
Step 5: Store the Data
Finally, let's log this lead.
- Click + after the Slack notification
- Select Set Variables
- Configure:
json{ "name": "Store Lead Data", "variables": { "lead_processed": true, "processed_at": "{{ now() }}", "lead_email": "{{ input.body.email }}", "lead_name": "{{ input.body.name }}" } }
Step 6: Handle Invalid Data
Let's add an error response for invalid submissions.
- Click + on the False branch of the Condition
- Select Set Variables
- Configure:
json{ "name": "Mark as Invalid", "variables": { "error": "Missing required fields", "valid": false } }
Your Completed Workflow
Your workflow should look like this:
┌─────────────────┐
│ Webhook │
│ (Receive Lead) │
└────────┬────────┘
│
┌────────▼────────┐
│ Condition │
│ (Validate Input)│
└────────┬────────┘
│
┌──────────────┴──────────────┐
│ │
┌───────▼───────┐ ┌───────▼───────┐
│ True │ │ False │
└───────┬───────┘ └───────┬───────┘
│ │
┌───────▼───────┐ ┌───────▼───────┐
│ Notify Team │ │ Mark Invalid │
│ (Slack) │ │ │
└───────┬───────┘ └───────────────┘
│
┌───────▼───────┐
│ Store Lead │
│ Data │
└───────────────┘
Step 7: Test Your Workflow
- Click Test in the toolbar
- Enter test input:
json{ "body": { "name": "John Doe", "email": "[email protected]", "company": "Acme Inc" } }
- Click Run Test
- Watch the execution flow through each node
- Check your Slack channel for the notification!
Step 8: Publish and Get Webhook URL
- Click Publish to make the workflow active
- Copy your webhook URL from the trigger configuration
- Test with cURL:
bashcurl -X POST "https://hooks.arcanflows.io/v1/workflows/YOUR_WORKFLOW_ID/webhook" \ -H "Authorization: Bearer your-secret-token" \ -H "Content-Type: application/json" \ -d '{ "name": "Jane Smith", "email": "[email protected]", "company": "Tech Corp" }'
What's Next?
Now that you've built your first workflow, try these enhancements:
Add More Actions
- Send Email: Send a welcome email to the lead
- HTTP Request: Push data to your CRM
- AI Agent: Qualify the lead with AI
Add Error Handling
- Retry: Automatically retry failed notifications
- Error Handler: Catch and log errors
- Alert: Get notified when workflows fail
Advanced Triggers
- Schedule: Run workflows on a schedule
- Form: Trigger from form submissions
- Event: React to system events
Common Issues
Webhook Not Receiving Data
- Check that the workflow is published
- Verify the authentication token
- Ensure the Content-Type is application/json
Slack Notification Not Sending
- Verify your Slack webhook URL in Settings
- Check the notification channel is active
- Review the execution logs for errors
Validation Always Failing
- Check the field paths match your input structure
- Use the debug panel to inspect actual values
- Ensure you're using
input.bodyfor webhook body data