Code Component
Author and run your own code
Component key: codeDescription
The code component allows you to write your own short snippets of JavaScript code, and is handy for writing quick functions or data transformations that are specific to your product or industry. Please see the full article on the code component for information on when a code component is appropriate, and common use cases for a code component.
Code component steps should be succinct and integration-specific. If the code you write could be reused in other integrations, if it needs to handle credentials, or if the code is complex enough that it would benefit from unit tests, etc., you should write a custom component instead.
For some examples of code component usage, check out these quickstart guides:
Connections
API Key
API Key Secret
OAuth 2.0 Authorization Code
Basic Username/Password
OAuth 2.0 Client Credentials
Private Key
Triggers
Code Block Trigger
Author and run your own code as a trigger | key: runCodeTrigger
{
"payload": null
}
Data Sources
Code Block JSON Form
Author and run your own code as a JSON Form data source | key: runCodeJsonForm | type: jsonForm
Code Block Object Selection
Author and run your own code as a object selection data source | key: runCodeObjectSelection | type: objectSelection
Code Block Picklist
Author and run your own code as a picklist data source | key: runCodePicklist | type: picklist
Code Block String
Author and run your own code as a string data source | key: runCodeString | type: string
Actions
Code Block
Author and run your own code | key: runCode
{
"data": null
}