How to pass data between steps in your automation

Data imported or generated by steps in Axiom.ai's no-code builder can easily be passed between steps to transform or extract. Steps make data available in the form of Data variables that can be simply plugged into a step to make its content available to the user. If you need to learn how to import data, click here.

# Pass data from one step to another


Passing data from one step to another or from a data source is relatively simple using Axiom.ai. Look for the 'Insert Data' button, and you will see a choice of variables you can use. Just like in programming, the variable will not be available for use in steps added prior.

To learn more about passing data and variable types, read on.

# Steps that output data

Many steps in Axiom.ai output data. You can see which steps output data by looking in the header section of a step; those which contain an orange plug icon will output data.

Data variables have a specific name, which is used to refer uniquely to the output of that step, for example google-sheet-data, custom-data, scrape-data.

# Steps that can accept data

Fields that can accept data will contain an "Insert Data" dropdown. Selecting the data variable from this dropdown will pass the data from the step that produced it into the current step for processing.

Here are some of steps you can pass data into:

# Selecting what data to pass

When passing data, you can either pass all the data or select a subset of data to pass. For data that supports this, you will see the following window when adding data:

To pass specific columns, click the "Clear All" and then click the column headings to select the data you wish to pass.

At runtime, the data will be replaced with the output from its associated step, exactly as though you had entered that data manually into the box.

# Steps requiring data to function

Some steps require data to be passed to function. In these cases, if you have not yet added a step that outputs data you will be warned with a message "This step requires data input to function. You should add a step that outputs data before this one to use it.

# Outputted data between steps

Almost all of the data output from steps are formatted as a two dimensional array of rows and columns, identical to the format used in a spreadsheet. All steps that can handle data will accept this format, and will behave appropriately.

All data in Axiom.ai is immutable, which means that it is constant whenever it is used. Data output from a step is never modified in place by any other step.

However, many steps are able to take data as input and produce a new result, which is a modified version of the passed data.

In these cases, the original data remains unchanged and a new data variable is created with the modified value. This is useful to perform tasks such as removing duplicates, removing rows which contain or do not contain values, replacing text, and more.

# Understanding Data variables


Data variables are a way to store, and use information during your automation. There are three variable types in Axiom.ai, all of which have a different appearance and functionality.

# Global variable

This variable is accessible anywhere, and you will always have direct access to all the data in this variable. This variable is overwritten with new data every time it is generated - loops will not accumulate data. For that, use an accumulator variable.

# Loop variable

This variable is being used as an input for a loop, and will automatically select the row for you. You can still select a column.

# Accumulator variable

This is a special type of global variable that will automatically contain the contents of every sub-step inside it. Data is appended to the accumulator in the same order the steps appear, and it will also accumulate the results of multiple loops.