Code Component

Author and run your own code
Component key: code#
DescriptionThe 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:
#
Code Connections#
API KeyInput | Notes |
---|---|
Input API Key string / Required | Notes API Key |
#
API Key SecretInput | Notes |
---|---|
Input API Key string / Required | Notes API Key |
Input API Secret password / Required | Notes API Secret |
#
OAuth 2.0 Authorization CodeInput | Notes |
---|---|
Input Authorize URL string / Required | Notes The OAuth 2.0 Authorization URL for the API |
Input Client ID string / Required | Notes Client Identifier of your app for the API |
Input Client Secret password / Required | Notes Client Secret of your app for the API |
Input Headers string Key Value List | Notes Additional header to supply to authorization requests |
Input Scopes string | Notes Space separated OAuth 2.0 permission scopes for the API |
Input Token URL string / Required | Notes The OAuth 2.0 Token URL for the API |
#
Basic Username/PasswordInput | Notes |
---|---|
Input Password password / Required | Notes Password |
Input Username string / Required | Notes Username |
#
OAuth 2.0 Client CredentialsInput | Notes |
---|---|
Input Client ID string / Required | Notes Client Identifier of your app for the API |
Input Client Secret string / Required | Notes Client Secret of your app for the API |
Input Headers string Key Value List | Notes Additional header to supply to token requests |
Input Scopes string | Notes Space separated OAuth 2.0 permission scopes for the API |
Input Token URL string / Required | Notes The OAuth 2.0 Token URL for the API |
#
Private KeyInput | Notes |
---|---|
Input Private Key text / Required | Notes Private Key |
Input Username string / Required | Notes Username |
#
Actions#
Code BlockAuthor and run your own code | key: runCode
Input | Default | Notes |
---|---|---|
Input Code code / Required | Default
| Notes The code to be executed |
#
Output Example Payload{ "data": null}