Assemble blocks in workflows

Learn how to assemble and connect blocks in Retool Workflows.

A workflow contains blocks that execute actions, such as querying a resource or leveraging AI.

You can add blocks to a workflow by:

  • Using the toolbar or contextual menu on the canvas.
  • Creating a new connected block from an existing block.
  • Duplicating an existing block.

Each block connects to another along the workflow's control flow—the connecting line that begins at the Start block—and executes sequentially. Each block must be part of the control flow to execute during a run.

Add blocks from the toolbar or contextual menu

Click + in the toolbar to add a block, then select the type of block to create. You can also right-click anywhere on the canvas to add a block. Blocks you add to the canvas are not automatically connected.

Create connected blocks

Click and drag ⦿ from an existing block, then select the type of block to create. This automatically creates a connection between blocks.

Connect and disconnect blocks

Click and drag ⦿ from one block to another. The name of a connected block appears as a label on the left. Hover the cursor over this label to preview the incoming data. To disconnect a block, click and drag its label away from the block to which it's connected.

Any blocks that are not in the control flow (i.e., no connecting line) are not run automatically and display a warning if they are not connected.

Duplicate a block

Click on an existing block and select Duplicate. This duplicates the block's state and any connections to or from it.

Duplicate a block

Execute blocks

You can run blocks individually in the Workflow editor by clicking . The block uses results passed from the previous block in the control flow.

If there is no data received from a previous block, an error will occur. You can run all previous blocks in the control flow when running a block. This effectively runs the workflow but stops once it reaches the current block.