Connection variables

Connection variables are values stored as labeled references in a particular Nintex Apps connection. These key-value pairs are often used to store protected information unique to a connection, like credentials and database URLs. All variables are stored in a centralized location within the connection's settings and can be deployed across different environments. When an application and its connections are deployed to another environment, the connection variables will be moved, but the values will not. This allows the values to differ in each environment.

Why use connection variables?

It's common practice to develop in one environment, like a sandbox, and then deploy to another, like a production environment. When deploying to the next environment, some values are intentionally not sent because they are secret (like passwords) and others may need to be different (like database URLs). And even for values that are not protected, their settings would be overwritten during each deployment. In these examples, it would be better to have unique values for consistent placeholder references, instead of static values.

Enter connection variables. By defining the necessary variables in each connection, you'll only need to enter them once and change them only if their values change. By setting some fields to reference variables using merge syntax, instead of hard-coded values, you won't have to re-enter those field values each time you deploy to another environment. If the variable names match across environments, then their unique values are injected based on the environment's configuration.

For more information, see Deployment.

Example use case

A common workflow within Nintex Apps could look like this:

  1. Within a sandbox environment, create connection variables for the username and password for a sandbox database, but whose variable name matches the production variables exactly.
  2. Within the sandbox environment, create a connection that—instead of hardcoded values—uses the previously created connection variables for its username and password credential fields.
  3. Within a production environment, create connection variables for the username and password for a production database.

Development would take place in the sandbox environment. When deployed to the production Nintex Apps environment, the connection would function as expected, but pointed to the production database, because the environment names matched. Without using this variable-based workflow, credentials would need to be hardcoded and updated at the connection level in both environments.

Manage connection variables

You can create, edit, and delete connection variables to use in different deployed environments.

Use connection variables

Variable values are securely injected by the proxy wherever the {{$Connection.<variable name>}} merge syntax is used in the connection (for example, in the URL/endpoint). Secret variable values are not exposed to the client. Variables are deployed with the connection, but values are not.

  1. Create a connection or navigate to an existing connection with connection variables. For more information, see Configure authentication and Create a connection variable.

  2. In fields where variables are accepted, complete one of the following actions: 

    • Select a connection variable that you already created.

    • Insert the {{$Connection.<variable name>}} merge syntax.

    • Paste a copied existing merge variable. To copy an existing merge variable, navigate to the connection with the connection variable, click the Variables tab, click More options next to the variable that you want to copy, and select Copy merge variable. You can also copy a merge variable while editing it.