Skip to main content

Link variable from the code to a connector

Static values can be set on connectors, but variables are a way to make your automation much more dynamic and efficient.

Create a variable in the code editor

First, you'll need to create a variable inside your code. The most simple way is to declare a new value, but you can, of course, generate new values with functions, apply data transformation, etc...

Here is an example of a simple variable declaration:

const maxEntries = 20;

Select variable in Connector parameters

To link this variable, open a connector and choose in which parameter this variable will be set.

Click on the Variable type on top of the connector and then select your variable inside the dropdown list.

Connector variable

The link is now done: at run, we'll compute the value of this variable and inject it inside the connector's parameter.