ThingWorx Flow > Creating and Managing Custom Actions > Modifying the settings.json File for Custom Actions
Modifying the settings.json File for Custom Actions
You can modify the settings.json file to perform the following customizations for custom actions:
While creating a custom action, if you want to include a node module that is not allowed, you can add it to the allow list. The list of node modules that you can use in custom actions is available here.
* 
For ThingWorx Flow 9.2 and later, the allow list shows internal and external node modules for which custom actions can be added.
The following table lists the Node modules that are allowed by default:
Node Module
Allow List
Internal Node Modules
"assert", "crypto", "path", "buffer", "events", "fs", "http", "https", "punycode", "querystring", "string_decoder", "url", "zlib"
* 
The events module may not work in custom actions.
External Node Modules
"request", "lodash", "soap", "xml2js", "ws", "ptc-apiai-connector", "ptc-aws-connector", "ptc-azure-connector", "ptc-bitly-connector", "ptc-box-connector", "ptc-clock-connector", "ptc-dropbox-connector", "ptc-dynamics365-connector", "ptc-devtools-connector", "ptc-excel-connector", "ptc-file-connector", "ptc-ftp-connector", "ptc-flow-sdk", "ptc-github-connector", "ptc-gitlab-connector", "ptc-google_form-connector", "ptc-google_gmail-connector", "ptc-google_drive-connector", "ptc-google_sheet-connector", "ptc-google_task-connector", "ptc-google_translator-connector", "ptc-ILMconnector-connector", "ptc-jira-connector", "ptc-odata-connector", "ptc-office365-connector", "ptc-onedrive-connector", "ptc-oslc-connector", "ptc-pubnub-connector", ptc-rockwell-connector", "ptc-rss_feeds-connector", "ptc-salesforce-connector", "ptc-sap_odata-connector", "ptc-sap_rfc-connector", "ptc-servicemax-connector", "ptc-slack-connector", "ptc-soap-connector", "ptc-swagger-connector", "ptc-thingworx-connector", "ptc-thingworx_mapper-connector", "ptc-trello-connector", "ptc-twilio-connector", "ptc-usgeocoder-connector", "ptc-windchill-connector", "ptc-youtube-connector", "ptc-zendesk-connector", "ptc-webtools-connector", "ptc-database-connector"
You can allow or prohibit the Copy action for the out-of-the-box ThingWorx Flow services.
* 
By default, the Copy action is not supported for the following third-party services and utilities:
Azure, Dynamics 365 CRM, Excel Online, FTP, FactoryTalk MOM, OData, OSLC, SAP OData, SAP RFC, SOAP, SQL Connector, Swagger, ThingWorx, Twilio, Windchill, Windchill RV&S, Zendesk
Even if you modify the settings.json file to allow the Copy action for these third-party services and utilities, the actions do not work.
To update the settings.json file for custom actions on the ThingWorx Flow server, do the following:
For ThingWorx Flow 9.0 and 9.1 
1. Run the following command to download the configuration settings from your instance of ThingWorx Flow :
flow-deploy settings download -f <Path_to_Customization_File> -t <ThingWorx_Base_URL> -u <ThingWorx_Administrator_Username> -p '<ThingWorx_Administrator_Password>' -c devtools -s default
This command downloads the configuration file to the location that you specify with the -f argument in the command.
2. Update the settings.json code after step 3 as per your requirement and save it.
To whitelist internal node modules, modify the whiteListBuiltInModules section in the settings.json file.
To whitelist external node modules, modify the whiteListExternalModules section in the settings.json file.
To allow or prohibit the Copy action for any service, modify the copyProhibitedConnectors section in the settings.json file.
3. Run the following command to upload the configuration settings to your instance of ThingWorx Flow :
flow-deploy settings upload -f <Path_to_Customization_File> -t <ThingWorx_Base_URL> -u <ThingWorx_Administrator_Username> -p '<ThingWorx_Administrator_Password>' -c devtools -s default
This command uploads the configuration file from the location that you specified with the -f argument in the command.
After the file is uploaded successfully, you can use these customizations while creating your custom actions.
settings.json code For ThingWorx Flow 9.0 and ThingWorx Flow 9.1
{
"connectorid": "devtools",
"configschema": {
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Devtools - WhiteListed Modules",
"type": "object",
"properties": {
"whiteListExternalModules": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"request",
"lodash",
"soap",
"xml2js",
"ws",
"ptc-apiai-connector",
"ptc-aws-connector",
"ptc-azure-connector",
"ptc-bitly-connector",
"ptc-box-connector",
"ptc-clock-connector",
"ptc-dropbox-connector",
"ptc-dynamics365-connector",
"ptc-devtools-connector",
"ptc-excel-connector",
"ptc-file-connector",
"ptc-ftp-connector",
"ptc-flow-sdk",
"ptc-github-connector",
"ptc-gitlab-connector",
"ptc-google_form-connector",
"ptc-google_gmail-connector",
"ptc-google_drive-connector",
"ptc-google_sheet-connector",
"ptc-google_task-connector",
"ptc-google_translator-connector",
"ptc-ILMconnector-connector",
"ptc-jira-connector",
"ptc-odata-connector",
"ptc-oslc-connector",
"ptc-office365-connector",
"ptc-onedrive-connector",
"ptc-pubnub-connector",
"ptc-rockwell-connector",
"ptc-rss_feeds-connector",
"ptc-salesforce-connector",
"ptc-sap_odata-connector",
"ptc-sap_rfc-connector",
"ptc-servicemax-connector",
"ptc-slack-connector",
"ptc-soap-connector",
"ptc-swagger-connector",
"ptc-thingworx-connector",
"ptc-thingworx_mapper-connector",
"ptc-trello-connector",
"ptc-twilio-connector",
"ptc-usgeocoder-connector",
"ptc-windchill-connector",
"ptc-youtube-connector",
"ptc-zendesk-connector",
"ptc-webtools-connector",
"ptc-database-connector"
]
},
"whiteListBuiltInModules": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"assert",
"crypto",
"path",
"buffer",
"events",
"fs",
"http",
"https",
"punycode",
"querystring",
"string_decoder",
"url",
"zlib"
]
},
"copyProhibitedConnectors": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"azure",
"excel",
"ftp",
"rockwell",
"odata",
"sap_odata",
"sap_rfc",
"soap",
"swagger",
"thingworx",
"windchill",
"dynamics365",
"integrity",
"zendesk",
"twilio",
"database",
"oslc"
]
}
}
}
}
For ThingWorx Flow 9.2 
1. Run the following command to download the configuration settings from your instance of ThingWorx Flow :
flow-deploy settings download -f <Path_to_Customization_File> -t <ThingWorx_Base_URL> -u <ThingWorx_Administrator_Username> -p '<ThingWorx_Administrator_Password>' -c devtools -s default
This command downloads the configuration file to the location that you specify with the -f argument in the command.
2. Update the settings.json code after step 3 as per your requirement and save it.
To allow list internal node modules, modify the allowBuiltInModulesList section in the settings.json file.
To allow list external node modules, modify the allowExternalModulesList section in the settings.json file.
To allow or prohibit the Copy action for any service, modify the copyProhibitedConnectors section in the settings.json file.
3. Run the following command to upload the configuration settings to your instance of ThingWorx Flow :
flow-deploy settings upload -f <Path_to_Customization_File> -t <ThingWorx_Base_URL> -u <ThingWorx_Administrator_Username> -p '<ThingWorx_Administrator_Password>' -c devtools -s default
This command uploads the configuration file from the location that you specified with the -f argument in the command.
After the file is uploaded successfully, you can use these customizations while creating your custom actions.
settings.json code For ThingWorx Flow 9.2
{
"connectorid": "devtools",
"configschema": {
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Devtools - Allowed Modules List",
"type": "object",
"properties": {
"allowExternalModulesList": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"request",
"lodash",
"soap",
"xml2js",
"ws",
"ptc-apiai-connector",
"ptc-aws-connector",
"ptc-azure-connector",
"ptc-bitly-connector",
"ptc-box-connector",
"ptc-clock-connector",
"ptc-dropbox-connector",
"ptc-dynamics365-connector",
"ptc-devtools-connector",
"ptc-excel-connector",
"ptc-file-connector",
"ptc-ftp-connector",
"ptc-flow-sdk",
"ptc-github-connector",
"ptc-gitlab-connector",
"ptc-google_form-connector",
"ptc-google_gmail-connector",
"ptc-google_drive-connector",
"ptc-google_sheet-connector",
"ptc-google_task-connector",
"ptc-google_translator-connector",
"ptc-integrity-connector",
"ptc-jira-connector",
"ptc-odata-connector",
"ptc-oslc-connector",
"ptc-office365-connector",
"ptc-onedrive-connector",
"ptc-openpdm-connector",
"ptc-pubnub-connector",
"ptc-rockwell-connector",
"ptc-rss_feeds-connector",
"ptc-salesforce-connector",
"ptc-sap_odata-connector",
"ptc-sap_rfc-connector",
"ptc-servicemax-connector",
"ptc-slack-connector",
"ptc-soap-connector",
"ptc-swagger-connector",
"ptc-thingworx-connector",
"ptc-thingworx_mapper-connector",
"ptc-trello-connector",
"ptc-twilio-connector",
"ptc-usgeocoder-connector",
"ptc-windchill-connector",
"ptc-youtube-connector",
"ptc-zendesk-connector",
"ptc-webtools-connector",
"ptc-database-connector"
]
},
"allowBuiltInModulesList": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"assert",
"crypto",
"path",
"buffer",
"events",
"fs",
"http",
"https",
"punycode",
"querystring",
"string_decoder",
"url",
"zlib"
]
},
"copyProhibitedConnectors": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"azure",
"excel",
"ftp",
"rockwell",
"odata",
"openpdm",
"sap_odata",
"sap_rfc",
"soap",
"swagger",
"thingworx",
"windchill",
"dynamics365",
"integrity",
"zendesk",
"twilio",
"database",
"oslc"
]
}
}
}
}
Was this helpful?