Home » Workflow Automation » First Workflow

How to Build Your First Automated Workflow

Building your first workflow takes about ten minutes. You create a new chain command, add blocks for each step on the visual canvas, connect them in order, and set the trigger. This guide walks through building a simple lead notification workflow that sends an email and updates a database record when a new contact arrives.

Before You Start

You need an active account with the Chain Commands app installed. If you also plan to send emails or SMS messages in your workflow, make sure you have the Email Broadcast or SMS Broadcast app installed and configured with a sending provider. For this tutorial, we will build a workflow that queries data and sends an email notification, so the Email Broadcast app should be ready.

Tip: If this is your very first time using the platform, try creating a simple chatbot first to get familiar with the admin panel. Workflows build on top of the same command system that all apps use.

Step-by-Step: Build a Lead Notification Workflow

Step 1: Create a new chain command.
Go to the Chain Commands app in your admin panel. Click Create New Chain Command. Give it a name like "New Lead Notification" and save it. The visual workflow editor opens with an empty canvas.
Step 2: Add the trigger block.
Every workflow starts with a trigger. For this example, we will use a webhook trigger so an external form or system can start the workflow by sending data to a URL. Drag a webhook trigger block onto the canvas. The platform generates a unique URL that you can give to your form builder, landing page, or any system that sends HTTP requests. When data arrives at that URL, the workflow starts.
Step 3: Add a data processing block.
Drag an app command block onto the canvas and connect it to the trigger. Configure it to read the incoming data and store the contact information in variables. For example, extract the name, email, and message fields from the webhook payload. These variables will be available to every subsequent step in the workflow.
Step 4: Add a database update block.
Drag another command block and connect it after the data processing step. Configure it to insert or update a record in your database with the new contact information. This ensures every lead is saved even if a later step fails. See How to Use Variables Across Workflow Steps for details on passing data between blocks.
Step 5: Add an email notification block.
Drag an email send block and connect it after the database step. Configure the recipient as your sales team's email address. Use variables in the subject and body to include the lead's name, email, and message. For example, the subject could be "New Lead: {name}" and the body could include all the details from the form submission.
Step 6: Save and test the workflow.
Click Save to store your workflow. Send a test request to the webhook URL with sample data using a tool like curl, Postman, or your actual form. Check that the database record was created and the notification email arrived. If something is not working, check the workflow execution log to see which step failed and what data it received.

Understanding the Canvas

The visual canvas shows your workflow as a series of connected blocks. Lines between blocks represent the flow of execution. Data flows from left to right by default, and you can rearrange blocks to keep the layout clean. Each block shows its command type and a summary of its configuration, so you can scan the entire workflow at a glance.

To edit a block, click on it to open its configuration panel. To delete a block, select it and press delete. To add a new connection, drag from one block's output port to another block's input port. Connections determine the execution order, and a block will not run until all blocks connected to its input have completed.

Adding Complexity Later

Once your basic workflow is running, you can extend it with more features:

Common First Workflow Ideas

If the lead notification example does not match your use case, here are other good first workflows:

Start simple, get it working, then add steps and logic. Every workflow on the platform, no matter how complex, started as a two or three block chain.

Build your first automated workflow in minutes. Visual builder, no coding required.

Get Started Free