# nodes

node_type: n8n-nodes-base.Signl4
name: Signl4
display_name: SIGNL4
description: Consume SIGNL4 API
category: Other
code_hash: ecc751791e5a3ffc499f7d9a5a93314a13ff96290453d6af4f1d3438f6f0bf80
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/signl4
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Signl4 = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Signl4 {
      constructor() {
          this.description = {
              displayName: 'SIGNL4',
              name: 'signl4',
              icon: 'file:signl4.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume SIGNL4 API',
              defaults: {
                  name: 'SIGNL4',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'signl4Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Alert',
                              value: 'alert',
                          },
                      ],
                      default: 'alert',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['alert'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send an alert',
                              action: 'Send an alert',
                          },
                          {
                              name: 'Resolve',
                              value: 'resolve',
                              description: 'Resolve an alert',
                              action: 'Resolve an alert',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['alert'],
                          },
                      },
                      description: 'A more detailed description for the alert',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['alert'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Alerting Scenario',
                              name: 'alertingScenario',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Single ACK',
                                      value: 'single_ack',
                                      description: 'In case only one person needs to confirm this Signl',
                                  },
                                  {
                                      name: 'Multi ACK',
                                      value: 'multi_ack',
                                      description: 'In case this alert must be confirmed by the number of people who are on duty at the time this Singl is raised',
                                  },
                              ],
                              default: 'single_ack',
                          },
                          {
                              displayName: 'Attachments',
                              name: 'attachmentsUi',
                              placeholder: 'Add Attachments',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: false,
                              },
                              options: [
                                  {
                                      name: 'attachmentsBinary',
                                      displayName: 'Attachments Binary',
                                      values: [
                                          {
                                              displayName: 'Property Name',
                                              name: 'property',
                                              type: 'string',
                                              placeholder: 'data',
                                              default: '',
                                              description: 'Name of the binary properties which contain data which should be added as attachment',
                                          },
                                      ],
                                  },
                              ],
                              default: {},
                          },
                          {
                              displayName: 'External ID',
                              name: 'externalId',
                              type: 'string',
                              default: '',
                              description: 'If the event originates from a record in a 3rd party system, use this parameter to pass the unique ID of that record. That ID will be communicated in outbound webhook notifications from SIGNL4, which is great for correlation/synchronization of that record with the alert. If you resolve / close an alert you must use the same External ID as in the original alert.',
                          },
                          {
                              displayName: 'Filtering',
                              name: 'filtering',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to apply event filtering for this event, or not. If set to true, the event will only trigger a notification to the team, if it contains at least one keyword from one of your services and system categories (i.e. it is whitelisted)',
                          },
                          {
                              displayName: 'Location',
                              name: 'locationFieldsUi',
                              type: 'fixedCollection',
                              placeholder: 'Add Location',
                              default: {},
                              description: "Transmit location information ('latitude, longitude') with your event and display a map in the mobile app",
                              options: [
                                  {
                                      name: 'locationFieldsValues',
                                      displayName: 'Location',
                                      values: [
                                          {
                                              displayName: 'Latitude',
                                              name: 'latitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location latitude',
                                              default: '',
                                          },
                                          {
                                              displayName: 'Longitude',
                                              name: 'longitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location longitude',
                                              default: '',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Service',
                              name: 'service',
                              type: 'string',
                              default: '',
                              description: 'Assigns the alert to the service/system category with the specified name',
                          },
                          {
                              displayName: 'Title',
                              name: 'title',
                              type: 'string',
                              default: '',
                              description: 'The title or subject of this alert',
                          },
                      ],
                  },
                  {
                      displayName: 'External ID',
                      name: 'externalId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['resolve'],
                              resource: ['alert'],
                          },
                      },
                      description: 'If the event originates from a record in a 3rd party system, use this parameter to pass the unique ID of that record. That ID will be communicated in outbound webhook notifications from SIGNL4, which is great for correlation/synchronization of that record with the alert. If you resolve / close an alert you must use the same External ID as in the original alert.',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'alert') {
                      if (operation === 'send') {
                          const message = this.getNodeParameter('message', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const data = {
                              message,
                          };
                          if (additionalFields.title) {
                              data.title = additionalFields.title;
                          }
                          if (additionalFields.service) {
                              data.service = additionalFields.service;
                          }
                          if (additionalFields.locationFieldsUi) {
                              const locationUi = additionalFields.locationFieldsUi
                                  .locationFieldsValues;
                              if (locationUi) {
                                  data['X-S4-Location'] = `${locationUi.latitude},${locationUi.longitude}`;
                              }
                          }
                          if (additionalFields.alertingScenario) {
                              data['X-S4-AlertingScenario'] = additionalFields.alertingScenario;
                          }
                          if (additionalFields.filtering) {
                              data['X-S4-Filtering'] = additionalFields.filtering.toString();
                          }
                          if (additionalFields.externalId) {
                              data['X-S4-ExternalID'] = additionalFields.externalId;
                          }
                          data['X-S4-Status'] = 'new';
                          data['X-S4-SourceSystem'] = 'n8n';
                          const attachments = additionalFields.attachmentsUi;
                          if (attachments === null || attachments === void 0 ? void 0 : attachments.attachmentsBinary) {
                              const propertyName = attachments.attachmentsBinary
                                  .property;
                              const binaryData = this.helpers.assertBinaryData(i, propertyName);
                              if (binaryData) {
                                  const supportedFileExtension = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'mp3', 'wav'];
                                  if (!supportedFileExtension.includes(binaryData.fileExtension)) {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid extension, just ${supportedFileExtension.join(',')} are supported}`, { itemIndex: i });
                                  }
                                  const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, propertyName);
                                  data.attachment = {
                                      value: binaryDataBuffer,
                                      options: {
                                          filename: binaryData.fileName,
                                          contentType: binaryData.mimeType,
                                      },
                                  };
                              }
                          }
                          responseData = await GenericFunctions_1.SIGNL4ApiRequest.call(this, 'POST', '', {}, {
                              formData: data,
                          });
                      }
                      if (operation === 'resolve') {
                          const data = {};
                          data['X-S4-ExternalID'] = this.getNodeParameter('externalId', i);
                          data['X-S4-Status'] = 'resolved';
                          data['X-S4-SourceSystem'] = 'n8n';
                          responseData = await GenericFunctions_1.SIGNL4ApiRequest.call(this, 'POST', '', {}, {
                              formData: data,
                          });
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Signl4 = Signl4;
  //# sourceMappingURL=Signl4.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: SIGNL4 credentials
  description: Documentation for SIGNL4 credentials. Use these credentials to authenticate SIGNL4 in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # SIGNL4 credentials

  You can use these credentials to authenticate the following nodes:

  - [SIGNL4](/integrations/builtin/app-nodes/n8n-nodes-base.signl4.md)

  ## Prerequisites

  Create a [SIGNL4](https://www.signl4.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - Webhook secret

  ## Related resources

  Refer to [SIGNL4's Inbound Webhook documentation](https://connect.signl4.com/webhook/docs/index.html){:target=_blank .external-link} for more information about the service.

  ## Using webhook secret

  To configure this credential, you'll need:

  - A **Team Secret**: SIGNL4 includes this secret in the "✅ Sign up complete" email as the last part of the webhook URL. If your webhook URL is `https://connect.signl4.com/webhook/helloworld`, your team secret would be `helloworld`.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"460d71df-8161-43ed-8de1-ab6ab309699c","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"f6c2c317c0ccabbc882bf67256cf7aa02464a959366c7c08428c97a97a3f8caf"}}


node_type: n8n-nodes-base.Slack
name: Slack
display_name: Slack
description: Consume Slack API
category: Other
code_hash: 0ed10d0646f3c595406359edfa2c293dac41991cee59ad4fb3ccf2bb70eca6fc
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/slack
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Slack = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SlackV1_node_1 = require("./V1/SlackV1.node");
  const SlackV2_node_1 = require("./V2/SlackV2.node");
  class Slack extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Slack',
              name: 'slack',
              icon: 'file:slack.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Slack API',
              defaultVersion: 2.1,
          };
          const nodeVersions = {
              1: new SlackV1_node_1.SlackV1(baseDescription),
              2: new SlackV2_node_1.SlackV2(baseDescription),
              2.1: new SlackV2_node_1.SlackV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Slack = Slack;
  //# sourceMappingURL=Slack.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Slack credentials
  description: Documentation for Slack credentials. Use these credentials to authenticate Slack in n8n, a workflow automation platform.
  contentType: [integration, reference]
  priority: high
  ---

  # Slack credentials

  You can use these credentials to authenticate the following nodes:

  - [Slack](/integrations/builtin/app-nodes/n8n-nodes-base.slack.md)
  - [Slack Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md)

  ## Supported authentication methods

  - API access token:
      - Required for the [Slack Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md) node.
      - Works with the [Slack](/integrations/builtin/app-nodes/n8n-nodes-base.slack.md) node, but not recommended.
  - OAuth2:
      - Recommended method for the [Slack](/integrations/builtin/app-nodes/n8n-nodes-base.slack.md) node.
      - Doesn't work with the [Slack Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md) node.

  ## Related resources

  Refer to [Slack's API documentation](https://api.slack.com/apis){:target=_blank .external-link} for more information about the service.

  ## Using API access token

  To configure this credential, you'll need a [Slack](https://slack.com/){:target=_blank .external-link} account and:

  - An **Access Token**

  To generate an access token, create a Slack app:

  1. Open your [Slack API Apps](https://api.slack.com/apps){:target=_blank .external-link} page.
  2. Select **Create New App > From scratch**.
  3. Enter an **App Name**.
  4. Select the **Workspace** where you'll be developing your app.
  5. Select **Create App**. The app details open.
  6. In the left menu under **Features**, select **OAuth & Permissions**.
  8. In the **Scopes** section, select appropriate scopes for your app. Refer to [Scopes](#scopes) for a list of recommended scopes.
  9. After you've added scopes, go up to the **OAuth Tokens** section and select **Install to Workspace**. You must be a Slack workspace admin to complete this action.
  10. Select **Allow**.
  12. Copy the **Bot User OAuth Token** and enter it as the **Access Token** in your n8n credential.
  13. If you're using this credential for the [Slack Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md), follow the steps in [Slack Trigger configuration](#slack-trigger-configuration) to finish setting up your app.

  Refer to the Slack API [Quickstart](https://api.slack.com/quickstart){:target=_blank .external-link} for more information.

  ### Slack Trigger configuration

  To use your Slack app with the [Slack Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md) node:

  1. Go to **Features** > **Event Subscriptions**.
  2. Turn on the **Enable Events** control.
  3. In n8n, copy the **Webhook URL** and enter it as the **Request URL** in your Slack app.

      ///  note  | Request URL
      Slack only allows one request URL per app. If you want to test your workflow, you'll need to do one of the following:

      - Test with your **Test URL** first, then change your Slack app to use the **Production URL** once you've verified everything's working
      - Use the **Production URL** with execution logging.
      ///

  4. Once verified, select the bot events to subscribe to. Use the **Trigger on** field in n8n to filter these requests. 
      - To use an event not in the list, add it as a bot event and select **Any Event** in the n8n node.

  Refer to [Quickstart | Configuring the app for event listening](https://api.slack.com/quickstart#listening){:target=_blank .external-link} for more information.

  ## Using OAuth2

  --8<-- "_snippets/integrations/builtin/credentials/cloud-oauth-button.md"

  If you're [self-hosting n8n](/hosting/index.md) and need to configure OAuth2 from scratch, you'll need a [Slack](https://slack.com/){:target=_blank .external-link} account and:

  - A **Client ID**
  - A **Client Secret**

  To get both, create a Slack app:

  1. Open your [Slack API Apps](https://api.slack.com/apps){:target=_blank .external-link} page.
  2. Select **Create New App > From scratch**.
  3. Enter an **App Name**.
  4. Select the **Workspace** where you'll be developing your app.
  5. Select **Create App**. The app details open.
  6. In **Settings > Basic Information**, open the **App Credentials** section.
  7. Copy the **Client ID** and **Client Secret**. Paste these into the corresponding fields in n8n.
  6. In the left menu under **Features**, select **OAuth & Permissions**.
  7. In the **Redirect URLs** section, select **Add New Redirect URL**.
  8. Copy the **OAuth Callback URL** from n8n and enter it as the new Redirect URL in Slack.
  9. Select **Add**.
  10. Select **Save URLs**.
  11. In the **Scopes** section, select appropriate scopes for your app. Refer to [Scopes](#scopes) for a list of scopes.
  13. After you've added scopes, go up to the **OAuth Tokens** section and select **Install to Workspace**. You must be a Slack workspace admin to complete this action.
  14. Select **Allow**.
  15. At this point, you should be able to select the OAuth button in your n8n credential to connect.

  Refer to the Slack API [Quickstart](https://api.slack.com/quickstart){:target=_blank .external-link} for more information. Refer to the Slack [Installing with OAuth](https://api.slack.com/authentication/oauth-v2){:target=_blank .external-link} documentation for more details on the OAuth flow itself.

  ## Scopes

  Scopes determine what permissions an app has.

  * If you want your app to act on behalf of users who authorize the app, add the required scopes under the **User Token Scopes** section.
  * If you're building a bot, add the required scopes under the **Bot Token Scopes** section.

  Here's the list of scopes the OAuth credential requires, which are a good starting point:

  | **Scope name** | **Notes** |
  | --- | --- |
  | `channels:read` | |
  | `channels:write` | Not available as a bot token scope |
  | `chat:write` | |
  | `files:read` | |
  | `files:write` | |
  | `groups:read` | |
  | `im:read` | |
  | `mpim:read` | |
  | `reactions:read` | |
  | `reactions:write` | |
  | `stars:read`| Not available as a bot token scope |
  | `stars:write` | Not available as a bot token scope |
  | `usergroups:read` | |
  | `usergroups:write` | | 
  | `users.profile:read` | |
  | `users.profile:write` | Not available as a bot token scope |
  | `users:read` | |

  ## Common issues

  ### Token expired

  --8<-- "_snippets/integrations/builtin/credentials/slack/token-rotation.md"

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"9bcb8210-c22e-407c-abdd-288607519a22","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"982600f5af43842186b915ea6270eb980207ac4850ae356f4f7e2cb3ff9413d7"}}


node_type: n8n-nodes-base.Snowflake
name: Snowflake
display_name: Snowflake
description: Get, add and update data in Snowflake
category: Other
code_hash: 500143dab0de2d112b6848ed3cc32c7b191fca0b0aa4323cb3c8b7da66b93cc4
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/snowflake
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Snowflake = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const snowflake_sdk_1 = __importDefault(require("snowflake-sdk"));
  const utilities_1 = require("../../utils/utilities");
  class Snowflake {
      constructor() {
          this.description = {
              displayName: 'Snowflake',
              name: 'snowflake',
              icon: 'file:snowflake.svg',
              group: ['input'],
              version: 1,
              description: 'Get, add and update data in Snowflake',
              defaults: {
                  name: 'Snowflake',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'snowflake',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Execute Query',
                              value: 'executeQuery',
                              description: 'Execute an SQL query',
                              action: 'Execute a SQL query',
                          },
                          {
                              name: 'Insert',
                              value: 'insert',
                              description: 'Insert rows in database',
                              action: 'Insert rows in database',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update rows in database',
                              action: 'Update rows in database',
                          },
                      ],
                      default: 'insert',
                  },
                  {
                      displayName: 'Query',
                      name: 'query',
                      type: 'string',
                      noDataExpression: true,
                      typeOptions: {
                          editor: 'sqlEditor',
                          rows: 5,
                      },
                      displayOptions: {
                          show: {
                              operation: ['executeQuery'],
                          },
                      },
                      default: '',
                      placeholder: 'SELECT id, name FROM product WHERE id < 40',
                      required: true,
                      description: 'The SQL query to execute',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to insert data to',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      placeholder: 'id,name,description',
                      description: 'Comma-separated list of the properties which should used as columns for the new rows',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to update data in',
                  },
                  {
                      displayName: 'Update Key',
                      name: 'updateKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: 'id',
                      required: true,
                      description: 'Name of the property which decides which rows in the database should be updated. Normally that would be "id".',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      placeholder: 'name,description',
                      description: 'Comma-separated list of the properties which should used as columns for rows to update',
                  },
              ],
          };
      }
      async execute() {
          const credentials = (await this.getCredentials('snowflake'));
          const returnData = [];
          let responseData;
          const connection = snowflake_sdk_1.default.createConnection(credentials);
          await (0, GenericFunctions_1.connect)(connection);
          const items = this.getInputData();
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'executeQuery') {
              for (let i = 0; i < items.length; i++) {
                  let query = this.getNodeParameter('query', i);
                  for (const resolvable of (0, utilities_1.getResolvables)(query)) {
                      query = query.replace(resolvable, this.evaluateExpression(resolvable, i));
                  }
                  responseData = await (0, GenericFunctions_1.execute)(connection, query, []);
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
          }
          if (operation === 'insert') {
              const table = this.getNodeParameter('table', 0);
              const columnString = this.getNodeParameter('columns', 0);
              const columns = columnString.split(',').map((column) => column.trim());
              const query = `INSERT INTO ${table}(${columns.join(',')}) VALUES (${columns
                  .map((_column) => '?')
                  .join(',')})`;
              const data = this.helpers.copyInputItems(items, columns);
              const binds = data.map((element) => Object.values(element));
              await (0, GenericFunctions_1.execute)(connection, query, binds);
              data.forEach((d, i) => {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(d), { itemData: { item: i } });
                  returnData.push(...executionData);
              });
          }
          if (operation === 'update') {
              const table = this.getNodeParameter('table', 0);
              const updateKey = this.getNodeParameter('updateKey', 0);
              const columnString = this.getNodeParameter('columns', 0);
              const columns = columnString.split(',').map((column) => column.trim());
              if (!columns.includes(updateKey)) {
                  columns.unshift(updateKey);
              }
              const query = `UPDATE ${table} SET ${columns
                  .map((column) => `${column} = ?`)
                  .join(',')} WHERE ${updateKey} = ?;`;
              const data = this.helpers.copyInputItems(items, columns);
              const binds = data.map((element) => Object.values(element).concat(element[updateKey]));
              for (let i = 0; i < binds.length; i++) {
                  await (0, GenericFunctions_1.execute)(connection, query, binds[i]);
              }
              data.forEach((d, i) => {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(d), { itemData: { item: i } });
                  returnData.push(...executionData);
              });
          }
          await (0, GenericFunctions_1.destroy)(connection);
          return [returnData];
      }
  }
  exports.Snowflake = Snowflake;
  //# sourceMappingURL=Snowflake.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Snowflake credentials
  description: Documentation for Snowflake credentials. Use these credentials to authenticate Snowflake in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Snowflake credentials

  You can use these credentials to authenticate the following nodes:

  - [Snowflake](/integrations/builtin/app-nodes/n8n-nodes-base.snowflake.md)

  ## Prerequisites

  Create a [Snowflake](https://www.snowflake.com/en/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - Database connection

  ## Related resources

  Refer to [Snowflake's API documentation](https://docs.snowflake.com/en/api-reference){:target=_blank .external-link} and [SQL Command Reference](https://docs.snowflake.com/en/sql-reference-commands){:target=_blank .external-link} for more information about the service.

  ## Using database connection

  To configure this credential, you'll need:

  - An **Account** name: Your account name is the string of characters located between `https://` and `snowflakecomputing.com` in your Snowflake URL. For example, if the URL of your Snowflake account is `https://abc.eu-central-1.snowflakecomputing.com` then the name of your account is `abc.eu-central-1`.
  - A **Database**: Enter the name of the [database](https://docs.snowflake.com/en/sql-reference/sql/use-database){:target=_blank .external-link} the credential should connect to.
  - A **Warehouse**: Enter the name of the default virtual [warehouse](https://docs.snowflake.com/en/sql-reference/sql/use-warehouse){:target=_blank .external-link} to use for the session after connecting. n8n uses this warehouse for performing queries, loading data, and so on.
  - A **Username**
  - A **Password**
  - A **Schema**: Enter the [schema](https://docs.snowflake.com/en/sql-reference/sql/use-schema){:target=_blank .external-link} you want to use after connecting.
  - A **Role**: Enter the security [role](https://docs.snowflake.com/en/sql-reference/sql/use-role){:target=_blank .external-link} you want to use after connecting.
  - **Client Session Keep Alive**: By default, client connections typically time out three or four hours after the most recent query execution. Turning this setting on sets the `clientSessionKeepAlive` parameter to true: the server will keep the client's connection alive indefinitely, even if the connection doesn't execute any queries.

  Refer to [Session Commands](https://docs.snowflake.com/en/sql-reference/commands-session){:target=_blank .external-link} for more information on these settings.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"611c51f4-ede2-4110-90e2-2bf0f4f753b6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"5ef9d72ec0a4551c73e9c742791ab6a354a24475aa07da048f01cc508a991994"}}


node_type: n8n-nodes-base.Sms77
name: Sms77
display_name: seven
description: Send SMS and make text-to-speech calls
category: Other
code_hash: aa9de8dde48b46654d68fcb68dc969e66a6ebb93af370b08a8c8919f7d65d0fd
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/sms77
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Sms77 = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Sms77 {
      constructor() {
          this.description = {
              displayName: 'seven',
              name: 'sms77',
              icon: 'file:seven.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Send SMS and make text-to-speech calls',
              defaults: {
                  name: 'seven',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sms77Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                          {
                              name: 'Voice Call',
                              value: 'voice',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS',
                              action: 'Send an SMS',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['voice'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Converts text to voice and calls a given number',
                              action: 'Convert text to voice',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: '+4901234567890',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The caller ID displayed in the receivers display. Max 16 numeric or 11 alphanumeric characters.',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: '+49876543210, MyGroup',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from seven.',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'The message to send. Max. 1520 characters',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Opton',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Debug',
                              name: 'debug',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the API returns fake responses like in a sandbox',
                          },
                          {
                              displayName: 'Delay',
                              name: 'delay',
                              type: 'dateTime',
                              default: '',
                              description: 'Pick a date for time delayed dispatch',
                          },
                          {
                              displayName: 'Foreign ID',
                              name: 'foreign_id',
                              type: 'string',
                              default: '',
                              placeholder: 'MyCustomForeignID',
                              description: 'Custom foreign ID returned in DLR callbacks',
                          },
                          {
                              displayName: 'Flash',
                              name: 'flash',
                              type: 'boolean',
                              default: false,
                              description: "Send as flash message being displayed directly the receiver's display",
                          },
                          {
                              displayName: 'Label',
                              name: 'label',
                              type: 'string',
                              default: '',
                              placeholder: 'MyCustomLabel',
                              description: 'Custom label used to group analytics',
                          },
                          {
                              displayName: 'No Reload',
                              name: 'no_reload',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to disable reload lock to allow sending duplicate messages',
                          },
                          {
                              displayName: 'Performance Tracking',
                              name: 'performance_tracking',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable performance tracking for URLs found in the message text',
                          },
                          {
                              displayName: 'TTL',
                              name: 'ttl',
                              type: 'number',
                              default: 2880,
                              typeOptions: {
                                  minValue: 1,
                              },
                              description: 'Custom time to live specifying the validity period of a message in minutes',
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Opton',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['voice'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Debug',
                              name: 'debug',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the API returns fake responses like in a sandbox',
                          },
                          {
                              displayName: 'From',
                              name: 'from',
                              type: 'string',
                              default: '',
                              placeholder: '+4901234567890',
                              description: 'The caller ID. Please use only verified sender IDs, one of your virtual inbound numbers or one of our shared virtual numbers.',
                          },
                          {
                              displayName: 'XML',
                              name: 'xml',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the text is in XML format',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const returnData = [];
          for (let i = 0; i < this.getInputData().length; i++) {
              const resource = this.getNodeParameter('resource', i);
              const operation = this.getNodeParameter('operation', i);
              let responseData;
              try {
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          const from = this.getNodeParameter('from', i);
                          const to = this.getNodeParameter('to', i);
                          const text = this.getNodeParameter('message', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              from,
                              to,
                              text,
                              ...options,
                          };
                          responseData = await GenericFunctions_1.sms77ApiRequest.call(this, 'POST', '/sms', body);
                      }
                  }
                  if (resource === 'voice') {
                      if (operation === 'send') {
                          const to = this.getNodeParameter('to', i);
                          const text = this.getNodeParameter('message', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              to,
                              text,
                              ...options,
                          };
                          responseData = await GenericFunctions_1.sms77ApiRequest.call(this, 'POST', '/voice', body);
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Sms77 = Sms77;
  //# sourceMappingURL=Sms77.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: seven credentials
  description: Documentation for seven credentials. Use these credentials to authenticate seven in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # seven credentials

  You can use these credentials to authenticate the following nodes:

  - [seven](/integrations/builtin/app-nodes/n8n-nodes-base.sms77.md)

  ## Prerequisites

  Create a [seven](https://www.seven.io/en){:target=_blank .external-link} developer account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [seven's API documentation](https://docs.seven.io/en){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - An **API key**: Go to **Account > Developer >** [**API Keys**](https://app.seven.io/developer#create-api-key){:target=_blank .external-link} to create an API key. Refer to [API First Steps](https://docs.seven.io/en/rest-api/first-steps){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"6b9c658a-dec8-4cbc-9127-aa19b9044708","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"f50abc77c08da32da92948cdf8a36d2b82b56d6e515a8a159e4d3ddac7ccc41d"}}


node_type: n8n-nodes-base.SplitInBatches
name: SplitInBatches
display_name: Split In Batches
description: Split data into batches and iterate over each batch
category: Other
code_hash: c751422a11e30bf361a6c4803376289740a40434aeb77f90e18cd4dd7ba5c019
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SplitInBatches = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SplitInBatchesV1_node_1 = require("./v1/SplitInBatchesV1.node");
  const SplitInBatchesV2_node_1 = require("./v2/SplitInBatchesV2.node");
  const SplitInBatchesV3_node_1 = require("./v3/SplitInBatchesV3.node");
  class SplitInBatches extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Split In Batches',
              name: 'splitInBatches',
              icon: 'fa:th-large',
              group: ['organization'],
              description: 'Split data into batches and iterate over each batch',
              defaultVersion: 3,
          };
          const nodeVersions = {
              1: new SplitInBatchesV1_node_1.SplitInBatchesV1(),
              2: new SplitInBatchesV2_node_1.SplitInBatchesV2(),
              3: new SplitInBatchesV3_node_1.SplitInBatchesV3(),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.SplitInBatches = SplitInBatches;
  //# sourceMappingURL=SplitInBatches.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Loop Over Items (Split in Batches)
  description: Documentation for the Loop Over Items node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.
  contentType: [integration, reference]
  priority: critical
  ---

  # Loop Over Items

  The Loop Over Items node helps you loop through data when needed.

  The node saves the original incoming data, and with each iteration, returns a predefined amount of data through the **loop** output.

  When the node execution completes, it combines all of the processed data and returns it through the **done** output.

  ## When to use the Loop Over Items node

  By default, n8n nodes are designed to process a list of input items (with some exceptions, detailed below). Depending on what you're trying to achieve, you often don't need the Loop Over Items node in your workflow. You can learn more about how n8n processes multiple items on the [looping in n8n](/flow-logic/looping.md) page.

  These links highlight some of the cases where the Loop Over Items node can be useful:

  * [Loop until all items are processed](/flow-logic/looping.md#loop-until-all-items-are-processed): describes how the Loop Over Items node differs from normal item processing and when you might want to incorporate this node.
  * [Node exceptions](/flow-logic/looping.md#node-exceptions): outlines specific cases and nodes where you may need to use the Loop Over Items node to manually build looping logic.
  * [Avoiding rate limiting](/integrations/builtin/rate-limits.md): demonstrates how to batch API requests to avoid rate limits from other services.

  ## Node parameters

  ### Batch Size

  Enter the number of items to return with each call.

  ## Node options

  ### Reset

  If turned on, the node will reset with the current input-data newly initialized with each loop. Use this when you want the Loop Over Items node to treat incoming data as a new set of data instead of a continuation of previous items.

  For example, you can use the Loop Over Items node with the reset option and an [If node](/integrations/builtin/core-nodes/n8n-nodes-base.if.md) to query a paginated service when you don't know how many pages you need in advance. The loop queries pages one at a time, performs any processing, and increments the page number. The loop reset ensures the loop recognizes each iteration as a new set of data. The If node evaluates an exit condition to decide whether to perform another iteration or not.

  /// warning | Include a valid termination condition
  For workflows like the example described above, it's critical to include a valid termination condition for the loop. If your termination condition never matches, your workflow execution will get stuck in an infinite loop.
  ///

  When enabled, you can adjust the reset conditions by switching the parameter representation from **Fixed** to **Expression**. The results of your expression evaluation determine when the node will reset item processing.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'split-in-batches') ]]

  ### Read RSS feed from two different sources

  This workflow allows you to read an RSS feed from two different sources using the Loop Over Items node. You need the Loop Over Items node in the workflow as the RSS Feed Read node only processes the first item it receives. You can also find the [workflow](https://n8n.io/workflows/687-read-rss-feed-from-two-different-sources/){:target=_blank .external-link} on n8n.io.

  The example walks through building the workflow, but assumes you are already familiar with n8n. To build your first workflow, including learning how to add nodes to a workflow, refer to [Try it out](/try-it-out/index.md).

  The final workflow looks like this:

  [[ workflowDemo("file:///integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/rss-feed-example.json") ]]

  Copy the workflow file above and paste into your instance, or manually build it by following these steps:

  1. Add the manual trigger.
  2. Add the Code node.
  3. Copy this code into the Code node:
  	```js
  	return [
  		{
  			json: {
  				url: 'https://medium.com/feed/n8n-io',
  			}
  		},
  		{
  			json: {
  				url: 'https://dev.to/feed/n8n',
  			}
  		}
  	];
  	```
  4. Add the Loop Over Items node.
  5. Configure Loop Over Items: set the batch size to `1` in the **Batch Size** field.
  6. Add the RSS Feed Read node.
  7. Select **Test Workflow**. This runs the workflow to load data into the RSS Feed Read node.
  8. Configure RSS Feed Read: map `url` from the input to the **URL** field. You can do this by dragging and dropping from the **INPUT** panel, or using this expression: `{{ $json.url }}`.
  9. Select **Test Workflow** to run the workflow and see the resulting data.

  ### Check that the node has processed all items

  To check if the node still has items to process, use the following expression: `{{$node["Loop Over Items"].context["noItemsLeft"]}}`. This expression returns a boolean value. If the node still has data to process, the expression returns `false`, otherwise it returns `true`.

  ### Get the current running index of the node

  To get the current running index of the node, use the following expression: `{{$node["Loop Over Items"].context["currentRunIndex"];}}`.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"b7bbbed1-bd15-4ad7-8acc-20694d3219b9","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"ed9b3c8b68f0ed9fb80abf2695f28d1f29695850d25cb170fcd625011cc2dcf3"}}


node_type: n8n-nodes-base.Splunk
name: Splunk
display_name: Splunk
description: Consume the Splunk Enterprise API
category: Other
code_hash: 8970779a0ac1a63e37de3d5c596afa6149c66570fc8fc6f0f3a952c70a600f74
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/splunk
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Splunk = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Splunk {
      constructor() {
          this.description = {
              displayName: 'Splunk',
              name: 'splunk',
              icon: 'file:splunk.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Splunk Enterprise API',
              defaults: {
                  name: 'Splunk',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'splunkApi',
                      required: true,
                      testedBy: 'splunkApiTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Fired Alert',
                              value: 'firedAlert',
                          },
                          {
                              name: 'Search Configuration',
                              value: 'searchConfiguration',
                          },
                          {
                              name: 'Search Job',
                              value: 'searchJob',
                          },
                          {
                              name: 'Search Result',
                              value: 'searchResult',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'searchJob',
                  },
                  ...descriptions_1.firedAlertOperations,
                  ...descriptions_1.searchConfigurationOperations,
                  ...descriptions_1.searchConfigurationFields,
                  ...descriptions_1.searchJobOperations,
                  ...descriptions_1.searchJobFields,
                  ...descriptions_1.searchResultOperations,
                  ...descriptions_1.searchResultFields,
                  ...descriptions_1.userOperations,
                  ...descriptions_1.userFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getRoles() {
                      const endpoint = '/services/authorization/roles';
                      const responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint));
                      const { entry: entries } = responseData.feed;
                      return Array.isArray(entries)
                          ? entries.map((entry) => ({ name: entry.title, value: entry.title }))
                          : [{ name: entries.title, value: entries.title }];
                  },
              },
              credentialTest: {
                  async splunkApiTest(credential) {
                      const { authToken, baseUrl, allowUnauthorizedCerts } = credential.data;
                      const endpoint = '/services/alerts/fired_alerts';
                      const options = {
                          headers: {
                              Authorization: `Bearer ${authToken}`,
                              'Content-Type': 'application/x-www-form-urlencoded',
                          },
                          method: 'GET',
                          form: {},
                          qs: {},
                          uri: `${baseUrl}${endpoint}`,
                          json: true,
                          rejectUnauthorized: !allowUnauthorizedCerts,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                  },
              },
          };
      }
      async execute() {
          var _a;
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'firedAlert') {
                      if (operation === 'getReport') {
                          const endpoint = '/services/alerts/fired_alerts';
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                  }
                  else if (resource === 'searchConfiguration') {
                      if (operation === 'delete') {
                          const partialEndpoint = '/services/saved/searches/';
                          const searchConfigurationId = GenericFunctions_1.getId.call(this, i, 'searchConfigurationId', '/search/saved/searches/');
                          const endpoint = `${partialEndpoint}/${searchConfigurationId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/saved/searches/';
                          const searchConfigurationId = GenericFunctions_1.getId.call(this, i, 'searchConfigurationId', '/search/saved/searches/');
                          const endpoint = `${partialEndpoint}/${searchConfigurationId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const options = this.getNodeParameter('options', i);
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/saved/searches';
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatFeed);
                      }
                  }
                  else if (resource === 'searchJob') {
                      if (operation === 'create') {
                          const body = {
                              search: this.getNodeParameter('search', i),
                          };
                          const { earliest_time, latest_time, index_earliest, index_latest, ...rest } = this.getNodeParameter('additionalFields', i);
                          (0, GenericFunctions_1.populate)({
                              ...(earliest_time && { earliest_time: (0, GenericFunctions_1.toUnixEpoch)(earliest_time) }),
                              ...(latest_time && { latest_time: (0, GenericFunctions_1.toUnixEpoch)(latest_time) }),
                              ...(index_earliest && { index_earliest: (0, GenericFunctions_1.toUnixEpoch)(index_earliest) }),
                              ...(index_latest && { index_latest: (0, GenericFunctions_1.toUnixEpoch)(index_latest) }),
                              ...rest,
                          }, body);
                          const endpoint = '/services/search/jobs';
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'POST', endpoint, body);
                          const getEndpoint = `/services/search/jobs/${responseData.response.sid}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', getEndpoint).then(GenericFunctions_1.formatSearch);
                      }
                      else if (operation === 'delete') {
                          const partialEndpoint = '/services/search/jobs/';
                          const searchJobId = GenericFunctions_1.getId.call(this, i, 'searchJobId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${searchJobId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/search/jobs/';
                          const searchJobId = GenericFunctions_1.getId.call(this, i, 'searchJobId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${searchJobId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatSearch);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const options = this.getNodeParameter('options', i);
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/search/jobs';
                          responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint, {}, qs));
                          responseData = (0, GenericFunctions_1.formatFeed)(responseData);
                      }
                  }
                  else if (resource === 'searchResult') {
                      if (operation === 'getAll') {
                          const searchJobId = this.getNodeParameter('searchJobId', i);
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          const options = this.getNodeParameter('options', i);
                          const keyValuePair = (_a = filters === null || filters === void 0 ? void 0 : filters.keyValueMatch) === null || _a === void 0 ? void 0 : _a.keyValuePair;
                          if ((keyValuePair === null || keyValuePair === void 0 ? void 0 : keyValuePair.key) && (keyValuePair === null || keyValuePair === void 0 ? void 0 : keyValuePair.value)) {
                              qs.search = `search ${keyValuePair.key}=${keyValuePair.value}`;
                          }
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = `/services/search/jobs/${searchJobId}/results`;
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatResults);
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'create') {
                          const roles = this.getNodeParameter('roles', i);
                          const body = {
                              name: this.getNodeParameter('name', i),
                              roles,
                              password: this.getNodeParameter('password', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          (0, GenericFunctions_1.populate)(additionalFields, body);
                          const endpoint = '/services/authentication/users';
                          responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'POST', endpoint, body));
                          responseData = (0, GenericFunctions_1.formatFeed)(responseData);
                      }
                      else if (operation === 'delete') {
                          const partialEndpoint = '/services/authentication/users';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${userId}`;
                          await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/authentication/users/';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', '/services/authentication/users/');
                          const endpoint = `${partialEndpoint}/${userId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/authentication/users';
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const { roles, ...rest } = this.getNodeParameter('updateFields', i);
                          (0, GenericFunctions_1.populate)({
                              ...(roles && { roles }),
                              ...rest,
                          }, body);
                          const partialEndpoint = '/services/authentication/users/';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${userId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'POST', endpoint, body)
                              .then(GenericFunctions_1.formatFeed);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.cause.error });
                      continue;
                  }
                  throw error;
              }
              Array.isArray(responseData)
                  ? returnData.push(...responseData)
                  : returnData.push(responseData);
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Splunk = Splunk;
  //# sourceMappingURL=Splunk.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Splunk credentials
  description: Documentation for Splunk credentials. Use these credentials to authenticate Splunk in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Splunk credentials

  You can use these credentials to authenticate the following nodes:

  - [Splunk](/integrations/builtin/app-nodes/n8n-nodes-base.splunk.md)

  ## Prerequisites

  - [Download and install](https://www.splunk.com/en_us/download/splunk-enterprise.html){:target=_blank .external-link} Splunk Enterprise.
  - [Enable token authentication](https://docs.splunk.com/Documentation/Splunk/9.2.1/Security/EnableTokenAuth){:target=_blank .external-link} in **Settings > Tokens**.

  /// note | Free trial Splunk Cloud Platform accounts can't access the REST API
  Free trial Splunk Cloud Platform accounts don't have access to the REST API. Ensure you have the necessary permissions. Refer to [Access requirements and limitations for the Splunk Cloud Platform REST API](https://docs.splunk.com/Documentation/SplunkCloud/8.2.2203/RESTTUT/RESTandCloud){:target=_blank .external-link} for more details.
  ///

  ## Supported authentication methods

  - API auth token

  ## Related resources

  Refer to [Splunk's Enterprise API documentation](https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog){:target=_blank .external-link} for more information about the service.

  ## Using API auth token

  To configure this credential, you'll need:

  - An **Auth Token**: Once you've enabled token authentication, create an auth token in **Settings > Tokens**. Refer to [Creating authentication tokens](https://docs.splunk.com/Documentation/Splunk/9.2.1/Security/CreateAuthTokens){:target=_blank .external-link} for more information.
  - A **Base URL**: For your Splunk instance. This should include the protocol, domain, and port, for example: `https://localhost:8089`.
  - **Allow Self-Signed Certificates**: If turned on, n8n will connect even if SSL validation fails.

  ## Required capabilities

  Your Splunk platform account and role must have certain capabilities to create authentication tokens:

  - `edit_tokens_own`: Required if you want to create tokens for yourself.
  - `edit_tokens_all`: Required if you want to create tokens for any user on the instance.

  Refer to [Define roles on the Splunk platform with capabilities](https://docs.splunk.com/Documentation/Splunk/9.2.1/Security/Rolesandcapabilities){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"c8abe97a-ba35-4d66-a9fd-09042648669a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"1178999f752143005a322bb5a90656c5d1f316fa9f4c7fb53b4910b62c275a28"}}


node_type: n8n-nodes-base.Spontit
name: Spontit
display_name: Spontit
description: Consume Spontit API
category: Other
code_hash: 33769d94fd78408d188102c331b5795082646047dcc5544e182e4f3a11529f4d
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/spontit
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Spontit = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const PushDescription_1 = require("./PushDescription");
  const moment_1 = __importDefault(require("moment"));
  class Spontit {
      constructor() {
          this.description = {
              displayName: 'Spontit',
              name: 'spontit',
              icon: 'file:spontit.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Spontit API',
              defaults: {
                  name: 'Spontit',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'spontitApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Push',
                              value: 'push',
                          },
                      ],
                      default: 'push',
                  },
                  ...PushDescription_1.pushOperations,
                  ...PushDescription_1.pushFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const timezone = this.getTimezone();
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'push') {
                      if (operation === 'create') {
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.pushToFollowers) {
                              body.pushToFollowers = body.pushToFollowers.split(',');
                          }
                          if (body.pushToPhoneNumbers) {
                              body.pushToPhoneNumbers = body.pushToPhoneNumbers.split(',');
                          }
                          if (body.pushToEmails) {
                              body.pushToEmails = body.pushToEmails.split(',');
                          }
                          if (body.schedule) {
                              body.scheduled = moment_1.default.tz(body.schedule, timezone).unix();
                          }
                          if (body.expirationStamp) {
                              body.expirationStamp = moment_1.default.tz(body.expirationStamp, timezone).unix();
                          }
                          responseData = await GenericFunctions_1.spontitApiRequest.call(this, 'POST', '/push', body);
                          responseData = responseData.data;
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Spontit = Spontit;
  //# sourceMappingURL=Spontit.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Spontit credentials
  description: Documentation for Spontit credentials. Use these credentials to authenticate Spontit in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Spontit credentials

  You can use these credentials to authenticate the following nodes:

  - [Spontit](/integrations/builtin/app-nodes/n8n-nodes-base.spontit.md)

  ## Prerequisites

  Create a [Spontit](https://www.spontit.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Spontit's API documentation](https://api.spontit.com/){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - An **API Key**: Go to **API** to get a new secret key. Enter that key as your **API Key**.
  - A **Username**: Enter your Spontit username. If you're unsure how to format it, open your **Profile** and copy the username from there.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"c0d13cc5-dc88-45a7-9752-876f7bbed293","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"a3b7f2021883ccf65b39203adecfb56a44f30c73a6f530b058f3fe0327de250f"}}


node_type: n8n-nodes-base.SpreadsheetFile
name: SpreadsheetFile
display_name: Spreadsheet File
description: Reads and writes data from a spreadsheet file like CSV, XLS, ODS, etc
category: Other
code_hash: 6e655ee1172b11636b5c4634ce0a591a107d5056c258f5cdf9cda099aa7973ea
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SpreadsheetFile = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SpreadsheetFileV1_node_1 = require("./v1/SpreadsheetFileV1.node");
  const SpreadsheetFileV2_node_1 = require("./v2/SpreadsheetFileV2.node");
  class SpreadsheetFile extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Spreadsheet File',
              name: 'spreadsheetFile',
              icon: 'fa:table',
              group: ['transform'],
              description: 'Reads and writes data from a spreadsheet file like CSV, XLS, ODS, etc',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new SpreadsheetFileV1_node_1.SpreadsheetFileV1(baseDescription),
              2: new SpreadsheetFileV2_node_1.SpreadsheetFileV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.SpreadsheetFile = SpreadsheetFile;
  //# sourceMappingURL=SpreadsheetFile.node.js.map

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"ff8413df-9579-49a4-a42b-9c9a37fa31d7","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"888e8f198a4c5103970e7d7738270b1498ea033b7a20a45d375ba0ba841d89a5"}}


node_type: n8n-nodes-base.StickyNote
name: StickyNote
display_name: Sticky Note
description: Make your workflow easier to understand
category: Other
code_hash: 71536993abcfd47e981e96d368c60bcc43b74fc57c1cb59cf8688071356f8bf0
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.StickyNote = void 0;
  class StickyNote {
      constructor() {
          this.description = {
              displayName: 'Sticky Note',
              name: 'stickyNote',
              icon: 'fa:sticky-note',
              group: ['input'],
              version: 1,
              description: 'Make your workflow easier to understand',
              defaults: {
                  name: 'Sticky Note',
                  color: '#FFD233',
              },
              inputs: [],
              outputs: [],
              properties: [
                  {
                      displayName: 'Content',
                      name: 'content',
                      type: 'string',
                      required: true,
                      default: "## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
                  },
                  {
                      displayName: 'Height',
                      name: 'height',
                      type: 'number',
                      required: true,
                      default: 160,
                  },
                  {
                      displayName: 'Width',
                      name: 'width',
                      type: 'number',
                      required: true,
                      default: 240,
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          return [items];
      }
  }
  exports.StickyNote = StickyNote;
  //# sourceMappingURL=StickyNote.node.js.map

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"4bdea6c4-ad9c-409e-a6ad-506ae02f46b6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"ba41f904cc181598b9c4d2a71fb94f24be0a8835a92bbf4e96a855387c0a3188"}}


node_type: n8n-nodes-base.Spotify
name: Spotify
display_name: Spotify
description: Access public song data via the Spotify API
category: Other
code_hash: 1a821c70bcb95f1080d2a7f8f2884b566c30771e6de24c0a9a28da9a76c8f677
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/spotify
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Spotify = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const IsoCountryCodes_1 = require("./IsoCountryCodes");
  class Spotify {
      constructor() {
          this.description = {
              displayName: 'Spotify',
              name: 'spotify',
              icon: 'file:spotify.svg',
              group: ['input'],
              version: 1,
              description: 'Access public song data via the Spotify API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Spotify',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'spotifyOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Album',
                              value: 'album',
                          },
                          {
                              name: 'Artist',
                              value: 'artist',
                          },
                          {
                              name: 'Library',
                              value: 'library',
                          },
                          {
                              name: 'My Data',
                              value: 'myData',
                          },
                          {
                              name: 'Player',
                              value: 'player',
                          },
                          {
                              name: 'Playlist',
                              value: 'playlist',
                          },
                          {
                              name: 'Track',
                              value: 'track',
                          },
                      ],
                      default: 'player',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['player'],
                          },
                      },
                      options: [
                          {
                              name: 'Add Song to Queue',
                              value: 'addSongToQueue',
                              description: 'Add a song to your queue',
                              action: 'Add a song to a queue',
                          },
                          {
                              name: 'Currently Playing',
                              value: 'currentlyPlaying',
                              description: 'Get your currently playing track',
                              action: 'Get the currently playing track',
                          },
                          {
                              name: 'Next Song',
                              value: 'nextSong',
                              description: 'Skip to your next track',
                              action: 'Skip to the next track',
                          },
                          {
                              name: 'Pause',
                              value: 'pause',
                              description: 'Pause your music',
                              action: 'Pause the player',
                          },
                          {
                              name: 'Previous Song',
                              value: 'previousSong',
                              description: 'Skip to your previous song',
                              action: 'Skip to the previous song',
                          },
                          {
                              name: 'Recently Played',
                              value: 'recentlyPlayed',
                              description: 'Get your recently played tracks',
                              action: 'Get the recently played tracks',
                          },
                          {
                              name: 'Resume',
                              value: 'resume',
                              description: 'Resume playback on the current active device',
                              action: 'Resume the player',
                          },
                          {
                              name: 'Set Volume',
                              value: 'volume',
                              description: 'Set volume on the current active device',
                              action: 'Set volume on the player',
                          },
                          {
                              name: 'Start Music',
                              value: 'startMusic',
                              description: 'Start playing a playlist, artist, or album',
                              action: 'Start music on the player',
                          },
                      ],
                      default: 'addSongToQueue',
                  },
                  {
                      displayName: 'Resource ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['player'],
                              operation: ['startMusic'],
                          },
                      },
                      placeholder: 'spotify:album:1YZ3k65Mqw3G8FzYlW1mmp',
                      description: 'Enter a playlist, artist, or album URI or ID',
                  },
                  {
                      displayName: 'Track ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['player'],
                              operation: ['addSongToQueue'],
                          },
                      },
                      placeholder: 'spotify:track:0xE4LEFzSNGsz1F6kvXsHU',
                      description: 'Enter a track URI or ID',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['album'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get an album by URI or ID',
                              action: 'Get an album',
                          },
                          {
                              name: 'Get New Releases',
                              value: 'getNewReleases',
                              description: 'Get a list of new album releases',
                              action: 'Get new album releases',
                          },
                          {
                              name: 'Get Tracks',
                              value: 'getTracks',
                              description: "Get an album's tracks by URI or ID",
                              action: "Get an album's tracks by URI or ID",
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search albums by keyword',
                              action: 'Search albums by keyword',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Album ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['album'],
                              operation: ['get', 'getTracks'],
                          },
                          hide: {
                              operation: ['search'],
                          },
                      },
                      placeholder: 'spotify:album:1YZ3k65Mqw3G8FzYlW1mmp',
                      description: "The album's Spotify URI or ID",
                  },
                  {
                      displayName: 'Search Keyword',
                      name: 'query',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'The keyword term to search for',
                      displayOptions: {
                          show: {
                              resource: ['album'],
                              operation: ['search'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['artist'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get an artist by URI or ID',
                              action: 'Get an artist',
                          },
                          {
                              name: 'Get Albums',
                              value: 'getAlbums',
                              description: "Get an artist's albums by URI or ID",
                              action: "Get an artist's albums by URI or ID",
                          },
                          {
                              name: 'Get Related Artists',
                              value: 'getRelatedArtists',
                              description: "Get an artist's related artists by URI or ID",
                              action: "Get an artist's related artists by URI or ID",
                          },
                          {
                              name: 'Get Top Tracks',
                              value: 'getTopTracks',
                              description: "Get an artist's top tracks by URI or ID",
                              action: "Get an artist's top tracks by URI or ID",
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search artists by keyword',
                              action: 'Search artists by keyword',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Artist ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['artist'],
                          },
                          hide: {
                              operation: ['search'],
                          },
                      },
                      placeholder: 'spotify:artist:4LLpKhyESsyAXpc4laK94U',
                      description: "The artist's Spotify URI or ID",
                  },
                  {
                      displayName: 'Country',
                      name: 'country',
                      type: 'string',
                      default: 'US',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['artist'],
                              operation: ['getTopTracks'],
                          },
                      },
                      placeholder: 'US',
                      description: 'Top tracks in which country? Enter the postal abbreviation',
                  },
                  {
                      displayName: 'Search Keyword',
                      name: 'query',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'The keyword term to search for',
                      displayOptions: {
                          show: {
                              resource: ['artist'],
                              operation: ['search'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                          },
                      },
                      options: [
                          {
                              name: 'Add an Item',
                              value: 'add',
                              description: 'Add tracks to a playlist by track and playlist URI or ID',
                              action: 'Add an Item to a playlist',
                          },
                          {
                              name: 'Create a Playlist',
                              value: 'create',
                              description: 'Create a new playlist',
                              action: 'Create a playlist',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a playlist by URI or ID',
                              action: 'Get a playlist',
                          },
                          {
                              name: "Get the User's Playlists",
                              value: 'getUserPlaylists',
                              description: "Get a user's playlists",
                              action: "Get a user's playlists",
                          },
                          {
                              name: 'Get Tracks',
                              value: 'getTracks',
                              description: "Get a playlist's tracks by URI or ID",
                              action: "Get a playlist's tracks by URI or ID",
                          },
                          {
                              name: 'Remove an Item',
                              value: 'delete',
                              description: 'Remove tracks from a playlist by track and playlist URI or ID',
                              action: 'Remove an item from a playlist',
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search playlists by keyword',
                              action: 'Search playlists by keyword',
                          },
                      ],
                      default: 'add',
                  },
                  {
                      displayName: 'Playlist ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['add', 'delete', 'get', 'getTracks'],
                          },
                      },
                      placeholder: 'spotify:playlist:37i9dQZF1DWUhI3iC1khPH',
                      description: "The playlist's Spotify URI or its ID",
                  },
                  {
                      displayName: 'Name',
                      name: 'name',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['create'],
                          },
                      },
                      placeholder: 'Favorite Songs',
                      description: 'Name of the playlist to create',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['create'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Description',
                              name: 'description',
                              type: 'string',
                              default: '',
                              placeholder: 'These are all my favorite songs.',
                              description: 'Description for the playlist to create',
                          },
                          {
                              displayName: 'Public',
                              name: 'public',
                              type: 'boolean',
                              default: true,
                              description: 'Whether the playlist is publicly accessible',
                          },
                      ],
                  },
                  {
                      displayName: 'Track ID',
                      name: 'trackID',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['add', 'delete'],
                          },
                      },
                      placeholder: 'spotify:track:0xE4LEFzSNGsz1F6kvXsHU',
                      description: "The track's Spotify URI or its ID. The track to add/delete from the playlist.",
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['add'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Position',
                              name: 'position',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              default: 0,
                              placeholder: '0',
                              description: "The new track's position in the playlist",
                          },
                      ],
                  },
                  {
                      displayName: 'Search Keyword',
                      name: 'query',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'The keyword term to search for',
                      displayOptions: {
                          show: {
                              resource: ['playlist'],
                              operation: ['search'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['track'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a track by its URI or ID',
                              action: 'Get a track',
                          },
                          {
                              name: 'Get Audio Features',
                              value: 'getAudioFeatures',
                              description: 'Get audio features for a track by URI or ID',
                              action: 'Get audio features of a track',
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search tracks by keyword',
                              action: 'Search tracks by keyword',
                          },
                      ],
                      default: 'track',
                  },
                  {
                      displayName: 'Track ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['track'],
                          },
                          hide: {
                              operation: ['search'],
                          },
                      },
                      placeholder: 'spotify:track:0xE4LEFzSNGsz1F6kvXsHU',
                      description: "The track's Spotify URI or ID",
                  },
                  {
                      displayName: 'Search Keyword',
                      name: 'query',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'The keyword term to search for',
                      displayOptions: {
                          show: {
                              resource: ['track'],
                              operation: ['search'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['library'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Liked Tracks',
                              value: 'getLikedTracks',
                              description: "Get the user's liked tracks",
                              action: 'Get liked tracks',
                          },
                      ],
                      default: 'getLikedTracks',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['myData'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Following Artists',
                              value: 'getFollowingArtists',
                              description: 'Get your followed artists',
                              action: 'Get your followed artists',
                          },
                      ],
                      default: 'getFollowingArtists',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['album', 'artist', 'library', 'myData', 'playlist', 'track', 'player'],
                              operation: [
                                  'getTracks',
                                  'getAlbums',
                                  'getUserPlaylists',
                                  'getNewReleases',
                                  'getLikedTracks',
                                  'getFollowingArtists',
                                  'search',
                                  'recentlyPlayed',
                              ],
                          },
                      },
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      default: 50,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['album', 'artist', 'library', 'playlist', 'track'],
                              operation: [
                                  'getTracks',
                                  'getAlbums',
                                  'getUserPlaylists',
                                  'getNewReleases',
                                  'getLikedTracks',
                                  'search',
                              ],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      default: 50,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['myData', 'player'],
                              operation: ['getFollowingArtists', 'recentlyPlayed'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 50,
                      },
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Volume',
                      name: 'volumePercent',
                      type: 'number',
                      default: 50,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['player'],
                              operation: ['volume'],
                          },
                      },
                      typeOptions: {
                          minValue: 0,
                          maxValue: 100,
                      },
                      description: 'The volume percentage to set',
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      type: 'collection',
                      placeholder: 'Add Filter',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['album'],
                              operation: ['getNewReleases'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Country',
                              name: 'country',
                              type: 'options',
                              default: 'US',
                              options: IsoCountryCodes_1.isoCountryCodes.map(({ name, alpha2 }) => ({ name, value: alpha2 })),
                              description: 'Country to filter new releases by',
                          },
                      ],
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      type: 'collection',
                      placeholder: 'Add Filter',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['playlist', 'artist', 'track', 'album'],
                              operation: ['search'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Country',
                              name: 'market',
                              type: 'options',
                              options: IsoCountryCodes_1.isoCountryCodes.map(({ name, alpha2 }) => ({ name, value: alpha2 })),
                              default: '',
                              description: 'If a country code is specified, only content that is playable in that market is returned',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const body = {};
          let qs;
          let requestMethod;
          let endpoint;
          let returnAll;
          let propertyName = '';
          let responseData;
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          requestMethod = 'GET';
          endpoint = '';
          qs = {};
          returnAll = false;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'player') {
                      if (operation === 'pause') {
                          requestMethod = 'PUT';
                          endpoint = '/me/player/pause';
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'recentlyPlayed') {
                          requestMethod = 'GET';
                          endpoint = '/me/player/recently-played';
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'items';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'currentlyPlaying') {
                          requestMethod = 'GET';
                          endpoint = '/me/player/currently-playing';
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                      }
                      else if (operation === 'nextSong') {
                          requestMethod = 'POST';
                          endpoint = '/me/player/next';
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'previousSong') {
                          requestMethod = 'POST';
                          endpoint = '/me/player/previous';
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'startMusic') {
                          requestMethod = 'PUT';
                          endpoint = '/me/player/play';
                          const id = this.getNodeParameter('id', i);
                          body.context_uri = id;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'addSongToQueue') {
                          requestMethod = 'POST';
                          endpoint = '/me/player/queue';
                          const id = this.getNodeParameter('id', i);
                          qs = {
                              uri: id,
                          };
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'resume') {
                          requestMethod = 'PUT';
                          endpoint = '/me/player/play';
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'volume') {
                          requestMethod = 'PUT';
                          endpoint = '/me/player/volume';
                          const volumePercent = this.getNodeParameter('volumePercent', i);
                          qs = {
                              volume_percent: volumePercent,
                          };
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                  }
                  else if (resource === 'album') {
                      if (operation === 'get') {
                          const uri = this.getNodeParameter('id', i);
                          const id = uri.replace('spotify:album:', '');
                          requestMethod = 'GET';
                          endpoint = `/albums/${id}`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                      }
                      else if (operation === 'getNewReleases') {
                          endpoint = '/browse/new-releases';
                          requestMethod = 'GET';
                          propertyName = 'albums.items';
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.albums.items;
                          }
                      }
                      else if (operation === 'getTracks') {
                          const uri = this.getNodeParameter('id', i);
                          const id = uri.replace('spotify:album:', '');
                          requestMethod = 'GET';
                          endpoint = `/albums/${id}/tracks`;
                          propertyName = 'tracks';
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'items';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'search') {
                          requestMethod = 'GET';
                          endpoint = '/search';
                          propertyName = 'albums.items';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const q = this.getNodeParameter('query', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs = {
                              q,
                              type: 'album',
                              ...filters,
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.albums.items;
                          }
                      }
                  }
                  else if (resource === 'artist') {
                      const uri = this.getNodeParameter('id', i, '');
                      const id = uri.replace('spotify:artist:', '');
                      if (operation === 'getAlbums') {
                          endpoint = `/artists/${id}/albums`;
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'items';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'getRelatedArtists') {
                          endpoint = `/artists/${id}/related-artists`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.artists;
                      }
                      else if (operation === 'getTopTracks') {
                          const country = this.getNodeParameter('country', i);
                          qs = {
                              country,
                          };
                          endpoint = `/artists/${id}/top-tracks`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.tracks;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          endpoint = `/artists/${id}`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                      }
                      else if (operation === 'search') {
                          requestMethod = 'GET';
                          endpoint = '/search';
                          propertyName = 'artists.items';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const q = this.getNodeParameter('query', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs = {
                              q,
                              limit: 50,
                              type: 'artist',
                              ...filters,
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.artists.items;
                          }
                      }
                  }
                  else if (resource === 'playlist') {
                      if (['delete', 'get', 'getTracks', 'add'].includes(operation)) {
                          const uri = this.getNodeParameter('id', i);
                          const id = uri.replace('spotify:playlist:', '');
                          if (operation === 'delete') {
                              requestMethod = 'DELETE';
                              const trackId = this.getNodeParameter('trackID', i);
                              body.tracks = [
                                  {
                                      uri: trackId,
                                  },
                              ];
                              endpoint = `/playlists/${id}/tracks`;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = { success: true };
                          }
                          else if (operation === 'get') {
                              requestMethod = 'GET';
                              endpoint = `/playlists/${id}`;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          }
                          else if (operation === 'getTracks') {
                              requestMethod = 'GET';
                              endpoint = `/playlists/${id}/tracks`;
                              returnAll = this.getNodeParameter('returnAll', i);
                              propertyName = 'items';
                              if (!returnAll) {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs = {
                                      limit,
                                  };
                                  responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                                  responseData = responseData.items;
                              }
                          }
                          else if (operation === 'add') {
                              requestMethod = 'POST';
                              const trackId = this.getNodeParameter('trackID', i);
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              qs = {
                                  uris: trackId,
                              };
                              if (additionalFields.position !== undefined) {
                                  qs.position = additionalFields.position;
                              }
                              endpoint = `/playlists/${id}/tracks`;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                          }
                      }
                      else if (operation === 'getUserPlaylists') {
                          requestMethod = 'GET';
                          endpoint = '/me/playlists';
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'items';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'create') {
                          body.name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, 'POST', '/me/playlists', body, qs);
                      }
                      else if (operation === 'search') {
                          requestMethod = 'GET';
                          endpoint = '/search';
                          propertyName = 'playlists.items';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const q = this.getNodeParameter('query', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs = {
                              q,
                              type: 'playlist',
                              limit: 50,
                              ...filters,
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.playlists.items;
                          }
                      }
                  }
                  else if (resource === 'track') {
                      const uri = this.getNodeParameter('id', i, '');
                      const id = uri.replace('spotify:track:', '');
                      requestMethod = 'GET';
                      if (operation === 'getAudioFeatures') {
                          endpoint = `/audio-features/${id}`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                      }
                      else if (operation === 'get') {
                          endpoint = `/tracks/${id}`;
                          responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                      }
                      else if (operation === 'search') {
                          requestMethod = 'GET';
                          endpoint = '/search';
                          propertyName = 'tracks.items';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const q = this.getNodeParameter('query', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs = {
                              q,
                              type: 'track',
                              limit: 50,
                              ...filters,
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.tracks.items;
                          }
                      }
                  }
                  else if (resource === 'library') {
                      if (operation === 'getLikedTracks') {
                          requestMethod = 'GET';
                          endpoint = '/me/tracks';
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'items';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.items;
                          }
                      }
                  }
                  else if (resource === 'myData') {
                      if (operation === 'getFollowingArtists') {
                          requestMethod = 'GET';
                          endpoint = '/me/following';
                          returnAll = this.getNodeParameter('returnAll', i);
                          propertyName = 'artists.items';
                          qs = {
                              type: 'artist',
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs = {
                                  type: 'artist',
                                  limit,
                              };
                              responseData = await GenericFunctions_1.spotifyApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.artists.items;
                          }
                      }
                  }
                  if (returnAll) {
                      responseData = await GenericFunctions_1.spotifyApiRequestAllItems.call(this, propertyName, requestMethod, endpoint, body, qs);
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Spotify = Spotify;
  //# sourceMappingURL=Spotify.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Spotify credentials
  description: Documentation for Spotify credentials. Use these credentials to authenticate Spotify in n8n, a workflow automation platform.
  contentType: [integration, reference]
  priority: medium
  ---

  # Spotify credentials

  You can use these credentials to authenticate the following nodes:

  - [Spotify](/integrations/builtin/app-nodes/n8n-nodes-base.spotify.md)

  ## Supported authentication methods

  - OAuth2

  ## Related resources

  Refer to [Spotify's Web API documentation](https://developer.spotify.com/documentation/web-api){:target=_blank .external-link} for more information about the service.

  ## Using OAuth2

  --8<-- "_snippets/integrations/builtin/credentials/cloud-oauth-button.md"

  If you're [self-hosting](/hosting/index.md) n8n, you'll need a [Spotify Developer](https://developer.spotify.com/){:target=_blank .external-link} account so you can create a Spotify app:

  1. Open the [Spotify developer dashboard](https://developer.spotify.com/dashboard){:target=_blank .external-link}.
  2. Select **Create an app**.
  3. Enter an **App name**, like `n8n integration`.
  4. Enter an **App description**.
  5. Copy the **OAuth Redirect URL** from n8n and enter it as the **Redirect URI** in your Spotify app.
  6. Check the box to agree to the Spotify Terms of Service and Branding Guidelines.
  7. Select **Create**. The **App overview** page opens.
  8. Copy the **Client ID** and enter it in your n8n credential.
  9. Copy the **Client Secret** and enter it in your n8n credential.
  10. Select **Connect my account** and follow the on-screen prompts to finish authorizing the credential.

  Refer to [Spotify Apps](https://developer.spotify.com/documentation/web-api/concepts/apps){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"45e09081-f321-4b61-a3da-c4704b57ac42","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"2cf8a07c9565e22bbdc39ebaee592d4d0ffe48c642fcf6c8df166ab0bca0336b"}}


node_type: n8n-nodes-base.SseTrigger
name: SseTrigger
display_name: SSE Trigger
description: Triggers the workflow when Server-Sent Events occur
category: Other
code_hash: 05f0871eb011af3c8b264d9249c442aca37fbbc12533aca5e843312cf67942fb
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.ssetrigger
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SseTrigger = void 0;
  const eventsource_1 = __importDefault(require("eventsource"));
  const n8n_workflow_1 = require("n8n-workflow");
  class SseTrigger {
      constructor() {
          this.description = {
              displayName: 'SSE Trigger',
              name: 'sseTrigger',
              icon: 'fa:cloud-download-alt',
              group: ['trigger'],
              version: 1,
              description: 'Triggers the workflow when Server-Sent Events occur',
              eventTriggerDescription: '',
              activationMessage: 'You can now make calls to your SSE URL to trigger executions.',
              defaults: {
                  name: 'SSE Trigger',
                  color: '#225577',
              },
              triggerPanel: {
                  header: '',
                  executionsHelp: {
                      inactive: "<b>While building your workflow</b>, click the 'listen' button, then trigger an SSE event. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a change is detected, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                      active: "<b>While building your workflow</b>, click the 'listen' button, then trigger an SSE event. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a change is detected, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                  },
                  activationHint: "Once you’ve finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously (you just won’t see those executions here).",
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'URL',
                      name: 'url',
                      type: 'string',
                      default: '',
                      placeholder: 'http://example.com',
                      description: 'The URL to receive the SSE from',
                      required: true,
                  },
              ],
          };
      }
      async trigger() {
          const url = this.getNodeParameter('url');
          const eventSource = new eventsource_1.default(url);
          eventSource.onmessage = (event) => {
              const eventData = (0, n8n_workflow_1.jsonParse)(event.data, {
                  errorMessage: 'Invalid JSON for event data',
              });
              this.emit([this.helpers.returnJsonArray([eventData])]);
          };
          async function closeFunction() {
              eventSource.close();
          }
          return {
              closeFunction,
          };
      }
  }
  exports.SseTrigger = SseTrigger;
  //# sourceMappingURL=SseTrigger.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: SSE Trigger node documentation
  description: Learn how to use the SSE Trigger node in n8n. Follow technical documentation to integrate SSE Trigger node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # SSE Trigger node

  Server-Sent Events (SSE) is a server push technology enabling a client to receive automatic updates from a server using HTTP connection. The SSE Trigger node is used to receive server-sent events.

  ## Node parameters

  The SSE Trigger node has one parameter, the **URL**. Enter the URL from which to receive the server-sent events (SSE).


  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'sse-trigger') ]]

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"193383e0-d616-4751-ad4f-93eaa1b3c61a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"42a294927a11207229c7a16b8e2941fe4664c6dc9508af08ac47f8c9dca9005f"}}


node_type: n8n-nodes-base.Stackby
name: Stackby
display_name: Stackby
description: Read, write, and delete data in Stackby
category: Other
code_hash: 01e67da38c6f9be77eccfb21b9551d9c8fc64893991b678ddd9b4f56e2a8f463
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/stackby
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Stackby = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunction_1 = require("./GenericFunction");
  const utilities_1 = require("../../utils/utilities");
  class Stackby {
      constructor() {
          this.description = {
              displayName: 'Stackby',
              name: 'stackby',
              icon: 'file:stackby.png',
              group: ['transform'],
              version: 1,
              description: 'Read, write, and delete data in Stackby',
              defaults: {
                  name: 'Stackby',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'stackbyApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Append',
                              value: 'append',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                          {
                              name: 'Read',
                              value: 'read',
                          },
                      ],
                      default: 'append',
                      placeholder: 'Action to perform',
                  },
                  {
                      displayName: 'Stack ID',
                      name: 'stackId',
                      type: 'string',
                      default: '',
                      required: true,
                      description: 'The ID of the stack to access',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      default: '',
                      placeholder: 'Stories',
                      required: true,
                      description: 'Enter Table Name',
                  },
                  {
                      displayName: 'ID',
                      name: 'id',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['read', 'delete'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'ID of the record to return',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                          },
                      },
                      default: true,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 1000,
                      },
                      default: 1000,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'View',
                              name: 'view',
                              type: 'string',
                              default: '',
                              placeholder: 'All Stories',
                              description: 'The name or ID of a view in the Stories table. If set, only the records in that view will be returned. The records will be sorted according to the order of the view.',
                          },
                      ],
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['append'],
                          },
                      },
                      default: '',
                      required: true,
                      placeholder: 'id,name,description',
                      description: 'Comma-separated list of the properties which should used as columns for the new rows',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'read') {
              for (let i = 0; i < length; i++) {
                  try {
                      const stackId = this.getNodeParameter('stackId', i);
                      const table = encodeURI(this.getNodeParameter('table', i));
                      const rowIds = this.getNodeParameter('id', i);
                      qs.rowIds = [rowIds];
                      responseData = await GenericFunction_1.apiRequest.call(this, 'GET', `/rowlist/${stackId}/${table}`, {}, qs);
                      returnData.push.apply(returnData, responseData.map((data) => data.field));
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                          returnData.push(...executionErrorData);
                          continue;
                      }
                      throw error;
                  }
              }
          }
          if (operation === 'delete') {
              for (let i = 0; i < length; i++) {
                  try {
                      const stackId = this.getNodeParameter('stackId', i);
                      const table = encodeURI(this.getNodeParameter('table', i));
                      const rowIds = this.getNodeParameter('id', i);
                      qs.rowIds = [rowIds];
                      responseData = await GenericFunction_1.apiRequest.call(this, 'DELETE', `/rowdelete/${stackId}/${table}`, {}, qs);
                      responseData = responseData.records;
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                          returnData.push(...executionErrorData);
                          continue;
                      }
                      throw error;
                  }
              }
          }
          if (operation === 'append') {
              try {
                  const records = {};
                  let key = '';
                  for (let i = 0; i < length; i++) {
                      const stackId = this.getNodeParameter('stackId', i);
                      const table = encodeURI(this.getNodeParameter('table', i));
                      const columns = this.getNodeParameter('columns', i);
                      const columnList = columns.split(',').map((column) => column.trim());
                      const record = {};
                      for (const column of columnList) {
                          if (items[i].json[column] === undefined) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Column ${column} does not exist on input`, { itemIndex: i });
                          }
                          else {
                              record[column] = items[i].json[column];
                          }
                      }
                      key = `${stackId}/${table}`;
                      if (records[key] === undefined) {
                          records[key] = [];
                      }
                      records[key].push({ field: record });
                  }
                  for (const recordKey of Object.keys(records)) {
                      responseData = await GenericFunction_1.apiRequest.call(this, 'POST', `/rowcreate/${recordKey}`, {
                          records: records[recordKey],
                      });
                  }
                  returnData.push.apply(returnData, responseData.map((data) => data.field));
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const itemData = (0, utilities_1.generatePairedItemData)(items.length);
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData });
                      returnData.push(...executionErrorData);
                  }
                  else {
                      throw error;
                  }
              }
          }
          if (operation === 'list') {
              for (let i = 0; i < length; i++) {
                  try {
                      const stackId = this.getNodeParameter('stackId', i);
                      const table = encodeURI(this.getNodeParameter('table', i));
                      const returnAll = this.getNodeParameter('returnAll', 0);
                      const additionalFields = this.getNodeParameter('additionalFields', i, {});
                      if (additionalFields.view) {
                          qs.view = additionalFields.view;
                      }
                      if (returnAll) {
                          responseData = await GenericFunction_1.apiRequestAllItems.call(this, 'GET', `/rowlist/${stackId}/${table}`, {}, qs);
                      }
                      else {
                          qs.maxrecord = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunction_1.apiRequest.call(this, 'GET', `/rowlist/${stackId}/${table}`, {}, qs);
                      }
                      returnData.push.apply(returnData, responseData.map((data) => data.field));
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                          returnData.push(...executionErrorData);
                          continue;
                      }
                      throw error;
                  }
              }
          }
          return [returnData];
      }
  }
  exports.Stackby = Stackby;
  //# sourceMappingURL=Stackby.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Stackby credentials
  description: Documentation for Stackby credentials. Use these credentials to authenticate Stackby in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Stackby credentials

  You can use these credentials to authenticate the following nodes:

  - [Stackby](/integrations/builtin/app-nodes/n8n-nodes-base.stackby.md)

  ## Prerequisites

  Create a [Stackby](https://stackby.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Stackby's API documentation](https://documenter.getpostman.com/view/27762116/2s9YBxXvCa){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - An **API Key**: Go to your [**Account Settings > API**](https://www.stackby.com/account){:target=_blank .external-link} to create an API Key. Refer to [API Key](https://help.stackby.com/en/article/95-api-key){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"99be39ea-4adc-4212-8f27-9418a4ab9367","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"84e92f938e5c13f959c764e3c0a3fceeaa1a64380c3cc4dbca441412a684bc22"}}


node_type: n8n-nodes-base.Start
name: Start
display_name: Start
description: Starts the workflow execution from this node
category: Other
code_hash: 327ac4d08639ec3324f54dd7f64f0b4df659eb5c371c63fa6ce8c346517717e8
documentation_url: https://docs.n8n.io/try-it-out/quickstart
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Start = void 0;
  class Start {
      constructor() {
          this.description = {
              displayName: 'Start',
              name: 'start',
              icon: 'fa:play',
              group: ['input'],
              version: 1,
              description: 'Starts the workflow execution from this node',
              maxNodes: 1,
              hidden: true,
              defaults: {
                  name: 'Start',
                  color: '#00e000',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'This node is where a manual workflow execution starts. To make one, go back to the canvas and click ‘execute workflow’',
                      name: 'notice',
                      type: 'notice',
                      default: '',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          return [items];
      }
  }
  exports.Start = Start;
  //# sourceMappingURL=Start.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  description: A quick example to try out n8n.
  contentType: tutorial
  ---

  # The very quick quickstart

  This quickstart gets you started using n8n as quickly as possible. Its allows you to try out the UI and introduces two key features: [workflow templates](/glossary.md#template-n8n) and [expressions](/glossary.md#expression-n8n). It doesn't include detailed explanations or explore concepts in-depth.

  In this tutorial, you will:

  * Load a [workflow](/glossary.md#workflow-n8n) from the workflow templates library
  * Add a node and configure it using expressions
  * Run your first workflow

  ## Step one: Sign up for n8n

  This quickstart uses [n8n Cloud](/manage-cloud/overview.md). A free trial is available for new users. If you haven't already done so, [sign up](https://app.n8n.cloud/register) for an account now.

  ## Step two: Open a workflow template

  n8n provides a quickstart template using training nodes. You can use this to work with fake data and avoid setting up [credentials](/glossary.md#credential-n8n).

  1. Go to [Templates | Very quick quickstart](https://n8n.io/workflows/1700-very-quick-quickstart/).
  1. Select **Use workflow** to view the options for using the template.
  1. Select **Import template to <name> cloud workspace** to load the template into your Cloud instance.

  This workflow:

  1. Gets example data from the [Customer Datastore](/integrations/builtin/app-nodes/n8n-nodes-base.n8ntrainingcustomerdatastore.md) node.
  2. Uses the [Edit Fields](/integrations/builtin/core-nodes/n8n-nodes-base.set.md) node to extract only the desired data and assigns that data to variables. In this example, you map the customer name, ID, and description.

  The individual pieces in an n8n workflow are called [nodes](/glossary.md#node-n8n). Double click a node to explore its settings and how it processes data.

  ## Step three: Run the workflow

  Select **Test Workflow**. This runs the workflow, loading the data from the Customer Datastore node, then transforming it with Edit Fields. You need this data available in the workflow so that you can work with it in the next step.

  ## Step four: Add a node

  Add a third node to message each customer and tell them their description. Use the Customer Messenger node to send a message to fake recipients.

  1. Select the **Add node** <span class="inline-image">![Add node icon](/_images/try-it-out/add-node-small.png){.off-glb}</span> connector on the Edit Fields node.
  2. Search for **Customer Messenger**. n8n shows a list of nodes that match the search.
  3. Select **Customer Messenger (n8n training)** to add the node to the [canvas](/glossary.md#canvas-n8n). n8n opens the node automatically.
  4. Use [expressions](/code/expressions.md) to map in the **Customer ID** and create the **Message**:
  	1. In the **INPUT** panel select the **Schema** tab.
  	2. Drag **Edit Fields1** > **customer_id** into the **Customer ID** field in the node settings.
      2. Hover over **Message**. Select the **Expression** tab, then select the expand button <span class="inline-image">![Add node icon](/_images/common-icons/open-expression-editor.png){.off-glb}</span> to open the full expressions editor.
      3. Copy this expression into the editor:
          ```
          Hi {{ $json.customer_name }}. Your description is: {{ $json.customer_description }}
          ```
  5. Close the expressions editor, then close the **Customer Messenger** node by clicking outside the node or selecting **Back to canvas**.
  6. Select **Test Workflow**. n8n runs the workflow.

  The complete workflow should look like this:

  [[ workflowDemo("file:///try-it-out/quickstart/very-quick-quickstart-workflow.json") ]]


  ## Next steps

  * Read n8n's [longer try it out tutorial](/try-it-out/tutorial-first-workflow.md) for a more complex workflow, and an introduction to more features and n8n concepts.
  * Take the [text courses](/courses/index.md) or [video courses](/video-courses.md).

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"3c618dc2-9401-4b5e-92a7-cffe101b6c63","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"e1b852950049ee87fbe1f53389f2ff1e21c5ee940af557ea4cb28e1734b36e72"}}


node_type: n8n-nodes-base.Storyblok
name: Storyblok
display_name: Storyblok
description: Consume Storyblok API
category: Other
code_hash: 883eea1ccd320f86c2501929a0fa7ef6e0721ae17abc05a8e5c65d7b16983f24
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/storyblok
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Storyblok = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const StoryContentDescription_1 = require("./StoryContentDescription");
  const StoryManagementDescription_1 = require("./StoryManagementDescription");
  class Storyblok {
      constructor() {
          this.description = {
              displayName: 'Storyblok',
              name: 'storyblok',
              icon: 'file:storyblok.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Storyblok API',
              defaults: {
                  name: 'Storyblok',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'storyblokContentApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      name: 'storyblokManagementApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Source',
                      name: 'source',
                      type: 'options',
                      default: 'contentApi',
                      description: 'Pick where your data comes from, Content or Management API',
                      options: [
                          {
                              name: 'Content API',
                              value: 'contentApi',
                          },
                          {
                              name: 'Management API',
                              value: 'managementApi',
                          },
                      ],
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
                  ...StoryContentDescription_1.storyContentOperations,
                  ...StoryContentDescription_1.storyContentFields,
                  ...StoryManagementDescription_1.storyManagementOperations,
                  ...StoryManagementDescription_1.storyManagementFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSpaces() {
                      const returnData = [];
                      const { spaces } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/spaces');
                      for (const space of spaces) {
                          returnData.push({
                              name: space.name,
                              value: space.id,
                          });
                      }
                      return returnData;
                  },
                  async getComponents() {
                      const returnData = [];
                      const space = this.getCurrentNodeParameter('space');
                      const { components } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/components`);
                      for (const component of components) {
                          returnData.push({
                              name: `${component.name} ${component.is_root ? '(root)' : ''}`,
                              value: component.name,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const source = this.getNodeParameter('source', 0);
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (source === 'contentApi') {
                      if (resource === 'story') {
                          if (operation === 'get') {
                              const identifier = this.getNodeParameter('identifier', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/cdn/stories/${identifier}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', '/v1/cdn/stories', {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/cdn/stories', {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                      }
                  }
                  if (source === 'managementApi') {
                      if (resource === 'story') {
                          if (operation === 'delete') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'DELETE', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'get') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const space = this.getNodeParameter('space', i);
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                          if (operation === 'publish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              const options = this.getNodeParameter('options', i);
                              const query = {};
                              if (options.releaseId) {
                                  query.release_id = options.releaseId;
                              }
                              if (options.language) {
                                  query.lang = options.language;
                              }
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/publish`, {}, query);
                              responseData = responseData.story;
                          }
                          if (operation === 'unpublish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/unpublish`);
                              responseData = responseData.story;
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Storyblok = Storyblok;
  //# sourceMappingURL=Storyblok.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Storyblok credentials
  description: Documentation for Storyblok credentials. Use these credentials to authenticate Storyblok in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Storyblok credentials

  You can use these credentials to authenticate the following nodes:

  - [Storyblok](/integrations/builtin/app-nodes/n8n-nodes-base.storyblok.md)

  ## Prerequisites

  Create a [Storyblok](https://www.storyblok.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - Content API key: For read-only access
  - Management API key: For full CRUD operations

  /// note | Content API support
  n8n supports Content API v1 only.
  ///

  ## Related resources

  Refer to Storyblok's [Content v1 API documentation](https://www.storyblok.com/docs/api/content-delivery/v1){:target=_blank .external-link} and [Management API documentation](https://www.storyblok.com/docs/api/management/getting-started/introduction){:target=_blank .external-link} for more information about the services.

  ## Using Content API key

  To configure this credential, you'll need:

  - A Content **API Key**: Go to your Storyblok workspace's **Settings > Access Tokens** to get an API key. Choose an **Access Level** of either **Public** (`version=published`) or **Preview** (`version-published` and `version=draft`). Enter this access token as your **API Key**. Refer to [How to retrieve and generate access tokens](https://www.storyblok.com/faq/retrieve-and-generate-access-tokens){:target=_blank .external-link} for more detailed instructions.

  Refer to [Content v1 API Authentication](https://www.storyblok.com/docs/api/content-delivery/v1#topics/authentication){:target=_blank .external-link} for more information about supported operations with each Access Level.

  ## Using Management API key

  To configure this credential, you'll need:

  - A **Personal Access Token**: Go to [**My Account**](https://app.storyblok.com/#!/me/account){:target=_blank .external-link} **> Personal access tokens** to generate a new access token. Enter this access token as your **Personal Access Token**.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"4b88b007-3c20-401e-b1a4-03ee08bcc0f6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"3cb6ab5601a142a8c5234b6f08644fe8ec6de8f75f1dfba998994a7782543e1b"}}


node_type: n8n-nodes-base.Strapi
name: Strapi
display_name: Strapi
description: Consume Strapi API
category: Other
code_hash: 6d23d2bca4436fba9185d08178d05af5842389779fe3c06be65ca04239b1eaad
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/strapi
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Strapi = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const EntryDescription_1 = require("./EntryDescription");
  class Strapi {
      constructor() {
          this.description = {
              displayName: 'Strapi',
              name: 'strapi',
              icon: 'file:strapi.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Strapi API',
              defaults: {
                  name: 'Strapi',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'strapiApi',
                      required: true,
                      testedBy: 'strapiApiTest',
                      displayOptions: {
                          show: {
                              authentication: ['password'],
                          },
                      },
                  },
                  {
                      name: 'strapiTokenApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['token'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Username & Password',
                              value: 'password',
                          },
                          {
                              name: 'API Token',
                              value: 'token',
                          },
                      ],
                      default: 'password',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      noDataExpression: true,
                      type: 'options',
                      options: [
                          {
                              name: 'Entry',
                              value: 'entry',
                          },
                      ],
                      default: 'entry',
                  },
                  ...EntryDescription_1.entryOperations,
                  ...EntryDescription_1.entryFields,
              ],
          };
          this.methods = {
              credentialTest: {
                  async strapiApiTest(credential) {
                      const credentials = credential.data;
                      let options = {};
                      const url = (0, GenericFunctions_1.removeTrailingSlash)(credentials.url);
                      options = {
                          headers: {
                              'content-type': 'application/json',
                          },
                          method: 'POST',
                          body: {
                              identifier: credentials.email,
                              password: credentials.password,
                          },
                          uri: credentials.apiVersion === 'v4' ? `${url}/api/auth/local` : `${url}/auth/local`,
                          json: true,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: `Auth settings are not valid: ${error}`,
                          };
                      }
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          const headers = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const authenticationMethod = this.getNodeParameter('authentication', 0);
          let apiVersion;
          if (authenticationMethod === 'password') {
              const { jwt } = await GenericFunctions_1.getToken.call(this);
              apiVersion = (await this.getCredentials('strapiApi')).apiVersion;
              headers.Authorization = `Bearer ${jwt}`;
          }
          else {
              apiVersion = (await this.getCredentials('strapiTokenApi')).apiVersion;
          }
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'entry') {
                      if (operation === 'create') {
                          const body = {};
                          const contentType = this.getNodeParameter('contentType', i);
                          const columns = this.getNodeParameter('columns', i);
                          const columnList = columns.split(',').map((column) => column.trim());
                          for (const key of Object.keys(items[i].json)) {
                              if (columnList.includes(key)) {
                                  apiVersion === 'v4'
                                      ? (body.data = items[i].json)
                                      : (body[key] = items[i].json[key]);
                              }
                          }
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'POST', `/${contentType}`, body, qs, undefined, headers);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'delete') {
                          const contentType = this.getNodeParameter('contentType', i);
                          const entryId = this.getNodeParameter('entryId', i);
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'DELETE', `/${contentType}/${entryId}`, {}, qs, undefined, headers);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const contentType = this.getNodeParameter('contentType', i);
                          const options = this.getNodeParameter('options', i);
                          if (apiVersion === 'v4') {
                              if (options.sort && options.sort.length !== 0) {
                                  const sortFields = options.sort;
                                  qs.sort = sortFields.join(',');
                              }
                              if (options.where) {
                                  const query = (0, GenericFunctions_1.validateJSON)(options.where);
                                  if (query !== undefined) {
                                      qs.filters = query;
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query must be a valid JSON', {
                                          itemIndex: i,
                                      });
                                  }
                              }
                              if (options.publicationState) {
                                  qs.publicationState = options.publicationState;
                              }
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.strapiApiRequestAllItems.call(this, 'GET', `/${contentType}`, {}, qs, headers, apiVersion);
                              }
                              else {
                                  qs['pagination[pageSize]'] = this.getNodeParameter('limit', i);
                                  ({ data: responseData } = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}`, {}, qs, undefined, headers));
                              }
                          }
                          else {
                              if (options.sort && options.sort.length !== 0) {
                                  const sortFields = options.sort;
                                  qs._sort = sortFields.join(',');
                              }
                              if (options.where) {
                                  const query = (0, GenericFunctions_1.validateJSON)(options.where);
                                  if (query !== undefined) {
                                      qs._where = query;
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query must be a valid JSON', {
                                          itemIndex: i,
                                      });
                                  }
                              }
                              if (options.publicationState) {
                                  qs._publicationState = options.publicationState;
                              }
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.strapiApiRequestAllItems.call(this, 'GET', `/${contentType}`, {}, qs, headers, apiVersion);
                              }
                              else {
                                  qs._limit = this.getNodeParameter('limit', i);
                                  responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}`, {}, qs, undefined, headers);
                              }
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'get') {
                          const contentType = this.getNodeParameter('contentType', i);
                          const entryId = this.getNodeParameter('entryId', i);
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'GET', `/${contentType}/${entryId}`, {}, qs, undefined, headers);
                          if (apiVersion === 'v4') {
                              responseData = responseData.data;
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      if (operation === 'update') {
                          const body = {};
                          const contentType = this.getNodeParameter('contentType', i);
                          const columns = this.getNodeParameter('columns', i);
                          const updateKey = this.getNodeParameter('updateKey', i);
                          const columnList = columns.split(',').map((column) => column.trim());
                          const entryId = items[i].json[updateKey];
                          for (const key of Object.keys(items[i].json)) {
                              if (columnList.includes(key)) {
                                  apiVersion === 'v4'
                                      ? (body.data = items[i].json)
                                      : (body[key] = items[i].json[key]);
                              }
                          }
                          responseData = await GenericFunctions_1.strapiApiRequest.call(this, 'PUT', `/${contentType}/${entryId}`, body, qs, undefined, headers);
                          if (apiVersion === 'v4') {
                              responseData = responseData.data;
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Strapi = Strapi;
  //# sourceMappingURL=Strapi.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Strapi credentials
  description: Documentation for Strapi credentials. Use these credentials to authenticate Strapi in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Strapi credentials

  You can use these credentials to authenticate the following nodes:

  - [Strapi](/integrations/builtin/app-nodes/n8n-nodes-base.strapi.md)

  ## Prerequisites

  Create a [Strapi](https://strapi.io/){:target=_blank .external-link} admin account with:

  - Access to an existing Strapi project.
  - At least one collection type within that project.
  - Published data within that collection type.

  Refer to the Strapi developer [Quick Start Guide](https://docs.strapi.io/dev-docs/quick-start){:target=_blank .external-link} for more information.

  ## Supported authentication methods

  - API user account: Requires a user account with appropriate content permissions.
  - API token: Requires an admin account.

  ## Related resources

  Refer to [Strapi's documentation](https://docs.strapi.io/dev-docs/api/rest){:target=_blank .external-link} for more information about the service.

  ## Using API user account

  To configure this credential, you'll need:

  - A user **Email**: Must be for a user account, not an admin account. Refer to the more detailed instructions below.
  - A user **Password**: Must be for a user account, not an admin account. Refer to the more detailed instructions below.
  - The **URL**: Use the public URL of your Strapi server, defined in `./config/server.js` as the `url` parameter. Strapi recommends using an absolute URL.
      - For Strapi Cloud projects, use the URL of your Cloud project, for example: `https://my-strapi-project-name.strapiapp.com`
  - The **API Version**: Select the version of the API you want your calls to use. Options include:
      - **Version 3**
      - **Version 4**

  In Strapi, the configuration involves two steps:

  1. [Configure a role](#configure-a-role).
  2. [Create a user account](#create-a-user-account).

  Refer to the more detailed instructions below for each step.

  ### Configure a role

  For API access, use the Users & Permissions Plugin in **Settings > Users & Permissions Plugin**.

  Refer to [Configuring Users & Permissions Plugin](https://docs.strapi.io/user-docs/settings/configuring-users-permissions-plugin-settings){:target=_blank .external-link} for more information on the plugin. Refer to [Configuring end-user roles](https://docs.strapi.io/user-docs/users-roles-permissions/configuring-end-users-roles){:target=_blank .external-link} for more information on roles.

  For the n8n credential, the user must have a role that grants them API permissions on the collection type. For the role, you can either:

  * Update the default **Authenticated** role to include the permissions and assign the user to that role. Refer to [Configuring role's permissions](https://docs.strapi.io/user-docs/users-roles-permissions/configuring-end-users-roles#configuring-roles-permissions){:target=_blank .external-link} for more information.
  * Create a new role to include the permissions and assign the user to that role. Refer to [Creating a new role](https://docs.strapi.io/user-docs/users-roles-permissions/configuring-end-users-roles#creating-a-new-role){:target=_blank .external-link} for more information.

  For either option, once you open the role:

  1. Go to the **Permissions** section.
  2. Open the section for the relevant collection type.
  3. Select the permissions for the collection type that the role should have. Options include:
      - `create` (POST)
      - `find` and `findone` (GET)
      - `update` (PUT)
      - `delete` (DELETE)
  4. Repeat for all relevant collection types.
  5. Save the role.

  Refer to [Endpoints](https://docs.strapi.io/dev-docs/api/rest#endpoints){:target=_blank .external-link} for more information on the permission options.

  ### Create a user account

  Now that you have an appropriate role, create an end-user account and assign the role to it:

  1. Go to **Content Manager > Collection Types > User**.
  2. Select **Add new entry**.
  3. Fill in the user details. The n8n credential requires these fields, though your Strapi project may have more custom required fields:
      - **Username**: Required for all Strapi users.
      - **Email**: Enter in Strapi and use as the **Email** in the n8n credential.
      - **Password**: Enter in Strapi and use as the **Password** in the n8n credential.
      - **Role**: Select the role you set up in the previous step.

  Refer to [Managing end-user accounts](https://docs.strapi.io/user-docs/users-roles-permissions/managing-end-users){:target=_blank .external-link} for more information.


  ## Using API token

  To configure this credential, you'll need:

  - An **API Token**: Create an API token from **Settings > Global Settings > API Tokens**. Refer to Strapi's [Creating a new API token documentation](https://docs.strapi.io/user-docs/settings/API-tokens#creating-a-new-api-token){:target=_blank .external-link} for more details and information on regenerating API tokens.
      
      /// note | API tokens permission
      If you don't see the **API tokens** option in **Global settings**, your account doesn't have the **API tokens > Read** permission.
      ///
      
  - The **URL**: Use the public URL of your Strapi server, defined in `./config/server.js` as the `url` parameter. Strapi recommends using an absolute URL.
      - For Strapi Cloud projects, use the URL of your Cloud project, for example: `https://my-strapi-project-name.strapiapp.com`
  - The **API Version**: Select the version of the API you want your calls to use. Options include:
      - **Version 3**
      - **Version 4**

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"d4faecbc-14d2-419e-8d94-a72d1d7d8aa7","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"9f81f990a8ec70a555ee48c01a76a4730a8de1977eb7c4df9085aa61818f5914"}}


node_type: n8n-nodes-base.Ssh
name: Ssh
display_name: SSH
description: Execute commands via SSH
category: Other
code_hash: 6cd745a1e989a5652e95fb4e93213461aba20bf8defb942f71286257ab9372eb
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.ssh
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Ssh = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const utilities_1 = require("../../utils/utilities");
  const promises_1 = require("fs/promises");
  const tmp_promise_1 = require("tmp-promise");
  const node_ssh_1 = require("node-ssh");
  async function resolveHomeDir(path, ssh, itemIndex) {
      if (path.startsWith('~/')) {
          let homeDir = (await ssh.execCommand('echo $HOME')).stdout;
          if (homeDir.charAt(homeDir.length - 1) !== '/') {
              homeDir += '/';
          }
          return path.replace('~/', homeDir);
      }
      if (path.startsWith('~')) {
          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid path. Replace "~" with home directory or "~/"', {
              itemIndex,
          });
      }
      return path;
  }
  class Ssh {
      constructor() {
          this.description = {
              displayName: 'SSH',
              name: 'ssh',
              icon: 'fa:terminal',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Execute commands via SSH',
              defaults: {
                  name: 'SSH',
                  color: '#000000',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sshPassword',
                      required: true,
                      testedBy: 'sshConnectionTest',
                      displayOptions: {
                          show: {
                              authentication: ['password'],
                          },
                      },
                  },
                  {
                      name: 'sshPrivateKey',
                      required: true,
                      testedBy: 'sshConnectionTest',
                      displayOptions: {
                          show: {
                              authentication: ['privateKey'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Password',
                              value: 'password',
                          },
                          {
                              name: 'Private Key',
                              value: 'privateKey',
                          },
                      ],
                      default: 'password',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Command',
                              value: 'command',
                          },
                          {
                              name: 'File',
                              value: 'file',
                          },
                      ],
                      default: 'command',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['command'],
                          },
                      },
                      options: [
                          {
                              name: 'Execute',
                              value: 'execute',
                              description: 'Execute a command',
                              action: 'Execute a command',
                          },
                      ],
                      default: 'execute',
                  },
                  {
                      displayName: 'Command',
                      name: 'command',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['command'],
                              operation: ['execute'],
                          },
                      },
                      default: '',
                      description: 'The command to be executed on a remote device',
                  },
                  {
                      displayName: 'Working Directory',
                      name: 'cwd',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['command'],
                              operation: ['execute'],
                          },
                      },
                      default: '/',
                      required: true,
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['file'],
                          },
                      },
                      options: [
                          {
                              name: 'Download',
                              value: 'download',
                              description: 'Download a file',
                              action: 'Download a file',
                          },
                          {
                              name: 'Upload',
                              value: 'upload',
                              description: 'Upload a file',
                              action: 'Upload a file',
                          },
                      ],
                      default: 'upload',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property which contains the data for the file to be uploaded',
                  },
                  {
                      displayName: 'Target Directory',
                      name: 'path',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['file'],
                              operation: ['upload'],
                          },
                      },
                      default: '',
                      required: true,
                      placeholder: '/home/user',
                      description: 'The directory to upload the file to. The name of the file does not need to be specified, it\'s taken from the binary data file name. To override this behavior, set the parameter "File Name" under options.',
                  },
                  {
                      displayName: 'Path',
                      displayOptions: {
                          show: {
                              resource: ['file'],
                              operation: ['download'],
                          },
                      },
                      name: 'path',
                      type: 'string',
                      default: '',
                      placeholder: '/home/user/invoice.txt',
                      description: 'The file path of the file to download. Has to contain the full path including file name.',
                      required: true,
                  },
                  {
                      displayName: 'Binary Property',
                      displayOptions: {
                          show: {
                              resource: ['file'],
                              operation: ['download'],
                          },
                      },
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      description: 'Object property name which holds binary data',
                      required: true,
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      displayOptions: {
                          show: {
                              resource: ['file'],
                              operation: ['upload', 'download'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              default: '',
                              description: 'Overrides the binary data file name',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async sshConnectionTest(credential) {
                      const credentials = credential.data;
                      const ssh = new node_ssh_1.NodeSSH();
                      const temporaryFiles = [];
                      try {
                          if (!credentials.privateKey) {
                              await ssh.connect({
                                  host: credentials.host,
                                  username: credentials.username,
                                  port: credentials.port,
                                  password: credentials.password,
                              });
                          }
                          else {
                              const options = {
                                  host: credentials.host,
                                  username: credentials.username,
                                  port: credentials.port,
                                  privateKey: (0, utilities_1.formatPrivateKey)(credentials.privateKey),
                              };
                              if (credentials.passphrase) {
                                  options.passphrase = credentials.passphrase;
                              }
                              await ssh.connect(options);
                          }
                      }
                      catch (error) {
                          const message = `SSH connection failed: ${error.message}`;
                          return {
                              status: 'Error',
                              message,
                          };
                      }
                      finally {
                          ssh.dispose();
                          for (const tempFile of temporaryFiles)
                              await (0, promises_1.rm)(tempFile);
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnItems = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const authentication = this.getNodeParameter('authentication', 0);
          const temporaryFiles = [];
          const ssh = new node_ssh_1.NodeSSH();
          try {
              if (authentication === 'password') {
                  const credentials = await this.getCredentials('sshPassword');
                  await ssh.connect({
                      host: credentials.host,
                      username: credentials.username,
                      port: credentials.port,
                      password: credentials.password,
                  });
              }
              else if (authentication === 'privateKey') {
                  const credentials = await this.getCredentials('sshPrivateKey');
                  const options = {
                      host: credentials.host,
                      username: credentials.username,
                      port: credentials.port,
                      privateKey: (0, utilities_1.formatPrivateKey)(credentials.privateKey),
                  };
                  if (credentials.passphrase) {
                      options.passphrase = credentials.passphrase;
                  }
                  await ssh.connect(options);
              }
              for (let i = 0; i < items.length; i++) {
                  try {
                      if (resource === 'command') {
                          if (operation === 'execute') {
                              const command = this.getNodeParameter('command', i);
                              const cwd = await resolveHomeDir.call(this, this.getNodeParameter('cwd', i), ssh, i);
                              returnItems.push({
                                  json: (await ssh.execCommand(command, { cwd })),
                                  pairedItem: {
                                      item: i,
                                  },
                              });
                          }
                      }
                      if (resource === 'file') {
                          if (operation === 'download') {
                              const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
                              const parameterPath = await resolveHomeDir.call(this, this.getNodeParameter('path', i), ssh, i);
                              const { path } = await (0, tmp_promise_1.file)({ prefix: 'n8n-ssh-' });
                              temporaryFiles.push(path);
                              await ssh.getFile(path, parameterPath);
                              const newItem = {
                                  json: items[i].json,
                                  binary: {},
                                  pairedItem: {
                                      item: i,
                                  },
                              };
                              if (items[i].binary !== undefined && newItem.binary) {
                                  Object.assign(newItem.binary, items[i].binary);
                              }
                              items[i] = newItem;
                              const fileName = this.getNodeParameter('options.fileName', i, '');
                              items[i].binary[dataPropertyNameDownload] = await this.nodeHelpers.copyBinaryFile(path, fileName || parameterPath);
                          }
                          if (operation === 'upload') {
                              const parameterPath = await resolveHomeDir.call(this, this.getNodeParameter('path', i), ssh, i);
                              const fileName = this.getNodeParameter('options.fileName', i, '');
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                              let uploadData;
                              if (binaryData.id) {
                                  uploadData = await this.helpers.getBinaryStream(binaryData.id);
                              }
                              else {
                                  uploadData = Buffer.from(binaryData.data, n8n_workflow_1.BINARY_ENCODING);
                              }
                              const { path } = await (0, tmp_promise_1.file)({ prefix: 'n8n-ssh-' });
                              temporaryFiles.push(path);
                              await (0, promises_1.writeFile)(path, uploadData);
                              await ssh.putFile(path, `${parameterPath}${parameterPath.charAt(parameterPath.length - 1) === '/' ? '' : '/'}${fileName || binaryData.fileName}`);
                              returnItems.push({
                                  json: {
                                      success: true,
                                  },
                                  pairedItem: {
                                      item: i,
                                  },
                              });
                          }
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          if (resource === 'file' && operation === 'download') {
                              items[i] = {
                                  json: {
                                      error: error.message,
                                  },
                              };
                          }
                          else {
                              returnItems.push({
                                  json: {
                                      error: error.message,
                                  },
                                  pairedItem: {
                                      item: i,
                                  },
                              });
                          }
                          continue;
                      }
                      throw error;
                  }
              }
          }
          catch (error) {
              ssh.dispose();
              for (const tempFile of temporaryFiles)
                  await (0, promises_1.rm)(tempFile);
              throw error;
          }
          for (const tempFile of temporaryFiles)
              await (0, promises_1.rm)(tempFile);
          ssh.dispose();
          if (resource === 'file' && operation === 'download') {
              return [items];
          }
          else {
              return [returnItems];
          }
      }
  }
  exports.Ssh = Ssh;
  //# sourceMappingURL=Ssh.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: SSH
  description: Documentation for the SSH node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.
  contentType: [integration, reference]
  priority: medium
  ---

  # SSH

  The SSH node is useful for executing commands using the Secure Shell Protocol.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/ssh.md).
  ///

  ## Operations

  - [**Execute** a command](#execute-command)
  - [**Download** a file](#download-file)
  - [**Upload** a file](#upload-file)

  /// note | Uploading files
  To attach a file for upload, you will need to use an extra node such as the [Read/Write Files from Disk](/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile.md) node or the [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/index.md) node to pass the file as a data property.
  ///

  ### Execute Command

  Configure this operation with these parameters:

  - **Credential to connect with**: Select an existing or create a new [SSH credential](/integrations/builtin/credentials/ssh.md) to connect with.
  - **Command**: Enter the command to execute on the remote device.
  - **Working Directory**: Enter the directory where n8n should execute the command.

  ### Download File

  - **Credential to connect with**: Select an existing or create a new [SSH credential](/integrations/builtin/credentials/ssh.md) to connect with.
  - **Path**: Enter the path for the file you want to download. This path must include the file name. The downloaded file will use this file name. To use a different name, use the **File Name** option. Refer to [Download File options](#download-file-options) for more information.
  - **File Property**: Enter the name of the object property that holds the binary data you want to download.

  #### Download File options

  You can further configure this operation with the **File Name** option. Use this option to override the binary data file name to a name of your choice.

  ### Upload File

  - **Credential to connect with**: Select an existing or create a new [SSH credential](/integrations/builtin/credentials/ssh.md) to connect with.
  - **Input Binary Field**: Enter the name of the input binary field that contains the file you want to upload.
  - **Target Directory**: The directory to upload the file to. The name of the file is taken from the binary data file name. To enter a different name, use the **File Name** option. Refer to [Upload File options](#upload-file-options) for more information.

  #### Upload File options

  You can further configure this operation with the **File Name** option. Use this option to override the binary data file name to a name of your choice.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'ssh') ]]

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"fd4d2063-0750-4f8c-9fb6-dcd46966febd","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"4964d92e6c3fd6ad57a491844315c2ba1922bba526916b462cc6d42ed3198cd6"}}


node_type: n8n-nodes-base.StopAndError
name: StopAndError
display_name: Stop and Error
description: Throw an error in the workflow
category: Other
code_hash: 79f3b665f4ccdb01a1faacf08233e29fbd6878e69d5d611b5dd2bf0bf9b25308
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.stopanderror
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:29
updated_at: 2025-06-08 08:05:29
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.StopAndError = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const errorObjectPlaceholder = `{
  	"code": "404",
  	"description": "The resource could not be fetched"
  }`;
  class StopAndError {
      constructor() {
          this.description = {
              displayName: 'Stop and Error',
              name: 'stopAndError',
              icon: 'fa:exclamation-triangle',
              group: ['input'],
              version: 1,
              description: 'Throw an error in the workflow',
              defaults: {
                  name: 'Stop and Error',
                  color: '#ff0000',
              },
              inputs: ['main'],
              outputs: [],
              properties: [
                  {
                      displayName: 'Error Type',
                      name: 'errorType',
                      type: 'options',
                      options: [
                          {
                              name: 'Error Message',
                              value: 'errorMessage',
                          },
                          {
                              name: 'Error Object',
                              value: 'errorObject',
                          },
                      ],
                      default: 'errorMessage',
                      description: 'Type of error to throw',
                  },
                  {
                      displayName: 'Error Message',
                      name: 'errorMessage',
                      type: 'string',
                      placeholder: 'An error occurred!',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              errorType: ['errorMessage'],
                          },
                      },
                  },
                  {
                      displayName: 'Error Object',
                      name: 'errorObject',
                      type: 'json',
                      description: 'Object containing error properties',
                      default: '',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      placeholder: errorObjectPlaceholder,
                      required: true,
                      displayOptions: {
                          show: {
                              errorType: ['errorObject'],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const errorType = this.getNodeParameter('errorType', 0);
          const { id: workflowId, name: workflowName } = this.getWorkflow();
          let toThrow;
          if (errorType === 'errorMessage') {
              toThrow = this.getNodeParameter('errorMessage', 0);
          }
          else {
              const json = this.getNodeParameter('errorObject', 0);
              const errorObject = (0, n8n_workflow_1.jsonParse)(json);
              toThrow = {
                  name: 'User-thrown error',
                  message: `Workflow ID ${workflowId} "${workflowName}" has failed`,
                  ...errorObject,
              };
          }
          throw new n8n_workflow_1.NodeOperationError(this.getNode(), toThrow);
      }
  }
  exports.StopAndError = StopAndError;
  //# sourceMappingURL=StopAndError.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Stop And Error
  description: Documentation for the Stop And Error node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.
  contentType: [integration, reference]
  priority: high
  ---

  # Stop And Error

  Use the Stop And Error node to display custom error messages, cause executions to fail under certain conditions, and send custom error information to error workflows.

  ## Operations

  * Error Message
  * Error Object

  ## Node parameters

  Both operations include one node parameter, the **Error Type**. Use this parameter to select the type of error to throw. Choose between the two operations: **Error Message** and **Error Object**.

  The other parameters depend on which operation you select.

  ### Error Message parameters

  The Error Message Error Type adds one parameter, the **Error Message** field. Enter the message you'd like to throw.

  ### Error Object parameters

  The Error Object Error Type adds one parameter, the **Error Object**. Enter a JSON object that contains the error properties you'd like to throw.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'stop-and-error') ]]

  ## Related resources

  You can use the Stop And Error node with the [Error trigger](/integrations/builtin/core-nodes/n8n-nodes-base.errortrigger.md) node.

  Read more about [Error workflows](/flow-logic/error-handling.md) in n8n workflows.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"15d613e2-4bcf-478c-ad46-893b5ef5740c","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"c7e9fb20fe38b06d7028ab3be626be16cf9bdb7ba486efa891a587be9e0550da"}}


node_type: n8n-nodes-base.Strava
name: Strava
display_name: Strava
description: Consume Strava API
category: Other
code_hash: 7a22dfb2e271c2501cb569ed4956c2717f03c82004e50494b33660c19bd5d9a5
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/strava
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Strava = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ActivityDescription_1 = require("./ActivityDescription");
  const moment_1 = __importDefault(require("moment"));
  class Strava {
      constructor() {
          this.description = {
              displayName: 'Strava',
              name: 'strava',
              icon: 'file:strava.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Strava API',
              defaults: {
                  name: 'Strava',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'stravaOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Activity',
                              value: 'activity',
                          },
                      ],
                      default: 'activity',
                  },
                  ...ActivityDescription_1.activityOperations,
                  ...ActivityDescription_1.activityFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'activity') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const type = this.getNodeParameter('type', i);
                          const startDate = this.getNodeParameter('startDate', i);
                          const elapsedTime = this.getNodeParameter('elapsedTime', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.trainer === true) {
                              additionalFields.trainer = 1;
                          }
                          if (additionalFields.commute === true) {
                              additionalFields.commute = 1;
                          }
                          const body = {
                              name,
                              type,
                              start_date_local: (0, moment_1.default)(startDate).toISOString(),
                              elapsed_time: elapsedTime,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'POST', '/activities', body);
                      }
                      if (operation === 'get') {
                          const activityId = this.getNodeParameter('activityId', i);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}`);
                      }
                      if (['getLaps', 'getZones', 'getKudos', 'getComments'].includes(operation)) {
                          const path = {
                              getComments: 'comments',
                              getZones: 'zones',
                              getKudos: 'kudos',
                              getLaps: 'laps',
                          };
                          const activityId = this.getNodeParameter('activityId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}/${path[operation]}`);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'getStreams') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const keys = this.getNodeParameter('keys', i);
                          qs.keys = keys.toString();
                          qs.key_by_type = true;
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', `/activities/${activityId}/streams`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.stravaApiRequestAllItems.call(this, 'GET', '/activities', {}, qs);
                          }
                          else {
                              qs.per_page = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'GET', '/activities', {}, qs);
                          }
                      }
                      if (operation === 'update') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.stravaApiRequest.call(this, 'PUT', `/activities/${activityId}`, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Strava = Strava;
  //# sourceMappingURL=Strava.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Strava credentials
  description: Documentation for Strava credentials. Use these credentials to authenticate Strava in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Strava credentials

  You can use these credentials to authenticate the following nodes:

  - [Strava](/integrations/builtin/app-nodes/n8n-nodes-base.strava.md)
  - [Strava Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.stravatrigger.md)

  ## Prerequisites

  - Create a [Strava](https://strava.com){:target=_blank .external-link} account.
  - Create a Strava application in [**Settings > API**](https://www.strava.com/settings/api){:target=_blank .external-link}. Refer to [Using OAuth2](#using-oauth2) for more information.

  ## Supported authentication methods

  - OAuth2

  ## Related resources

  Refer to [Strava's API documentation](https://developers.strava.com/docs/reference/){:target=_blank .external-link} for more information about the service.

  ## Using OAuth2

  To configure this credential, you'll need:

  - A **Client ID**: Generated when you [create a Strava app](https://developers.strava.com/docs/getting-started/#account){:target=_blank .external-link}.
  - A **Client Secret**: Generated when you [create a Strava app](https://developers.strava.com/docs/getting-started/#account){:target=_blank .external-link}.

  Use these settings for your Strava app:

  - In n8n, copy the **OAuth Callback URL**. Paste this URL into your Strava app's **Authorization Callback Domain**.
  - Remove the protocol (`https://` or `http://`) and the relative URL (`/oauth2/callback` or `/rest/oauth2-credential/callback`) from the **Authorization Callback Domain**. For example, if the OAuth Redirect URL was originally `https://oauth.n8n.cloud/oauth2/callback`, the **Authorization Callback Domain** would be `oauth.n8n.cloud`.
  - Copy the **Client ID** and **Client Secret** from your app and add them to your n8n credential.

  Refer to [Authentication](https://developers.strava.com/docs/authentication/){:target=_blank .external-link} for more information about Strava's OAuth flow.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"d19e2810-da6e-4ed4-b306-1629dcfa67ef","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"1b5ac016d2a8c69533e8e4a846a6e1fb64a6c78d491902f52aaf0f28be334eba"}}


node_type: n8n-nodes-base.Stripe
name: Stripe
display_name: Stripe
description: Consume the Stripe API
category: Other
code_hash: a140efa1ba344639e26ed3feb6d57c8e4e5ed6c063161e3d63c831962c1f45ad
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/stripe
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Stripe = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  const helpers_1 = require("./helpers");
  const descriptions_1 = require("./descriptions");
  class Stripe {
      constructor() {
          this.description = {
              displayName: 'Stripe',
              name: 'stripe',
              icon: 'file:stripe.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Stripe API',
              defaults: {
                  name: 'Stripe',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'stripeApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Balance',
                              value: 'balance',
                          },
                          {
                              name: 'Charge',
                              value: 'charge',
                          },
                          {
                              name: 'Coupon',
                              value: 'coupon',
                          },
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Customer Card',
                              value: 'customerCard',
                          },
                          {
                              name: 'Source',
                              value: 'source',
                          },
                          {
                              name: 'Token',
                              value: 'token',
                          },
                      ],
                      default: 'balance',
                  },
                  ...descriptions_1.balanceOperations,
                  ...descriptions_1.customerCardOperations,
                  ...descriptions_1.customerCardFields,
                  ...descriptions_1.chargeOperations,
                  ...descriptions_1.chargeFields,
                  ...descriptions_1.couponOperations,
                  ...descriptions_1.couponFields,
                  ...descriptions_1.customerOperations,
                  ...descriptions_1.customerFields,
                  ...descriptions_1.sourceOperations,
                  ...descriptions_1.sourceFields,
                  ...descriptions_1.tokenOperations,
                  ...descriptions_1.tokenFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCustomers() {
                      return helpers_1.loadResource.call(this, 'customer');
                  },
                  async getCurrencies() {
                      const returnData = [];
                      const { data } = await helpers_1.stripeApiRequest.call(this, 'GET', '/country_specs', {});
                      for (const currency of data[0].supported_payment_currencies) {
                          returnData.push({
                              name: currency.toUpperCase(),
                              value: currency,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'balance') {
                      if (operation === 'get') {
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', '/balance', {}, {});
                      }
                  }
                  else if (resource === 'customerCard') {
                      if (operation === 'add') {
                          const body = {
                              source: this.getNodeParameter('token', i),
                          };
                          const customerId = this.getNodeParameter('customerId', i);
                          const endpoint = `/customers/${customerId}/sources`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', endpoint, body, {});
                      }
                      else if (operation === 'remove') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const endpoint = `/customers/${customerId}/sources/${cardId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      }
                      else if (operation === 'get') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const sourceId = this.getNodeParameter('sourceId', i);
                          const endpoint = `/customers/${customerId}/sources/${sourceId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', endpoint, {}, {});
                      }
                  }
                  else if (resource === 'charge') {
                      if (operation === 'create') {
                          const body = {
                              customer: this.getNodeParameter('customerId', i),
                              currency: this.getNodeParameter('currency', i).toLowerCase(),
                              amount: this.getNodeParameter('amount', i),
                              source: this.getNodeParameter('source', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustChargeFields)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/charges', body, {});
                      }
                      else if (operation === 'get') {
                          const chargeId = this.getNodeParameter('chargeId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/charges/${chargeId}`, {}, {});
                      }
                      else if (operation === 'getAll') {
                          responseData = await helpers_1.handleListing.call(this, resource, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if ((0, isEmpty_1.default)(updateFields)) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          Object.assign(body, (0, helpers_1.adjustChargeFields)(updateFields));
                          const chargeId = this.getNodeParameter('chargeId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', `/charges/${chargeId}`, body, {});
                      }
                  }
                  else if (resource === 'coupon') {
                      if (operation === 'create') {
                          const body = {
                              duration: this.getNodeParameter('duration', i),
                          };
                          const type = this.getNodeParameter('type', i);
                          if (type === 'fixedAmount') {
                              body.amount_off = this.getNodeParameter('amountOff', i);
                              body.currency = this.getNodeParameter('currency', i);
                          }
                          else {
                              body.percent_off = this.getNodeParameter('percentOff', i);
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/coupons', body, {});
                      }
                      else if (operation === 'getAll') {
                          responseData = await helpers_1.handleListing.call(this, resource, i);
                      }
                  }
                  else if (resource === 'customer') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustCustomerFields)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/customers', body, {});
                      }
                      else if (operation === 'delete') {
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', `/customers/${customerId}`, {}, {});
                      }
                      else if (operation === 'get') {
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/customers/${customerId}`, {}, {});
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (!(0, isEmpty_1.default)(filters)) {
                              qs.email = filters.email;
                          }
                          responseData = await helpers_1.handleListing.call(this, resource, i, qs);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if ((0, isEmpty_1.default)(updateFields)) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          Object.assign(body, (0, helpers_1.adjustCustomerFields)(updateFields));
                          const customerId = this.getNodeParameter('customerId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', `/customers/${customerId}`, body, {});
                      }
                  }
                  else if (resource === 'source') {
                      if (operation === 'create') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const body = {
                              type: this.getNodeParameter('type', i),
                              amount: this.getNodeParameter('amount', i),
                              currency: this.getNodeParameter('currency', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!(0, isEmpty_1.default)(additionalFields)) {
                              Object.assign(body, (0, helpers_1.adjustMetadata)(additionalFields));
                          }
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/sources', body, {});
                          const endpoint = `/customers/${customerId}/sources`;
                          await helpers_1.stripeApiRequest.call(this, 'POST', endpoint, { source: responseData.id }, {});
                      }
                      else if (operation === 'delete') {
                          const sourceId = this.getNodeParameter('sourceId', i);
                          const customerId = this.getNodeParameter('customerId', i);
                          const endpoint = `/customers/${customerId}/sources/${sourceId}`;
                          responseData = await helpers_1.stripeApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      }
                      else if (operation === 'get') {
                          const sourceId = this.getNodeParameter('sourceId', i);
                          responseData = await helpers_1.stripeApiRequest.call(this, 'GET', `/sources/${sourceId}`, {}, {});
                      }
                  }
                  else if (resource === 'token') {
                      if (operation === 'create') {
                          const type = this.getNodeParameter('type', i);
                          const body = {};
                          if (type !== 'cardToken') {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only card token creation implemented.', { itemIndex: i });
                          }
                          body.card = {
                              number: this.getNodeParameter('number', i),
                              exp_month: this.getNodeParameter('expirationMonth', i),
                              exp_year: this.getNodeParameter('expirationYear', i),
                              cvc: this.getNodeParameter('cvc', i),
                          };
                          responseData = await helpers_1.stripeApiRequest.call(this, 'POST', '/tokens', body, {});
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Stripe = Stripe;
  //# sourceMappingURL=Stripe.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Stripe credentials
  description: Documentation for Stripe credentials. Use these credentials to authenticate Stripe in n8n, a workflow automation platform.
  contentType: [integration, reference]
  priority: medium
  ---

  # Stripe credentials

  You can use these credentials to authenticate the following nodes:

  - [Stripe Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.stripetrigger.md)
  - [Stripe](/integrations/builtin/app-nodes/n8n-nodes-base.stripe.md)

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Stripe's API documentation](https://docs.stripe.com/api){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need a [Stripe](https://stripe.com/){:target=_blank .external-link} admin or developer account and:

  - An API **Secret Key**

  Before you generate an API key, decide whether to generate it in live mode or test mode. Refer to [Test mode and live mode](#test-mode-and-live-mode) for more information about the two modes.

  ### Live mode Secret key

  To generate a Secret key in live mode:

  1. Open the [Stripe developer dashboard](https://dashboard.stripe.com/developers){:target=_blank .external-link} and select [**API Keys**](https://dashboard.stripe.com/apikeys){:target=_blank .external-link}.
  2. In the **Standard Keys** section, select **Create secret key**.
  3. Enter a **Key name**, like `n8n integration`.
  4. Select **Create**. The new API key displays.
  4. Copy the key and enter it in your n8n credential as the **Secret Key**.

  Refer to Stripe's [Create a secret API key](https://docs.stripe.com/keys#create-api-secret-key){:target=_blank .external-link} for more information.

  ### Test mode Secret key

  To use a Secret key in test mode, you must copy the existing one:

  1. Go to your [Stripe test mode developer dashboard](https://dashboard.stripe.com/test/developers){:target=_blank .external-link} and select [**API Keys**](https://dashboard.stripe.com/test/apikeys){:target=_blank .external-link}.
  2. In the **Standard Keys** section, select **Reveal test key** for the **Secret key**.
  3. Copy the key and enter it in your n8n credential as the **Secret Key**.

  Refer to Stripe's [Create a secret API key](https://docs.stripe.com/keys#create-api-secret-key){:target=_blank .external-link} for more information.

  ## Test mode and live mode

  All Stripe API requests happen within either [test mode](https://docs.stripe.com/test-mode) or live mode. Each mode has its own API key. 

  Use test mode to access simulated test data and live mode to access actual account data. Objects in one mode aren’t accessible to the other.

  Refer to [API keys | Test mode versus live mode](https://docs.stripe.com/keys#test-live-modes){:target=_blank .external-link} for more information about what's available in each mode and guidance on when to use each.

  /// note | n8n credentials for both modes
  If you want to work with both live mode and test mode keys, store each mode's key in a separate n8n credential.
  ///

  ## Key prefixes

  Stripes' Secret keys always begin with `sk_`:

  - Live keys begin with `sk_live_`.
  - Test keys begin with `sk_test_`.

  n8n hasn't tested these credentials with Restricted keys (prefixed `rk_`).

  /// warning | Publishable keys
  Don't use the Publishable keys (prefixed `pk_`) with your n8n credential.
  ///

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"1d275bb1-ad64-490c-b106-1a343b3be2c6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"a5d71de420eef30f574345c337e65fdd9b9d4a8819c51b003fe8aaff8808718b"}}


node_type: n8n-nodes-base.Supabase
name: Supabase
display_name: Supabase
description: Add, get, delete and update data in a table
category: Other
code_hash: 6690085b257b8dfeb9738fd6b9f1ff9c39e50ee8432805b445f1c3c7f934bf41
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/supabase
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Supabase = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const RowDescription_1 = require("./RowDescription");
  class Supabase {
      constructor() {
          this.description = {
              displayName: 'Supabase',
              name: 'supabase',
              icon: 'file:supabase.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Add, get, delete and update data in a table',
              defaults: {
                  name: 'Supabase',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'supabaseApi',
                      required: true,
                      testedBy: 'supabaseApiCredentialTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Row',
                              value: 'row',
                          },
                      ],
                      default: 'row',
                  },
                  ...RowDescription_1.rowOperations,
                  ...RowDescription_1.rowFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTables() {
                      const returnData = [];
                      const { paths } = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', '/');
                      for (const path of Object.keys(paths)) {
                          if (path === '/')
                              continue;
                          returnData.push({
                              name: path.replace('/', ''),
                              value: path.replace('/', ''),
                          });
                      }
                      return returnData;
                  },
                  async getTableColumns() {
                      const returnData = [];
                      const tableName = this.getCurrentNodeParameter('tableId');
                      const { definitions } = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', '/');
                      for (const column of Object.keys(definitions[tableName].properties)) {
                          returnData.push({
                              name: `${column} - (${definitions[tableName].properties[column].type})`,
                              value: column,
                          });
                      }
                      return returnData;
                  },
              },
              credentialTest: {
                  async supabaseApiCredentialTest(credential) {
                      try {
                          await GenericFunctions_1.validateCredentials.call(this, credential.data);
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: 'The Service Key is invalid',
                          };
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          if (resource === 'row') {
              if (operation === 'create') {
                  const records = [];
                  const tableId = this.getNodeParameter('tableId', 0);
                  for (let i = 0; i < length; i++) {
                      const record = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              record[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              record[`${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      records.push(record);
                  }
                  const endpoint = `/${tableId}`;
                  try {
                      const createdRows = await GenericFunctions_1.supabaseApiRequest.call(this, 'POST', endpoint, records);
                      createdRows.forEach((row, i) => {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(row), { itemData: { item: i } });
                          returnData.push(...executionData);
                      });
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: (0, GenericFunctions_1.mapPairedItemsFrom)(records) });
                          returnData.push(...executionData);
                      }
                      else {
                          throw error;
                      }
                  }
              }
              if (operation === 'delete') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (!keys.length) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                          }
                          if (matchType === 'allFilters') {
                              const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                              Object.assign(qs, data);
                          }
                          if (matchType === 'anyFilter') {
                              const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                              Object.assign(qs, { or: `(${data.join(',')})` });
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      let rows;
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'DELETE', endpoint, {}, qs);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              if (operation === 'get') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      const keys = this.getNodeParameter('filters.conditions', i, []);
                      const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildGetQuery)(obj, value), {});
                      Object.assign(qs, data);
                      let rows;
                      if (!keys.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                      }
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', endpoint, {}, qs);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              if (operation === 'getAll') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const returnAll = this.getNodeParameter('returnAll', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (keys.length !== 0) {
                              if (matchType === 'allFilters') {
                                  const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                                  Object.assign(qs, data);
                              }
                              if (matchType === 'anyFilter') {
                                  const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                                  Object.assign(qs, { or: `(${data.join(',')})` });
                              }
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      if (!returnAll) {
                          qs.limit = this.getNodeParameter('limit', 0);
                      }
                      let rows;
                      try {
                          rows = await GenericFunctions_1.supabaseApiRequest.call(this, 'GET', endpoint, {}, qs);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                  }
              }
              if (operation === 'update') {
                  const tableId = this.getNodeParameter('tableId', 0);
                  const filterType = this.getNodeParameter('filterType', 0);
                  let endpoint = `/${tableId}`;
                  for (let i = 0; i < length; i++) {
                      if (filterType === 'manual') {
                          const matchType = this.getNodeParameter('matchType', 0);
                          const keys = this.getNodeParameter('filters.conditions', i, []);
                          if (!keys.length) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one select condition must be defined', { itemIndex: i });
                          }
                          if (matchType === 'allFilters') {
                              const data = keys.reduce((obj, value) => (0, GenericFunctions_1.buildQuery)(obj, value), {});
                              Object.assign(qs, data);
                          }
                          if (matchType === 'anyFilter') {
                              const data = keys.map((key) => (0, GenericFunctions_1.buildOrQuery)(key));
                              Object.assign(qs, { or: `(${data.join(',')})` });
                          }
                      }
                      if (filterType === 'string') {
                          const filterString = this.getNodeParameter('filterString', i);
                          endpoint = `${endpoint}?${encodeURI(filterString)}`;
                      }
                      const record = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              record[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              record[`${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      let updatedRow;
                      try {
                          updatedRow = await GenericFunctions_1.supabaseApiRequest.call(this, 'PATCH', endpoint, record, qs);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(updatedRow), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } });
                              returnData.push(...executionData);
                              continue;
                          }
                          throw error;
                      }
                  }
              }
          }
          return [returnData];
      }
  }
  exports.Supabase = Supabase;
  //# sourceMappingURL=Supabase.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Supabase credentials
  description: Documentation for Supabase credentials. Use these credentials to authenticate Supabase in n8n, a workflow automation platform.
  contentType: [integration, reference]
  priority: high
  ---

  # Supabase credentials

  You can use these credentials to authenticate the following nodes:

  - [Supabase](/integrations/builtin/app-nodes/n8n-nodes-base.supabase/index.md)
  - [Supabase Vector Store](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase.md)

  ## Prerequisites

  Create a [Supabase](https://supabase.com/dashboard/sign-up){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Supabase's API documentation](https://supabase.com/docs/guides/api){:target=_blank .external-link} for more information about the service.

  ## Using access token

  To configure this credential, you'll need:

  - A **Host**
  - A **Service Role Secret**

  To generate your API Key:

  <!-- vale off -->

  1. In your Supabase account, go to the **Dashboard** and create or select a project for which you want to create an API key.
  2. Go to [**Project Settings > API**](https://supabase.com/dashboard/project/_/settings/api){:target=_blank .external-link} to see the API Settings for your project.
  3. Copy the **URL** from the **Project URL** section and enter it as your n8n **Host**. Refer to [API URL and keys](https://supabase.com/docs/guides/api#api-url-and-keys){:target=_blank .external-link} for more detailed instruction.
  4. Reveal and copy the **Project API key** for the `service_role`. Copy that key and enter it as your n8n **Service Role Secret**. Refer to [Understanding API Keys](https://supabase.com/docs/guides/api/api-keys){:target=_blank .external-link} for more information on the `service_role` privileges.
  <!-- vale on -->

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"98d2269f-e744-47f7-b46c-35bbf4096e40","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"640efd5e08d96aae66a97c6248517a5b275df801ba882342b915518c20da0ac2"}}


node_type: n8n-nodes-base.Switch
name: Switch
display_name: Switch
description: Route items depending on defined expression or rules
category: Other
code_hash: c1b9c3794375e6db2acbdf04c54a05bfeec3053a08c530f04f57e173953e77c9
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.switch
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Switch = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SwitchV1_node_1 = require("./V1/SwitchV1.node");
  const SwitchV2_node_1 = require("./V2/SwitchV2.node");
  class Switch extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Switch',
              name: 'switch',
              icon: 'fa:map-signs',
              group: ['transform'],
              description: 'Route items depending on defined expression or rules',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new SwitchV1_node_1.SwitchV1(baseDescription),
              2: new SwitchV2_node_1.SwitchV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Switch = Switch;
  //# sourceMappingURL=Switch.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Switch
  description: Documentation for the Switch node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.
  contentType: [integration, reference]
  priority: critical
  ---

  # Switch

  Use the Switch node to route a workflow conditionally based on comparison operations. It's similar to the [IF](/integrations/builtin/core-nodes/n8n-nodes-base.if.md) node, but supports multiple output routes.

  ## Node parameters

  Select the **Mode** the node should use:

  * **Rules**: Select this mode to build a matching rule for each output.
  * **Expression**: Select this mode to write an expression to return the output index programmatically.

  Node configuration depends on the **Mode** you select.

  ### Rules

  To configure the node with this operation, use these parameters:

  * Create **Routing Rules** to define comparison conditions.
      * Use the data type dropdown to select the data type and comparison operation type for your condition. For example, to create a rules for dates after a particular date, select **Date & Time > is after**.
      * The fields and values to enter into the condition change based on the data type and comparison you select. Refer to [Available data type comparisons](#available-data-type-comparisons) for a full list of all comparisons by data type.
  * **Rename Output**: Turn this control on to rename the output field to put matching data into. Enter your desired **Output Name**.

  Select **Add Routing Rule** to add more rules.

  #### Rule options

  You can further configure the node with this operation using these **Options**:

  - **Fallback Output**: Choose how to route the workflow when an item doesn't match any of the rules or conditions.
      - **None**: Ignore the item. This is the default behavior.
      - **Extra Output**: Send items to an extra, separate output.
      - **Output 0**: Send items to the same output as those matching the first rule.
  - **Ignore Case**: Set whether to ignore letter case when evaluating conditions (turned on) or enforce letter case (turned off).
  - **Less Strict Type Validation**: Set whether you want n8n to attempt to convert value types based on the operator you choose (turned on) or not (turned off).
  - **Send data to all matching outputs**: Set whether to send data to all outputs meeting conditions (turned on) or whether to send the data to the first output matching the conditions (turned off).

  ### Expression

  To configure the node with this operation, use these parameters:

  - **Number of Outputs**: Set how many outputs the node should have.
  - **Output Index**: Create an expression to calculate which input item should be routed to which output. The expression must return a number.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'switch') ]]

  ## Related resources

  Refer to [Splitting with conditionals](/flow-logic/splitting.md) for more information on using conditionals to create complex logic in n8n.

  --8<-- "_snippets/integrations/builtin/core-nodes/data-types.md"

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"9ebd8cf8-736b-453a-b859-b548155406e1","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"9f95e8b3a1c883d6378cc5e2854c9f868437790171317c588a69f1d6af5f3d11"}}


node_type: n8n-nodes-base.Taiga
name: Taiga
display_name: Taiga
description: Consume Taiga API
category: Other
code_hash: b5515948bd59b70034e4508dd755ebad7d28139a4db63a8d93f64faf53aaa923
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/taiga
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Taiga = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Taiga {
      constructor() {
          this.description = {
              displayName: 'Taiga',
              name: 'taiga',
              icon: 'file:taiga.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Taiga API',
              defaults: {
                  name: 'Taiga',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'taigaApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Epic',
                              value: 'epic',
                          },
                          {
                              name: 'Issue',
                              value: 'issue',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'User Story',
                              value: 'userStory',
                          },
                      ],
                      default: 'issue',
                  },
                  ...descriptions_1.epicOperations,
                  ...descriptions_1.epicFields,
                  ...descriptions_1.issueOperations,
                  ...descriptions_1.issueFields,
                  ...descriptions_1.taskOperations,
                  ...descriptions_1.taskFields,
                  ...descriptions_1.userStoryOperations,
                  ...descriptions_1.userStoryFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getEpics() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const epics = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/epics', {}, { project }));
                      return epics.map(({ subject, id }) => ({ name: subject, value: id }));
                  },
                  async getMilestones() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const milestones = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/milestones', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(milestones);
                  },
                  async getPriorities() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const priorities = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/priorities', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(priorities);
                  },
                  async getProjects() {
                      const { id } = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/users/me'));
                      const projects = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/projects', {}, { member: id }));
                      return (0, GenericFunctions_1.toOptions)(projects);
                  },
                  async getRoles() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const roles = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/roles', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(roles);
                  },
                  async getSeverities() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const severities = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/severities', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(severities);
                  },
                  async getTags() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const tags = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/projects/${project}/tags_colors`));
                      return Object.keys(tags).map((tag) => ({ name: tag, value: tag }));
                  },
                  async getTypes() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const types = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/issue-types', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(types);
                  },
                  async getUsers() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const users = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/users', {}, { project }));
                      return users.map(({ full_name_display, id }) => ({ name: full_name_display, value: id }));
                  },
                  async getUserStories() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const userStories = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/userstories', {}, { project }));
                      return userStories.map(({ subject, id }) => ({ name: subject, value: id }));
                  },
                  async getIssueStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/issue-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
                  async getTaskStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/task-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
                  async getUserStoryStatuses() {
                      const project = this.getCurrentNodeParameter('projectId');
                      const statuses = (await GenericFunctions_1.taigaApiRequest.call(this, 'GET', '/userstory-statuses', {}, { project }));
                      return (0, GenericFunctions_1.toOptions)(statuses);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'epic') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/epics', body);
                      }
                      else if (operation === 'delete') {
                          const epicId = this.getNodeParameter('epicId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/epics/${epicId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const epicId = this.getNodeParameter('epicId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/epics/${epicId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/epics', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const epicId = this.getNodeParameter('epicId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/epics/${epicId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/epics/${epicId}`, body);
                      }
                  }
                  else if (resource === 'issue') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/issues', body);
                      }
                      else if (operation === 'delete') {
                          const issueId = this.getNodeParameter('issueId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/issues/${issueId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const issueId = this.getNodeParameter('issueId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/issues/${issueId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/issues', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const issueId = this.getNodeParameter('issueId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/issues/${issueId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/issues/${issueId}`, body);
                      }
                  }
                  else if (resource === 'task') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/tasks', body);
                      }
                      else if (operation === 'delete') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', `/tasks/${taskId}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/tasks', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const taskId = this.getNodeParameter('taskId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/tasks/${taskId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/tasks/${taskId}`, body);
                      }
                  }
                  else if (resource === 'userStory') {
                      if (operation === 'create') {
                          const body = {
                              project: this.getNodeParameter('projectId', i),
                              subject: this.getNodeParameter('subject', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'POST', '/userstories', body);
                      }
                      else if (operation === 'delete') {
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          const endpoint = `/userstories/${userStoryId}`;
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          const endpoint = `/userstories/${userStoryId}`;
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/userstories', {}, qs, i);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const userStoryId = this.getNodeParameter('userStoryId', i);
                          body.version = await GenericFunctions_1.getVersionForUpdate.call(this, `/userstories/${userStoryId}`);
                          responseData = await GenericFunctions_1.taigaApiRequest.call(this, 'PATCH', `/userstories/${userStoryId}`, body);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Taiga = Taiga;
  //# sourceMappingURL=Taiga.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Taiga credentials
  description: Documentation for Taiga credentials. Use these credentials to authenticate Taiga in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Taiga credentials

  You can use these credentials to authenticate the following nodes:

  - [Taiga](/integrations/builtin/app-nodes/n8n-nodes-base.taiga.md)
  - [Taiga Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.taigatrigger.md)

  ## Prerequisites

  Create a [Taiga](https://taiga.io/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - Basic auth

  ## Related resources

  Refer to [Taiga's API documentation](https://docs.taiga.io/api.html){:target=_blank .external-link} for more information about the service.

  ## Using basic auth

  To configure this credential, you'll need:

  - A **Username**: Enter your username or user email address. Refer to [Normal login](https://docs.taiga.io/api.html#auth-normal-login){:target=_blank .external-link} for more information.
  - A **Password**: Enter your password.
  - The **Environment**: Choose between **Cloud** or **Self-Hosted**. For **Self-Hosted** instances, you'll also need to add:
      - The **URL**: Enter your Taiga URL.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"504c7fdf-cd23-4896-ab30-8d7c1f537d1a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"da321597faafbcbd68e6e736805751250475df2fba4fba857a655819942d565c"}}


node_type: n8n-nodes-base.Tapfiliate
name: Tapfiliate
display_name: Tapfiliate
description: Consume Tapfiliate API
category: Other
code_hash: 322284a7aa45ad766d6bfbf77223992d532b8fa418f9f4a1c231747871981d2e
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/tapfiliate
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Tapfiliate = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const AffiliateDescription_1 = require("./AffiliateDescription");
  const AffiliateMetadataDescription_1 = require("./AffiliateMetadataDescription");
  const ProgramAffiliateDescription_1 = require("./ProgramAffiliateDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Tapfiliate {
      constructor() {
          this.description = {
              displayName: 'Tapfiliate',
              name: 'tapfiliate',
              icon: 'file:tapfiliate.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume Tapfiliate API',
              defaults: {
                  name: 'Tapfiliate',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'tapfiliateApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Affiliate',
                              value: 'affiliate',
                          },
                          {
                              name: 'Affiliate Metadata',
                              value: 'affiliateMetadata',
                          },
                          {
                              name: 'Program Affiliate',
                              value: 'programAffiliate',
                          },
                      ],
                      default: 'affiliate',
                      required: true,
                  },
                  ...AffiliateDescription_1.affiliateOperations,
                  ...AffiliateDescription_1.affiliateFields,
                  ...AffiliateMetadataDescription_1.affiliateMetadataOperations,
                  ...AffiliateMetadataDescription_1.affiliateMetadataFields,
                  ...ProgramAffiliateDescription_1.programAffiliateOperations,
                  ...ProgramAffiliateDescription_1.programAffiliateFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getPrograms() {
                      const returnData = [];
                      const programs = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', '/programs/');
                      for (const program of programs) {
                          returnData.push({
                              name: program.title,
                              value: program.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          var _a;
          const items = this.getInputData();
          const length = items.length;
          const qs = {};
          let responseData;
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'affiliate') {
                      if (operation === 'create') {
                          const firstname = this.getNodeParameter('firstname', i);
                          const lastname = this.getNodeParameter('lastname', i);
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              firstname,
                              lastname,
                              email,
                          };
                          Object.assign(body, additionalFields);
                          if (body.addressUi) {
                              body.address = body.addressUi.addressValues;
                              delete body.addressUi;
                              if (body.address.country) {
                                  body.address.country = {
                                      code: body.address.country,
                                  };
                              }
                          }
                          if (body.companyName) {
                              body.company = {
                                  name: body.companyName,
                              };
                              delete body.companyName;
                          }
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'POST', '/affiliates/', body);
                          returnData.push(responseData);
                      }
                      if (operation === 'delete') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/affiliates/${affiliateId}/`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/affiliates/${affiliateId}/`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', '/affiliates/', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', '/affiliates/', {}, qs);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'affiliateMetadata') {
                      if (operation === 'add') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const metadata = ((_a = this.getNodeParameter('metadataUi', i)) === null || _a === void 0 ? void 0 : _a.metadataValues) || [];
                          if (metadata.length === 0) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Metadata cannot be empty.', {
                                  itemIndex: i,
                              });
                          }
                          for (const { key, value } of metadata) {
                              await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/affiliates/${affiliateId}/meta-data/${key}/`, { value });
                          }
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const key = this.getNodeParameter('key', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/affiliates/${affiliateId}/meta-data/${key}/`);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const key = this.getNodeParameter('key', i);
                          const value = this.getNodeParameter('value', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/affiliates/${affiliateId}/meta-data/`, { [key]: value });
                      }
                  }
                  if (resource === 'programAffiliate') {
                      if (operation === 'add') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              affiliate: {
                                  id: affiliateId,
                              },
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'POST', `/programs/${programId}/affiliates/`, body);
                      }
                      if (operation === 'approve') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'PUT', `/programs/${programId}/affiliates/${affiliateId}/approved/`);
                      }
                      if (operation === 'disapprove') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'DELETE', `/programs/${programId}/affiliates/${affiliateId}/approved/`);
                      }
                      if (operation === 'get') {
                          const programId = this.getNodeParameter('programId', i);
                          const affiliateId = this.getNodeParameter('affiliateId', i);
                          responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/programs/${programId}/affiliates/${affiliateId}/`);
                      }
                      if (operation === 'getAll') {
                          const programId = this.getNodeParameter('programId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.tapfiliateApiRequestAllItems.call(this, 'GET', `/programs/${programId}/affiliates/`, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.tapfiliateApiRequest.call(this, 'GET', `/programs/${programId}/affiliates/`, {}, qs);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Tapfiliate = Tapfiliate;
  //# sourceMappingURL=Tapfiliate.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Tapfiliate credentials
  description: Documentation for Tapfiliate credentials. Use these credentials to authenticate Tapfiliate in n8n, a workflow automation platform.
  contentType: [integration, reference]
  ---

  # Tapfiliate credentials

  You can use these credentials to authenticate the following nodes:

  - [Tapfiliate](/integrations/builtin/app-nodes/n8n-nodes-base.tapfiliate.md)

  ## Prerequisites

  Create a [Tapfiliate](https://tapfiliate.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Tapfiliate's API documentation](https://tapfiliate.com/docs/rest/){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - An **API Key**: Get your API Key from your [**Profile Settings**](https://app.tapfiliate.com/a/profile/){:target=_blank .external-link} **> API Key**.

  Refer to [Your API key](https://support.tapfiliate.com/en/articles/1441950-your-api-key){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"8eb8ad06-03d9-4b06-9d1c-18dad90e5eb3","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"3d6a321cc7dc787fc12f0fd76ae280c99d7bc10715f54e28935aad3a4287dd0e"}}


node_type: n8n-nodes-base.Telegram
name: Telegram
display_name: Telegram
description: Sends data to Telegram
category: Other
code_hash: f3c5a39bf643219deb3a2978b9bea87fc66b9bd893b076fa8339233a39fd38c7
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/telegram
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:30
updated_at: 2025-06-08 08:05:30
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Telegram = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Telegram {
      constructor() {
          this.description = {
              displayName: 'Telegram',
              name: 'telegram',
              icon: 'file:telegram.svg',
              group: ['output'],
              version: [1, 1.1],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Sends data to Telegram',
              defaults: {
                  name: 'Telegram',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'telegramApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Chat',
                              value: 'chat',
                          },
                          {
                              name: 'Callback',
                              value: 'callback',
                          },
                          {
                              name: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Message',
                              value: 'message',
                          },
                      ],
                      default: 'message',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['chat'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get up to date information about a chat',
                              action: 'Get a chat',
                          },
                          {
                              name: 'Get Administrators',
                              value: 'administrators',
                              description: 'Get the Administrators of a chat',
                              action: 'Get all administrators in a chat',
                          },
                          {
                              name: 'Get Member',
                              value: 'member',
                              description: 'Get the member of a chat',
                              action: 'Get a member in a chat',
                          },
                          {
                              name: 'Leave',
                              value: 'leave',
                              description: 'Leave a group, supergroup or channel',
                              action: 'Leave a chat',
                          },
                          {
                              name: 'Set Description',
                              value: 'setDescription',
                              description: 'Set the description of a chat',
                              action: 'Set description on a chat',
                          },
                          {
                              name: 'Set Title',
                              value: 'setTitle',
                              description: 'Set the title of a chat',
                              action: 'Set a title on a chat',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['callback'],
                          },
                      },
                      options: [
                          {
                              name: 'Answer Query',
                              value: 'answerQuery',
                              description: 'Send answer to callback query sent from inline keyboard',
                              action: 'Answer Query a callback',
                          },
                          {
                              name: 'Answer Inline Query',
                              value: 'answerInlineQuery',
                              description: 'Send answer to callback query sent from inline bot',
                              action: 'Answer an inline query callback',
                          },
                      ],
                      default: 'answerQuery',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['file'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a file',
                              action: 'Get a file',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Delete Chat Message',
                              value: 'deleteMessage',
                              description: 'Delete a chat message',
                              action: 'Delete a chat message',
                          },
                          {
                              name: 'Edit Message Text',
                              value: 'editMessageText',
                              description: 'Edit a text message',
                              action: 'Edit a test message',
                          },
                          {
                              name: 'Pin Chat Message',
                              value: 'pinChatMessage',
                              description: 'Pin a chat message',
                              action: 'Pin a chat message',
                          },
                          {
                              name: 'Send Animation',
                              value: 'sendAnimation',
                              description: 'Send an animated file',
                              action: 'Send an animated file',
                          },
                          {
                              name: 'Send Audio',
                              value: 'sendAudio',
                              description: 'Send a audio file',
                              action: 'Send an audio file',
                          },
                          {
                              name: 'Send Chat Action',
                              value: 'sendChatAction',
                              description: 'Send a chat action',
                              action: 'Send a chat action',
                          },
                          {
                              name: 'Send Document',
                              value: 'sendDocument',
                              description: 'Send a document',
                              action: 'Send a document',
                          },
                          {
                              name: 'Send Location',
                              value: 'sendLocation',
                              description: 'Send a location',
                              action: 'Send a location',
                          },
                          {
                              name: 'Send Media Group',
                              value: 'sendMediaGroup',
                              description: 'Send group of photos or videos to album',
                              action: 'Send a media group message',
                          },
                          {
                              name: 'Send Message',
                              value: 'sendMessage',
                              description: 'Send a text message',
                              action: 'Send a text message',
                          },
                          {
                              name: 'Send Photo',
                              value: 'sendPhoto',
                              description: 'Send a photo',
                              action: 'Send a photo message',
                          },
                          {
                              name: 'Send Sticker',
                              value: 'sendSticker',
                              description: 'Send a sticker',
                              action: 'Send a sticker',
                          },
                          {
                              name: 'Send Video',
                              value: 'sendVideo',
                              description: 'Send a video',
                              action: 'Send a video',
                          },
                          {
                              name: 'Unpin Chat Message',
                              value: 'unpinChatMessage',
                              description: 'Unpin a chat message',
                              action: 'Unpin a chat message',
                          },
                      ],
                      default: 'sendMessage',
                  },
                  {
                      displayName: 'Chat ID',
                      name: 'chatId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: [
                                  'administrators',
                                  'deleteMessage',
                                  'get',
                                  'leave',
                                  'member',
                                  'pinChatMessage',
                                  'setDescription',
                                  'setTitle',
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendChatAction',
                                  'sendDocument',
                                  'sendLocation',
                                  'sendMessage',
                                  'sendMediaGroup',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                                  'unpinChatMessage',
                              ],
                              resource: ['chat', 'message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername)',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['deleteMessage'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to delete',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['pinChatMessage', 'unpinChatMessage'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to pin or unpin',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['pinChatMessage'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Disable Notification',
                              name: 'disable_notification',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to send a notification to all chat members about the new pinned message',
                          },
                      ],
                  },
                  {
                      displayName: 'User ID',
                      name: 'userId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['member'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the target user',
                  },
                  {
                      displayName: 'Description',
                      name: 'description',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['setDescription'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'New chat description, 0-255 characters',
                  },
                  {
                      displayName: 'Title',
                      name: 'title',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['setTitle'],
                              resource: ['chat'],
                          },
                      },
                      required: true,
                      description: 'New chat title, 1-255 characters',
                  },
                  {
                      displayName: 'Query ID',
                      name: 'queryId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the query to be answered',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['answerQuery'],
                              resource: ['callback'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Cache Time',
                              name: 'cache_time',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              default: 0,
                              description: 'The maximum amount of time in seconds that the result of the callback query may be cached client-side',
                          },
                          {
                              displayName: 'Show Alert',
                              name: 'show_alert',
                              type: 'boolean',
                              default: false,
                              description: 'Whether an alert will be shown by the client instead of a notification at the top of the chat screen',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              default: '',
                              description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters.',
                          },
                          {
                              displayName: 'URL',
                              name: 'url',
                              type: 'string',
                              default: '',
                              description: "URL that will be opened by the user's client",
                          },
                      ],
                  },
                  {
                      displayName: 'Query ID',
                      name: 'queryId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the answered query',
                  },
                  {
                      displayName: 'Results',
                      name: 'results',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      required: true,
                      description: 'A JSON-serialized array of results for the inline query',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['answerInlineQuery'],
                              resource: ['callback'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Cache Time',
                              name: 'cache_time',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              default: 0,
                              description: 'The maximum amount of time in seconds that the result of the callback query may be cached client-side',
                          },
                          {
                              displayName: 'Show Alert',
                              name: 'show_alert',
                              type: 'boolean',
                              default: false,
                              description: 'Whether an alert will be shown by the client instead of a notification at the top of the chat screen',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              default: '',
                              description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters.',
                          },
                          {
                              displayName: 'URL',
                              name: 'url',
                              type: 'string',
                              default: '',
                              description: "URL that will be opened by the user's client",
                          },
                      ],
                  },
                  {
                      displayName: 'File ID',
                      name: 'fileId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['file'],
                          },
                      },
                      required: true,
                      description: 'The ID of the file',
                  },
                  {
                      displayName: 'Download',
                      name: 'download',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['file'],
                          },
                      },
                      default: true,
                      description: 'Whether to download the file',
                  },
                  {
                      displayName: 'Message Type',
                      name: 'messageType',
                      type: 'options',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Inline Message',
                              value: 'inlineMessage',
                          },
                          {
                              name: 'Message',
                              value: 'message',
                          },
                      ],
                      default: 'message',
                      description: 'The type of the message to edit',
                  },
                  {
                      displayName: 'Chat ID',
                      name: 'chatId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['message'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername). To find your chat ID ask @get_id_bot.',
                  },
                  {
                      displayName: 'Binary Data',
                      name: 'binaryData',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendPhoto',
                                  'sendVideo',
                                  'sendSticker',
                              ],
                              resource: ['message'],
                          },
                      },
                      description: 'Whether the data to upload should be taken from binary field',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendPhoto',
                                  'sendVideo',
                                  'sendSticker',
                              ],
                              resource: ['message'],
                              binaryData: [true],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property that contains the data to upload',
                  },
                  {
                      displayName: 'Message ID',
                      name: 'messageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['message'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the message to edit',
                  },
                  {
                      displayName: 'Inline Message ID',
                      name: 'inlineMessageId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              messageType: ['inlineMessage'],
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      required: true,
                      description: 'Unique identifier of the inline message to edit',
                  },
                  {
                      displayName: 'Reply Markup',
                      name: 'replyMarkup',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText'],
                              resource: ['message'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'None',
                              value: 'none',
                          },
                          {
                              name: 'Inline Keyboard',
                              value: 'inlineKeyboard',
                          },
                      ],
                      default: 'none',
                      description: 'Additional interface options',
                  },
                  {
                      displayName: 'Animation',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendAnimation'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Animation to send. Pass a file_id to send an animation that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get an animation from the Internet.',
                  },
                  {
                      displayName: 'Audio',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendAudio'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Audio file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Action',
                      name: 'action',
                      type: 'options',
                      displayOptions: {
                          show: {
                              operation: ['sendChatAction'],
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Find Location',
                              value: 'find_location',
                              action: 'Find location',
                          },
                          {
                              name: 'Record Audio',
                              value: 'record_audio',
                              action: 'Record audio',
                          },
                          {
                              name: 'Record Video',
                              value: 'record_video',
                              action: 'Record video',
                          },
                          {
                              name: 'Record Video Note',
                              value: 'record_video_note',
                              action: 'Record video note',
                          },
                          {
                              name: 'Typing',
                              value: 'typing',
                              action: 'Typing a message',
                          },
                          {
                              name: 'Upload Audio',
                              value: 'upload_audio',
                              action: 'Upload audio',
                          },
                          {
                              name: 'Upload Document',
                              value: 'upload_document',
                              action: 'Upload document',
                          },
                          {
                              name: 'Upload Photo',
                              value: 'upload_photo',
                              action: 'Upload photo',
                          },
                          {
                              name: 'Upload Video',
                              value: 'upload_video',
                              action: 'Upload video',
                          },
                          {
                              name: 'Upload Video Note',
                              value: 'upload_video_note',
                              action: 'Upload video note',
                          },
                      ],
                      default: 'typing',
                      description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive. The status is set for 5 seconds or less (when a message arrives from your bot).',
                  },
                  {
                      displayName: 'Document',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendDocument'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Document to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Latitude',
                      name: 'latitude',
                      type: 'number',
                      default: 0.0,
                      typeOptions: {
                          numberPrecision: 10,
                          minValue: -90,
                          maxValue: 90,
                      },
                      displayOptions: {
                          show: {
                              operation: ['sendLocation'],
                              resource: ['message'],
                          },
                      },
                      description: 'Location latitude',
                  },
                  {
                      displayName: 'Longitude',
                      name: 'longitude',
                      type: 'number',
                      typeOptions: {
                          numberPrecision: 10,
                          minValue: -180,
                          maxValue: 180,
                      },
                      default: 0.0,
                      displayOptions: {
                          show: {
                              operation: ['sendLocation'],
                              resource: ['message'],
                          },
                      },
                      description: 'Location longitude',
                  },
                  {
                      displayName: 'Media',
                      name: 'media',
                      type: 'fixedCollection',
                      displayOptions: {
                          show: {
                              operation: ['sendMediaGroup'],
                              resource: ['message'],
                          },
                      },
                      description: 'The media to add',
                      placeholder: 'Add Media',
                      typeOptions: {
                          multipleValues: true,
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Media',
                              name: 'media',
                              values: [
                                  {
                                      displayName: 'Type',
                                      name: 'type',
                                      type: 'options',
                                      options: [
                                          {
                                              name: 'Photo',
                                              value: 'photo',
                                          },
                                          {
                                              name: 'Video',
                                              value: 'video',
                                          },
                                      ],
                                      default: 'photo',
                                      description: 'The type of the media to add',
                                  },
                                  {
                                      displayName: 'Media File',
                                      name: 'media',
                                      type: 'string',
                                      default: '',
                                      description: 'Media to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass an HTTP URL for Telegram to get a file from the Internet.',
                                  },
                                  {
                                      displayName: 'Additional Fields',
                                      name: 'additionalFields',
                                      type: 'collection',
                                      placeholder: 'Add Field',
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Caption',
                                              name: 'caption',
                                              type: 'string',
                                              default: '',
                                              description: 'Caption text to set, 0-1024 characters',
                                          },
                                          {
                                              displayName: 'Parse Mode',
                                              name: 'parse_mode',
                                              type: 'options',
                                              options: [
                                                  {
                                                      name: 'Markdown',
                                                      value: 'Markdown',
                                                  },
                                                  {
                                                      name: 'HTML',
                                                      value: 'HTML',
                                                  },
                                              ],
                                              default: 'HTML',
                                              description: 'How to parse the text',
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      required: true,
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['editMessageText', 'sendMessage'],
                              resource: ['message'],
                          },
                      },
                      description: 'Text of the message to be sent',
                  },
                  {
                      displayName: 'Photo',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendPhoto'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Photo to send. Pass a file_id to send a photo that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a photo from the Internet.',
                  },
                  {
                      displayName: 'Sticker',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendSticker'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Sticker to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a .webp file from the Internet.',
                  },
                  {
                      displayName: 'Video',
                      name: 'file',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['sendVideo'],
                              resource: ['message'],
                              binaryData: [false],
                          },
                      },
                      description: 'Video file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
                  },
                  {
                      displayName: 'Reply Markup',
                      name: 'replyMarkup',
                      displayOptions: {
                          show: {
                              operation: [
                                  'sendAnimation',
                                  'sendDocument',
                                  'sendMessage',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                                  'sendAudio',
                                  'sendLocation',
                              ],
                              resource: ['message'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'Force Reply',
                              value: 'forceReply',
                          },
                          {
                              name: 'Inline Keyboard',
                              value: 'inlineKeyboard',
                          },
                          {
                              name: 'None',
                              value: 'none',
                          },
                          {
                              name: 'Reply Keyboard',
                              value: 'replyKeyboard',
                          },
                          {
                              name: 'Reply Keyboard Remove',
                              value: 'replyKeyboardRemove',
                          },
                      ],
                      default: 'none',
                      description: 'Additional interface options',
                  },
                  {
                      displayName: 'Force Reply',
                      name: 'forceReply',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              replyMarkup: ['forceReply'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Force Reply',
                              name: 'force_reply',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to show reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply',
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to force reply from specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Inline Keyboard',
                      name: 'inlineKeyboard',
                      placeholder: 'Add Keyboard Row',
                      description: 'Adds an inline keyboard that appears right next to the message it belongs to',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              replyMarkup: ['inlineKeyboard'],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Rows',
                              name: 'rows',
                              values: [
                                  {
                                      displayName: 'Row',
                                      name: 'row',
                                      type: 'fixedCollection',
                                      description: 'The value to set',
                                      placeholder: 'Add Button',
                                      typeOptions: {
                                          multipleValues: true,
                                      },
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Buttons',
                                              name: 'buttons',
                                              values: [
                                                  {
                                                      displayName: 'Text',
                                                      name: 'text',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Label text on the button',
                                                  },
                                                  {
                                                      displayName: 'Additional Fields',
                                                      name: 'additionalFields',
                                                      type: 'collection',
                                                      placeholder: 'Add Field',
                                                      default: {},
                                                      options: [
                                                          {
                                                              displayName: 'Callback Data',
                                                              name: 'callback_data',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes',
                                                          },
                                                          {
                                                              displayName: 'Pay',
                                                              name: 'pay',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: 'Whether to send a Pay button',
                                                          },
                                                          {
                                                              displayName: 'Switch Inline Query Current Chat',
                                                              name: 'switch_inline_query_current_chat',
                                                              type: 'string',
                                                              default: '',
                                                              description: "If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field.Can be empty, in which case only the bot’s username will be inserted",
                                                          },
                                                          {
                                                              displayName: 'Switch Inline Query',
                                                              name: 'switch_inline_query',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.',
                                                          },
                                                          {
                                                              displayName: 'URL',
                                                              name: 'url',
                                                              type: 'string',
                                                              default: '',
                                                              description: 'HTTP or tg:// URL to be opened when button is pressed',
                                                          },
                                                      ],
                                                  },
                                              ],
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard',
                      name: 'replyKeyboard',
                      placeholder: 'Add Reply Keyboard Row',
                      description: 'Adds a custom keyboard with reply options',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboard'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Rows',
                              name: 'rows',
                              values: [
                                  {
                                      displayName: 'Row',
                                      name: 'row',
                                      type: 'fixedCollection',
                                      description: 'The value to set',
                                      placeholder: 'Add Button',
                                      typeOptions: {
                                          multipleValues: true,
                                      },
                                      default: {},
                                      options: [
                                          {
                                              displayName: 'Buttons',
                                              name: 'buttons',
                                              values: [
                                                  {
                                                      displayName: 'Text',
                                                      name: 'text',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.',
                                                  },
                                                  {
                                                      displayName: 'Additional Fields',
                                                      name: 'additionalFields',
                                                      type: 'collection',
                                                      placeholder: 'Add Field',
                                                      default: {},
                                                      options: [
                                                          {
                                                              displayName: 'Request Contact',
                                                              name: 'request_contact',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: "Whether the user's phone number will be sent as a contact when the button is pressed.Available in private chats only",
                                                          },
                                                          {
                                                              displayName: 'Request Location',
                                                              name: 'request_location',
                                                              type: 'boolean',
                                                              default: false,
                                                              description: "Whether the user's request_location",
                                                          },
                                                      ],
                                                  },
                                              ],
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard Options',
                      name: 'replyKeyboardOptions',
                      type: 'collection',
                      placeholder: 'Add Option',
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboard'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Resize Keyboard',
                              name: 'resize_keyboard',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to request clients to resize the keyboard vertically for optimal fit',
                          },
                          {
                              displayName: 'One Time Keyboard',
                              name: 'one_time_keyboard',
                              type: 'boolean',
                              default: false,
                              description: "Whether to request clients to hide the keyboard as soon as it's been used",
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to show the keyboard to specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Reply Keyboard Remove',
                      name: 'replyKeyboardRemove',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              replyMarkup: ['replyKeyboardRemove'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Remove Keyboard',
                              name: 'remove_keyboard',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to request clients to remove the custom keyboard',
                          },
                          {
                              displayName: 'Selective',
                              name: 'selective',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to force reply from specific users only',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: [
                                  'editMessageText',
                                  'sendAnimation',
                                  'sendAudio',
                                  'sendDocument',
                                  'sendLocation',
                                  'sendMessage',
                                  'sendMediaGroup',
                                  'sendPhoto',
                                  'sendSticker',
                                  'sendVideo',
                              ],
                              resource: ['message'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Append n8n Attribution',
                              name: 'appendAttribution',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to include the phrase “This message was sent automatically with n8n” to the end of the message',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendMessage'],
                                  },
                              },
                          },
                          {
                              displayName: 'Caption',
                              name: 'caption',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendDocument',
                                          'sendPhoto',
                                          'sendVideo',
                                      ],
                                  },
                              },
                              default: '',
                              description: 'Caption text to set, 0-1024 characters',
                          },
                          {
                              displayName: 'Disable Notification',
                              name: 'disable_notification',
                              type: 'boolean',
                              default: false,
                              displayOptions: {
                                  hide: {
                                      '/operation': ['editMessageText'],
                                  },
                              },
                              description: 'Whether to send the message silently. Users will receive a notification with no sound.',
                          },
                          {
                              displayName: 'Disable WebPage Preview',
                              name: 'disable_web_page_preview',
                              type: 'boolean',
                              displayOptions: {
                                  show: {
                                      '/operation': ['editMessageText', 'sendMessage'],
                                  },
                              },
                              default: false,
                              description: 'Whether to disable link previews for links in this message',
                          },
                          {
                              displayName: 'Duration',
                              name: 'duration',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendAudio', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Duration of clip in seconds',
                          },
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              default: '',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendDocument',
                                          'sendPhoto',
                                          'sendVideo',
                                          'sendSticker',
                                      ],
                                      '/resource': ['message'],
                                      '/binaryData': [true],
                                  },
                              },
                              placeholder: 'image.jpeg',
                          },
                          {
                              displayName: 'Height',
                              name: 'height',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Height of the video',
                          },
                          {
                              displayName: 'Parse Mode',
                              name: 'parse_mode',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Markdown',
                                      value: 'Markdown',
                                  },
                                  {
                                      name: 'HTML',
                                      value: 'HTML',
                                  },
                              ],
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'editMessageText',
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendMessage',
                                          'sendPhoto',
                                          'sendVideo',
                                          'sendDocument',
                                      ],
                                  },
                              },
                              default: 'HTML',
                              description: 'How to parse the text',
                          },
                          {
                              displayName: 'Performer',
                              name: 'performer',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAudio'],
                                  },
                              },
                              default: '',
                              description: 'Name of the performer',
                          },
                          {
                              displayName: 'Reply To Message ID',
                              name: 'reply_to_message_id',
                              type: 'number',
                              displayOptions: {
                                  hide: {
                                      '/operation': ['editMessageText'],
                                  },
                              },
                              default: 0,
                              description: 'If the message is a reply, ID of the original message',
                          },
                          {
                              displayName: 'Message Thread ID',
                              name: 'message_thread_id',
                              type: 'number',
                              displayOptions: {
                                  show: {
                                      '/operation': [
                                          'sendAnimation',
                                          'sendAudio',
                                          'sendChatAction',
                                          'sendDocument',
                                          'sendLocation',
                                          'sendMediaGroup',
                                          'sendMessage',
                                          'sendPhoto',
                                          'sendSticker',
                                          'sendVideo',
                                      ],
                                  },
                              },
                              default: 0,
                              description: 'The unique identifier of the forum topic',
                          },
                          {
                              displayName: 'Title',
                              name: 'title',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAudio'],
                                  },
                              },
                              default: '',
                              description: 'Title of the track',
                          },
                          {
                              displayName: 'Thumbnail',
                              name: 'thumb',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendAudio', 'sendDocument', 'sendVideo'],
                                  },
                              },
                              default: '',
                              description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320.',
                          },
                          {
                              displayName: 'Width',
                              name: 'width',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                              },
                              displayOptions: {
                                  show: {
                                      '/operation': ['sendAnimation', 'sendVideo'],
                                  },
                              },
                              default: 0,
                              description: 'Width of the video',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          var _a, _b;
          const items = this.getInputData();
          const returnData = [];
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          const binaryData = this.getNodeParameter('binaryData', 0, false);
          const nodeVersion = this.getNode().typeVersion;
          const instanceId = this.getInstanceId();
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'POST';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'callback') {
                      if (operation === 'answerQuery') {
                          endpoint = 'answerCallbackQuery';
                          body.callback_query_id = this.getNodeParameter('queryId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'answerInlineQuery') {
                          endpoint = 'answerInlineQuery';
                          body.inline_query_id = this.getNodeParameter('queryId', i);
                          body.results = this.getNodeParameter('results', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                  }
                  else if (resource === 'chat') {
                      if (operation === 'get') {
                          endpoint = 'getChat';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'administrators') {
                          endpoint = 'getChatAdministrators';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'leave') {
                          endpoint = 'leaveChat';
                          body.chat_id = this.getNodeParameter('chatId', i);
                      }
                      else if (operation === 'member') {
                          endpoint = 'getChatMember';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.user_id = this.getNodeParameter('userId', i);
                      }
                      else if (operation === 'setDescription') {
                          endpoint = 'setChatDescription';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.description = this.getNodeParameter('description', i);
                      }
                      else if (operation === 'setTitle') {
                          endpoint = 'setChatTitle';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.title = this.getNodeParameter('title', i);
                      }
                  }
                  else if (resource === 'file') {
                      if (operation === 'get') {
                          endpoint = 'getFile';
                          body.file_id = this.getNodeParameter('fileId', i);
                      }
                  }
                  else if (resource === 'message') {
                      if (operation === 'editMessageText') {
                          endpoint = 'editMessageText';
                          const messageType = this.getNodeParameter('messageType', i);
                          if (messageType === 'inlineMessage') {
                              body.inline_message_id = this.getNodeParameter('inlineMessageId', i);
                          }
                          else {
                              body.chat_id = this.getNodeParameter('chatId', i);
                              body.message_id = this.getNodeParameter('messageId', i);
                          }
                          body.text = this.getNodeParameter('text', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'deleteMessage') {
                          endpoint = 'deleteMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                      }
                      else if (operation === 'pinChatMessage') {
                          endpoint = 'pinChatMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                          const { disable_notification } = this.getNodeParameter('additionalFields', i);
                          if (disable_notification) {
                              body.disable_notification = true;
                          }
                      }
                      else if (operation === 'unpinChatMessage') {
                          endpoint = 'unpinChatMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.message_id = this.getNodeParameter('messageId', i);
                      }
                      else if (operation === 'sendAnimation') {
                          endpoint = 'sendAnimation';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.animation = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendAudio') {
                          endpoint = 'sendAudio';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.audio = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendChatAction') {
                          endpoint = 'sendChatAction';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.action = this.getNodeParameter('action', i);
                      }
                      else if (operation === 'sendDocument') {
                          endpoint = 'sendDocument';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.document = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendLocation') {
                          endpoint = 'sendLocation';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.latitude = this.getNodeParameter('latitude', i);
                          body.longitude = this.getNodeParameter('longitude', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendMessage') {
                          endpoint = 'sendMessage';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.text = this.getNodeParameter('text', i);
                          GenericFunctions_1.addAdditionalFields.call(this, body, i, nodeVersion, instanceId);
                      }
                      else if (operation === 'sendMediaGroup') {
                          endpoint = 'sendMediaGroup';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          const mediaItems = this.getNodeParameter('media', i);
                          body.media = [];
                          for (const mediaItem of mediaItems.media) {
                              if (mediaItem.additionalFields !== undefined) {
                                  Object.assign(mediaItem, mediaItem.additionalFields);
                                  delete mediaItem.additionalFields;
                              }
                              body.media.push(mediaItem);
                          }
                      }
                      else if (operation === 'sendPhoto') {
                          endpoint = 'sendPhoto';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.photo = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendSticker') {
                          endpoint = 'sendSticker';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.sticker = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                      else if (operation === 'sendVideo') {
                          endpoint = 'sendVideo';
                          body.chat_id = this.getNodeParameter('chatId', i);
                          body.video = this.getNodeParameter('file', i, '');
                          GenericFunctions_1.addAdditionalFields.call(this, body, i);
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  let responseData;
                  if (binaryData) {
                      const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);
                      const itemBinaryData = items[i].binary[binaryPropertyName];
                      const propertyName = (0, GenericFunctions_1.getPropertyName)(operation);
                      const fileName = this.getNodeParameter('additionalFields.fileName', 0, '');
                      const filename = fileName || ((_a = itemBinaryData.fileName) === null || _a === void 0 ? void 0 : _a.toString());
                      if (!fileName && !itemBinaryData.fileName) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `File name is needed to ${operation}. Make sure the property that holds the binary data
  						has the file name property set or set it manually in the node using the File Name parameter under
  						Additional Fields.`);
                      }
                      body.disable_notification = ((_b = body.disable_notification) === null || _b === void 0 ? void 0 : _b.toString()) || 'false';
                      let uploadData;
                      if (itemBinaryData.id) {
                          uploadData = await this.helpers.getBinaryStream(itemBinaryData.id);
                      }
                      else {
                          uploadData = Buffer.from(itemBinaryData.data, n8n_workflow_1.BINARY_ENCODING);
                      }
                      const formData = {
                          ...body,
                          [propertyName]: {
                              value: uploadData,
                              options: {
                                  filename,
                                  contentType: itemBinaryData.mimeType,
                              },
                          },
                      };
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, {}, qs, { formData });
                  }
                  else {
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                  }
                  if (resource === 'file' && operation === 'get') {
                      if (this.getNodeParameter('download', i, false)) {
                          const filePath = responseData.result.file_path;
                          const credentials = await this.getCredentials('telegramApi');
                          const file = await GenericFunctions_1.apiRequest.call(this, 'GET', '', {}, {}, {
                              json: false,
                              encoding: null,
                              uri: `https://api.telegram.org/file/bot${credentials.accessToken}/${filePath}`,
                              resolveWithFullResponse: true,
                              useStream: true,
                          });
                          const fileName = filePath.split('/').pop();
                          const data = await this.helpers.prepareBinaryData(file.body, fileName);
                          returnData.push({
                              json: responseData,
                              binary: { data },
                              pairedItem: { item: i },
                          });
                          continue;
                      }
                  }
                  else if (resource === 'chat' && operation === 'administrators') {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.result), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: {}, error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Telegram = Telegram;
  //# sourceMappingURL=Telegram.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Telegram credentials
  description: Documentation for Telegram credentials. Use these credentials to authenticate Telegram in n8n, a workflow automation platform.
  contentType: [integration, reference]
  priority: critical
  ---

  # Telegram credentials

  You can use these credentials to authenticate the following nodes:

  - [Telegram](/integrations/builtin/app-nodes/n8n-nodes-base.telegram/index.md)
  - [Telegram Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.telegramtrigger/index.md)

  ## Prerequisites

  Create a [Telegram](https://telegram.org/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API bot access token

  ## Related resources

  Refer to [Telegram's Bot API documentation](https://core.telegram.org/bots/api){:target=_blank .external-link} for more information about the service.

  Refer to the [Telegram Bot Features](https://core.telegram.org/bots/features){:target=_blank .external-link} documentation for more information on creating and working with bots.

  ## Using API bot access token

  To configure this credential, you'll need:

  - A bot **Access Token**

  To generate your access token:

  1. Start a chat with the [BotFather](https://telegram.me/BotFather){:target=_blank .external-link}.
  2. Enter the `/newbot` command to create a new bot.
  3. The BotFather will ask you for a name and username for your new bot:
      * The **name** is the bot's name displayed in contact details and elsewhere. You can change the bot name later.
      * The **username** is a short name used in search, mentions, and t.me links. Use these guidelines when creating your username:
          * Must be between 5 and 32 characters long.
          * Not case sensitive.
          * May only include Latin characters, numbers, and underscores.
          * Must end in `bot`, like `tetris_bot` or `TetrisBot`.
          * You can't change the username later.
  3. Copy the bot **token** the BotFather generates and add it as the **Access Token** in n8n.

  Refer to the [BotFather Create a new bot documentation](https://core.telegram.org/bots/features#creating-a-new-bot) for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"079515f9-9f8d-4e0f-b6ec-6a6fff31bc3a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"df80efcce3d6c91419b779a2fc8bfc996fa5076bfdb2a58f6a21c6fd99422c7e"}}


