Understanding Flows
Flows are the foundation of automation in QuivaWorks. They allow you to build intelligent workflows that combine AI agents, business logic, data transformation, and integrations to automate complex business processes.What is a Flow?
A flow is a sequence of connected steps that execute in response to a trigger. Think of it as a recipe for automation:- Triggers start your flow (webhooks, schedules, form submissions, etc.)
- Steps perform actions (run AI agents, make decisions, transform data, call APIs)
- Connections pass data between steps using variable mappings
Core Concepts
Agent-Centric Design
QuivaWorks flows are designed around AI agents as the primary intelligence layer. While traditional automation requires you to program every step, agent-centric flows allow you to:- Define what you want to accomplish, not how to accomplish it
- Let agents make intelligent decisions based on context
- Handle exceptions and edge cases naturally through reasoning
- Use tools and connectors dynamically based on the situation
Example: Customer Service Flow
Traditional Automation: If email contains “refund” → Send to refunds team. If email contains “technical” → Send to support team. Else → Send to general inbox.Agent-Centric Flow: Trigger on new email → Agent reads email, understands intent, checks order history, applies policies, and either resolves immediately or routes to appropriate team with context.The agent handles nuance, multiple topics, and exceptions without explicit programming.
Trigger → Agent → Tools Pattern
The optimal flow pattern in QuivaWorks:- Trigger - Start the flow (form submission, schedule, webhook, etc.)
- Agent - Process the trigger with intelligence and reasoning
- Tools - Give the agent access to your data and systems (connectors)
1
Add a Trigger
Choose how your flow starts (form, API, schedule, etc.)
2
Create an Agent
Define the agent’s role and capabilities
3
Attach Tools
Connect your CRM, database, APIs, and other services
4
Deploy
Activate your flow and let it run
Flow Components
Triggers
Triggers define how and when your flow starts. Every flow needs at least one trigger.Embed Triggers
Buttons, forms, and chat windows embedded in your website
HTTP Request
Custom API endpoints to trigger flows programmatically
Webhook
Receive events from external applications
Schedule
Run flows on a recurring schedule
Upload
Trigger when documents are uploaded
Process incoming emails automatically
Stream Triggers
Real-time message processing (Advanced mode)
View All Triggers
Complete trigger reference
Steps
Steps are the building blocks of your flow. They perform actions, make decisions, and transform data.Agents
AI agents that reason, use tools, and make decisions
Condition
Branch your flow based on logic and rules
HTTP Request
Call external APIs and services
Map
Transform and reshape data structures
Rules
Apply business logic and calculations
Human in the Loop
Request human approval or input
Functions
Use utility functions and storage operations
View All Steps
Complete steps reference
Common Flow Patterns
Customer Service Automation
Lead Qualification
Content Generation
Invoice Processing
Flow Execution
Response Modes
Flows can run in two modes:- Wait for Completion
- Run in Background
The trigger waits for the entire flow to complete before responding. Best for:
- API endpoints that need to return results
- Form submissions that show confirmation
- Chat interactions that need immediate responses
Variable Mapping
Data flows between steps using variable mapping. Each step can access:- Trigger data:
$.trigger.email,$.trigger.form.name - Previous step outputs:
$.step_id.response,$.step_id.data - Secrets:
SECRET::API_KEY:: - Transformations: Filters, JSONPath, pipes
Learn more about variable mapping in our Advanced Variable Mapping Guide
Building Your First Flow
Ready to get started? Follow these guides:Create a Customer Service Agent
Build an agent that handles customer inquiries
Automate Lead Qualification
Qualify and route leads automatically
Schedule Content Creation
Generate and publish content on schedule
Process Documents
Extract and validate data from uploads
Best Practices
Start Simple, Then Add Complexity
Start Simple, Then Add Complexity
Begin with a trigger and a single agent. Test thoroughly. Then add conditions, additional steps, and error handling as needed.
Use Agents for Intelligence, Steps for Logic
Use Agents for Intelligence, Steps for Logic
Let agents handle reasoning and decision-making. Use condition steps for branching based on clear outcomes. Don’t try to program intelligence into conditions.
Give Agents the Right Tools
Give Agents the Right Tools
Connect relevant data sources and APIs. The more context an agent has, the better decisions it can make.
Handle Errors Gracefully
Handle Errors Gracefully
Add human-in-the-loop steps for critical decisions. Use condition steps to catch errors and provide fallback paths.
Test with Real Data
Test with Real Data
Use actual customer emails, form submissions, and edge cases when testing. Agents perform best when trained on realistic scenarios.
Monitor and Iterate
Monitor and Iterate
Review flow execution logs regularly. Refine agent instructions and tools based on actual performance.
Next Steps
Triggers
Learn about all trigger types
Steps
Explore available step types
Agents
Deep dive into AI agents
Variable Mapping
Master data transformations
Rules Engine
Build business logic
Best Practices
Flow design patterns