# Creating Flow

## Basic Flows

The default flow in automation design is provided by "push" type connections. These connections allow the automation flow to reach other blocks by following the connections that depend on the outputs of a block that has completed its work. However, you can create flows that go from the very simple to the complex.&#x20;

Let's diggin'.

### Sequence Flow

When blocks are connected sequentially (in series), the automation flow proceeds by running these blocks sequentially.&#x20;

<figure><img src="https://lh3.googleusercontent.com/ySUWEnU_8WqkxNV9laD5wtI5beKVbaMGRsOg3IEkcbaIBTl3KpR7NG8qQAwNks_NC8xUAtUEb8TMQncbgh6SYi-mywC5kPEO3HOTNqxATyBu8Hkb5Za1rD3N_hkb-ahfbjFJAZ39eDp_Lrqwsw5Mvi0" alt=""><figcaption><p>A sequence flow</p></figcaption></figure>

### Parallel Flow

If there is more than one connection on an output, the automation flow follows the connections according to their order and operates the connected blocks. Connections on a single output are sorted in the order they were added. You can change the order later if you want.

<figure><img src="https://lh6.googleusercontent.com/SVLW-563ZenGw4pZHwc_06OsdA49tiQDUwKI8d-hXkvNcBMAR7y6c4xm60ID3ATY2qKHXGkYz7DMuIVPcaCeD83iFx0BR9RZHefReaYtUhjocrtYLCy4_VvzW-qDJ-XJxU9G3lRPg3K8aPzwcsc7Z3w" alt=""><figcaption><p>Working order of blocks: A, B, C, D, E.</p></figcaption></figure>

### Sequence and Parallel Together

Automation flow gives priority to sequence flow that are a combination of serial and parallel connections. In other words, the output coming out of the main block runs the first sequence flow in parallel. When this sequence flow is completed, the other sequence flow in parallel starts.&#x20;

<figure><img src="https://lh5.googleusercontent.com/-YZVRe0-eb6aWri5IJgDaIjbrTO_4LcEKCVg2kKyH1wDw9-5kpMLlHvVw0ERh1PoIxUUjBy-AKFV_Wq9KGJfFnxloeaLulE0netztPKBuGRCBzDvIAw2NV0kCbl75rZXfZvyJGo5gvSDbm343S42_Ag" alt=""><figcaption><p>Working order of blocks: A, B, C, D, E.</p></figcaption></figure>

### Flow with More than One Output

If a block has more than one output, the connections of the outputs are not followed simultaneously, but in order on the block. Outputs are sorted from top to bottom on the block in the editor.

<figure><img src="https://lh3.googleusercontent.com/QWbGDmkHdj0aLXqW6gpiYEDyo-vhNrsOO_L610kX8yhH_7T4V2F_OCBY2ouk32nHn1sqELB7tN44O6wyR-sjXgbij26SOOtdNpLWjwjIkFhH1HVCJhYOUNEZXBVyF04pBaE4O-fFcKY3lVNYw43TvgE" alt=""><figcaption><p>Working order of blocks: A, B, C.</p></figcaption></figure>

### Flow with More than One Output and in Parallel

Where the blocks has multiple outputs and some outputs have multiple connections, the flow follows each output sequentially. In the output, the connections are followed in order among themselves.

<figure><img src="https://lh6.googleusercontent.com/2sHmYnSLhLn0VfL-bzMzV9u0URGKPqrOTFrJlFAQRW636elhvm6zYyYOp5m2ABQlia1sQSbCjz3Nt4hCT1Wl4Ns0Nu6-0ardoWpqE3Yti7t0XkbD4XAvLlJh9rtJ-kXoraU3wfDTAl00PjhC3J9QMhU" alt=""><figcaption><p>Working order of blocks: A, B, C, D.</p></figcaption></figure>

### Flow Having Multiple Inputs

In the case where the automation flow connects on different inputs of a block, for the block to work, all its connected inputs must be activated. An inğut becomes active when one of the connections linked to it becomes active and uses the value of that connection.&#x20;

In the image below, when the flow reaches block C for the first time by following blocks A and B, it cannot be run because the second input of block C is not yet active. Therefore, this connection of the automation flow terminates and the flow follows the second connection of block A to reach block D and C in turn. When block C is connected a second time, it runs because all its inputs are active.

<figure><img src="https://lh4.googleusercontent.com/V0WuVXuLJGwxCqvPAb-KmnTaQqOA7Z4b4z5g9tRHJqp5cnQA0SLqvvLMw1KQhKVBGCf5heSiSE-Kcg2HbD1vQpUr2IV-IYLzZufF2TiXrXXsP97OP4DlDawi2KejXxey1iymo1sDE6BkBKYewSVIliA" alt=""><figcaption><p>Working order of blocks: A, B, C (not work), D, C.</p></figcaption></figure>

As shown in the image below, the output from blocks A and B has been activated and the output has been moved to block C. But since the second output of the A block is not activated in the automation flow, the second input of the C block is not active. So the first time block C is accessed, it will not work. However, when block C is reached by following the second input of component A, block C now works.

<figure><img src="https://lh5.googleusercontent.com/breER7RyEmf3phN9edUjSeUvXLC-SVdMnuv5RZoIiAbDg59MVKq04wVxjx11teasXKnT7mTmhYOE2SO3nmt4daI43TD5Khd7dZE4Ps53NFnVAn_YCZhXWUG4LSwF06-WHCSHH9cWzUUmJstB2vE0J2I" alt=""><figcaption><p>Working order of blocks: A, B, C (not work), C.</p></figcaption></figure>

### Flow Having Single Input&#x20;

In the case where two connections link on a single input of a block, C will run every time C is reached, as all inputs of C are active when block C is reached by following connection.

<figure><img src="https://lh4.googleusercontent.com/dami6D0rsBPKRWgtFdJqxfponthRfODGPN0QY4JbCmBGy1x-gJmYwO0X4-h6dDhPz3aRJkjv6c-Cnk4aqhOp9_6gGwJtOSdvO-BEIh9602eLh5znT6ZO4Rwm8gYikQWcu23PJxpGaR23XAoKZyPymLg" alt=""><figcaption><p>Working order of blocks: A, B, C, D.</p></figcaption></figure>

This automation flow can be used when the same operations need to be repeated for the data obtained as a result of different operations.

## Circular Flow

The connection structure that enables a block to reach itself when the connections from the output of a block to the inputs of other blocks are followed as a chain is called a circular flow.

Direct and indirect circles are not allowed in the automation flow, as an example of which are shown below. Automations with a circular connection will not run.

<figure><img src="https://lh6.googleusercontent.com/dSvh-I4lQNdhmH3iud-B-aixp4KMFLCTf_LsAHRfPNvyIxALX9RD6I4HndvfSA2Ovp4aorfkNZtPw_8RzxZhLeNMdBWrolYuiWlxMX0pqaufeies5BbyV94BcHlQkQv7TIaWLRVX81JBul7rymC0gxc" alt=""><figcaption><p>Not working flow</p></figcaption></figure>

## Conditional Flow

A conditional branching of the automation flow takes place using blocks that have multiple outputs, each of which is activated or not activated depending on a certain condition, as shown below. There is a special condition component so you can branch the automation flow by specifying your own branching rules.

<figure><img src="https://lh6.googleusercontent.com/MbhjnDQunUj-a-6SJBf00eOFLCfagI_HnkmchIAi1-dqcx77ENMlTlKxh5EC65tZiN2V0v1nDHJNdkptiCwV03wlZgNbHK1zMfKuerTBBJ8tyLKWyx4s4qCgVUlJjxpXVGWJgpgRQmJOrOsiNLQCB9E" alt=""><figcaption><p>Conditional Flow</p></figcaption></figure>

## Iterated Flow

Iteration in the automation flow is created with iteration components. These components cause elements to repeat a specified number of times. Once the iteration block is activated in the automation flow, it repeatedly activates its outputs with different values. That is, the next element of the list or the number of iterations is output. This iteration continues until it is time to stop. You can do this from the settings of iteration component.

Iteration components have two different types of output that are activated during each iteration and when all iterations are complete. These two separate types of outputs are not activated at the same time. The output activated during each iteration is shown as 1 in the image below. These outputs can be multiple. It can provide iteration-related values, such as the repeating list element and the iteration count, and allows blocks to be connected and run during each iteration. In the same image, when all iterations are completed, the activated output is shown with 2. This output ensures that other processes that need to run in the automation flow after iterations run and the automation flow continues.

<figure><img src="https://lh6.googleusercontent.com/c8Nw1c8m7bjEZ_Z8rggbgb3p-Bgm23MghhtT8HjTrjBUaHRO3-zCkX8QSF3LkeI65EskpF2WVhYHugyqMdg1D3VAm-7PVOrT_d3HiCTjIvrPCI5FXc-sIvKuLsPsIBCKDr57ZpQTMvwR4bJoqhSxwOE" alt=""><figcaption><p>Working order of blocks: A, I (iterated), B (iterated), C (iterated), I (iterated), B (iterated), C (iterated), …, I (completed), D (completed), E (completed)</p></figcaption></figure>

## Flow with Pull Connection

Blocks can be connected in an automation flow in such a way that a block provides output values to the blocks that come after it, without being directly connected to a preceding block. This connection style is known as a 'pull connection.' Unlike the 'push' connection where blocks connected in this manner are triggered to work due to the execution of preceding blocks, in a 'pull' connection, the blocks connected receive the values they need from a block that comes after them. This enables smoother communication and interaction between blocks.

Think of it like this: imagine a relay race. The runner passing the baton (output values) to the next runner (block) doesn't depend on the previous runner's speed. Instead, the next runner takes the baton when they're ready and move at their pace. Similarly, in a 'pull' connection, blocks work when they need to, without waiting for the blocks before them to finish.

<figure><img src="https://lh3.googleusercontent.com/YthDLGbVuWWM0ljwDsVfzi5x0wpJprzqus4PdcAiVyT1kGknb8FteLth4jzmUFKqSAJHN85mHH8-S6m96a9dhXCpuWaYUHmPcVoFLyfBH4t4JzWn80fQIQJQ4YUk3NtIvEbT6LJ-PT4e6z-Fvfr-HYQ" alt=""><figcaption><p>Working order of blocks: T, A (not work), B, A</p></figcaption></figure>

### Sequence Pull Flow

If pull components require the output of other pull components to function, the components are executed sequentially, providing the required input values for each component's operation. To achieve this, the pull branch is initiated from the starting block and components are executed by following the connections.

<figure><img src="https://lh4.googleusercontent.com/FizwDUfySVhCl4cJ3bswqc_AdU3Tt_kjiMXBAp0n_x6eopkI0L1eMzwgqyes6l7rsQOgRwevbDIOrEl-o2EkL7wJuuvRn9DiCDV2HWh1NyXY79Ka5NUJUrSflZbdVtk3MYjJnlSTPn_VGajfvA4rwMg" alt=""><figcaption><p>Working order of blocks: T, A (not work), B, C, A</p></figcaption></figure>

### Parallel Pull Flow

If the pull branch has branching, the automation flow follows the branches according to the sequence of input points within each branch and the order in which branches attached to the same input point were added. Users can modify this sequence.

<figure><img src="https://lh5.googleusercontent.com/Yojv47PpfITZqEni35b6PYsme_tdGVYEM7XAk9jkGPmcoERjfDLrWN92i-nU8Nad7BhuhZ7uUPjzmejBieTltx2deernUSeXrY6rahCmaTjmz-w-Ku-eZv3B3lz-SrDTwZhhI319k1nqvjN9RM6ycnE" alt=""><figcaption><p>Working order of blocks: T, A (not work), B, D (not work), C, D, A</p></figcaption></figure>

### Flow Connecting to Multiple Inputs

If branching occurs within the pull branch and these branches connect, the block where the flow branches (represented as Block B in the visual) runs once, and its output connections are followed. For the block where the branches converge to operate, all of its inputs must be active.

<figure><img src="https://lh5.googleusercontent.com/QLteEdJ_XO0XBPrJFlhq_ZeCyDjuUZZR727NtlcqqM4prrwYceDdXUcUa0YViHvzy0q1UV1cjTh-bOZCDw3e46vjZg_cgoFzfPH7Miiq_HihGnL_a7snbU6GDsfE4oiwQzxmuEXTM6-lvsM29XsMesg" alt=""><figcaption><p>Working order of blocks: T, A (not work), B, C, E (not work), D, E, A</p></figcaption></figure>

### **Flow Connecting to Single Input**

It's not possible to add multiple pull connections to a single input of any blocks. On a single input, both pull and push connections cannot coexist simultaneously. The flow depicted in below is invalid and won't execute in the program.

<figure><img src="https://lh5.googleusercontent.com/t9jcoLQ26o82outOez99k0MpZjbrrxNFHQCAmQqaWU60BfAjYq0HsS78FylZNdEDgtj7w5trQCDm8JEJFb2NiABegQSHQLWh3h1YLbZ1v7HjFLNv4_5glXw5GteX8tJRTP_4NPJLyvflw-v3R9CGGTQ" alt=""><figcaption><p>Incorrect flow example with multiple pull connections on a single input</p></figcaption></figure>

### **Connections Excluded from Pull Flow**

If a component is to be operated using the pull method, only the connections within the pull branch that serve the purpose of supplying necessary input values for the component's operation are considered. These connections encompass all the connections reached by tracing back from the relevant input. In the example shown in below, the output of block B only reaches block A since it's triggered due to A. The connection between B and C isn't followed as it's not necessary for the operation of block A, hence block C doesn't operate.

<figure><img src="https://lh5.googleusercontent.com/iXoqXvk1BMqVBEHxnlli4n8qGcb5Zchx6MhD907mj7hu161WC7npFll41bhaFr6aOTlquKC6uuOWrdn-_q1rWw5lpTfbxuBtBWA3_IbkNsVnRHvg83Jl9hmem0k9TylP1OeSpJs6pjmUmF-X7cl8kF4" alt=""><figcaption><p>Connection excluded pull flow. The pull flow running to provide the second input of block A does not include the connection between blocks B and C.</p></figcaption></figure>
