Quickstart: Build Your First Flow in 5 Minutes
In this tutorial, you'll create a simple flow that runs automatically every minute. This will teach you the basics of Staqr's automation engine.
What you'll learn:
- How to create a flow
- What triggers and actions are
- How to test flows
- How to view execution logs
Time: 5 minutes Prerequisites: Staqr account (any role with Flows access)
A Flow is an automated workflow consisting of a trigger (what starts it) and actions (what it does). Learn more in Building Flows.
What We'll Build
A simple flow that:
- Trigger: Runs automatically every 1 minute (schedule trigger)
- Action: Logs "Hello from Staqr!" to the execution log
This is the simplest possible flow, but it teaches the core concepts you'll use for complex automations.
Step 1: Navigate to Flows
- Click Flows in the left navigation rail
- You'll see the Flows page (may be empty if you haven't created any flows yet)
What you see:
- Flow list (empty or showing existing flows)
- "Create Flow" button in the top right
- Folders sidebar (for organizing flows)
Step 2: Create a New Flow
- Click the "Create Flow" button (top right)
- The Flow Builder opens with an empty canvas
What you see:
- Empty flow canvas
- "Add trigger" placeholder (flows must start with a trigger)
- Toolbar with Save, Test, and Publish buttons
Step 3: Add a Schedule Trigger
A trigger is what starts your flow. We'll use a Schedule trigger to run automatically.
- Click "Select Trigger" or the trigger placeholder
- In the trigger panel, search for and select "Schedule"
- In the schedule configuration:
- Cron expression:
*/1 * * * *(runs every 1 minute) - Or use the visual builder if available
- Cron expression:
- Click Save or confirm the trigger
*/1 * * * * means "every 1 minute". The five fields are: minute, hour, day of month, month, day of week. Learn more about schedule triggers.
What you did: You configured the flow to run automatically every minute. The flow will keep running on this schedule until you disable it.
Step 4: Add a Code Action
An action is what your flow does when triggered. We'll use a Code action to log a message.
- Click "+" or "Add action" below the trigger
- Search for and select "Code" from the action types
- In the code editor, enter:
console.log("Hello from Staqr!");
return { message: "Success!", timestamp: new Date().toISOString() };
- Click Save to confirm the action
What you did: You created a simple JavaScript function that logs a message. When the flow runs, this code executes and returns a result.
Code actions run in a secure sandbox. You can use JavaScript to transform data, call APIs, or perform any logic your automation needs.
Step 5: Test Your Flow
Now let's test the flow to see it in action.
- Click the "Test" button (usually in the top toolbar)
- The flow executes immediately (doesn't wait for the schedule)
- You'll see the execution results with your message!
What you see:
- Execution status: Success (green checkmark)
- Trigger output (execution timestamp)
- Action output with your logged message and returned data
- Execution time (usually under 1 second)
Congratulations! Your first flow works!
Step 6: View Flow Runs (Optional)
Your flow is now running automatically every minute. Let's check the execution history.
- Navigate to "Flow Runs" in the left navigation (or click the runs tab in the flow builder)
- You'll see a list of all flow executions
- Click on any run to see detailed logs
What you see:
- List of executions with timestamps
- Status indicator (Success/Failed)
- Execution duration
- Click any run to see full input/output logs
Clean Up (Optional)
Your flow will continue running every minute. To stop it:
Option A: Disable the flow
- Go back to the Flows page
- Find your flow in the list
- Toggle the Enabled switch to Off (or use the context menu)
Option B: Delete the flow
- Open the flow in Flow Builder
- Click the delete option (usually in a menu or settings)
What You Learned
- Flows are automated workflows with triggers and actions
- Triggers start flows (schedule, webhook, or event-based)
- Actions do the work (code execution, integrations, API calls)
- Testing runs flows immediately for debugging
- Flow Runs show execution history and detailed logs
Next Steps
Now that you've built your first flow, explore more capabilities:
Beginner
- Building Flows - Understand flow architecture
- Passing Data - Pass data between actions
- Debugging Runs - Troubleshoot failed flows
Intermediate
- Publishing Flows - Share and deploy flows
- Flow Versioning - Manage flow versions
- Known Limits - Understand platform constraints
Advanced
- Building Integrations - Create custom connectors
- Embedding SDK - White-label flows in your app
- API Reference - Programmatic flow management
If you'd rather test APIs using a GUI instead of the Flow Builder, download our Postman Collections. They let you call Staqr and Commerce APIs interactively without writing code - perfect for support engineers, sales demos, and API exploration.
Troubleshooting
Flow doesn't run automatically:
- Verify the flow is Enabled (check the toggle switch)
- Confirm the schedule trigger cron expression is valid
- Check Flow Runs for any error logs
Code action fails:
- Check for JavaScript syntax errors in your code
- Ensure you have a
returnstatement - View the execution log for detailed error messages
Can't find Flows in navigation:
- Your user role may not have Flows permission
- Contact your administrator for access
Test button doesn't work:
- Ensure the flow has a valid trigger configured
- Save any pending changes before testing
Need Help?
- Building Flows - Complete flow documentation
- Debugging Runs - Troubleshooting guide
- API Reference - Technical specifications
Next: Continue with more advanced tutorials or explore the documentation for your specific role (Administrator, Developer, DevOps).