Open Navigation

Avoiding config data errors

Conflict of default values

It is important to note that you will get an error message if two of your workflows have used config data with the same name but different default values

For example, if one workflow sets "email-name" as 'Support Team' and "email-address" as 'support@acme.com', while another workflow sets "email-name" as 'Sales Team' and "email-address" as 'sales@acme.com', you will receive the following error:

ERROR: Config keys email-name,email-address are used in more than one workflow

Data type errors

Also note that you will see errors if you attempt to use project config in a field that is of a different type to the config setting:

workflow-data-type-error

This error happened because the Username field only accepts String values and the staff-number config is set as number type:

config-type-setting

Using project config in multiple connectors which require authentication

If you are using project config in more than one service connector which requires authentication (i.e. a service connector such as Marketo, Salesforce, Trello etc. - not in a Tray platform core/helper connector such as the Text Helpers conector, or the Boolean connector) you will need to slightly alter the way you enter the config in the connector operations.

The first service connector to use project config must do so in the normal fashion - using a standard $.config.xxxx jsonpath. Any second, third etc. service connectors that wish to use the same project config should be set as 'String' type and should use { } to enclose the project config path.

It is very important to follow these instructions exactly so that project config works as intended, and is available to be added to the End User Configuration Wizard.

For example if you have a project config value such as:

project-config-1

And you wish to use this in both a Trello 'Create new Board' step and a Slack 'Create Channel' step, the Trello step would look like this:

trello-config-2

Note that, as the first connector to use project config, the project config path must be a normal jsonpath.

Then for the Slack connector, as the second connector to use project config, the project config path is enclosed in { } and the field type is String:

slack-config-1

Using project config in drop-down fields

If, in the second connector using the same project config, the service operation you are using is a dynamic drop-down list (such as a list of Slack channels, or a list of Salesforce Record Types) then you will also need to use the Change Type operation in our Text Helpers connector to change the config value to string first.

This is because, if the drop-down list input type is kept as string, it will force you to choose from the drop-down list.

So if in the above example you wanted to use the project config to message an already existing Slack channel, you would change the type using the Text Helper:

change-type

And then use the result in the Slack connector 'Send Message' operation, to choose the channel from the drop-down list:

slack-ddl

Note that this time the type is jsonpath and curly brackets are not used.

Also note that using the Text Helper is not necessary if it is the first service connector to use a project config which is attempting to use it in a drop-down field. It can simply use a jsonpath to directly call the config - i.e. $.config.xxxx

Was this article helpful?
Yes
No