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.
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.
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.
-
Transforms: the settings object is available only in the script-based transform, which means you can refer to elements of the settings object using the regular JavaScript dot notation.
-
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:
Comments
Is it possible to use Custom Settings in an Export's SQL query? When I reference a custom setting in a query, then preview the query, I receive the error: "Cannot read property 'xxx' of undefined", where 'xxx' is the name of the Custom Setting.
Having the exact same issue!! trying to use setting as a schema override (dev/prod) not working
Sorry for the delay, Josh Saterdalen and Anthony Rosenkrantz. (I mistook the autonotification on your comments as Community forum requests.) Assuming you haven't done so already, I'm going to submit these questions to our support queue and track the answers as they try to reproduce and then find another solution or escalate to the product team.
i put a work around in my flows to get the settings and stash them in the payload. so when i run postgres connectors i have the settings. (not great solution)
How would you go about updating the custom setting after each run? For example, if I set one up as a counter and I want the counter to increase after each successful flow run. How would I do that? Thanks!
Hi, Shubham Kaila. That's a great question, which I'm surprised we haven't seen yet.
The official answer is that it's not supported right now. Custom settings are static (read-only). Keeping tally of successful runs is best done through your dashboards/consoles and logs.
If you wanted to automate it, perhaps you could increment a value in a custom record or upload a file in an import at the end of your flow.
I defined settings on a flow group and hoped it would create a hierarchy based on the flow group name, instead it puts them in a generic settings.flowGrouping property. Bummer.
Maybe I'm not thinking about flow grouping correctly, but what is the point of settings on a flowGroup? How is it different than settings at the integration level? Is there different behavior in some way for these two:
Steve Klett - Thanks for posting. It would be interesting to understand your use case to learn. I am assuming you're trying to access some of these settings through your bubbles/flow. That particular flow might be belonging to one of the flow groups. In this case you would see the settings defined for that flow group which is "ftp_file_prefix". Were you expecting to see the settings defined for all flow groups in which case you may want to see that hierarchy that exist ? We would like to know and understand what can be accomplished with that sort of behaviour.
Please sign in to leave a comment.