Avoiding config data errors
- On this page
- Avoiding config data errors
- Conflict of default values
- Data type errors
- Using project config in multiple connectors which require authentication
- Using project config in drop-down fields
Conflict of default valuesCopied!
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 errorsCopied!
You will see errors if you attempt to use project config in a field that is of a different type to the config setting:
This error happened because the Username field only accepts String values and the staff-number config is set as number type:
Using project config in multiple connectors which require authenticationCopied!
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:
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:
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:
Using project config in drop-down fieldsCopied!
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:
And then use the result in the Slack connector 'Send Message' operation, to choose the channel from the drop-down list:
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