Custom settings allow you to define additional attributes on resources that can then be accessed within the logic of your flows.
Custom forms allow users of your resources to control the values of these custom settings in convenient forms that can be extended with scripts. Custom forms give less technical users the ability to easily configure flows to suit their needs.
- Defining custom settings
- Using custom settings in flows
You can define custom settings for the following resource types:
- Integrations, via the Settings tab
- Flows, via the Settings pane
- Connections, exports, and imports, via the Custom settings section of their respective forms
Settings can be defined only for resources to which you have Manager (write) access, and when you are in Developer mode. Once settings are defined and a custom form is built for those settings, then any user with Manager access can modify the values for those settings.
You can define settings by entering valid JSON objects into the Settings editor. In this example, we are introducing two fields to the settings of an integration:
Similarly, in this example, we are adding a field to a flow within an integration:
As mentioned above, integrator.io allows you to define settings for all of the key resource types. The settings on each resource are independent, which means that – for example – the settings on a flow can’t be defined in terms of the integration that the connection is used in.
Custom settings are available for each integration and its resources: flow, connections, exports, and imports. Because of the relationship between these objects, custom settings are cumulative, and integrator.io makes it easy for you to access settings from the various scopes.
For example, when working on a hook for an export in a flow, you will have access to the settings for:
- The export itself;
- The flow the export is a part of;
- The connection that the flow uses; and
- The integration that the flow belongs to
Where available, you will find settings as an object at the same level as the actual flow record data itself. For example, to continue the example from the previous section, notice the settings object below and the way in which the individual integration and flow setting attributes appear within it:
Once you have defined settings, you can use them to change the behavior of your flows. You can currently access the settings object in filters, transforms, and hooks.
- Filters: the settings object is available in both the rules and script-based filter. In the rules-based view, notice that all settings appear in the drop-down list for the second operand.
- Hooks: the settings object is available, at present, in most hooks.
Custom settings are currently not available for import mapping and response mapping. In order to work around this limitation, we recommend you copy any settings that you would like to use in mapping into the flow data itself before the mapping step, ideally as part of a preMap hook.
In this example, we are copying the region attribute from the flow settings back into the data so that it can be used in the mapping step: