Skip to content

Automation Flow

In the previous article, we created a named value to use in the Condition component, meaning the named value must be set before the Condition component runs. In this article, weโ€™ll verify if thatโ€™s happening and explore how we can control and adjust the order in which components are executed to ensure smooth automation flow.

The automation flow refers to the order in which components are executed within an automation. In Monkedo, the flow is straightforward: once a component finishes running, the connected component is run next. For example, look at an earlier version of our automation shown below. In this case, the flow moves sequentially from left to right, executing each component one after the other.

automation with condition

Branches in Automation Diagrams

Section titled Branches in Automation Diagrams

Now, letโ€™s examine the current version of our automation as shown below. This time, the diagram isnโ€™t a linear sequence of components connected end-to-end. Instead, the flow branches after the first component, creating two separate branchesโ€”much like the branches of a tree. This occurs when a single componentโ€™s output is connected to multiple subsequent components.

Branches in automation
Branches in automation flow

When an automation flow branches, Monkedo follows the connections in a specific order, which is displayed on the connection lines, as indicated by the arrows in the image above. In our case, Branch B has the first connection (order 1), so it will run before Branch A. However, we need Branch A to run first since it sets the named value "Today," which is required by the Condition component in Branch B.

Monkedo gives you the flexibility to adjust the order of connections so that certain components run before others. To change the connection order, click the connection line you want to modify. This will highlight the line and open the Connection Panel, as shown below. The panel displays details about the connection, including the output it links to and its current order.

Connection Panel

You can adjust the order by setting this connection to 1, ensuring it runs first. Click the "Change" button to apply the new order and update the flow.

Running Components Step by Step

Section titled Running Components Step by Step

The automation editor in Monkedo lets you test your automation by running components step by step, following the exact order they will execute when the automation is live. At the top of the editor, youโ€™ll find control buttons as shown below. The leftmost button runs each component one at a time, starting from the trigger component, so make sure you've added a trigger before testing. The middle button re-executes the most recently run component, while the rightmost button stops the current execution.

Automation editor buttons

Below is an example of running components step by step using the leftmost button. In this mode, the info panel displays the results of the last component that ran, and the editor highlights the next component to be executed. During this step-by-step process, you cannot focus on other components. To return to the regular "free editing" mode, click the stop button.

Running automation with buttons at top

In the example above, the automation starts with the Schedule Trigger. It then follows connection 1 to run the top branch. Once all components in that branch are executed, the automation continues with connection 2. Components in the second branch run sequentially as well. Since the Iterate Table component processes each row of the table one at a time, the flow loops back to it after the branch completes, retrieving the next row for processing.

This feature helps you visually inspect and debug your automation before deploying it. We highly recommend running through your entire automation in the editor to ensure it behaves as expected.

What is Next?

Now that weโ€™ve learned how components run in sequence and verified the correct order of execution, in the next article, weโ€™ll use the tweet content to post tweets.