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 whitelisted, you can add it to the whitelist. The list of Node modules that you can use in custom actions is available here.
The following table lists the Node modules that are whitelisted by default:
Node Module
Whitelisted 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-onnector", "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_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 connectors.
* 
By default, the Copy action is not supported for the following connectors: Azure, Dynamics 365 CRM, Excel Online, FTP, Integrity Lifecycle Manager, OData, FactoryTalk MOM, SAP, SOAP, SQL Connector, Swagger, ThingWorx, Twilio, Windchill, Zendesk
Even if you modify the settings.json file to allow the Copy action for these connectors, the actions do not work.
To update the settings.json file for custom actions on the ThingWorx Flow server, do the following:
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 file 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 connector, 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.
Was this helpful?