# nodes

node_type: n8n-nodes-base.TheHive
name: TheHive
display_name: TheHive
description: Consume TheHive API
category: Other
code_hash: 4693e13130108cbcdb7b8541cea40e18dff162d3e1cdd41ddc11bb95d829a947
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/thehive5
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.TheHive = void 0;
  const AlertDescription_1 = require("./descriptions/AlertDescription");
  const ObservableDescription_1 = require("./descriptions/ObservableDescription");
  const CaseDescription_1 = require("./descriptions/CaseDescription");
  const TaskDescription_1 = require("./descriptions/TaskDescription");
  const LogDescription_1 = require("./descriptions/LogDescription");
  const QueryFunctions_1 = require("./QueryFunctions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const set_1 = __importDefault(require("lodash/set"));
  class TheHive {
      constructor() {
          this.description = {
              displayName: 'TheHive',
              name: 'theHive',
              icon: 'file:thehive.svg',
              group: ['transform'],
              subtitle: '={{$parameter["operation"]}} : {{$parameter["resource"]}}',
              version: 1,
              description: 'Consume TheHive API',
              defaults: {
                  name: 'TheHive',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'theHiveApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      options: [
                          {
                              name: 'Alert',
                              value: 'alert',
                          },
                          {
                              name: 'Case',
                              value: 'case',
                          },
                          {
                              name: 'Log',
                              value: 'log',
                          },
                          {
                              name: 'Observable',
                              value: 'observable',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                      ],
                      default: 'alert',
                  },
                  ...AlertDescription_1.alertOperations,
                  ...AlertDescription_1.alertFields,
                  ...ObservableDescription_1.observableOperations,
                  ...ObservableDescription_1.observableFields,
                  ...CaseDescription_1.caseOperations,
                  ...CaseDescription_1.caseFields,
                  ...TaskDescription_1.taskOperations,
                  ...TaskDescription_1.taskFields,
                  ...LogDescription_1.logOperations,
                  ...LogDescription_1.logFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async loadResponders() {
                      const resource = (0, GenericFunctions_1.mapResource)(this.getNodeParameter('resource'));
                      const resourceId = this.getNodeParameter('id');
                      const endpoint = `/connector/cortex/responder/${resource}/${resourceId}`;
                      const responders = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      for (const responder of responders) {
                          returnData.push({
                              name: responder.name,
                              value: responder.id,
                              description: responder.description,
                          });
                      }
                      return returnData;
                  },
                  async loadAnalyzers() {
                      const dataType = this.getNodeParameter('dataType');
                      const endpoint = `/connector/cortex/analyzer/type/${dataType}`;
                      const requestResult = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      for (const analyzer of requestResult) {
                          for (const cortexId of analyzer.cortexIds) {
                              returnData.push({
                                  name: `[${cortexId}] ${analyzer.name}`,
                                  value: `${analyzer.id}::${cortexId}`,
                                  description: analyzer.description,
                              });
                          }
                      }
                      return returnData;
                  },
                  async loadCustomFields() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const endpoint = version === 'v1' ? '/customField' : '/list/custom_fields';
                      const requestResult = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      const returnData = [];
                      const customFields = version === 'v1'
                          ? requestResult
                          : Object.keys(requestResult).map((key) => requestResult[key]);
                      for (const field of customFields) {
                          returnData.push({
                              name: `${field.name}: ${field.reference}`,
                              value: field.reference,
                              description: `${field.type}: ${field.description}`,
                          });
                      }
                      return returnData;
                  },
                  async loadObservableOptions() {
                      const version = (await this.getCredentials('theHiveApi')).apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count observables' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create observable' },
                          {
                              name: 'Execute Analyzer',
                              value: 'executeAnalyzer',
                              description: 'Execute an responder on selected observable',
                          },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on selected observable',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get all observables of a specific case',
                          },
                          { name: 'Get', value: 'get', description: 'Get a single observable' },
                          { name: 'Search', value: 'search', description: 'Search observables' },
                          { name: 'Update', value: 'update', description: 'Update observable' },
                      ];
                      return options;
                  },
                  async loadObservableTypes() {
                      const version = (await this.getCredentials('theHiveApi')).apiVersion;
                      const endpoint = version === 'v1' ? '/observable/type?range=all' : '/list/list_artifactDataType';
                      const dataTypes = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', endpoint);
                      let returnData = [];
                      if (version === 'v1') {
                          returnData = dataTypes.map((dataType) => {
                              return {
                                  name: dataType.name,
                                  value: dataType.name,
                              };
                          });
                      }
                      else {
                          returnData = Object.keys(dataTypes).map((key) => {
                              const dataType = dataTypes[key];
                              return {
                                  name: dataType,
                                  value: dataType,
                              };
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async loadTaskOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count tasks' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create a task' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified task',
                          },
                          { name: 'Get Many', value: 'getAll', description: 'Get all asks of a specific case' },
                          { name: 'Get', value: 'get', description: 'Get a single task' },
                          { name: 'Search', value: 'search', description: 'Search tasks' },
                          { name: 'Update', value: 'update', description: 'Update a task' },
                      ];
                      return options;
                  },
                  async loadAlertOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count alerts' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create alert' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified alert',
                          },
                          { name: 'Get', value: 'get', description: 'Get an alert' },
                          { name: 'Get Many', value: 'getAll', description: 'Get all alerts' },
                          { name: 'Mark as Read', value: 'markAsRead', description: 'Mark the alert as read' },
                          {
                              name: 'Mark as Unread',
                              value: 'markAsUnread',
                              description: 'Mark the alert as unread',
                          },
                          { name: 'Merge', value: 'merge', description: 'Merge alert into an existing case' },
                          { name: 'Promote', value: 'promote', description: 'Promote an alert into a case' },
                          { name: 'Update', value: 'update', description: 'Update alert' },
                      ];
                      return options;
                  },
                  async loadCaseOptions() {
                      const credentials = await this.getCredentials('theHiveApi');
                      const version = credentials.apiVersion;
                      const options = [
                          ...(version === 'v1'
                              ? [{ name: 'Count', value: 'count', description: 'Count a case' }]
                              : []),
                          { name: 'Create', value: 'create', description: 'Create a case' },
                          {
                              name: 'Execute Responder',
                              value: 'executeResponder',
                              description: 'Execute a responder on the specified case',
                          },
                          { name: 'Get Many', value: 'getAll', description: 'Get all cases' },
                          { name: 'Get', value: 'get', description: 'Get a single case' },
                          { name: 'Update', value: 'update', description: 'Update a case' },
                      ];
                      return options;
                  },
              },
          };
      }
      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 === 'alert') {
                      if (operation === 'count') {
                          const filters = this.getNodeParameter('filters', i, {});
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _countSearchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'title') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listAlert',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-Alert';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, additionalFields, jsonParameters);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              description: this.getNodeParameter('description', i),
                              severity: this.getNodeParameter('severity', i),
                              date: Date.parse(this.getNodeParameter('date', i)),
                              tags: (0, GenericFunctions_1.splitTags)(this.getNodeParameter('tags', i)),
                              tlp: this.getNodeParameter('tlp', i),
                              status: this.getNodeParameter('status', i),
                              type: this.getNodeParameter('type', i),
                              source: this.getNodeParameter('source', i),
                              sourceRef: this.getNodeParameter('sourceRef', i),
                              follow: this.getNodeParameter('follow', i, true),
                              ...(0, GenericFunctions_1.prepareOptional)(additionalFields),
                          };
                          if (customFields) {
                              Object.keys(customFields).forEach((key) => {
                                  (0, set_1.default)(body, key, customFields[key]);
                              });
                          }
                          const artifactUi = this.getNodeParameter('artifactUi', i);
                          if (artifactUi) {
                              const artifactValues = artifactUi.artifactValues;
                              if (artifactValues) {
                                  const artifactData = [];
                                  for (const artifactvalue of artifactValues) {
                                      const element = {};
                                      element.message = artifactvalue.message;
                                      element.tags = artifactvalue.tags.split(',');
                                      element.dataType = artifactvalue.dataType;
                                      element.data = artifactvalue.data;
                                      if (artifactvalue.dataType === 'file') {
                                          const binaryPropertyName = artifactvalue.binaryProperty;
                                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                          element.data = `${binaryData.fileName};${binaryData.mimeType};${binaryData.data}`;
                                      }
                                      artifactData.push(element);
                                  }
                                  body.artifacts = artifactData;
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/alert', body);
                      }
                      if (operation === 'executeResponder') {
                          const alertId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: alertId,
                              objectType: 'alert',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const alertId = this.getNodeParameter('id', i);
                          const includeSimilar = this.getNodeParameter('options.includeSimilar', i, false);
                          if (includeSimilar) {
                              qs.similarity = true;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', `/alert/${alertId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const filters = this.getNodeParameter('filters', i, {});
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const options = this.getNodeParameter('options', i);
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _searchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'title') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listAlert',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'alerts';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/alert/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'markAsRead') {
                          const alertId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/markAsRead`);
                      }
                      if (operation === 'markAsUnread') {
                          const alertId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/markAsUnread`);
                      }
                      if (operation === 'merge') {
                          const alertId = this.getNodeParameter('id', i);
                          const caseId = this.getNodeParameter('caseId', i);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/merge/${caseId}`, {});
                      }
                      if (operation === 'promote') {
                          const alertId = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {};
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/alert/${alertId}/createCase`, body);
                      }
                      if (operation === 'update') {
                          const alertId = this.getNodeParameter('id', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, updateFields, jsonParameters);
                          const artifactUi = updateFields.artifactUi;
                          delete updateFields.artifactUi;
                          const body = {
                              ...customFields,
                          };
                          Object.assign(body, updateFields);
                          if (artifactUi) {
                              const artifactValues = artifactUi.artifactValues;
                              if (artifactValues) {
                                  const artifactData = [];
                                  for (const artifactvalue of artifactValues) {
                                      const element = {};
                                      element.message = artifactvalue.message;
                                      element.tags = artifactvalue.tags.split(',');
                                      element.dataType = artifactvalue.dataType;
                                      element.data = artifactvalue.data;
                                      if (artifactvalue.dataType === 'file') {
                                          const binaryPropertyName = artifactvalue.binaryProperty;
                                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                          element.data = `${binaryData.fileName};${binaryData.mimeType};${binaryData.data}`;
                                      }
                                      artifactData.push(element);
                                  }
                                  body.artifacts = artifactData;
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/alert/${alertId}`, body);
                      }
                  }
                  if (resource === 'observable') {
                      if (operation === 'count') {
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'dataType' || key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'keywork' || key === 'message') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'range') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Between)('startDate', countQueryAttributs['range']['dateRange']['fromDate'], countQueryAttributs['range']['dateRange']['toDate']));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listObservable',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-observables';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'executeAnalyzer') {
                          const observableId = this.getNodeParameter('id', i);
                          const analyzers = this.getNodeParameter('analyzers', i).map((analyzer) => {
                              const parts = analyzer.split('::');
                              return {
                                  analyzerId: parts[0],
                                  cortexId: parts[1],
                              };
                          });
                          let response;
                          let body;
                          responseData = [];
                          for (const analyzer of analyzers) {
                              body = {
                                  ...analyzer,
                                  artifactId: observableId,
                              };
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/job', body, qs);
                              const jobId = response.id;
                              qs.name = 'observable-jobs';
                              do {
                                  responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'GET', `/connector/cortex/job/${jobId}`, body, qs);
                              } while (responseData.status === 'Waiting' || responseData.status === 'InProgress');
                          }
                      }
                      if (operation === 'executeResponder') {
                          const observableId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: observableId,
                              objectType: 'case_artifact',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'create') {
                          const caseId = this.getNodeParameter('caseId', i);
                          let body = {
                              dataType: this.getNodeParameter('dataType', i),
                              message: this.getNodeParameter('message', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              tlp: this.getNodeParameter('tlp', i),
                              ioc: this.getNodeParameter('ioc', i),
                              sighted: this.getNodeParameter('sighted', i),
                              status: this.getNodeParameter('status', i),
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('options', i, {})),
                          };
                          let options = {};
                          if (body.dataType === 'file') {
                              const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
                              const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                              const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                              options = {
                                  formData: {
                                      attachment: {
                                          value: dataBuffer,
                                          options: {
                                              contentType: binaryData.mimeType,
                                              filename: binaryData.fileName,
                                          },
                                      },
                                      _json: JSON.stringify(body),
                                  },
                              };
                              body = {};
                          }
                          else {
                              body.data = this.getNodeParameter('data', i);
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/${caseId}/artifact`, body, qs, '', options);
                      }
                      if (operation === 'get') {
                          const observableId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getObservable',
                                          idOrName: observableId,
                                      },
                                  ],
                              };
                              qs.name = `get-observable-${observableId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/artifact/${observableId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const options = this.getNodeParameter('options', i);
                          const caseId = this.getNodeParameter('caseId', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                      {
                                          _name: 'observables',
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'observables';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/artifact/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.Parent)('case', (0, QueryFunctions_1.Id)(caseId));
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'search') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'dataType' || key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'keywork' || key === 'message') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else if (key === 'range') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Between)('startDate', queryAttributs['range']['dateRange']['fromDate'], queryAttributs['range']['dateRange']['toDate']));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listObservable',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'observables';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/artifact/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('updateFields', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/artifact/${id}`, body, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'case') {
                      if (operation === 'count') {
                          const filters = this.getNodeParameter('filters', i, {});
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _countSearchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'tags') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.In)(key, countQueryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'summary' || key === 'title') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listCase',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-cases';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'executeResponder') {
                          const caseId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: caseId,
                              objectType: 'case',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'create') {
                          const options = this.getNodeParameter('options', i, {});
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, options, jsonParameters);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              description: this.getNodeParameter('description', i),
                              severity: this.getNodeParameter('severity', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              owner: this.getNodeParameter('owner', i),
                              flag: this.getNodeParameter('flag', i),
                              tlp: this.getNodeParameter('tlp', i),
                              tags: (0, GenericFunctions_1.splitTags)(this.getNodeParameter('tags', i)),
                              ...(0, GenericFunctions_1.prepareOptional)(options),
                          };
                          if (customFields) {
                              Object.keys(customFields).forEach((key) => {
                                  (0, set_1.default)(body, key, customFields[key]);
                              });
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/case', body);
                      }
                      if (operation === 'get') {
                          const caseId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                  ],
                              };
                              qs.name = `get-case-${caseId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/${caseId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const filters = this.getNodeParameter('filters', i, {});
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(filters);
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          if ('customFieldsUi' in filters) {
                              const customFields = (await GenericFunctions_1.prepareCustomFields.call(this, filters));
                              const searchQueries = (0, GenericFunctions_1.buildCustomFieldSearch)(customFields);
                              _searchQuery['_and'].push(...searchQueries);
                          }
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'tags') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.In)(key, queryAttributs[key]));
                              }
                              else if (key === 'description' || key === 'summary' || key === 'title') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listCase',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'cases';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i, {});
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const customFields = await GenericFunctions_1.prepareCustomFields.call(this, updateFields, jsonParameters);
                          const body = {
                              ...customFields,
                              ...(0, GenericFunctions_1.prepareOptional)(updateFields),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/${id}`, body);
                      }
                  }
                  if (resource === 'task') {
                      if (operation === 'count') {
                          const countQueryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _countSearchQuery = (0, QueryFunctions_1.And)();
                          for (const key of Object.keys(countQueryAttributs)) {
                              if (key === 'title' || key === 'description') {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, countQueryAttributs[key]));
                              }
                              else {
                                  _countSearchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, countQueryAttributs[key]));
                              }
                          }
                          const body = {
                              query: [
                                  {
                                      _name: 'listTask',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: _countSearchQuery['_and'],
                                  },
                              ],
                          };
                          body['query'].push({
                              _name: 'count',
                          });
                          qs.name = 'count-tasks';
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          responseData = { count: responseData };
                      }
                      if (operation === 'create') {
                          const caseId = this.getNodeParameter('caseId', i);
                          const body = {
                              title: this.getNodeParameter('title', i),
                              status: this.getNodeParameter('status', i),
                              flag: this.getNodeParameter('flag', i),
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('options', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/${caseId}/task`, body);
                      }
                      if (operation === 'executeResponder') {
                          const taskId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: taskId,
                              objectType: 'case_task',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'task-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const taskId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getTask',
                                          idOrName: taskId,
                                      },
                                  ],
                              };
                              qs.name = `get-task-${taskId}`;
                          }
                          else {
                              method = 'GET';
                              endpoint = `/case/task/${taskId}`;
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const caseId = this.getNodeParameter('caseId', i);
                          const options = this.getNodeParameter('options', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getCase',
                                          idOrName: caseId,
                                      },
                                      {
                                          _name: 'tasks',
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'case-tasks';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.And)((0, QueryFunctions_1.Parent)('case', (0, QueryFunctions_1.Id)(caseId)));
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'search') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const queryAttributs = (0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('filters', i, {}));
                          const _searchQuery = (0, QueryFunctions_1.And)();
                          const options = this.getNodeParameter('options', i);
                          for (const key of Object.keys(queryAttributs)) {
                              if (key === 'title' || key === 'description') {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.ContainsString)(key, queryAttributs[key]));
                              }
                              else {
                                  _searchQuery['_and'].push((0, QueryFunctions_1.Eq)(key, queryAttributs[key]));
                              }
                          }
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'listTask',
                                      },
                                      {
                                          _name: 'filter',
                                          _and: _searchQuery['_and'],
                                      },
                                  ],
                              };
                              (0, GenericFunctions_1.prepareSortQuery)(options.sort, body);
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'tasks';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = _searchQuery;
                              Object.assign(qs, (0, GenericFunctions_1.prepareOptional)(options));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              ...(0, GenericFunctions_1.prepareOptional)(this.getNodeParameter('updateFields', i, {})),
                          };
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'PATCH', `/case/task/${id}`, body);
                      }
                  }
                  if (resource === 'log') {
                      if (operation === 'create') {
                          const taskId = this.getNodeParameter('taskId', i);
                          let body = {
                              message: this.getNodeParameter('message', i),
                              startDate: Date.parse(this.getNodeParameter('startDate', i)),
                              status: this.getNodeParameter('status', i),
                          };
                          const optionals = this.getNodeParameter('options', i);
                          let options = {};
                          if (optionals.attachementUi) {
                              const attachmentValues = optionals.attachementUi
                                  .attachmentValues;
                              if (attachmentValues) {
                                  const binaryPropertyName = attachmentValues.binaryProperty;
                                  const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                                  options = {
                                      formData: {
                                          attachment: {
                                              value: dataBuffer,
                                              options: {
                                                  contentType: binaryData.mimeType,
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          _json: JSON.stringify(body),
                                      },
                                  };
                                  body = {};
                              }
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', `/case/task/${taskId}/log`, body, qs, '', options);
                      }
                      if (operation === 'executeResponder') {
                          const logId = this.getNodeParameter('id', i);
                          const responderId = this.getNodeParameter('responder', i);
                          let body;
                          let response;
                          responseData = [];
                          body = {
                              responderId,
                              objectId: logId,
                              objectType: 'case_task_log',
                          };
                          response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/connector/cortex/action', body);
                          body = {
                              query: [
                                  {
                                      _name: 'listAction',
                                  },
                                  {
                                      _name: 'filter',
                                      _and: [
                                          {
                                              _field: 'cortexId',
                                              _value: response.cortexId,
                                          },
                                          {
                                              _field: 'objectId',
                                              _value: response.objectId,
                                          },
                                          {
                                              _field: 'startDate',
                                              _value: response.startDate,
                                          },
                                      ],
                                  },
                              ],
                          };
                          qs.name = 'log-actions';
                          do {
                              response = await GenericFunctions_1.theHiveApiRequest.call(this, 'POST', '/v1/query', body, qs);
                          } while (response.status === 'Waiting' || response.status === 'InProgress');
                          responseData = response;
                      }
                      if (operation === 'get') {
                          const logId = this.getNodeParameter('id', i);
                          const credentials = await this.getCredentials('theHiveApi');
                          const version = credentials.apiVersion;
                          let endpoint;
                          let method;
                          let body = {};
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getLog',
                                          idOrName: logId,
                                      },
                                  ],
                              };
                              qs.name = `get-log-${logId}`;
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/log/_search';
                              body.query = { _id: logId };
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, endpoint, body, qs);
                      }
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('theHiveApi');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const version = credentials.apiVersion;
                          const taskId = this.getNodeParameter('taskId', i);
                          let endpoint;
                          let method;
                          let body = {};
                          let limit = undefined;
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                          }
                          if (version === 'v1') {
                              endpoint = '/v1/query';
                              method = 'POST';
                              body = {
                                  query: [
                                      {
                                          _name: 'getTask',
                                          idOrName: taskId,
                                      },
                                      {
                                          _name: 'logs',
                                      },
                                  ],
                              };
                              if (limit !== undefined) {
                                  (0, GenericFunctions_1.prepareRangeQuery)(`0-${limit}`, body);
                              }
                              qs.name = 'case-task-logs';
                          }
                          else {
                              method = 'POST';
                              endpoint = '/case/task/log/_search';
                              if (limit !== undefined) {
                                  qs.range = `0-${limit}`;
                              }
                              body.query = (0, QueryFunctions_1.And)((0, QueryFunctions_1.Parent)('task', (0, QueryFunctions_1.Id)(taskId)));
                          }
                          responseData = await GenericFunctions_1.theHiveApiRequest.call(this, method, 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.TheHive = TheHive;
  //# sourceMappingURL=TheHive.node.js.map

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

  # TheHive 5 credentials

  You can use these credentials to authenticate the following nodes with TheHive 5.

  - [TheHive 5](/integrations/builtin/app-nodes/n8n-nodes-base.thehive5.md)

  /// note | TheHive and TheHive 5
  n8n provides two nodes for TheHive. Use these credentials with TheHive 5 node. If you're using TheHive node for TheHive 3 or TheHive 4, use [TheHive credentials](/integrations/builtin/credentials/thehive.md).
  ///

  ## Prerequisites

  Install [TheHive 5](https://docs.strangebee.com/thehive/download/){:target=_blank .external-link} on your server.

  ## Supported authentication methods

  - API key

  ## Related resources

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

  ## Using API key

  To configure this credential, you'll need:

  - An **API Key**: Users with `orgAdmin` and `superAdmin` accounts can generate API keys:
      - `orgAdmin` account: Go to **Organization > Create API Key** for the user you wish to generate a key for.
      - `superAdmin` account: Go to **Users > Create API Key** for the user you wish to generate a key for.
      - Refer to [API Authentication](https://docs.strangebee.com/cortex/api/api-guide/?h=api+key#authentication){:target=_blank .external-link} for more information.
  - A **URL**: The URL of your TheHive server.
  - **Ignore SSL Issues**: When turned on, n8n will connect even if SSL certificate validation fails.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"1cf304dd-409d-4b41-a2a7-df27853c01b6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"88fb110dd714f4bb8ac0ff91893f13032dce6ad9d9cf5787981cb4252294aff9"}}


node_type: n8n-nodes-base.TimescaleDb
name: TimescaleDb
display_name: TimescaleDB
description: Add and update data in TimescaleDB
category: Other
code_hash: 713e4569856e0462795d8d821badaf29b960c59683cb71520ce0d1e709b5c921
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/timescaledb
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.TimescaleDb = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const genericFunctions_1 = require("../Postgres/v1/genericFunctions");
  const pg_promise_1 = __importDefault(require("pg-promise"));
  class TimescaleDb {
      constructor() {
          this.description = {
              displayName: 'TimescaleDB',
              name: 'timescaleDb',
              icon: 'file:timescale.svg',
              group: ['input'],
              version: 1,
              description: 'Add and update data in TimescaleDB',
              defaults: {
                  name: 'TimescaleDB',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'timescaleDb',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      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,
                          sqlDialect: 'PostgreSQL',
                      },
                      displayOptions: {
                          show: {
                              operation: ['executeQuery'],
                          },
                      },
                      default: '',
                      placeholder: 'SELECT id, name FROM product WHERE quantity > $1 AND price <= $2',
                      required: true,
                      description: 'The SQL query to execute. You can use n8n expressions or $1 and $2 in conjunction with query parameters.',
                  },
                  {
                      displayName: 'Schema',
                      name: 'schema',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: 'public',
                      required: true,
                      description: 'Name of the schema the table belongs to',
                  },
                  {
                      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: 'Schema',
                      name: 'schema',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: 'public',
                      required: true,
                      description: 'Name of the schema the table belongs to',
                  },
                  {
                      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',
                  },
                  {
                      displayName: 'Return Fields',
                      name: 'returnFields',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert', 'update'],
                          },
                      },
                      default: '*',
                      description: 'Comma-separated list of the fields that the operation will return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      options: [
                          {
                              displayName: 'Mode',
                              name: 'mode',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Independently',
                                      value: 'independently',
                                      description: 'Execute each query independently',
                                  },
                                  {
                                      name: 'Multiple Queries',
                                      value: 'multiple',
                                      description: '<b>Default</b>. Sends multiple queries at once to database.',
                                  },
                                  {
                                      name: 'Transaction',
                                      value: 'transaction',
                                      description: 'Executes all queries in a single transaction',
                                  },
                              ],
                              default: 'multiple',
                              description: 'The way queries should be sent to database. Can be used in conjunction with <b>Continue on Fail</b>. See <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.timescaledb/">the docs</a> for more examples',
                          },
                          {
                              displayName: 'Query Parameters',
                              name: 'queryParams',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/operation': ['executeQuery'],
                                  },
                              },
                              default: '',
                              placeholder: 'quantity,price',
                              description: 'Comma-separated list of properties which should be used as query parameters',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const credentials = await this.getCredentials('timescaleDb');
          const pgp = (0, pg_promise_1.default)();
          const config = {
              host: credentials.host,
              port: credentials.port,
              database: credentials.database,
              user: credentials.user,
              password: credentials.password,
              ssl: !['disable', undefined].includes(credentials.ssl),
              sslmode: credentials.ssl || 'disable',
          };
          const db = pgp(config);
          let returnItems = [];
          const items = this.getInputData();
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'executeQuery') {
              const queryResult = await genericFunctions_1.pgQueryV2.call(this, pgp, db, items, this.continueOnFail(), {
                  resolveExpression: true,
              });
              returnItems = this.helpers.returnJsonArray(queryResult);
          }
          else if (operation === 'insert') {
              const insertData = await (0, genericFunctions_1.pgInsert)(this.getNodeParameter, pgp, db, items, this.continueOnFail());
              for (let i = 0; i < insertData.length; i++) {
                  returnItems.push({
                      json: insertData[i],
                  });
              }
          }
          else if (operation === 'update') {
              const updateItems = await (0, genericFunctions_1.pgUpdate)(this.getNodeParameter, pgp, db, items, this.continueOnFail());
              returnItems = this.helpers.returnJsonArray(updateItems);
          }
          else {
              await db.$pool.end();
              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported!`);
          }
          await db.$pool.end();
          return [returnItems];
      }
  }
  exports.TimescaleDb = TimescaleDb;
  //# sourceMappingURL=TimescaleDb.node.js.map

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

  # TimescaleDB credentials

  You can use these credentials to authenticate the following nodes:

  - [TimescaleDB](/integrations/builtin/app-nodes/n8n-nodes-base.timescaledb.md)

  ## Prerequisites

  An available instance of [TimescaleDB](https://www.timescale.com/){:target=_blank .external-link}.

  ## Supported authentication methods

  - Database connection

  ## Related resources

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

  ## Using database connection

  To configure this credential, you'll need:

  - The **Host**: The fully qualified server name or IP address of your TimescaleDB server.
  - The **Database**: The name of the database to connect to.
  - A **User**: The user name you want to log in with.
  - A **Password**: Enter the password for the database user you are connecting to.
  - **Ignore SSL Issues**: If turned on, n8n will connect even if SSL certificate validation fails and you won't see the **SSL** selector.
  - **SSL**: This setting controls the `ssl-mode` connection string for the connection. Options include:
      - **Allow**: Sets the `ssl-mode` parameter to `allow`. First try a non-SSL connection; if that fails, try an SSL connection.
      - **Disable**: Sets the `ssl-mode` parameter to `disable`. Only try a non-SSL connection.
      - **Require**: Sets the `ssl-mode` parameter to `require`, which is the default for TimescaleDB connection strings. Only try an SSL connection. If a root CA file is present, verify that a trusted certificate authority (CA) issued the server certificate.
  - **Port**: The port number of the TimescaleDB server.

  Refer to [Timescale's connection settings documentation](https://docs.timescale.com/use-timescale/latest/integrations/query-admin/qstudio/#connection-settings){:target=_blank .external-link} for more information about the non-SSL fields. Refer to [Connect with a stricter SSL](https://docs.timescale.com/use-timescale/latest/security/strict-ssl/){:target=_blank .external-link} for more information about the SSL options.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"53ea2d12-5532-4cf2-91e4-e75355d25f98","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"0bdd7ba514e021c8b97f3d1dd557fbff14ea5ffa2f7d99263751d2bc12a331a3"}}


node_type: n8n-nodes-base.Todoist
name: Todoist
display_name: Todoist
description: Consume Todoist API
category: Other
code_hash: 5834162f968265342f1a072c65b59b08ebab47f0384790d999054541ff446777
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/todoist
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.Todoist = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const TodoistV1_node_1 = require("./v1/TodoistV1.node");
  const TodoistV2_node_1 = require("./v2/TodoistV2.node");
  class Todoist extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Todoist',
              name: 'todoist',
              icon: 'file:todoist.svg',
              group: ['output'],
              defaultVersion: 2,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Todoist API',
          };
          const nodeVersions = {
              1: new TodoistV1_node_1.TodoistV1(baseDescription),
              2: new TodoistV2_node_1.TodoistV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Todoist = Todoist;
  //# sourceMappingURL=Todoist.node.js.map

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

  # Todoist credentials

  You can use these credentials to authenticate the following nodes:

  - [Todoist](/integrations/builtin/app-nodes/n8n-nodes-base.todoist.md)

  ## Supported authentication methods

  - API key
  - OAuth2

  ## Related resources

  Refer to [Todoist's REST API documentation](https://developer.todoist.com/rest/v2/#overview){:target=_blank .external-link} for more information about the service.

  ## Using API key

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

  - An **API Key**

  To get your **API Key**:

  1. In Todoist, open your [**Integration settings**](https://todoist.com/prefs/integrations){:target=_blank .external-link}.
  2. Select the **Developer** tab.
  3. Copy your **API token** and enter it as the **API Key** in your n8n credential.

  Refer to [Find your API token](https://todoist.com/help/articles/find-your-api-token-Jpzx9IIlB){:target=_blank .external-link} for more information.

  ## Using OAuth2

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

  If you're [self-hosting](/hosting/index.md) n8n, you'll need a [Todoist](https://todoist.com/){:target=_blank .external-link} account and:

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

  Get both by creating an application:

  1. Open the Todoist [App Management Console](https://developer.todoist.com/appconsole.html){:target=_blank .external-link}.
  2. Select **Create a new app**.
  3. Enter an **App name** for your app, like `n8n integration`.
  4. Select **Create app**.
  5. Copy the n8n **OAuth Redirect URL** and enter it as the **OAuth redirect URL** in Todoist.
  6. Copy the **Client ID** from Todoist and enter it in your n8n credential.
  7. Copy the **Client Secret** from Todoist and enter it in your n8n credential.
  8. Configure the rest of your Todoist app as it makes sense for your use case.

  Refer to the Todoist [Authorization Guide](https://developer.todoist.com/guides/#authorization){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"0e5b763c-7f0f-4099-8b61-70203fc4b3ff","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"a17085b3b1954e063ee94b0cc3251638919dd534b88974339fbc66a470c72997"}}


node_type: n8n-nodes-base.Totp
name: Totp
display_name: TOTP
description: Generate a time-based one-time password
category: Other
code_hash: 7cdfce3ae2cf188a1b283409f9cc3859c6e6231987208b6599b91d397b862b07
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.totp
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.Totp = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const otpauth_1 = __importDefault(require("otpauth"));
  class Totp {
      constructor() {
          this.description = {
              displayName: 'TOTP',
              name: 'totp',
              icon: 'fa:fingerprint',
              group: ['transform'],
              version: 1,
              subtitle: '={{ $parameter["operation"] }}',
              description: 'Generate a time-based one-time password',
              defaults: {
                  name: 'TOTP',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'totpApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Generate Secret',
                              value: 'generateSecret',
                              action: 'Generate secret',
                          },
                      ],
                      default: 'generateSecret',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['generateSecret'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Option',
                      options: [
                          {
                              displayName: 'Algorithm',
                              name: 'algorithm',
                              type: 'options',
                              default: 'SHA1',
                              description: 'HMAC hashing algorithm. Defaults to SHA1.',
                              options: [
                                  {
                                      name: 'SHA1',
                                      value: 'SHA1',
                                  },
                                  {
                                      name: 'SHA224',
                                      value: 'SHA224',
                                  },
                                  {
                                      name: 'SHA256',
                                      value: 'SHA256',
                                  },
                                  {
                                      name: 'SHA3-224',
                                      value: 'SHA3-224',
                                  },
                                  {
                                      name: 'SHA3-256',
                                      value: 'SHA3-256',
                                  },
                                  {
                                      name: 'SHA3-384',
                                      value: 'SHA3-384',
                                  },
                                  {
                                      name: 'SHA3-512',
                                      value: 'SHA3-512',
                                  },
                                  {
                                      name: 'SHA384',
                                      value: 'SHA384',
                                  },
                                  {
                                      name: 'SHA512',
                                      value: 'SHA512',
                                  },
                              ],
                          },
                          {
                              displayName: 'Digits',
                              name: 'digits',
                              type: 'number',
                              default: 6,
                              description: 'Number of digits in the generated TOTP code. Defaults to 6 digits.',
                          },
                          {
                              displayName: 'Period',
                              name: 'period',
                              type: 'number',
                              default: 30,
                              description: 'How many seconds the generated TOTP code is valid for. Defaults to 30 seconds.',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          const credentials = (await this.getCredentials('totpApi'));
          if (!credentials.label.includes(':')) {
              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Malformed label - expected `issuer:username`');
          }
          const options = this.getNodeParameter('options', 0);
          if (!options.algorithm)
              options.algorithm = 'SHA1';
          if (!options.digits)
              options.digits = 6;
          if (!options.period)
              options.period = 30;
          const [issuer] = credentials.label.split(':');
          const totp = new otpauth_1.default.TOTP({
              issuer,
              label: credentials.label,
              secret: credentials.secret,
              algorithm: options.algorithm,
              digits: options.digits,
              period: options.period,
          });
          const token = totp.generate();
          const secondsRemaining = (options.period * (1 - ((Date.now() / 1000 / options.period) % 1))) | 0;
          if (operation === 'generateSecret') {
              for (let i = 0; i < items.length; i++) {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ token, secondsRemaining }), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
          }
          return [returnData];
      }
  }
  exports.Totp = Totp;
  //# sourceMappingURL=Totp.node.js.map

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

  # TOTP

  The TOTP node provides a way to generate a TOTP (time-based one-time password).

  /// note | Credentials
  Refer to [TOTP credentials](/integrations/builtin/credentials/totp.md) for guidance on setting up authentication. 
  ///

  ## Node parameters

  --8<-- "_snippets/integrations/builtin/app-nodes/ai-tools.md"

  Configure this node with these parameters.

  ### Credential to connect with

  Select or create a [TOTP credential](/integrations/builtin/credentials/totp.md) for the node to use.

  ### Operation

  **Generate Secret** is the only operation currently supported.

  ## Node options

  Use these **Options** to further configure the node.

  ### Algorithm

  Select the HMAC hashing algorithm to use. Default is SHA1.

  ### Digits

  Enter the number of digits in the generated code. Default is `6`.

  ### Period

  Enter how many seconds the TOTP is valid for. Default is `30`.

  ## Templates and examples

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

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"7b54975f-07c0-4d4d-9454-746d281fd3b6","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"c68ea991b573eeefbbd75ed10e72bcb8587a764eed4e683cc5ef16f35e64bdc4"}}


node_type: n8n-nodes-base.TravisCi
name: TravisCi
display_name: TravisCI
description: Consume TravisCI API
category: Other
code_hash: 3e073fa53575b8a98002bddbb6651c488e7ff09881d8d210b015393b839f0cba
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/travisci
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.TravisCi = void 0;
  const BuildDescription_1 = require("./BuildDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class TravisCi {
      constructor() {
          this.description = {
              displayName: 'TravisCI',
              name: 'travisCi',
              icon: 'file:travisci.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume TravisCI API',
              defaults: {
                  name: 'TravisCI',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'travisCiApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Build',
                              value: 'build',
                          },
                      ],
                      default: 'build',
                  },
                  ...BuildDescription_1.buildOperations,
                  ...BuildDescription_1.buildFields,
              ],
          };
      }
      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 === 'build') {
                      if (operation === 'get') {
                          const buildId = this.getNodeParameter('buildId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.include) {
                              qs.include = additionalFields.include;
                          }
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'GET', `/build/${buildId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (additionalFields.sortBy) {
                              qs.sort_by = additionalFields.sortBy;
                          }
                          if (additionalFields.sortBy && additionalFields.order) {
                              qs.sort_by = `${additionalFields.sortBy}:${additionalFields.order}`;
                          }
                          if (additionalFields.include) {
                              qs.include = additionalFields.include;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.travisciApiRequestAllItems.call(this, 'builds', 'GET', '/builds', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'GET', '/builds', {}, qs);
                              responseData = responseData.builds;
                          }
                      }
                      if (operation === 'cancel') {
                          const buildId = this.getNodeParameter('buildId', i);
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/build/${buildId}/cancel`, {}, qs);
                      }
                      if (operation === 'restart') {
                          const buildId = this.getNodeParameter('buildId', i);
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/build/${buildId}/restart`, {}, qs);
                      }
                      if (operation === 'trigger') {
                          let slug = this.getNodeParameter('slug', i);
                          const branch = this.getNodeParameter('branch', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          slug = slug.replace(new RegExp(/\//g), '%2F');
                          const request = {
                              branch,
                          };
                          if (additionalFields.message) {
                              request.message = additionalFields.message;
                          }
                          if (additionalFields.mergeMode) {
                              request.merge_mode = additionalFields.mergeMode;
                          }
                          responseData = await GenericFunctions_1.travisciApiRequest.call(this, 'POST', `/repo/${slug}/requests`, JSON.stringify({ request }));
                      }
                  }
                  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.TravisCi = TravisCi;
  //# sourceMappingURL=TravisCi.node.js.map

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

  # Travis CI credentials

  You can use these credentials to authenticate the following nodes:

  - [Travis CI](/integrations/builtin/app-nodes/n8n-nodes-base.travisci.md)

  ## Prerequisites

  Create a [Travis CI](https://travis-ci.org/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API token

  ## Related resources

  Refer to [Travis CI's API documentation](https://docs.travis-ci.com/user/developer/){:target=_blank .external-link} for more information about the service.

  ## Using API token

  To configure this credential, you'll need:

  - An **API Token**: Get your API token from **Account Settings >** [**API Token**](https://packagecloud.io/api_token){:target=_blank .external-link} or generate one through the Travis CI [command line client](https://github.com/travis-ci/travis.rb#installation){:target=_blank .external-link} .

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"80de7aae-ed42-4975-946d-318595610eed","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"d75a93cd918da327cdef88c1510abee606f8f433024bb5bdae92f210cac3972f"}}


node_type: n8n-nodes-base.Trello
name: Trello
display_name: Trello
description: Create, change and delete boards and cards
category: Other
code_hash: 3a5713584d89db802864ee8bb673e2c70882f0385ed0fbb2062f8101107f612b
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/trello
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.Trello = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const AttachmentDescription_1 = require("./AttachmentDescription");
  const BoardDescription_1 = require("./BoardDescription");
  const BoardMemberDescription_1 = require("./BoardMemberDescription");
  const CardDescription_1 = require("./CardDescription");
  const CardCommentDescription_1 = require("./CardCommentDescription");
  const ChecklistDescription_1 = require("./ChecklistDescription");
  const LabelDescription_1 = require("./LabelDescription");
  const ListDescription_1 = require("./ListDescription");
  class Trello {
      constructor() {
          this.description = {
              displayName: 'Trello',
              name: 'trello',
              icon: 'file:trello.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Create, change and delete boards and cards',
              defaults: {
                  name: 'Trello',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'trelloApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Attachment',
                              value: 'attachment',
                          },
                          {
                              name: 'Board',
                              value: 'board',
                          },
                          {
                              name: 'Board Member',
                              value: 'boardMember',
                          },
                          {
                              name: 'Card',
                              value: 'card',
                          },
                          {
                              name: 'Card Comment',
                              value: 'cardComment',
                          },
                          {
                              name: 'Checklist',
                              value: 'checklist',
                          },
                          {
                              name: 'Label',
                              value: 'label',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'card',
                  },
                  ...AttachmentDescription_1.attachmentOperations,
                  ...BoardDescription_1.boardOperations,
                  ...BoardMemberDescription_1.boardMemberOperations,
                  ...CardDescription_1.cardOperations,
                  ...CardCommentDescription_1.cardCommentOperations,
                  ...ChecklistDescription_1.checklistOperations,
                  ...LabelDescription_1.labelOperations,
                  ...ListDescription_1.listOperations,
                  ...AttachmentDescription_1.attachmentFields,
                  ...BoardDescription_1.boardFields,
                  ...BoardMemberDescription_1.boardMemberFields,
                  ...CardDescription_1.cardFields,
                  ...CardCommentDescription_1.cardCommentFields,
                  ...ChecklistDescription_1.checklistFields,
                  ...LabelDescription_1.labelFields,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              listSearch: {
                  async searchBoards(query) {
                      if (!query) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query required for Trello search');
                      }
                      const searchResults = await GenericFunctions_1.apiRequest.call(this, 'GET', 'search', {}, {
                          query,
                          modelTypes: 'boards',
                          board_fields: 'name,url,desc',
                          partial: true,
                          boards_limit: 50,
                      });
                      return {
                          results: searchResults.boards.map((b) => ({
                              name: b.name,
                              value: b.id,
                              url: b.url,
                              description: b.desc,
                          })),
                      };
                  },
                  async searchCards(query) {
                      if (!query) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Query required for Trello search');
                      }
                      const searchResults = await GenericFunctions_1.apiRequest.call(this, 'GET', 'search', {}, {
                          query,
                          modelTypes: 'cards',
                          board_fields: 'name,url,desc',
                          partial: true,
                          cards_limit: 50,
                      });
                      return {
                          results: searchResults.cards.map((b) => ({
                              name: b.name,
                              value: b.id,
                              url: b.url,
                              description: b.desc,
                          })),
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          let returnAll = false;
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'board') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'boards';
                          qs.name = this.getNodeParameter('name', i);
                          qs.desc = this.getNodeParameter('description', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `boards/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `boards/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `boards/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'boardMember') {
                      if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          endpoint = `boards/${id}/members`;
                      }
                      else if (operation === 'add') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          const idMember = this.getNodeParameter('idMember', i);
                          endpoint = `boards/${id}/members/${idMember}`;
                          qs.type = this.getNodeParameter('type', i);
                          qs.allowBillableGuest = this.getNodeParameter('additionalFields.allowBillableGuest', i, false);
                      }
                      else if (operation === 'invite') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `boards/${id}/members`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.email = this.getNodeParameter('email', i);
                          qs.type = additionalFields.type;
                          body.fullName = additionalFields.fullName;
                      }
                      else if (operation === 'remove') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i);
                          const idMember = this.getNodeParameter('idMember', i);
                          endpoint = `boards/${id}/members/${idMember}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'card') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'cards';
                          qs.idList = this.getNodeParameter('listId', i);
                          qs.name = this.getNodeParameter('name', i);
                          qs.desc = this.getNodeParameter('description', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i, undefined, { extractValue: true });
                          endpoint = `cards/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'cardComment') {
                      if (operation === 'create') {
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          qs.text = this.getNodeParameter('text', i);
                          requestMethod = 'POST';
                          endpoint = `cards/${cardId}/actions/comments`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `/cards/${cardId}/actions/${commentId}/comments`;
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const commentId = this.getNodeParameter('commentId', i);
                          qs.text = this.getNodeParameter('text', i);
                          endpoint = `cards/${cardId}/actions/${commentId}/comments`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'list') {
                      if (operation === 'archive') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          qs.value = this.getNodeParameter('archive', i);
                          endpoint = `lists/${id}/closed`;
                      }
                      else if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'lists';
                          qs.idBoard = this.getNodeParameter('idBoard', i);
                          qs.name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          const id = this.getNodeParameter('id', i);
                          endpoint = `boards/${id}/lists`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getCards') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}/cards`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `lists/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'attachment') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const url = this.getNodeParameter('url', i);
                          Object.assign(qs, {
                              url,
                          });
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          endpoint = `cards/${cardId}/attachments`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/attachments/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/attachments/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/attachments`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklist') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const name = this.getNodeParameter('name', i);
                          Object.assign(qs, { name });
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          endpoint = `cards/${cardId}/checklists`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `cards/${cardId}/checklists/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `checklists/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/checklists`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getCheckItem') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'createCheckItem') {
                          requestMethod = 'POST';
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `checklists/${checklistId}/checkItems`;
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, { name, ...additionalFields });
                      }
                      else if (operation === 'deleteCheckItem') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                      }
                      else if (operation === 'updateCheckItem') {
                          requestMethod = 'PUT';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const checkItemId = this.getNodeParameter('checkItemId', i);
                          endpoint = `cards/${cardId}/checkItem/${checkItemId}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'completedCheckItems') {
                          requestMethod = 'GET';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `cards/${cardId}/checkItemStates`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'label') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const idBoard = this.getNodeParameter('boardId', i, undefined, {
                              extractValue: true,
                          });
                          const name = this.getNodeParameter('name', i);
                          const color = this.getNodeParameter('color', i);
                          Object.assign(qs, {
                              idBoard,
                              name,
                              color,
                          });
                          endpoint = 'labels';
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const idBoard = this.getNodeParameter('boardId', i, undefined, {
                              extractValue: true,
                          });
                          endpoint = `board/${idBoard}/labels`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const id = this.getNodeParameter('id', i);
                          endpoint = `labels/${id}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(qs, updateFields);
                      }
                      else if (operation === 'addLabel') {
                          requestMethod = 'POST';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          qs.value = id;
                          endpoint = `/cards/${cardId}/idLabels`;
                      }
                      else if (operation === 'removeLabel') {
                          requestMethod = 'DELETE';
                          const cardId = this.getNodeParameter('cardId', i, undefined, {
                              extractValue: true,
                          });
                          const id = this.getNodeParameter('id', i);
                          endpoint = `/cards/${cardId}/idLabels/${id}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const skipPagination = ['list:getAll'];
                  if (returnAll && !skipPagination.includes(`${resource}:${operation}`)) {
                      responseData = await GenericFunctions_1.apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
                  }
                  else {
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                      if (!returnAll && qs.limit) {
                          responseData = responseData.splice(0, qs.limit);
                      }
                  }
                  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.Trello = Trello;
  //# sourceMappingURL=Trello.node.js.map

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

  # Trello credentials

  You can use these credentials to authenticate the following nodes:

  - [Trello](/integrations/builtin/app-nodes/n8n-nodes-base.trello.md)
  - [Trello Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.trellotrigger.md)

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Trello's API documentation](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/){:target=_blank .external-link} for more information about the service.

  ## Using API key

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

  - An **API Key**
  - An **API Token**

  To generate both the API Key and API Token, create a Trello Power-Up:

  1. Open the Trello [Power-Up Admin Portal](https://trello.com/power-ups/admin){:target=_blank .external-link}.
  2. Select **New**.
  3. Enter a **Name** for your Power-Up, like `n8n integration`.
  4. Select the **Workspace** the Power-Up should have access to.
  5. Leave the **iframe connector URL** blank.
  6. Enter appropriate contact information.
  7. Select **Create**.
  8. This should open the Power-Up to the **API Key** page. (If it doesn't, open that page.)
  9. Select **Generate a new API Key**.
  10. Copy the **API key** from Trello and enter it in your n8n credential.
  11. In your Trello API key page, enter your n8n base URL as an **Allowed origin**.
  12. In **Capabilities** make sure to select the necessary options.
  13. Select the **Token** link next to your Trello **API Key**.
  14. When prompted, select **Allow** to grant all the permissions asked for.
  15. Copy the Trello **Token** and enter it as the n8n **API Token**.

  Refer to Trello's [API Introduction](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#api-introduction){:target=_blank .external-link} for more information on API keys and tokens. Refer to Trello's [Power-Up Admin Portal](https://developer.atlassian.com/cloud/trello/guides/power-ups/managing-power-ups/#power-up-admin-portal){:target=_blank .external-link} for more information on creating Power-Ups.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"7dbe1155-b28b-4bb9-a203-0946f41f1432","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"9c4d46a70383eb0707ee62b10f7f59e2f34a526a8b18b7bb1423320fcf71d7f2"}}


node_type: n8n-nodes-base.Twilio
name: Twilio
display_name: Twilio
description: Send SMS and WhatsApp messages or make phone calls
category: Other
code_hash: 6a6d8e5660a38615ba7a11199540fed80d7d36fac57b6ba4728a36927c913bd4
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/twilio
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.Twilio = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Twilio {
      constructor() {
          this.description = {
              displayName: 'Twilio',
              name: 'twilio',
              icon: 'file:twilio.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Send SMS and WhatsApp messages or make phone calls',
              defaults: {
                  name: 'Twilio',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twilioApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Call',
                              value: 'call',
                          },
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS/MMS/WhatsApp message',
                              action: 'Send an SMS/MMS/WhatsApp message',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['call'],
                          },
                      },
                      options: [
                          {
                              name: 'Make',
                              value: 'make',
                              action: 'Make a call',
                          },
                      ],
                      default: 'make',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: '+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send', 'make'],
                              resource: ['sms', 'call'],
                          },
                      },
                      description: 'The number from which to send the message',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: '+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send', 'make'],
                              resource: ['sms', 'call'],
                          },
                      },
                      description: 'The number to which to send the message',
                  },
                  {
                      displayName: 'To Whatsapp',
                      name: 'toWhatsapp',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'Whether the message should be sent to WhatsApp',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The message to send',
                  },
                  {
                      displayName: 'Use TwiML',
                      name: 'twiml',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['make'],
                              resource: ['call'],
                          },
                      },
                      description: 'Whether to use the <a href="https://www.twilio.com/docs/voice/twiml">Twilio Markup Language</a> in the message',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['make'],
                              resource: ['call'],
                          },
                      },
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      options: [
                          {
                              displayName: 'Status Callback',
                              name: 'statusCallback',
                              type: 'string',
                              default: '',
                              description: 'Status Callbacks allow you to receive events related to the REST resources managed by Twilio: Rooms, Recordings and Compositions',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let operation;
          let resource;
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  resource = this.getNodeParameter('resource', i);
                  operation = this.getNodeParameter('operation', i);
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          requestMethod = 'POST';
                          endpoint = '/Messages.json';
                          body.From = this.getNodeParameter('from', i);
                          body.To = this.getNodeParameter('to', i);
                          body.Body = this.getNodeParameter('message', i);
                          body.StatusCallback = this.getNodeParameter('options.statusCallback', i, '');
                          const toWhatsapp = this.getNodeParameter('toWhatsapp', i);
                          if (toWhatsapp) {
                              body.From = `whatsapp:${body.From}`;
                              body.To = `whatsapp:${body.To}`;
                          }
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'call') {
                      if (operation === 'make') {
                          requestMethod = 'POST';
                          endpoint = '/Calls.json';
                          const message = this.getNodeParameter('message', i);
                          const useTwiml = this.getNodeParameter('twiml', i);
                          body.From = this.getNodeParameter('from', i);
                          body.To = this.getNodeParameter('to', i);
                          if (useTwiml) {
                              body.Twiml = message;
                          }
                          else {
                              body.Twiml = `<Response><Say>${(0, GenericFunctions_1.escapeXml)(message)}</Say></Response>`;
                          }
                          body.StatusCallback = this.getNodeParameter('options.statusCallback', i, '');
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const responseData = await GenericFunctions_1.twilioApiRequest.call(this, requestMethod, endpoint, body, qs);
                  returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twilio = Twilio;
  //# sourceMappingURL=Twilio.node.js.map

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

  # Twilio credentials

  You can use these credentials to authenticate the following nodes:

  - [Twilio](/integrations/builtin/app-nodes/n8n-nodes-base.twilio.md)
  - [Twilio trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.twiliotrigger.md)

  ## Supported authentication methods

  - **Auth token**: Twilio recommends this method for local testing only.
  - **API key**: Twilio recommends this method for production.

  ## Related resources

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

  ## Using Auth Token

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

  - Your Twilio **Account SID**
  - Your Twilio **Auth Token**

  To set up the credential:

  1. In n8n, select **Auth Token** as the **Auth Type**.
  2. In Twilio, go to **Console Dashboard > Account Info**.
  3. Copy your **Account SID** and enter this in your n8n credential. This acts as a username.
  4. Cop your **Auth Token** and enter this in your n8n credential. This acts as a password.

  Refer to [Auth Tokens and How to Change Them](https://help.twilio.com/articles/223136027-Auth-Tokens-and-How-to-Change-Them){:target=_blank .external-link} for more information.

  ## Using API key

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

  - Your Twilio **Account SID**
  - An **API Key SID**: Generated when you create an API key.
  - An **API Key Secret**: Generated when you create an API key.

  To set up the credential:

  1. In n8n, select **API Key** as the **Auth Type**.
  2. In Twilio, go to **Console Dashboard > Account Info**.
  3. Copy your **Account SID** and enter it in your n8n credential.
  4. In Twilio, go to your account's [**API keys & tokens**](https://www.twilio.com/console/project/api-keys) page.
  5. Select **Create API Key**.
  6. Enter a **Friendly name** for your API key, like `n8n integration`.
  7. Select your **Key type**. n8n works with either **Main** or **Standard**. Refer to [Selecting an API key type](#selecting-an-api-key-type) for more information.
  8. Select **Create API Key** to finish creating the key.
  5. On the **Copy secret key** page, copy the **SID** displayed with the key and enter it in your n8n credential **API Key SID**.
  6. On the **Copy secret key** page, copy the **Secret** displayed with the key and enter it in your n8n credential **API Key Secret**.

  Refer to [Create an API key](https://www.twilio.com/docs/iam/api-keys#create-an-api-key){:target=_blank .external-link} for more detailed instructions.

  ### Selecting an API key type

  When you create a Twilio API key, you must select a key type. The n8n credential works with **Main** and **Standard** key types.

  Here are more details on the different API key types:

  * **Main**: This key type gives you the same level of access as using your Account SID and Auth Token in API requests.
  * **Standard**: This key type gives you access to all the functionality in Twilio's APIs except the API key resources and Account resources.
  * **Restricted**: This key type is in beta. n8n hasn't tested the credential against this key type; if you try it, let us know if you run into any issues.

  Refer to [Types of API keys](https://www.twilio.com/docs/iam/api-keys#types-of-api-keys){:target=_blank .external-link} for more information on the key types.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"41cb1c02-d19a-4981-9d60-41ece5c83213","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"d38931bdcb5d90acb62524efed7d7807048c8cf3c04dbb9cbc78b9fe4e1e33ef"}}


node_type: n8n-nodes-base.Twist
name: Twist
display_name: Twist
description: Consume Twist API
category: Other
code_hash: e9b8d9315076ff304212703c7127f5754cf7480780be718af94afdd99f21a7b2
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/twist
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.Twist = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ChannelDescription_1 = require("./ChannelDescription");
  const MessageConversationDescription_1 = require("./MessageConversationDescription");
  const ThreadDescription_1 = require("./ThreadDescription");
  const CommentDescription_1 = require("./CommentDescription");
  const uuid_1 = require("uuid");
  const moment_1 = __importDefault(require("moment"));
  class Twist {
      constructor() {
          this.description = {
              displayName: 'Twist',
              name: 'twist',
              icon: 'file:twist.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Twist API',
              defaults: {
                  name: 'Twist',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twistOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Channel',
                              value: 'channel',
                          },
                          {
                              name: 'Comment',
                              value: 'comment',
                          },
                          {
                              name: 'Message Conversation',
                              value: 'messageConversation',
                          },
                          {
                              name: 'Thread',
                              value: 'thread',
                          },
                      ],
                      default: 'messageConversation',
                  },
                  ...ChannelDescription_1.channelOperations,
                  ...ChannelDescription_1.channelFields,
                  ...CommentDescription_1.commentOperations,
                  ...CommentDescription_1.commentFields,
                  ...MessageConversationDescription_1.messageConversationOperations,
                  ...MessageConversationDescription_1.messageConversationFields,
                  ...ThreadDescription_1.threadOperations,
                  ...ThreadDescription_1.threadFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getWorkspaces() {
                      const returnData = [];
                      const workspaces = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/workspaces/get');
                      for (const workspace of workspaces) {
                          returnData.push({
                              name: workspace.name,
                              value: workspace.id,
                          });
                      }
                      return returnData;
                  },
                  async getConversations() {
                      const returnData = [];
                      const qs = {
                          workspace_id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const conversations = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversations/get', {}, qs);
                      for (const conversation of conversations) {
                          returnData.push({
                              name: conversation.title || conversation.id,
                              value: conversation.id,
                          });
                      }
                      return returnData;
                  },
                  async getUsers() {
                      const returnData = [];
                      const qs = {
                          id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const users = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/workspaces/get_users', {}, qs);
                      for (const user of users) {
                          returnData.push({
                              name: user.name,
                              value: user.id,
                          });
                      }
                      return returnData;
                  },
                  async getGroups() {
                      const returnData = [];
                      const qs = {
                          workspace_id: this.getCurrentNodeParameter('workspaceId'),
                      };
                      const groups = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/groups/get', {}, qs);
                      for (const group of groups) {
                          returnData.push({
                              name: group.name,
                              value: group.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      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 === 'channel') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              workspace_id: workspaceId,
                              name,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/channels/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.workspace_id = workspaceId;
                          Object.assign(qs, filters);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/channels/get', {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: channelId,
                          };
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/update', body);
                      }
                      if (operation === 'archive') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/archive', {}, qs);
                      }
                      if (operation === 'unarchive') {
                          qs.id = this.getNodeParameter('channelId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/channels/unarchive', {}, qs);
                      }
                  }
                  if (resource === 'comment') {
                      if (operation === 'create') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              thread_id: threadId,
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('commentId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('commentId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/comments/getone', {}, qs);
                          responseData = responseData === null || responseData === void 0 ? void 0 : responseData.comment;
                      }
                      if (operation === 'getAll') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.thread_id = threadId;
                          Object.assign(qs, filters);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (qs.older_than_ts) {
                              qs.older_than_ts = (0, moment_1.default)(qs.older_than_ts).unix();
                          }
                          if (qs.newer_than_ts) {
                              qs.newer_than_ts = (0, moment_1.default)(qs.newer_than_ts).unix();
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/comments/get', {}, qs);
                          if (qs.as_ids) {
                              responseData = responseData.map((id) => ({ ID: id }));
                          }
                      }
                      if (operation === 'update') {
                          const commentId = this.getNodeParameter('commentId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: commentId,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/comments/update', body);
                      }
                  }
                  if (resource === 'messageConversation') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              conversation_id: conversationId,
                              workspace_id: workspaceId,
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/add', body);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversation_messages/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.conversation_id = conversationId;
                          Object.assign(qs, additionalFields);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/conversation_messages/get', {}, qs);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/remove', {}, qs);
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/conversation_messages/update', body);
                      }
                  }
                  if (resource === 'thread') {
                      if (operation === 'create') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const title = this.getNodeParameter('title', i);
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              channel_id: channelId,
                              content,
                              title,
                          };
                          Object.assign(body, additionalFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/add', body);
                      }
                      if (operation === 'delete') {
                          qs.id = this.getNodeParameter('threadId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/remove', {}, qs);
                      }
                      if (operation === 'get') {
                          qs.id = this.getNodeParameter('threadId', i);
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/threads/getone', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const channelId = this.getNodeParameter('channelId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          qs.channel_id = channelId;
                          Object.assign(qs, filters);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (qs.older_than_ts) {
                              qs.older_than_ts = (0, moment_1.default)(qs.older_than_ts).unix();
                          }
                          if (qs.newer_than_ts) {
                              qs.newer_than_ts = (0, moment_1.default)(qs.newer_than_ts).unix();
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'GET', '/threads/get', {}, qs);
                          if (qs.as_ids) {
                              responseData = responseData.map((id) => ({ ID: id }));
                          }
                      }
                      if (operation === 'update') {
                          const threadId = this.getNodeParameter('threadId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: threadId,
                          };
                          Object.assign(body, updateFields);
                          if (body.actionsUi) {
                              const actions = body.actionsUi.actionValues;
                              if (actions) {
                                  body.actions = actions;
                                  delete body.actionsUi;
                              }
                          }
                          if (body.binaryProperties) {
                              const binaryProperties = body.binaryProperties.split(',');
                              const attachments = [];
                              for (const binaryProperty of binaryProperties) {
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  attachments.push((await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/attachments/upload', {}, {}, {
                                      formData: {
                                          file_name: {
                                              value: dataBuffer,
                                              options: {
                                                  filename: binaryData.fileName,
                                              },
                                          },
                                          attachment_id: (0, uuid_1.v4)(),
                                      },
                                  })));
                              }
                              body.attachments = attachments;
                          }
                          if (body.direct_mentions) {
                              const directMentions = [];
                              for (const directMention of body.direct_mentions) {
                                  directMentions.push(`[name](twist-mention://${directMention})`);
                              }
                              body.content = `${directMentions.join(' ')} ${body.content}`;
                          }
                          responseData = await GenericFunctions_1.twistApiRequest.call(this, 'POST', '/threads/update', body);
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twist = Twist;
  //# sourceMappingURL=Twist.node.js.map

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

  # Twist credentials

  You can use these credentials to authenticate the following nodes:

  - [Twist](/integrations/builtin/app-nodes/n8n-nodes-base.twist.md)

  ## Prerequisites

  - Create a [Twist](https://twist.com/){:target=_blank .external-link} account.
  - [Create a general integration](https://twist.com/app_console/create_app){:target=_blank .external-link} and configure a valid OAuth Redirect URL. Refer to [Using OAuth2](#using-oauth2) for more information.

  ## Supported authentication methods

  - OAuth2

  ## Related resources

  Refer to [Twist's API documentation](https://developer.twist.com/v3/#authorization){:target=_blank .external-link} for more information about authenticating with the service.

  ## Using OAuth2
  To configure this credential, you'll need:

  - A **Client ID**: Generated once you create a general integration.
  - A **Client Secret**: Generated once you create a general integration.

  To generate your Client ID and Client Secret, [create a general integration](https://twist.com/app_console/create_app){:target=_blank .external-link}.

  Use these settings for your integration's **OAuth Authentication**:

  - Copy the **OAuth Redirect URL** from n8n and enter it as the **OAuth 2 redirect URL** in Twist.
      
      /// note | OAuth Redirect URL for self-hosted n8n
      Twist doesn't accept a `localhost` Redirect URL. The Redirect URL should be a URL in your domain, for example: `https://mytemplatemaker.example.com/gr_callback`. If your n8n **OAuth Redirect URL** contains localhost, refer below to [Local environment redirect URL](#local-environment-redirect-url) for generating a URL that Twist will allow.
      ///

  - Select **Update OAuth settings** to save those changes.
  - Copy the **Client ID** and **Client Secret** from Twist and enter them in the appropriate fields in n8n.

  ### Local environment redirect URL

  Twist doesn't accept a localhost callback URL. These steps should allow you to configure the OAuth credentials for the local environment:

  1. Use [ngrok](https://ngrok.com/) to expose the local server running on port `5678` to the internet. In your terminal, run the following command:
  ```sh
  ngrok http 5678
  ```
  2. Run the following command in a new terminal. Replace `<YOUR-NGROK-URL>` with the URL that you get from the previous step.
  ```sh
  export WEBHOOK_URL=<YOUR-NGROK-URL>
  ```
  3. Use the generated URL as your **OAuth 2 redirect URL** in Twist.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"7976c942-2251-4e79-aafb-ec17fe97e0fc","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"3a6d15c32f605afb4bdd96c714986fa9324d8ba8da3f92520e8c6ea2ebfeff95"}}


node_type: n8n-nodes-base.Twake
name: Twake
display_name: Twake
description: Consume Twake API
category: Other
code_hash: f118ef0fa20da4dc9fcaccdc87561206ca8708f58badba3b415d090b004c82bd
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/twake
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.Twake = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Twake {
      constructor() {
          this.description = {
              displayName: 'Twake',
              name: 'twake',
              group: ['transform'],
              version: 1,
              icon: 'file:twake.png',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Twake API',
              defaults: {
                  name: 'Twake',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'twakeCloudApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                              description: 'Send data to the message app',
                          },
                      ],
                      default: 'message',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send a message',
                              action: 'Send a message',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Channel Name or ID',
                      name: 'channelId',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getChannels',
                      },
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'Channel\'s ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Content',
                      name: 'content',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'Message content',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Sender Icon',
                              name: 'senderIcon',
                              type: 'string',
                              default: '',
                              description: 'URL of the image/icon',
                          },
                          {
                              displayName: 'Sender Name',
                              name: 'senderName',
                              type: 'string',
                              default: '',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getChannels() {
                      const responseData = await GenericFunctions_1.twakeApiRequest.call(this, 'POST', '/channel', {});
                      if (responseData === undefined) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No data got returned');
                      }
                      const returnData = [];
                      for (const channel of responseData) {
                          returnData.push({
                              name: channel.name,
                              value: channel.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      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++) {
              if (resource === 'message') {
                  if (operation === 'send') {
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const message = {
                          channel_id: this.getNodeParameter('channelId', i),
                          content: {
                              formatted: this.getNodeParameter('content', i),
                          },
                          hidden_data: {
                              allow_delete: 'everyone',
                          },
                      };
                      if (additionalFields.senderName) {
                          message.hidden_data.custom_title = additionalFields.senderName;
                      }
                      if (additionalFields.senderIcon) {
                          message.hidden_data.custom_icon = additionalFields.senderIcon;
                      }
                      const body = {
                          object: message,
                      };
                      const endpoint = '/actions/message/save';
                      responseData = await GenericFunctions_1.twakeApiRequest.call(this, 'POST', endpoint, body);
                      responseData = responseData.object;
                  }
              }
          }
          if (Array.isArray(responseData)) {
              returnData.push.apply(returnData, responseData);
          }
          else if (responseData !== undefined) {
              returnData.push(responseData);
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Twake = Twake;
  //# sourceMappingURL=Twake.node.js.map

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

  # Twake credentials

  You can use these credentials to authenticate the following nodes:

  - [Twake](/integrations/builtin/app-nodes/n8n-nodes-base.twake.md)

  ## Prerequisites

  Create a [Twake](https://twake.app/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - Cloud API key
  - Server API key

  ## Related resources

  Refer to [Twake's documentation](https://doc.twake.app/developers-api/api-reference){:target=_blank .external-link} for more information about the service.

  ## Using Cloud API key

  To configure this credential, you'll need:

  - A **Workspace Key**: Generated when you install the **n8n** application to your Twake Cloud environment and select **Configure**. Refer to [How to connect n8n to Twake](https://help.twake.app/en/latest/applications/connectors/index.html#how-to-connect-n8n-to-twake){:target=_blank .external-link} for more detailed instructions.

  ## Using Server API key

  To configure this credential, you'll need:

  - A **Host URL**: The URL of your Twake self-hosted instance.
  - A **Public ID**: Generated when you create an app.
  - A **Private API Key**: Generated when you create an app.

  To generate your **Public ID** and **Private API Key**, [create a Twake application](https://doc.twake.app/developers-api/get-started/create-your-first-application){:target=_blank .external-link}: 

  1. Go to **Workspace Settings > Applications and connectors > Access your applications and connectors > Create an application**.
  2. Enter appropriate details.
  3. Once you've created your app, view its **API Details**.
  4. Copy the **Public identifier** and add it as the n8n **Public ID**.
  5. Copy the **Private key** and add it as the n8n **Private API Key**.

  Refer to [API settings](https://doc.twake.app/developers-api/get-started/create-your-first-application#id-3.-api-settings){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"731f7e65-b3f1-4f9e-97dc-e5f6b2282f54","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"83007da8a552f7bad81972036b5ebf12c56479ecd6f3291afd6b5bb18e1936a1"}}


node_type: n8n-nodes-base.Twitter
name: Twitter
display_name: X (Formerly Twitter)
description: Consume the X API
category: Other
code_hash: 5e1aad84374009c13bc16df5fbf185f045b053d91f9481ea49ec3337e43cd209
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/twitter
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.Twitter = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const TwitterV1_node_1 = require("./V1/TwitterV1.node");
  const TwitterV2_node_1 = require("./V2/TwitterV2.node");
  class Twitter extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'X (Formerly Twitter)',
              name: 'twitter',
              icon: 'file:x.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the X API',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new TwitterV1_node_1.TwitterV1(baseDescription),
              2: new TwitterV2_node_1.TwitterV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Twitter = Twitter;
  //# sourceMappingURL=Twitter.node.js.map

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

  # X (formerly Twitter) credentials

  You can use these credentials to authenticate the following nodes:

  - [X (formerly Twitter)](/integrations/builtin/app-nodes/n8n-nodes-base.twitter.md)

  ## Prerequisites

  - Create an [X developer](https://developer.x.com/en){:target=_blank .external-link} account.
  - Create a [Twitter app](https://developer.x.com/en/docs/apps){:target=_blank .external-link} or use the default project and app created when you sign up for the developer portal. Refer to each supported authentication method below for more details on the app's configuration.

  ## Supported authentication methods

  - OAuth2

  /// note | Deprecation warning
  n8n used to support an **OAuth** authentication method, which used X's [OAuth 1.0a](https://developer.x.com/en/docs/authentication/oauth-1-0a){:target=_blank .external-link} authentication method. n8n deprecated this method with the release of V2 of the X node in n8n version [0.236.0](/release-notes/0-x.md#n8n02360).
  ///

  ## Related resources

  Refer to [X's API documentation](https://developer.x.com/en/docs/twitter-api){:target=_blank .external-link} for more information about the service. Refer to [X's API authentication documentation](https://developer.x.com/en/docs/authentication/overview){:target=_blank .external-link} for more information about authenticating with the service.

  Refer to [Application-only Authentication](https://developer.twitter.com/en/docs/authentication/oauth-2-0/application-only){:target=_blank .external-link} for more information about app-only authentication.

  ## Using OAuth2

  Use this method if you're using n8n version 0.236.0 or later.

  To configure this credential, you'll need:

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

  To generate your Client ID and Client Secret:

  1. In the Twitter [developer portal](https://developer.x.com/en/portal/dashboard){:target=_blank .external-link}, open your project.
  2. On the project's **Overview** tab, find the **Apps** section and select **Add App**.
  3. Give your app a **Name** and select **Next**.
  1. Go to the **App Settings**.
  4. In the **User authentication settings**, select **Set Up**.
  1. Set the **App permissions**. Choose **Read and write and Direct message** if you want to use all functions of the n8n X node.
  5. In the **Type of app** section, select **Web App, Automated App or Bot**.
  1. In n8n, copy the **OAuth Redirect URL**.
  7. In your X app, find the **App Info** section and paste that URL in as the **Callback URI / Redirect URL**.
  7. Add a **Website URL**.
  8. Save your changes.
  1. Copy the **Client ID** and **Client Secret** displayed in X and add them to the corresponding fields in your n8n credential.

  Refer to X's [OAuth 2.0 Authentication documentation](https://developer.x.com/en/docs/authentication/oauth-2-0){:target=_blank .external-link} for more information on working with this authentication method.

  /// note | X rate limits
  This credential uses the OAuth 2.0 Bearer Token authentication method, so you'll be subject to app rate limits. Refer to [X rate limits](#x-rate-limits) below for more information.
  ///

  ## X rate limits

  X has time-based rate limits per endpoint based on your developer access plan level. X calculates app rate limits and user rate limits independently. Refer to [Rate limits](https://developer.x.com/en/docs/twitter-api/rate-limits){:target=_blank .external-link} for the access plan level rate limits and guidance on avoiding hitting them.

  Use the guidance below for calculating rate limits:

  - If you're using the deprecated OAuth method, user rate limits apply. You'll have one limit per time window for each set of users' access tokens.
  - If you're [Using OAuth2](#using-oauth2), app rate limits apply. You'll have a limit per time window for requests made by your app.

  X calculates user rate limits and app rate limits independently.

  Refer to X's [Rate limits and authentication methods](https://developer.x.com/en/docs/twitter-api/rate-limits#auth){:target=_blank .external-link} for more information about these rate limit types.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"3a20b379-45d6-4227-89b3-0a58c7e4607d","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"66511cbe4c6875ef2dfa6ca1931fa6b8c1a3df3b77c1ffaf2c6973b0230b1910"}}


node_type: n8n-nodes-base.UProc
name: UProc
display_name: uProc
description: Consume uProc API
category: Other
code_hash: 24d13cc08ff97149e68e34a4a7b583ed84cc776550f9a6cd39738925e56418d9
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/uproc
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.UProc = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const GroupDescription_1 = require("./GroupDescription");
  const ToolDescription_1 = require("./ToolDescription");
  class UProc {
      constructor() {
          this.description = {
              displayName: 'uProc',
              name: 'uproc',
              icon: 'file:uproc.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["tool"]}}',
              description: 'Consume uProc API',
              defaults: {
                  name: 'uProc',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'uprocApi',
                      required: true,
                  },
              ],
              properties: [
                  ...GroupDescription_1.groupOptions,
                  ...ToolDescription_1.toolOperations,
                  ...ToolDescription_1.toolParameters,
                  {
                      displayName: 'Additional Options',
                      name: 'additionalOptions',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              group: [
                                  'audio',
                                  'communication',
                                  'company',
                                  'finance',
                                  'geographic',
                                  'image',
                                  'internet',
                                  'personal',
                                  'product',
                                  'security',
                                  'text',
                              ],
                          },
                      },
                      options: [
                          {
                              displayName: 'Data Webhook',
                              name: 'dataWebhook',
                              type: 'string',
                              description: 'URL to send tool response when tool has resolved your request',
                              default: '',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const group = this.getNodeParameter('group', 0);
          const tool = this.getNodeParameter('tool', 0);
          const additionalOptions = this.getNodeParameter('additionalOptions', 0);
          const dataWebhook = additionalOptions.dataWebhook;
          const fields = ToolDescription_1.toolParameters
              .filter((field) => {
              var _a, _b;
              return (((_b = (_a = field === null || field === void 0 ? void 0 : field.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.group) &&
                  field.displayOptions.show.tool &&
                  field.displayOptions.show.group.indexOf(group) !== -1 &&
                  field.displayOptions.show.tool.indexOf(tool) !== -1);
          })
              .map((field) => {
              return field.name;
          });
          for (let i = 0; i < length; i++) {
              try {
                  const toolKey = tool.replace(/([A-Z]+)/g, '-$1').toLowerCase();
                  const body = {
                      processor: toolKey,
                      params: {},
                  };
                  fields.forEach((field) => {
                      if (field === null || field === void 0 ? void 0 : field.length) {
                          const data = this.getNodeParameter(field, i);
                          body.params[field] = data + '';
                      }
                  });
                  if (dataWebhook === null || dataWebhook === void 0 ? void 0 : dataWebhook.length) {
                      body.callback = {};
                  }
                  if (dataWebhook === null || dataWebhook === void 0 ? void 0 : dataWebhook.length) {
                      body.callback.data = dataWebhook;
                  }
                  responseData = await GenericFunctions_1.uprocApiRequest.call(this, 'POST', body);
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.UProc = UProc;
  //# sourceMappingURL=UProc.node.js.map

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

  # uProc credentials

  You can use these credentials to authenticate the following nodes:

  - [uProc](/integrations/builtin/app-nodes/n8n-nodes-base.uproc.md)

  ## Prerequisites

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

  ## Supported authentication methods

  - API key

  ## Related resources

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

  ## Using API Key

  To configure this credential, you'll need:

  - An **Email** address: Enter the email address you use to log in to uProc. This is also displayed in **Settings > Integrations > API Credentials**.
  - An **API Key**: Go to **Settings > Integrations > API Credentials**. Copy the **API Key (real)** from the **API Credentials** section and enter it in your n8n credential.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"a49a605d-32a2-474c-94db-9dd651b13ca0","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"c1810e4f13d03832bec92e1bfa9f82a6c62817fe53690a9263ff9ffccb8d0228"}}


node_type: n8n-nodes-base.UnleashedSoftware
name: UnleashedSoftware
display_name: Unleashed Software
description: Consume Unleashed Software API
category: Other
code_hash: 8773e68fb6b500f5f3588c5fd46d57e0a82cf6f5be5dc93c8d17f9c065a38708
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/unleashedsoftware
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.UnleashedSoftware = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const SalesOrderDescription_1 = require("./SalesOrderDescription");
  const StockOnHandDescription_1 = require("./StockOnHandDescription");
  const moment_1 = __importDefault(require("moment"));
  class UnleashedSoftware {
      constructor() {
          this.description = {
              displayName: 'Unleashed Software',
              name: 'unleashedSoftware',
              group: ['transform'],
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              icon: 'file:unleashedSoftware.png',
              version: 1,
              description: 'Consume Unleashed Software API',
              defaults: {
                  name: 'Unleashed Software',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'unleashedSoftwareApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Sales Order',
                              value: 'salesOrder',
                          },
                          {
                              name: 'Stock On Hand',
                              value: 'stockOnHand',
                          },
                      ],
                      default: 'salesOrder',
                  },
                  ...SalesOrderDescription_1.salesOrderOperations,
                  ...SalesOrderDescription_1.salesOrderFields,
                  ...StockOnHandDescription_1.stockOnHandOperations,
                  ...StockOnHandDescription_1.stockOnHandFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData = [];
          for (let i = 0; i < length; i++) {
              const resource = this.getNodeParameter('resource', 0);
              const operation = this.getNodeParameter('operation', 0);
              if (resource === 'salesOrder') {
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      if (filters.startDate) {
                          filters.startDate = (0, moment_1.default)(filters.startDate).format('YYYY-MM-DD');
                      }
                      if (filters.endDate) {
                          filters.endDate = (0, moment_1.default)(filters.endDate).format('YYYY-MM-DD');
                      }
                      if (filters.modifiedSince) {
                          filters.modifiedSince = (0, moment_1.default)(filters.modifiedSince).format('YYYY-MM-DD');
                      }
                      if (filters.orderStatus) {
                          filters.orderStatus = filters.orderStatus.join(',');
                      }
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/SalesOrders', {}, qs);
                      }
                      else {
                          const limit = this.getNodeParameter('limit', i);
                          qs.pageSize = limit;
                          responseData = (await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', '/SalesOrders', {}, qs, 1));
                          responseData = responseData.Items;
                      }
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
              }
              if (resource === 'stockOnHand') {
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      if (filters.asAtDate) {
                          filters.asAtDate = (0, moment_1.default)(filters.asAtDate).format('YYYY-MM-DD');
                      }
                      if (filters.modifiedSince) {
                          filters.modifiedSince = (0, moment_1.default)(filters.modifiedSince).format('YYYY-MM-DD');
                      }
                      if (filters.orderBy) {
                          filters.orderBy = filters.orderBy.trim();
                      }
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/StockOnHand', {}, qs);
                      }
                      else {
                          const limit = this.getNodeParameter('limit', i);
                          qs.pageSize = limit;
                          responseData = (await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', '/StockOnHand', {}, qs, 1));
                          responseData = responseData.Items;
                      }
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'get') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.unleashedApiRequest.call(this, 'GET', `/StockOnHand/${productId}`);
                      (0, GenericFunctions_1.convertNETDates)(responseData);
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.UnleashedSoftware = UnleashedSoftware;
  //# sourceMappingURL=UnleashedSoftware.node.js.map

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

  # Unleashed Software credentials

  You can use these credentials to authenticate the following nodes:

  - [Unleashed Software](/integrations/builtin/app-nodes/n8n-nodes-base.unleashedsoftware.md)

  ## Prerequisites

  Create an [Unleashed Software](https://www.unleashedsoftware.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

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

  ## Using API key

  To configure this credential, you'll need:

  - An **API ID**: Go to **Integrations > Unleashed API Access** to find your **API ID**.
  - An **API Key**: Go to **Integrations > Unleashed API Access** to find your **API Key**.

  Refer to [Unleashed API Access](https://support.unleashedsoftware.com/hc/en-us/articles/4402393233689-Unleashed-API-Access){:target=_blank .external-link} for more information.

  /// note | Account owner required
  You must log in as an Unleashed account owner to view the API ID and API Key.
  ///

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"b50b92d1-951b-47ae-8329-f193c0eb6df9","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"fcd00b3386737a70d458cf1061cc833d489fb8c137d9ea71db4a9324601de336"}}


node_type: n8n-nodes-base.UptimeRobot
name: UptimeRobot
display_name: UptimeRobot
description: Consume UptimeRobot API
category: Other
code_hash: b74303511b0fa831d7dd7988ab722bfae325dcf112b7c4820d7772ee00c7f7f8
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/uptimerobot
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.UptimeRobot = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const MonitorDescription_1 = require("./MonitorDescription");
  const AlertContactDescription_1 = require("./AlertContactDescription");
  const MaintenanceWindowDescription_1 = require("./MaintenanceWindowDescription");
  const PublicStatusPageDescription_1 = require("./PublicStatusPageDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class UptimeRobot {
      constructor() {
          this.description = {
              displayName: 'UptimeRobot',
              name: 'uptimeRobot',
              icon: 'file:uptimerobot.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume UptimeRobot API',
              defaults: {
                  name: 'UptimeRobot',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'uptimeRobotApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Alert Contact',
                              value: 'alertContact',
                          },
                          {
                              name: 'Maintenance Window',
                              value: 'maintenanceWindow',
                          },
                          {
                              name: 'Monitor',
                              value: 'monitor',
                          },
                          {
                              name: 'Public Status Page',
                              value: 'publicStatusPage',
                          },
                      ],
                      default: 'account',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['account'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get account details',
                              action: 'Get an account',
                          },
                      ],
                      default: 'get',
                  },
                  ...MonitorDescription_1.monitorOperations,
                  ...MonitorDescription_1.monitorFields,
                  ...AlertContactDescription_1.alertContactOperations,
                  ...AlertContactDescription_1.alertContactFields,
                  ...MaintenanceWindowDescription_1.maintenanceWindowOperations,
                  ...MaintenanceWindowDescription_1.maintenanceWindowFields,
                  ...PublicStatusPageDescription_1.publicStatusPageOperations,
                  ...PublicStatusPageDescription_1.publicStatusPageFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const timezone = this.getTimezone();
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  let body = {};
                  if (resource === 'account') {
                      if (operation === 'get') {
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAccountDetails');
                          responseData = responseData.account;
                      }
                  }
                  if (resource === 'monitor') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              url: this.getNodeParameter('url', i),
                              type: this.getNodeParameter('type', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'get') {
                          const monitors = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMonitors', {
                              monitors,
                          });
                          responseData = responseData.monitors;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          body = {
                              ...filters,
                          };
                          if (body.statuses) {
                              body.statuses = body.statuses.join('-');
                          }
                          if (body.types) {
                              body.types = body.types.join('-');
                          }
                          if (body.alert_contacts) {
                              body.alert_contacts = 1;
                          }
                          if (body.logs) {
                              body.logs = 1;
                          }
                          if (body.mwindow) {
                              body.mwindows = 1;
                          }
                          if (body.response_times) {
                              body.response_times = 1;
                          }
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMonitors', body);
                          responseData = responseData.monitors;
                      }
                      if (operation === 'reset') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/resetMonitor', body);
                          responseData = responseData.monitor;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editMonitor', body);
                          responseData = responseData.monitor;
                      }
                  }
                  if (resource === 'alertContact') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              value: this.getNodeParameter('value', i),
                              type: this.getNodeParameter('type', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newAlertContact', body);
                          responseData = responseData.alertcontact;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteAlertContact', body);
                          responseData = responseData.alert_contact;
                      }
                      if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAlertContacts', {
                              alert_contacts: id,
                          });
                          responseData = responseData.alert_contacts;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getAlertContacts', body);
                          responseData = responseData.alert_contacts;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editAlertContact', body);
                          responseData = responseData.alert_contact;
                      }
                  }
                  if (resource === 'maintenanceWindow') {
                      if (operation === 'create') {
                          const startTime = this.getNodeParameter('start_time', i);
                          const type = this.getNodeParameter('type', i);
                          const parsedStartTime = type === 1
                              ? moment_timezone_1.default.tz(startTime, timezone).unix()
                              : moment_timezone_1.default.tz(startTime, timezone).format('HH:mm');
                          body = {
                              duration: this.getNodeParameter('duration', i),
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              start_time: parsedStartTime,
                              type,
                          };
                          if (type === 3) {
                              body.value = this.getNodeParameter('weekDay', i);
                          }
                          if (type === 4) {
                              body.value = this.getNodeParameter('monthDay', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newMWindow', body);
                          responseData = responseData.mwindow;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deleteMWindow', body);
                          responseData = { status: responseData.message };
                      }
                      if (operation === 'get') {
                          const mwindows = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMWindows', {
                              mwindows,
                          });
                          responseData = responseData.mwindows;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getMWindows', body);
                          responseData = responseData.mwindows;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              duration: this.getNodeParameter('duration', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          if (body.type === 1 && body.start_time) {
                              body.start_time = moment_timezone_1.default.tz(body.start_time, timezone).unix();
                          }
                          else {
                              body.start_time = moment_timezone_1.default.tz(body.start_time, timezone).format('HH:mm');
                          }
                          if (body.type === 3) {
                              body.value = body.weekDay;
                              delete body.weekDay;
                          }
                          if (body.type === 4) {
                              body.value = body.monthDay;
                              delete body.monthDay;
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editMWindow', body);
                          responseData = responseData.mwindow;
                      }
                  }
                  if (resource === 'publicStatusPage') {
                      if (operation === 'create') {
                          body = {
                              friendly_name: this.getNodeParameter('friendlyName', i),
                              monitors: this.getNodeParameter('monitors', i),
                              ...this.getNodeParameter('additionalFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/newPSP', body);
                          responseData = responseData.psp;
                      }
                      if (operation === 'delete') {
                          body = {
                              id: this.getNodeParameter('id', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/deletePSP', body);
                          responseData = responseData.psp;
                      }
                      if (operation === 'get') {
                          const psps = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getPSPs', { psps });
                          responseData = responseData.psps;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          body = {
                              ...this.getNodeParameter('filters', i),
                          };
                          if (!returnAll) {
                              body.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/getPSPs', body);
                          responseData = responseData.psps;
                      }
                      if (operation === 'update') {
                          body = {
                              id: this.getNodeParameter('id', i),
                              ...this.getNodeParameter('updateFields', i),
                          };
                          responseData = await GenericFunctions_1.uptimeRobotApiRequest.call(this, 'POST', '/editPSP', body);
                          responseData = responseData.psp;
                      }
                  }
                  Array.isArray(responseData)
                      ? returnData.push(...responseData)
                      : returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.UptimeRobot = UptimeRobot;
  //# sourceMappingURL=UptimeRobot.node.js.map

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

  # UptimeRobot credentials

  You can use these credentials to authenticate the following nodes:

  - [UptimeRobot](/integrations/builtin/app-nodes/n8n-nodes-base.uptimerobot.md)

  ## Prerequisites

  Create an [UptimeRobot](https://uptimerobot.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [UptimeRobot's API documentation](https://uptimerobot.com/api/){: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 **My Settings > API Settings**. Create a **Main API Key** and enter this key in your n8n credential.

  ### API key types

  UptimeRobot supports three API key types:

  - **Account-specific** (also known as **main**): Pulls data for multiple monitors.
  - **Monitor-specific**: Pulls data for a single monitor.
  - **Read-only**: Only runs `GET` API calls.

  To complete all of the operations in the UptimeRobot node, use the **Main** or **Account-specific** API key type. Refer to [API authentication](https://uptimerobot.com/api/#auth){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"dd62afa8-dafe-4682-8660-ad03469e5f2e","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"673d36f2263891956276c4dd6b1c1b08e9922a7cc929073b4d5c6f2a25e4d8ee"}}


node_type: n8n-nodes-base.Uplead
name: Uplead
display_name: Uplead
description: Consume Uplead API
category: Other
code_hash: 3ce27be43c0af9f6c0de56319d909fb40b551379d3fe62ccaa67dc9472090fa3
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/uplead
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.Uplead = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const CompanyDesciption_1 = require("./CompanyDesciption");
  const PersonDescription_1 = require("./PersonDescription");
  class Uplead {
      constructor() {
          this.description = {
              displayName: 'Uplead',
              name: 'uplead',
              icon: 'file:uplead.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume Uplead API',
              defaults: {
                  name: 'Uplead',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'upleadApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                              description: 'Company API lets you lookup company data via a domain name or company name',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                              description: 'Person API lets you lookup a person based on an email address OR based on a domain name + first name + last name',
                          },
                      ],
                      default: 'company',
                  },
                  ...CompanyDesciption_1.companyOperations,
                  ...CompanyDesciption_1.companyFields,
                  ...PersonDescription_1.personOperations,
                  ...PersonDescription_1.personFields,
              ],
          };
      }
      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 === 'person') {
                      if (operation === 'enrich') {
                          const email = this.getNodeParameter('email', i);
                          const firstname = this.getNodeParameter('firstname', i);
                          const lastname = this.getNodeParameter('lastname', i);
                          const domain = this.getNodeParameter('domain', i);
                          if (email) {
                              qs.email = email;
                          }
                          if (firstname) {
                              qs.first_name = firstname;
                          }
                          if (lastname) {
                              qs.last_name = lastname;
                          }
                          if (domain) {
                              qs.domain = domain;
                          }
                          responseData = await GenericFunctions_1.upleadApiRequest.call(this, 'GET', '/person-search', {}, qs);
                      }
                  }
                  if (resource === 'company') {
                      if (operation === 'enrich') {
                          const domain = this.getNodeParameter('domain', i);
                          const company = this.getNodeParameter('company', i);
                          if (domain) {
                              qs.domain = domain;
                          }
                          if (company) {
                              qs.company = company;
                          }
                          responseData = await GenericFunctions_1.upleadApiRequest.call(this, 'GET', '/company-search', {}, qs);
                      }
                  }
                  if (Array.isArray(responseData.data)) {
                      returnData.push.apply(returnData, responseData.data);
                  }
                  else {
                      if (responseData.data !== null) {
                          returnData.push(responseData.data);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Uplead = Uplead;
  //# sourceMappingURL=Uplead.node.js.map

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

  # UpLead credentials

  You can use these credentials to authenticate the following nodes:

  - [UpLead](/integrations/builtin/app-nodes/n8n-nodes-base.uplead.md)

  ## Prerequisites

  Create an [UpLead](https://uplead.com/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [UpLead's API documentation](https://docs.uplead.com/#overview){: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 > Profiles** to **Generate New API Key**. Refer to [How can I generate an API key?](https://support.uplead.com/en/articles/5621412-how-can-i-generate-an-api-key){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"9c8b4c4c-9c86-45fc-8346-00ae51a0c893","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"291f7636b2ac066705ca21e062693b67ea83270ce255918b8bda6b14039f8ecd"}}


node_type: n8n-nodes-base.UrlScanIo
name: UrlScanIo
display_name: urlscan.io
description: Provides various utilities for monitoring websites like health checks or screenshots
category: Other
code_hash: 9d774c970553defa6ffa786a53b69a8392799fa2e1f24be57c6343bc85d66c0f
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/urlscanio
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.UrlScanIo = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  class UrlScanIo {
      constructor() {
          this.description = {
              displayName: 'urlscan.io',
              name: 'urlScanIo',
              icon: 'file:urlScanIo.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Provides various utilities for monitoring websites like health checks or screenshots',
              defaults: {
                  name: 'urlscan.io',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'urlScanIoApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      noDataExpression: true,
                      type: 'options',
                      options: [
                          {
                              name: 'Scan',
                              value: 'scan',
                          },
                      ],
                      default: 'scan',
                  },
                  ...descriptions_1.scanOperations,
                  ...descriptions_1.scanFields,
              ],
          };
      }
      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 === 'scan') {
                      if (operation === 'get') {
                          const scanId = this.getNodeParameter('scanId', i);
                          responseData = await GenericFunctions_1.urlScanIoApiRequest.call(this, 'GET', `/result/${scanId}`);
                      }
                      else if (operation === 'getAll') {
                          const filters = this.getNodeParameter('filters', i);
                          const qs = {};
                          if (filters === null || filters === void 0 ? void 0 : filters.query) {
                              qs.q = filters.query;
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, '/search', qs);
                          responseData = responseData.map(GenericFunctions_1.normalizeId);
                      }
                      else if (operation === 'perform') {
                          const { tags: rawTags, ...rest } = this.getNodeParameter('additionalFields', i);
                          const body = {
                              url: this.getNodeParameter('url', i),
                              ...rest,
                          };
                          if (rawTags) {
                              const tags = rawTags.split(',').map((tag) => tag.trim());
                              if (tags.length > 10) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter at most 10 tags', {
                                      itemIndex: i,
                                  });
                              }
                              body.tags = tags;
                          }
                          responseData = await GenericFunctions_1.urlScanIoApiRequest.call(this, 'POST', '/scan', body);
                          responseData = (0, GenericFunctions_1.normalizeId)(responseData);
                      }
                  }
                  Array.isArray(responseData)
                      ? returnData.push(...responseData)
                      : returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.UrlScanIo = UrlScanIo;
  //# sourceMappingURL=UrlScanIo.node.js.map

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

  # urlscan.io credentials

  You can use these credentials to authenticate the following nodes:

  - [urlscan.io](/integrations/builtin/app-nodes/n8n-nodes-base.urlscanio.md)

  ## Prerequisites

  Create an [urlscan.io](https://urlscan.io/){:target=_blank .external-link} account.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [urlscan.io's API documentation](https://urlscan.io/docs/api/){: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 **Settings & API > API Keys**.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"2f1e8401-fbb0-4c69-b0c9-5eff4495b653","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"a8aa4adbe5e12d80ba97897f3e6ba3ff177171967b4c2c9f01b98cd2d030a32c"}}


node_type: n8n-nodes-base.Vero
name: Vero
display_name: Vero
description: Consume Vero API
category: Other
code_hash: 37d697c0a7127e11a8f6dd2ee542a7dfbbf0ba4c38649c1acd4b7496c07fbeef
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/vero
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Vero = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const UserDescription_1 = require("./UserDescription");
  const EventDescripion_1 = require("./EventDescripion");
  class Vero {
      constructor() {
          this.description = {
              displayName: 'Vero',
              name: 'vero',
              icon: 'file:vero.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Vero API',
              defaults: {
                  name: 'Vero',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'veroApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'User',
                              value: 'user',
                              description: 'Create, update and manage the subscription status of your users',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                              description: 'Track events based on actions your customers take in real time',
                          },
                      ],
                      default: 'user',
                  },
                  ...UserDescription_1.userOperations,
                  ...EventDescripion_1.eventOperations,
                  ...UserDescription_1.userFields,
                  ...EventDescripion_1.eventFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  if (resource === 'user') {
                      if (operation === 'create') {
                          const id = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              id,
                          };
                          if (additionalFields.email) {
                              body.email = additionalFields.email;
                          }
                          if (!jsonActive) {
                              const dataAttributesValues = this.getNodeParameter('dataAttributesUi', i).dataAttributesValues;
                              if (dataAttributesValues) {
                                  const dataAttributes = {};
                                  for (let index = 0; index < dataAttributesValues.length; index++) {
                                      dataAttributes[dataAttributesValues[index].key] =
                                          dataAttributesValues[index].value;
                                      body.data = dataAttributes;
                                  }
                              }
                          }
                          else {
                              const dataAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('dataAttributesJson', i));
                              if (dataAttributesJson) {
                                  body.data = dataAttributesJson;
                              }
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', '/users/track', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'alias') {
                          const id = this.getNodeParameter('id', i);
                          const newId = this.getNodeParameter('newId', i);
                          const body = {
                              id,
                              new_id: newId,
                          };
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'PUT', '/users/reidentify', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'unsubscribe' ||
                          operation === 'resubscribe' ||
                          operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              id,
                          };
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', `/users/${operation}`, body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'addTags' || operation === 'removeTags') {
                          const id = this.getNodeParameter('id', i);
                          const tags = this.getNodeParameter('tags', i).split(',');
                          const body = {
                              id,
                          };
                          if (operation === 'addTags') {
                              body.add = JSON.stringify(tags);
                          }
                          if (operation === 'removeTags') {
                              body.remove = JSON.stringify(tags);
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'PUT', '/users/tags/edit', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                  }
                  if (resource === 'event') {
                      if (operation === 'track') {
                          const id = this.getNodeParameter('id', i);
                          const email = this.getNodeParameter('email', i);
                          const eventName = this.getNodeParameter('eventName', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              identity: { id, email },
                              event_name: eventName,
                              email,
                          };
                          if (!jsonActive) {
                              const dataAttributesValues = this.getNodeParameter('dataAttributesUi', i).dataAttributesValues;
                              if (dataAttributesValues) {
                                  const dataAttributes = {};
                                  for (let index = 0; index < dataAttributesValues.length; index++) {
                                      dataAttributes[dataAttributesValues[index].key] =
                                          dataAttributesValues[index].value;
                                      body.data = JSON.stringify(dataAttributes);
                                  }
                              }
                              const extraAttributesValues = this.getNodeParameter('extraAttributesUi', i).extraAttributesValues;
                              if (extraAttributesValues) {
                                  const extraAttributes = {};
                                  for (let index = 0; index < extraAttributesValues.length; index++) {
                                      extraAttributes[extraAttributesValues[index].key] =
                                          extraAttributesValues[index].value;
                                      body.extras = JSON.stringify(extraAttributes);
                                  }
                              }
                          }
                          else {
                              const dataAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('dataAttributesJson', i));
                              if (dataAttributesJson) {
                                  body.data = JSON.stringify(dataAttributesJson);
                              }
                              const extraAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('extraAttributesJson', i));
                              if (extraAttributesJson) {
                                  body.extras = JSON.stringify(extraAttributesJson);
                              }
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', '/events/track', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Vero = Vero;
  //# sourceMappingURL=Vero.node.js.map

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

  # Vero credentials

  You can use these credentials to authenticate the following nodes:

  - [Vero](/integrations/builtin/app-nodes/n8n-nodes-base.vero.md)

  ## Prerequisites

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

  ## Supported authentication methods

  - API auth token

  ## Related resources

  Refer to [Vero's API documentation](https://developers.getvero.com/track-api-reference/#/){:target=_blank .external-link} for more information about the service.

  ## Using API auth token

  To configure this credential, you'll need:

  - An **Auth Token**: Get your auth token from your Vero account [settings](https://app.getvero.com/settings/project){:target=_blank .external-link}. Refer to [API authentication](https://developers.getvero.com/track-api-reference/#/#authentication){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"e8f44044-1699-468a-ad89-118aba40101b","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"82ff7586c2ca5ce9506b447528c09577fe42bcf8c7383f110ed5e254979199bd"}}


node_type: n8n-nodes-base.Vonage
name: Vonage
display_name: Vonage
description: Consume Vonage API
category: Other
code_hash: e56e55473d1585492c17d8199060fe1141d9eb4abc7d0d136b4a41da521a523e
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/vonage
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Vonage = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Vonage {
      constructor() {
          this.description = {
              displayName: 'Vonage',
              name: 'vonage',
              icon: 'file:vonage.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Vonage API',
              defaults: {
                  name: 'Vonage',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'vonageApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              action: 'Send an SMS',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      default: 'send',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The name or number the message should be sent from',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The number that the message should be sent to. Numbers are specified in E.164 format.',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The body of the message being sent',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Account Ref',
                              name: 'account-ref',
                              type: 'string',
                              default: '',
                              description: 'An optional string used to identify separate accounts using the SMS endpoint for billing purposes. To use this feature, please email support@nexmo.com.',
                          },
                          {
                              displayName: 'Callback',
                              name: 'callback',
                              type: 'string',
                              default: '',
                              description: 'The webhook endpoint the delivery receipt for this sms is sent to. This parameter overrides the webhook endpoint you set in Dashboard.',
                          },
                          {
                              displayName: 'Client Ref',
                              name: 'client-ref',
                              type: 'string',
                              default: '',
                              description: 'You can optionally include your own reference of up to 40 characters',
                          },
                          {
                              displayName: 'Message Class',
                              name: 'message-class',
                              type: 'options',
                              options: [
                                  {
                                      name: '0',
                                      value: 0,
                                  },
                                  {
                                      name: '1',
                                      value: 1,
                                  },
                                  {
                                      name: '2',
                                      value: 2,
                                  },
                                  {
                                      name: '3',
                                      value: 3,
                                  },
                              ],
                              default: '',
                              description: 'The Data Coding Scheme value of the message',
                          },
                          {
                              displayName: 'Protocol ID',
                              name: 'protocol-id',
                              type: 'string',
                              default: '',
                              description: 'The value of the protocol identifier to use. Ensure that the value is aligned with udh.',
                          },
                          {
                              displayName: 'Status Report Req',
                              name: 'status-report-req',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to receive a Delivery Receipt',
                          },
                          {
                              displayName: 'TTL (in Minutes)',
                              name: 'ttl',
                              type: 'number',
                              default: 4320,
                              description: 'By default Nexmo attempt delivery for 72 hours',
                          },
                      ],
                  },
              ],
          };
      }
      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 === 'sms') {
                      if (operation === 'send') {
                          const from = this.getNodeParameter('from', i);
                          const to = this.getNodeParameter('to', i);
                          const type = this.getNodeParameter('type', i, 'text');
                          const body = {
                              from,
                              to,
                              type,
                          };
                          if (type === 'text' || type === 'unicode') {
                              const message = this.getNodeParameter('message', i);
                              body.text = message;
                          }
                          if (type === 'binary') {
                              const data = this.getNodeParameter('body', i);
                              const udh = this.getNodeParameter('udh', i);
                              body.udh = udh;
                              body.body = data;
                          }
                          if (type === 'wappush') {
                              const title = this.getNodeParameter('title', i);
                              const url = this.getNodeParameter('url', i);
                              const validity = this.getNodeParameter('validity', i);
                              body.title = title;
                              body.url = url;
                              body.validity = validity * 60000;
                          }
                          if (type === 'vcard') {
                              const vcard = this.getNodeParameter('vcard', i);
                              body.vcard = vcard;
                          }
                          if (type === 'vcal') {
                              const vcal = this.getNodeParameter('vcal', i);
                              body.vcal = vcal;
                          }
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          if (body.ttl) {
                              body.ttl = body.ttl * 60000;
                          }
                          responseData = await GenericFunctions_1.vonageApiRequest.call(this, 'POST', '/sms/json', body);
                          responseData = responseData.messages;
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
              if (Array.isArray(responseData)) {
                  returnData.push.apply(returnData, responseData);
              }
              else if (responseData !== undefined) {
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Vonage = Vonage;
  //# sourceMappingURL=Vonage.node.js.map

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

  # Vonage credentials

  You can use these credentials to authenticate the following nodes:

  - [Vonage](/integrations/builtin/app-nodes/n8n-nodes-base.vonage.md)

  ## Prerequisites

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

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [Vonage's SMS API documentation](https://developer.vonage.com/en/api/sms){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - An **API Key**
  - An **API Secret**

  Get your **API Key** and **API Secret** from your [developer dashboard](https://dashboard.nexmo.com/){:target=_blank .external-link} **user account > Settings > API Settings**. Refer to [Retrieve your account information](https://developer.vonage.com/en/account/guides/dashboard-management#retrieve-your-account-information){:target=_blank .external-link} for more information.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"d818ee19-0275-4407-b5ce-c74f2f13fd5e","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"f8a2170371a36a4810307d1beb84e2cbf4995825b817b9507d611bb809c6ea4c"}}


node_type: n8n-nodes-base.Wait
name: Wait
display_name: Wait
description: Wait before continue with execution
category: Other
code_hash: f333ea7964e6b65519eba2d7b53d16012d5933e9da8b9317eb76676b294e709a
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Wait = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const description_1 = require("../Webhook/description");
  const Webhook_node_1 = require("../Webhook/Webhook.node");
  const displayOnWebhook = {
      show: {
          resume: ['webhook'],
      },
  };
  class Wait extends Webhook_node_1.Webhook {
      constructor() {
          var _a, _b;
          super(...arguments);
          this.authPropertyName = 'incomingAuthentication';
          this.description = {
              displayName: 'Wait',
              name: 'wait',
              icon: 'fa:pause-circle',
              group: ['organization'],
              version: 1,
              description: 'Wait before continue with execution',
              defaults: {
                  name: 'Wait',
                  color: '#804050',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: (0, description_1.credentialsProperty)(this.authPropertyName),
              webhooks: [
                  {
                      ...description_1.defaultWebhookDescription,
                      responseData: '={{$parameter["responseData"]}}',
                      path: '={{$parameter["options"]["webhookSuffix"] || ""}}',
                      restartWebhook: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resume',
                      name: 'resume',
                      type: 'options',
                      options: [
                          {
                              name: 'After Time Interval',
                              value: 'timeInterval',
                              description: 'Waits for a certain amount of time',
                          },
                          {
                              name: 'At Specified Time',
                              value: 'specificTime',
                              description: 'Waits until a specific date and time to continue',
                          },
                          {
                              name: 'On Webhook Call',
                              value: 'webhook',
                              description: 'Waits for a webhook call before continuing',
                          },
                      ],
                      default: 'timeInterval',
                      description: 'Determines the waiting mode to use before the workflow continues',
                  },
                  {
                      ...(0, description_1.authenticationProperty)(this.authPropertyName),
                      description: 'If and how incoming resume-webhook-requests to $execution.resumeUrl should be authenticated for additional security',
                      displayOptions: displayOnWebhook,
                  },
                  {
                      displayName: 'Date and Time',
                      name: 'dateTime',
                      type: 'dateTime',
                      displayOptions: {
                          show: {
                              resume: ['specificTime'],
                          },
                      },
                      default: '',
                      description: 'The date and time to wait for before continuing',
                  },
                  {
                      displayName: 'Wait Amount',
                      name: 'amount',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resume: ['timeInterval'],
                          },
                      },
                      typeOptions: {
                          minValue: 0,
                          numberPrecision: 2,
                      },
                      default: 1,
                      description: 'The time to wait',
                  },
                  {
                      displayName: 'Wait Unit',
                      name: 'unit',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resume: ['timeInterval'],
                          },
                      },
                      options: [
                          {
                              name: 'Seconds',
                              value: 'seconds',
                          },
                          {
                              name: 'Minutes',
                              value: 'minutes',
                          },
                          {
                              name: 'Hours',
                              value: 'hours',
                          },
                          {
                              name: 'Days',
                              value: 'days',
                          },
                      ],
                      default: 'hours',
                      description: 'The time unit of the Wait Amount value',
                  },
                  {
                      displayName: 'The webhook URL will be generated at run time. It can be referenced with the <strong>$execution.resumeUrl</strong> variable. Send it somewhere before getting to this node. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.wait" target="_blank">More info</a>',
                      name: 'webhookNotice',
                      type: 'notice',
                      displayOptions: displayOnWebhook,
                      default: '',
                  },
                  {
                      ...description_1.httpMethodsProperty,
                      displayOptions: displayOnWebhook,
                      description: 'The HTTP method of the Webhook call',
                  },
                  {
                      ...description_1.responseCodeProperty,
                      displayOptions: displayOnWebhook,
                  },
                  {
                      ...description_1.responseModeProperty,
                      displayOptions: displayOnWebhook,
                  },
                  {
                      ...description_1.responseDataProperty,
                      displayOptions: {
                          show: {
                              ...(_a = description_1.responseDataProperty.displayOptions) === null || _a === void 0 ? void 0 : _a.show,
                              ...displayOnWebhook.show,
                          },
                      },
                  },
                  {
                      ...description_1.responseBinaryPropertyNameProperty,
                      displayOptions: {
                          show: {
                              ...(_b = description_1.responseBinaryPropertyNameProperty.displayOptions) === null || _b === void 0 ? void 0 : _b.show,
                              ...displayOnWebhook.show,
                          },
                      },
                  },
                  {
                      displayName: 'Limit Wait Time',
                      name: 'limitWaitTime',
                      type: 'boolean',
                      default: false,
                      description: 'If no webhook call is received, the workflow will automatically resume execution after the specified limit type',
                      displayOptions: displayOnWebhook,
                  },
                  {
                      displayName: 'Limit Type',
                      name: 'limitType',
                      type: 'options',
                      default: 'afterTimeInterval',
                      description: 'Sets the condition for the execution to resume. Can be a specified date or after some time.',
                      displayOptions: {
                          show: {
                              limitWaitTime: [true],
                              ...displayOnWebhook.show,
                          },
                      },
                      options: [
                          {
                              name: 'After Time Interval',
                              description: 'Waits for a certain amount of time',
                              value: 'afterTimeInterval',
                          },
                          {
                              name: 'At Specified Time',
                              description: 'Waits until the set date and time to continue',
                              value: 'atSpecifiedTime',
                          },
                      ],
                  },
                  {
                      displayName: 'Amount',
                      name: 'resumeAmount',
                      type: 'number',
                      displayOptions: {
                          show: {
                              limitType: ['afterTimeInterval'],
                              limitWaitTime: [true],
                              ...displayOnWebhook.show,
                          },
                      },
                      typeOptions: {
                          minValue: 0,
                          numberPrecision: 2,
                      },
                      default: 1,
                      description: 'The time to wait',
                  },
                  {
                      displayName: 'Unit',
                      name: 'resumeUnit',
                      type: 'options',
                      displayOptions: {
                          show: {
                              limitType: ['afterTimeInterval'],
                              limitWaitTime: [true],
                              ...displayOnWebhook.show,
                          },
                      },
                      options: [
                          {
                              name: 'Seconds',
                              value: 'seconds',
                          },
                          {
                              name: 'Minutes',
                              value: 'minutes',
                          },
                          {
                              name: 'Hours',
                              value: 'hours',
                          },
                          {
                              name: 'Days',
                              value: 'days',
                          },
                      ],
                      default: 'hours',
                      description: 'Unit of the interval value',
                  },
                  {
                      displayName: 'Max Date and Time',
                      name: 'maxDateAndTime',
                      type: 'dateTime',
                      displayOptions: {
                          show: {
                              limitType: ['atSpecifiedTime'],
                              limitWaitTime: [true],
                              ...displayOnWebhook.show,
                          },
                      },
                      default: '',
                      description: 'Continue execution after the specified date and time',
                  },
                  {
                      ...description_1.optionsProperty,
                      displayOptions: displayOnWebhook,
                      options: [
                          ...description_1.optionsProperty.options,
                          {
                              displayName: 'Webhook Suffix',
                              name: 'webhookSuffix',
                              type: 'string',
                              default: '',
                              placeholder: 'webhook',
                              description: 'This suffix path will be appended to the restart URL. Helpful when using multiple wait nodes. Note: Does not support expressions.',
                          },
                      ],
                  },
              ],
          };
      }
      async execute(context) {
          const resume = context.getNodeParameter('resume', 0);
          if (resume === 'webhook') {
              return this.handleWebhookResume(context);
          }
          let waitTill;
          if (resume === 'timeInterval') {
              const unit = context.getNodeParameter('unit', 0);
              let waitAmount = context.getNodeParameter('amount', 0);
              if (unit === 'minutes') {
                  waitAmount *= 60;
              }
              if (unit === 'hours') {
                  waitAmount *= 60 * 60;
              }
              if (unit === 'days') {
                  waitAmount *= 60 * 60 * 24;
              }
              waitAmount *= 1000;
              waitTill = new Date(new Date().getTime() + waitAmount);
          }
          else {
              const dateTime = context.getNodeParameter('dateTime', 0);
              waitTill = new Date(dateTime);
          }
          const waitValue = Math.max(waitTill.getTime() - new Date().getTime(), 0);
          if (waitValue < 65000) {
              return new Promise((resolve, _reject) => {
                  setTimeout(() => {
                      resolve([context.getInputData()]);
                  }, waitValue);
              });
          }
          return this.putToWait(context, waitTill);
      }
      async handleWebhookResume(context) {
          let waitTill = new Date(n8n_workflow_1.WAIT_TIME_UNLIMITED);
          const limitWaitTime = context.getNodeParameter('limitWaitTime', 0);
          if (limitWaitTime === true) {
              const limitType = context.getNodeParameter('limitType', 0);
              if (limitType === 'afterTimeInterval') {
                  let waitAmount = context.getNodeParameter('resumeAmount', 0);
                  const resumeUnit = context.getNodeParameter('resumeUnit', 0);
                  if (resumeUnit === 'minutes') {
                      waitAmount *= 60;
                  }
                  if (resumeUnit === 'hours') {
                      waitAmount *= 60 * 60;
                  }
                  if (resumeUnit === 'days') {
                      waitAmount *= 60 * 60 * 24;
                  }
                  waitAmount *= 1000;
                  waitTill = new Date(new Date().getTime() + waitAmount);
              }
              else {
                  waitTill = new Date(context.getNodeParameter('maxDateAndTime', 0));
              }
          }
          return this.putToWait(context, waitTill);
      }
      async putToWait(context, waitTill) {
          await context.putExecutionToWait(waitTill);
          return [context.getInputData()];
      }
  }
  exports.Wait = Wait;
  //# sourceMappingURL=Wait.node.js.map

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

  # Wait

  Use the Wait node pause your workflow's execution. When the workflow pauses it offloads the execution data to the database. When the resume condition is met, the workflow reloads the data and the execution continues.

  ## Operations

  The Wait node can **Resume** on the following conditions:

  * [**After Time Interval**](#after-time-interval): The node waits for a certain amount of time.
  * [**At Specified Time**](#at-specified-time): The node waits until a specific time.
  * [**On Webhook Call**](#on-webhook-call): The node waits until it receives an HTTP call.
  * [**On Form Submitted**](#on-form-submitted): The node waits until it receives a form submission.

  Refer to the more detailed sections below for more detailed instructions.

  ### After Time Interval

  Wait for a certain amount of time.

  This parameter includes two more fields:

  * **Wait Amount**: Enter the amount of time to wait.
  * **Wait Unit**: Select the unit of measure for the **Wait Amount**. Choose from:
  	* **Seconds**
  	* **Minutes**
  	* **Hours**
  	* **Days**

  Refer to [Time-based operations](#time-based-operations) for more detail on how these intervals work and the timezone used.

  ### At Specified Time

  Wait until a specific date and time to continue. Use the date and time picker to set the **Date and Time**.

  Refer to [Time-based operations](#time-based-operations) for more detail on the timezone used.

  ### On Webhook Call

  This parameter enables your workflows to resume when the Wait node receives an HTTP call.

  The webhook URL that resumes the execution when called is generated at runtime. The Wait node provides the `$execution.resumeUrl` variable so that you can reference and send the yet-to-be-generated URL wherever needed, for example to a third-party service or in an email. 

  When the workflow executes, the Wait node generates the resume URL and the webhook(s) in your workflow using the `$execution.resumeUrl`. This generated URL is unique to each execution, so your workflow can contain multiple Wait nodes and as the webhook URL is called it will resume each Wait node sequentially.

  For this **Resume** style, set more parameters listed below.

  #### Authentication

  Select if and how incoming resume-webhook-requests to `$execution.resumeUrl` should be authenticated. Options include:

  * **Basic Auth**: Use basic authentication. Select or enter a new **Credential for Basic Auth** to use.
  * **Header Auth**: Use header authentication. Select or enter a new **Credential for Header Auth** to use.
  * **JWT Auth**: Use JWT authentication. Select or enter a new **Credential for JWT Auth** to use.
  * **None**: Don't use authentication.

  /// note | Auth reference
  Refer to the [Webhook node | Authentication documentation](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md#supported-authentication-methods) for more information on each auth type.
  ///

  #### HTTP Method

  Select the HTTP method the webhook should use. Refer to the [Webhook node | HTTP Method documentation](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md#http-method) for more information.

  #### Response Code

  Enter the Response Code the webhook should return. You can use common codes or enter a custom code.

  #### Respond

  Set when and how to respond to the webhook from these options:

  * **Immediately**: Respond as soon as the node executes.
  * **When Last Node Finishes**: Return the response code and the data output from the last node executed in the workflow. If you select this option, also set:
  	* **Response Data**: Select what data should be returned and what format to use. Options include:
  		* **All Entries**: Returns all the entries of the last node in an array.
  		* **First Entry JSON**: Return the JSON data of the first entry of the last node in a JSON object.
  		* **First Entry Binary**: Return the binary data of the first entry of the last node in a binary file.
  		* **No Response Body**: Return with no body.
  * **Using 'Respond to Webhook' Node**: Respond as defined in the [Respond to Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook.md) node.

  #### Limit Wait Time

  Set whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off). If turned on, also set:

  * **Limit Type**: Select what type of limit to enforce from these options:
  	* **After Time Interval**: Wait for a certain amount of time.
  		* Enter the limit's **Amount** of time.
  		* Select the limit's **Unit** of time.
  	* **At Specified Time**: Wait until a specific date and time to resume.
  		* **Max Date and Time**: Use the date and time picker to set the specified time the node should resume.

  #### On Webhook Call options

  * **Binary Property**: Enter the name of the binary property to write the data of the received file to. This option's only relevant if binary data is received.
  * **Ignore Bots**: Set whether to ignore requests from bots like link previewers and web crawlers (turned on) or not (turned off).
  * **IP(s) Whitelist**: Enter IP addresses here to limit who (or what) can invoke the webhook URL. Enter a comma-separated list of allowed IP addresses. Access from IPs outside the whitelist throws a 403 error. If left blank, all IP addresses can invoke the webhook URL.
  * **No Response Body**: Set whether n8n should send a body in the response (turned off) or prevent n8n from sending a body in the response (turned on).
  * **Raw Body**: Set whether to return the body in a raw format like JSON or XML (turned on) or not (turned off).
  * **Response Data**: Enter any custom data you want to send in the response.
  * **Response Headers**: Send more headers in the webhook response. Refer to [MDN Web Docs | Response header](https://developer.mozilla.org/en-US/docs/Glossary/Response_header){:target=_blank .external-link} to learn more about response headers.
  * **Webhook Suffix**: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated `$resumeWebhookUrl` won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.

  #### On Webhook Call limitations

  There are some limitations to keep in mind when using On Webhook Call:

  * Partial executions of your workflow changes the `$resumeWebhookUrl`, so be sure that the node sending this URL to your desired third-party runs in the same execution as the Wait node.

  ### On Form Submitted

  Wait for a form submission before continuing. Set up these parameters:

  #### Form Title

  Enter the title to display at the top of the form.

  #### Form Description

  Enter a form description to display beneath the title. This description can help prompt the user on how to complete the form.

  #### Form Fields

  Set up each field you want to appear on your form using these parameters:

  * **Field Label**: Enter the field label you want to appear in the form.
  * **Field Type**: Select the type of field to display in the form. Choose from:
  	* **Date**
  	* **Dropdown List**: Enter each dropdown options in the **Field Options**.
  		* **Multiple Choice**: Select whether the user can select a single dropdown option (turned off) or multiple dropdown options (turned on)
  	* **Number**
  	* **Password**
  	* **Text**
  	* **Textarea**
  * **Required Field**: Set whether the user must complete this field in order to submit the form (turned on) or if the user can submit the form without completing it (turned off).

  #### Respond When

  Set when to respond to the form submission. Choose from:

  * **Form Is Submitted**: Respond as soon as this node receives the form submission.
  * **Workflow Finishes**: Respond when the last node of this workflow finishes.
  * **Using 'Respond to Webhook' Node**: Respond when the [Respond to Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook.md) node executes.

  #### Limit Wait Time

  Set whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off).

  If turned on, also set:
  * **Limit Type**: Select what type of limit to enforce from these options:
  	* **After Time Interval**: Wait for a certain amount of time.
  		* Enter the limit's **Amount** of time.
  		* Select the limit's **Unit** of time.
  	* **At Specified Time**: Wait until a specific date and time to resume.
  		* **Max Date and Time**: Use the date and time picker to set the specified time the node should resume.

  #### On Form Response options

  * **Form Response**: Choose how and what you want the form to **Respond With** from these options:
  	* **Form Submitted Text**: The form displays whatever text is entered in **Text to Show** after a user fills out the form. Use this option if you want to display a confirmation message.
  	* **Redirect URL**: The form will redirect the user to the **URL to Redirect to** after they fill out the form. This must be a valid URL.
  * **Webhook Suffix**: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated `$resumeWebhookUrl` won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.

  ## Templates and examples

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

  ## Time-based operations

  For the time-based resume operations, note that:

  * For wait times less than 65 seconds, the workflow doesn't offload execution data to the database. Instead, the process continues to run and the execution resumes after the specified interval passes.
  * The n8n server time is always used regardless of the timezone setting. Workflow timezone settings, and any changes made to them, don't affect the Wait node interval or specified time. 

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"3806068b-f42b-4fec-82cd-09df7d3084db","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"6757e785250dd54e25b635ca91418ee3cbb4863f3e21a1c77504399ea8f85a6f"}}


node_type: n8n-nodes-base.Webflow
name: Webflow
display_name: Webflow
description: Consume the Webflow API
category: Other
code_hash: 6862aa4d34cdafe233189a97054c7356a36907c43238db2ef115afd5041849b0
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/webflow
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Webflow = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ItemDescription_1 = require("./ItemDescription");
  class Webflow {
      constructor() {
          this.description = {
              displayName: 'Webflow',
              name: 'webflow',
              icon: 'file:webflow.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Webflow API',
              defaults: {
                  name: 'Webflow',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'webflowApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'webflowOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Item',
                              value: 'item',
                          },
                      ],
                      default: 'item',
                  },
                  ...ItemDescription_1.itemOperations,
                  ...ItemDescription_1.itemFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSites() {
                      const returnData = [];
                      const sites = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', '/sites');
                      for (const site of sites) {
                          returnData.push({
                              name: site.name,
                              value: site._id,
                          });
                      }
                      return returnData;
                  },
                  async getCollections() {
                      const returnData = [];
                      const siteId = this.getCurrentNodeParameter('siteId');
                      const collections = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/sites/${siteId}/collections`);
                      for (const collection of collections) {
                          returnData.push({
                              name: collection.name,
                              value: collection._id,
                          });
                      }
                      return returnData;
                  },
                  async getFields() {
                      const returnData = [];
                      const collectionId = this.getCurrentNodeParameter('collectionId');
                      const { fields } = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}`);
                      for (const field of fields) {
                          returnData.push({
                              name: `${field.name} (${field.type}) ${field.required ? ' (required)' : ''}`,
                              value: field.slug,
                          });
                      }
                      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 === 'item') {
                      if (operation === 'create') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const properties = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          const live = this.getNodeParameter('live', i);
                          const fields = {};
                          properties.forEach((data) => (fields[data.fieldId] = data.fieldValue));
                          const body = {
                              fields,
                          };
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'POST', `/collections/${collectionId}/items`, body, { live });
                      }
                      else if (operation === 'delete') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'DELETE', `/collections/${collectionId}/items/${itemId}`);
                      }
                      else if (operation === 'get') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}/items/${itemId}`);
                          responseData = responseData.items;
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const qs = {};
                          if (returnAll) {
                              responseData = await GenericFunctions_1.webflowApiRequestAllItems.call(this, 'GET', `/collections/${collectionId}/items`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}/items`, {}, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'update') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          const properties = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          const live = this.getNodeParameter('live', i);
                          const fields = {};
                          properties.forEach((data) => (fields[data.fieldId] = data.fieldValue));
                          const body = {
                              fields,
                          };
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'PUT', `/collections/${collectionId}/items/${itemId}`, body, { live });
                      }
                  }
                  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.Webflow = Webflow;
  //# sourceMappingURL=Webflow.node.js.map

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

  # Webflow credentials

  You can use these credentials to authenticate the following nodes:

  - [Webflow](/integrations/builtin/app-nodes/n8n-nodes-base.webflow.md)
  - [Webflow Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.webflowtrigger.md)

  ## Prerequisites

  - Create a [Webflow](https://webflow.com/){:target=_blank .external-link} account.
  - [Create a site](https://developers.webflow.com/data/reference/structure-1#sites){:target=_blank .external-link}: Required for API access token authentication only.

  ## Supported authentication methods

  - API access token
  - OAuth2

  ## Related resources

  Refer to [Webflow's API documentation](https://developers.webflow.com/data/reference/rest-introduction){:target=_blank .external-link} for more information about the service.

  ## Using API access token

  To configure this credential, you'll need:

  - A Site **Access Token**: Access tokens are site-specific. Go to your site's **Site Settings > Apps & integrations > API access** and select **Generate API token**. Refer to [Get a Site Token](https://developers.webflow.com/data/docs/get-a-site-token){:target=_blank .external-link} for more information.

  ## Using OAuth2

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

  If you need to configure OAuth2 from scratch, [register an application](https://developers.webflow.com/data/docs/register-an-app){:target=_blank .external-link} in your workspace.

  Use these settings for your application:

  - Copy the **OAuth callback URL** from n8n and add it as a **Redirect URI** in your application.
  - Once you've created your application, copy the **Client ID** and **Client Secret** and enter them in your n8n credential.
  - If you are using the Webflow Data API V1 (deprecated), enable the **Legacy** toggle. Otherwise, leave this inactive.

  Refer to [OAuth](https://developers.webflow.com/data/reference/oauth-app){:target=_blank .external-link} for more information on Webflow's OAuth web flow.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"5b9ffc14-c4ef-4221-a2ff-4a33f2b38491","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"0c6dd540f8605519c29a262cf178293993eda258107f3a95b1a4644fe5498b73"}}


node_type: n8n-nodes-base.Webhook
name: Webhook
display_name: Webhook
description: Starts the workflow when a webhook is called
category: Other
code_hash: 143d6bbdce335c5a9204112b2c1e8b92e4061d75ba3cb23301845f6fed9e6c71
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
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.Webhook = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const promises_1 = require("stream/promises");
  const fs_1 = require("fs");
  const uuid_1 = require("uuid");
  const basic_auth_1 = __importDefault(require("basic-auth"));
  const isbot_1 = __importDefault(require("isbot"));
  const tmp_promise_1 = require("tmp-promise");
  const description_1 = require("./description");
  const error_1 = require("./error");
  class Webhook extends n8n_workflow_1.Node {
      constructor() {
          super(...arguments);
          this.authPropertyName = 'authentication';
          this.description = {
              displayName: 'Webhook',
              icon: 'file:webhook.svg',
              name: 'webhook',
              group: ['trigger'],
              version: 1,
              description: 'Starts the workflow when a webhook is called',
              eventTriggerDescription: 'Waiting for you to call the Test URL',
              activationMessage: 'You can now make calls to your production webhook URL.',
              defaults: {
                  name: 'Webhook',
              },
              triggerPanel: {
                  header: '',
                  executionsHelp: {
                      inactive: 'Webhooks have two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the \'listen\' button, then make a request to the test URL. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key="activate">Activate</a> the workflow, then make requests to the production URL. These executions will show up in the executions list, but not in the editor.',
                      active: 'Webhooks have two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the \'listen\' button, then make a request to the test URL. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. Since the workflow is activated, you can make requests to the production URL. 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, run it without having to click this button by using the production webhook URL.',
              },
              inputs: [],
              outputs: ['main'],
              credentials: (0, description_1.credentialsProperty)(this.authPropertyName),
              webhooks: [description_1.defaultWebhookDescription],
              properties: [
                  (0, description_1.authenticationProperty)(this.authPropertyName),
                  description_1.httpMethodsProperty,
                  {
                      displayName: 'Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      placeholder: 'webhook',
                      required: true,
                      description: 'The path to listen to',
                  },
                  description_1.responseModeProperty,
                  {
                      displayName: 'Insert a \'Respond to Webhook\' node to control when and how you respond. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/" target="_blank">More details</a>',
                      name: 'webhookNotice',
                      type: 'notice',
                      displayOptions: {
                          show: {
                              responseMode: ['responseNode'],
                          },
                      },
                      default: '',
                  },
                  description_1.responseCodeProperty,
                  description_1.responseDataProperty,
                  description_1.responseBinaryPropertyNameProperty,
                  description_1.optionsProperty,
              ],
          };
      }
      async webhook(context) {
          var _a;
          const options = context.getNodeParameter('options', {});
          const req = context.getRequestObject();
          const resp = context.getResponseObject();
          try {
              if (options.ignoreBots && (0, isbot_1.default)(req.headers['user-agent']))
                  throw new error_1.WebhookAuthorizationError(403);
              await this.validateAuth(context);
          }
          catch (error) {
              if (error instanceof error_1.WebhookAuthorizationError) {
                  resp.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' });
                  resp.end(error.message);
                  return { noWebhookResponse: true };
              }
              throw error;
          }
          if (options.binaryData) {
              return this.handleBinaryData(context);
          }
          if (req.contentType === 'multipart/form-data') {
              return this.handleFormData(context);
          }
          const response = {
              json: {
                  headers: req.headers,
                  params: req.params,
                  query: req.query,
                  body: req.body,
              },
              binary: options.rawBody
                  ? {
                      data: {
                          data: req.rawBody.toString(n8n_workflow_1.BINARY_ENCODING),
                          mimeType: (_a = req.contentType) !== null && _a !== void 0 ? _a : 'application/json',
                      },
                  }
                  : undefined,
          };
          return {
              webhookResponse: options.responseData,
              workflowData: [[response]],
          };
      }
      async validateAuth(context) {
          const authentication = context.getNodeParameter(this.authPropertyName);
          if (authentication === 'none')
              return;
          const req = context.getRequestObject();
          const headers = context.getHeaderData();
          if (authentication === 'basicAuth') {
              let expectedAuth;
              try {
                  expectedAuth = await context.getCredentials('httpBasicAuth');
              }
              catch { }
              if (expectedAuth === undefined || !expectedAuth.user || !expectedAuth.password) {
                  throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
              }
              const providedAuth = (0, basic_auth_1.default)(req);
              if (!providedAuth)
                  throw new error_1.WebhookAuthorizationError(401);
              if (providedAuth.name !== expectedAuth.user || providedAuth.pass !== expectedAuth.password) {
                  throw new error_1.WebhookAuthorizationError(403);
              }
          }
          else if (authentication === 'headerAuth') {
              let expectedAuth;
              try {
                  expectedAuth = await context.getCredentials('httpHeaderAuth');
              }
              catch { }
              if (expectedAuth === undefined || !expectedAuth.name || !expectedAuth.value) {
                  throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
              }
              const headerName = expectedAuth.name.toLowerCase();
              const expectedValue = expectedAuth.value;
              if (!headers.hasOwnProperty(headerName) ||
                  headers[headerName] !== expectedValue) {
                  throw new error_1.WebhookAuthorizationError(403);
              }
          }
      }
      async handleFormData(context) {
          var _a;
          const req = context.getRequestObject();
          const options = context.getNodeParameter('options', {});
          const { data, files } = req.body;
          const returnItem = {
              binary: {},
              json: {
                  headers: req.headers,
                  params: req.params,
                  query: req.query,
                  body: data,
              },
          };
          let count = 0;
          for (const key of Object.keys(files)) {
              const processFiles = [];
              let multiFile = false;
              if (Array.isArray(files[key])) {
                  processFiles.push(...files[key]);
                  multiFile = true;
              }
              else {
                  processFiles.push(files[key]);
              }
              let fileCount = 0;
              for (const file of processFiles) {
                  let binaryPropertyName = key;
                  if (binaryPropertyName.endsWith('[]')) {
                      binaryPropertyName = binaryPropertyName.slice(0, -2);
                  }
                  if (multiFile) {
                      binaryPropertyName += fileCount++;
                  }
                  if (options.binaryPropertyName) {
                      binaryPropertyName = `${options.binaryPropertyName}${count}`;
                  }
                  returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(file.filepath, (_a = file.originalFilename) !== null && _a !== void 0 ? _a : file.newFilename, file.mimetype);
                  count += 1;
              }
          }
          return { workflowData: [[returnItem]] };
      }
      async handleBinaryData(context) {
          var _a, _b, _c;
          const req = context.getRequestObject();
          const options = context.getNodeParameter('options', {});
          const binaryFile = await (0, tmp_promise_1.file)({ prefix: 'n8n-webhook-' });
          try {
              await (0, promises_1.pipeline)(req, (0, fs_1.createWriteStream)(binaryFile.path));
              const returnItem = {
                  binary: {},
                  json: {
                      headers: req.headers,
                      params: req.params,
                      query: req.query,
                      body: {},
                  },
              };
              const binaryPropertyName = (options.binaryPropertyName || 'data');
              const fileName = (_b = (_a = req.contentDisposition) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : (0, uuid_1.v4)();
              returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(binaryFile.path, fileName, (_c = req.contentType) !== null && _c !== void 0 ? _c : 'application/octet-stream');
              return { workflowData: [[returnItem]] };
          }
          catch (error) {
              throw new n8n_workflow_1.NodeOperationError(context.getNode(), error);
          }
          finally {
              await binaryFile.cleanup();
          }
      }
  }
  exports.Webhook = Webhook;
  //# sourceMappingURL=Webhook.node.js.map

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

  # Respond to Webhook

  Use the Respond to Webhook node to control the response to incoming webhooks. This node works with the [Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md) node.

  /// note | Runs once for the first data item
  The Respond to Webhook node runs once, using the first incoming data item. Refer to [Return more than one data item](#return-more-than-one-data-item-deprecated) for more information.
  ///

  ## How to use Respond to Webhook

  To use the Respond to Webhook node:

  1. Add a [Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md) node as the trigger node for the workflow.
  1. In the Webhook node, set **Respond** to **Using 'Respond to Webhook' node**.
  1. Add the Respond to Webhook node anywhere in your workflow. If you want it to return data from other nodes, place it after those nodes.

  ## Node parameters

  Configure the node behavior using these parameters.

  ### Respond With

  Choose what data to send in the webhook response.

  - **All Incoming Items**: Respond with all the JSON items from the input.
  - **Binary**: Respond with a binary file defined in **Response Data Source**.
  - **First Incoming Item**: Respond with the first incoming item's JSON.
  - **JSON**: Respond with a JSON object defined in **Response Body**.
  - **No Data**: No response payload.
  - **Redirect**: Redirect to a URL set in **Redirect URL**.
  - **Text**: Respond with text set in **Response Body**.

  ## Node options

  Select **Add Option** to view and set the options.

  - **Response Code**: Set the [response code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status){:target=_blank .external-link} to use.
  - **Response Headers**: Define the response headers to send.
  - **Put Response in Field**: Available when you respond with **All Incoming Items** or **First Incoming Item**. Set the field name for the field containing the response data.

  ## Templates and examples

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

  ## Workflow behavior

  When using the Respond to Webhook node, workflows behave as follows:

  - The workflow finishes without executing the Respond to Webhook node: it returns a standard message with a 200 status.
  - The workflow errors before the first Respond to Webhook node executes: the workflow returns an error message with a 500 status.
  - A second Respond to Webhook node executes after the first one: the workflow ignores it.
  - A Respond to Webhook node executes but there was no webhook: the workflow ignores the Respond to Webhook node.

  ## Return more than one data item (deprecated)

  /// note | Deprecated in 1.22.0
  n8n 1.22.0 added support for returning all data items using the **All Incoming Items** option. n8n recommends upgrading to the latest version of n8n, instead of using the workarounds described in this section.
  ///

  The Respond to Webhook node runs once, using the first incoming data item. This includes when using [expressions](/code/expressions.md). You can't force looping using the Loop node: the workflow will run, but the webhook response will still only contain the results of the first execution. 

  If you need to return more than one data item, choose one of these options:

  - Instead of using the Respond to Webhook node, use the **When Last Node Finishes** option in **Respond** in the Webhook node. Use this when you want to return the final data that the workflow outputs.
  - Use the [Aggregate](/integrations/builtin/core-nodes/n8n-nodes-base.aggregate.md) node to turn multiple items into a single item before passing the data to the Respond to Webhook node. Set **Aggregate** to **All Item Data (Into a Single List)**.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"48797e07-f5ac-4fa4-9eb0-6ce91e04d1b0","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"72b0976057a791e00b9aeda49597ecac1f20dbf6b440b230aeba3f2e74e06eae"}}


node_type: n8n-nodes-base.Wekan
name: Wekan
display_name: Wekan
description: Consume Wekan API
category: Other
code_hash: 7fa9339c04210a8df356f15f28131919effd00d88c7ed637e194ef9000461f1a
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/wekan
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Wekan = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const BoardDescription_1 = require("./BoardDescription");
  const CardDescription_1 = require("./CardDescription");
  const CardCommentDescription_1 = require("./CardCommentDescription");
  const ChecklistDescription_1 = require("./ChecklistDescription");
  const ChecklistItemDescription_1 = require("./ChecklistItemDescription");
  const ListDescription_1 = require("./ListDescription");
  const utilities_1 = require("../../utils/utilities");
  class Wekan {
      constructor() {
          this.description = {
              displayName: 'Wekan',
              name: 'wekan',
              icon: 'file:wekan.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Wekan API',
              defaults: {
                  name: 'Wekan',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wekanApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Board',
                              value: 'board',
                          },
                          {
                              name: 'Card',
                              value: 'card',
                          },
                          {
                              name: 'Card Comment',
                              value: 'cardComment',
                          },
                          {
                              name: 'Checklist',
                              value: 'checklist',
                          },
                          {
                              name: 'Checklist Item',
                              value: 'checklistItem',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'card',
                  },
                  ...BoardDescription_1.boardOperations,
                  ...CardDescription_1.cardOperations,
                  ...CardCommentDescription_1.cardCommentOperations,
                  ...ChecklistDescription_1.checklistOperations,
                  ...ChecklistItemDescription_1.checklistItemOperations,
                  ...ListDescription_1.listOperations,
                  ...BoardDescription_1.boardFields,
                  ...CardDescription_1.cardFields,
                  ...CardCommentDescription_1.cardCommentFields,
                  ...ChecklistDescription_1.checklistFields,
                  ...ChecklistItemDescription_1.checklistItemFields,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getUsers() {
                      const returnData = [];
                      const users = await GenericFunctions_1.apiRequest.call(this, 'GET', 'users', {}, {});
                      for (const user of users) {
                          returnData.push({
                              name: user.username,
                              value: user._id,
                          });
                      }
                      return returnData;
                  },
                  async getBoards() {
                      const returnData = [];
                      const user = await GenericFunctions_1.apiRequest.call(this, 'GET', 'user', {}, {});
                      const boards = await GenericFunctions_1.apiRequest.call(this, 'GET', `users/${user._id}/boards`, {}, {});
                      for (const board of boards) {
                          returnData.push({
                              name: board.title,
                              value: board._id,
                          });
                      }
                      return returnData;
                  },
                  async getLists() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const lists = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/lists`, {}, {});
                      for (const list of lists) {
                          returnData.push({
                              name: list.title,
                              value: list._id,
                          });
                      }
                      return returnData;
                  },
                  async getSwimlanes() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const swimlanes = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/swimlanes`, {}, {});
                      for (const swimlane of swimlanes) {
                          returnData.push({
                              name: swimlane.title,
                              value: swimlane._id,
                          });
                      }
                      return returnData;
                  },
                  async getCards() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const listId = this.getCurrentNodeParameter('listId');
                      const cards = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/lists/${listId}/cards`, {}, {});
                      for (const card of cards) {
                          returnData.push({
                              name: card.title,
                              value: card._id,
                          });
                      }
                      return returnData;
                  },
                  async getChecklists() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const checklists = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/checklists`, {}, {});
                      for (const checklist of checklists) {
                          returnData.push({
                              name: checklist.title,
                              value: checklist._id,
                          });
                      }
                      return returnData;
                  },
                  async getChecklistItems() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const checklistId = this.getCurrentNodeParameter('checklistId');
                      const checklist = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`, {}, {});
                      for (const item of checklist.items) {
                          returnData.push({
                              name: item.title,
                              value: item._id,
                          });
                      }
                      return returnData;
                  },
                  async getComments() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const comments = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/comments`, {}, {});
                      for (const comment of comments) {
                          returnData.push({
                              name: comment.comment,
                              value: comment._id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let returnAll;
          let limit;
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'board') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'boards';
                          body.title = this.getNodeParameter('title', i);
                          body.owner = this.getNodeParameter('owner', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const userId = this.getNodeParameter('IdUser', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `users/${userId}/boards`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'card') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards`;
                          body.title = this.getNodeParameter('title', i);
                          body.swimlaneId = this.getNodeParameter('swimlaneId', i);
                          body.authorId = this.getNodeParameter('authorId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const fromObject = this.getNodeParameter('fromObject', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (fromObject === 'list') {
                              const listId = this.getNodeParameter('listId', i);
                              endpoint = `boards/${boardId}/lists/${listId}/cards`;
                          }
                          if (fromObject === 'swimlane') {
                              const swimlaneId = this.getNodeParameter('swimlaneId', i);
                              endpoint = `boards/${boardId}/swimlanes/${swimlaneId}/cards`;
                          }
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'cardComment') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments`;
                          body.authorId = this.getNodeParameter('authorId', i);
                          body.comment = this.getNodeParameter('comment', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments/${commentId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments/${commentId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'list') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}/lists`;
                          body.title = this.getNodeParameter('title', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `boards/${boardId}/lists`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklist') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists`;
                          body.title = this.getNodeParameter('title', i);
                          body.items = this.getNodeParameter('items', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists`;
                      }
                      else if (operation === 'getCheckItem') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'deleteCheckItem') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'updateCheckItem') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklistItem') {
                      if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                  }
                  let responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                  if (returnAll === false && Array.isArray(responseData)) {
                      limit = this.getNodeParameter('limit', i);
                      responseData = responseData.splice(0, limit);
                  }
                  const executionData = this.helpers.constructExecutionMetaData((0, utilities_1.wrapData)(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Wekan = Wekan;
  //# sourceMappingURL=Wekan.node.js.map

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

  # Wekan credentials

  You can use these credentials to authenticate the following nodes:

  - [Wekan](/integrations/builtin/app-nodes/n8n-nodes-base.wekan.md)

  ## Prerequisites

  Install [Wekan](https://github.com/wekan/wekan/wiki) on your server.

  ## Supported authentication methods

  - Basic auth

  ## Related resources

  Refer to [Wekan's API documentation](https://github.com/wekan/wekan/wiki/REST-API){:target=_blank .external-link} for more information about authenticating with the service.

  ## Using basic auth

  To configure this credential, you'll need:

  - A **Username**: Enter your Wekan username.
  - A **Password**: Enter your Wekan password.
  - A **URL**: Enter your Wekan domain.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"80c1c027-d315-402c-b3b8-edf3fe3c3ca7","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"b619e3a9b5d53c807904c52036998326f58f5d5e314624007805798fea64fc9e"}}


node_type: n8n-nodes-base.WriteBinaryFile
name: WriteBinaryFile
display_name: Write Binary File
description: Writes a binary file to disk
category: Other
code_hash: 20162b6ab682660dc6c2229e1af0ac916ec38d2570006eaf9b0b6df2be10f946
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WriteBinaryFile = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class WriteBinaryFile {
      constructor() {
          this.description = {
              displayName: 'Write Binary File',
              name: 'writeBinaryFile',
              icon: 'fa:file-export',
              group: ['output'],
              version: 1,
              description: 'Writes a binary file to disk',
              defaults: {
                  name: 'Write Binary File',
                  color: '#CC2233',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'File Name',
                      name: 'fileName',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: '/data/example.jpg',
                      description: 'Path to which the file should be written',
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      description: 'Name of the binary property which contains the data for the file to be written',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Append',
                              name: 'append',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to append to an existing file',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let item;
          for (let itemIndex = 0; itemIndex < length; itemIndex++) {
              try {
                  const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
                  const fileName = this.getNodeParameter('fileName', itemIndex);
                  const options = this.getNodeParameter('options', 0, {});
                  const flag = options.append ? 'a' : 'w';
                  item = items[itemIndex];
                  const newItem = {
                      json: {},
                      pairedItem: {
                          item: itemIndex,
                      },
                  };
                  Object.assign(newItem.json, item.json);
                  const binaryData = this.helpers.assertBinaryData(itemIndex, dataPropertyName);
                  let fileContent;
                  if (binaryData.id) {
                      fileContent = await this.helpers.getBinaryStream(binaryData.id);
                  }
                  else {
                      fileContent = Buffer.from(binaryData.data, n8n_workflow_1.BINARY_ENCODING);
                  }
                  await this.helpers.writeContentToFile(fileName, fileContent, flag);
                  if (item.binary !== undefined) {
                      newItem.binary = {};
                      Object.assign(newItem.binary, item.binary);
                  }
                  newItem.json.fileName = fileName;
                  returnData.push(newItem);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: itemIndex,
                          },
                      });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.WriteBinaryFile = WriteBinaryFile;
  //# sourceMappingURL=WriteBinaryFile.node.js.map

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"2f8835ad-fcc4-4b37-9cab-73c5806b151b","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"d91f83449cf498c58f0a303dca28989969813097d56c6d0e14b812820e8ad3b8"}}


node_type: n8n-nodes-base.WhatsApp
name: WhatsApp
display_name: WhatsApp Business Cloud
description: Access WhatsApp API
category: Other
code_hash: f36be4f477cb2d0526f7bfdf3caeae4ed3518eb4a3b170d72e96b88e2dc44367
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/whatsapp
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WhatsApp = void 0;
  const MessagesDescription_1 = require("./MessagesDescription");
  const MediaDescription_1 = require("./MediaDescription");
  class WhatsApp {
      constructor() {
          this.description = {
              displayName: 'WhatsApp Business Cloud',
              name: 'whatsApp',
              icon: 'file:whatsapp.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{ $parameter["resource"] + ": " + $parameter["operation"] }}',
              description: 'Access WhatsApp API',
              defaults: {
                  name: 'WhatsApp Business Cloud',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'whatsAppApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  baseURL: 'https://graph.facebook.com/v13.0/',
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                          },
                          {
                              name: 'Media',
                              value: 'media',
                          },
                      ],
                      default: 'message',
                  },
                  ...MessagesDescription_1.messageFields,
                  ...MediaDescription_1.mediaFields,
                  ...MessagesDescription_1.messageTypeFields,
                  ...MediaDescription_1.mediaTypeFields,
              ],
          };
      }
  }
  exports.WhatsApp = WhatsApp;
  //# sourceMappingURL=WhatsApp.node.js.map

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

  # WhatsApp Business Cloud credentials

  You can use these credentials to authenticate the following nodes:

  - [WhatsApp Business Cloud](/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/index.md)
  - [WhatsApp Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.whatsapptrigger.md)

  ## Requirements

  To create credentials for WhatsApp, you need the following Meta assets:

  - A [Meta developer](https://developers.facebook.com/docs/development/register) account: A developer account allows you to create and manage Meta apps, including WhatsApp integrations.
  ??? note "Set up a Meta developer account"
  	1. Visit the [Facebook Developers site](https://developers.facebook.com).
  	2. Click **Getting Started** in the upper-right corner (if the link says **My Apps**, you've already set up a developer account).
  	3. Agree to terms and conditions.
  	4. Provide a phone number for verification.
  	5. Select your occupation or role.
  - A Meta [business portfolio](https://www.facebook.com/business/help/1710077379203657?id=180505742745347): WhatsApp messaging services require a Meta business portfolio, formerly called a Business Manager account. The UI may still show either option.
  ??? note "Set up a Meta business portfolio"
  	1. Visit the [Facebook Business site](https://business.facebook.com).
  	2. Select **Create an account**.
  		* If you already have a Facebook Business account and portfolio, but want a new portfolio, open the business portfolio selector in the left-side menu and select **Create a business portfolio**.
  	3. Enter a **Business portfolio name**.
  	4. Enter your **name**.
  	5. Enter a **business email**.
  	6. Select **Submit** or **Create**.
  - A Meta [business app](https://developers.facebook.com/docs/development/create-an-app/) configured with WhatsApp: Once you have a developer account, you will create a Meta business app.
  ??? note "Set up a Meta business app with WhatsApp"
  	1. Visit the [Meta for Developers Apps dashboard](https://developers.facebook.com/apps/)
  	2. Select **Create app**.
  	3. In **Add products to your app**, select **Set up** in the WhatsApp tile. Refer to [Add the WhatsApp Product](https://developers.facebook.com/docs/whatsapp/solution-providers/get-started-for-tech-providers#step-3--add-the-whatsapp-product) for more detail.
  	4. This opens the WhatsApp **Quickstart** page. Select your business portfolio.
  	5. Select **Continue**.
  	6. In the left-side menu, go to **App settings** > **Basic**.
  	7. Set the **Privacy Policy URL** and **Terms of Service URL** for the app.
  	8. Change the **App Mode** to **Live**.


  ## Supported authentication methods

  - API key: Use for the [WhatsApp Business Cloud](/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/index.md) node.
  - OAuth2: Use for the [WhatsApp Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.whatsapptrigger.md) node.

  ## Related resources

  Refer to [WhatsApp's API documentation](https://developers.facebook.com/docs/whatsapp/#platform-apis) for more information about the service.

  Meta classifies users who create WhatsApp business apps as Tech Providers; refer to Meta's [Get Started for Tech Providers](https://developers.facebook.com/docs/whatsapp/solution-providers/get-started-for-tech-providers) for more information.

  ## Using API key

  You need WhatsApp API key credentials to use the [WhatsApp Business Cloud](/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/index.md) node.

  To configure this credential, you'll need:

  - An API **Access Token**
  - A **Business Account ID**

  To generate an access token, follow these steps:

  1. Visit the [Meta for Developers Apps dashboard](https://developers.facebook.com/apps/).
  2. Select your Meta app.
  3. In the left-side menu, select **WhatsApp** > **API Setup**.
  4. Select **Generate access token** and confirm the access you want to grant.
  5. Copy the **Access token** and add it to n8n as the **Access Token**.
  6. Copy the **WhatsApp Business Account ID** and add it to n8n as the **Business Account ID**.

  Refer to [Test Business Messaging on WhatsApp](https://developers.facebook.com/docs/whatsapp/solution-providers/become-a-tech-provider-legacy-flow#step-4--test-business-messaging-on-whatsapp) for more information on the above steps.

  Fully verifying and launching your app will take further configuration. Refer to Meta's [Get Started for Tech Providers](https://developers.facebook.com/docs/whatsapp/solution-providers/become-a-tech-provider-legacy-flow#step-5--scale-your-solution) Steps 5 and beyond for more information. Refer to [App Review](https://developers.facebook.com/docs/resp-plat-initiatives/app-review) for more information on the Meta App Review process.

  ## Using OAuth2

  You need WhatsApp OAuth2 credentials to use the [WhatsApp Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.whatsapptrigger.md) node.

  To configure this credential, you'll need:

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

  To retrieve these items, follow these steps:

  1. Visit the [Meta for Developers Apps dashboard](https://developers.facebook.com/apps/).
  2. Select your Meta app.
  3. In the left-side menu, select **App settings** > **Basic**.
  4. Copy the **App ID** and enter it as the **Client ID** within the n8n credential.
  5. Copy the **App Secret** and enter it as the **Client Secret** within the n8n credential.

  Fully verifying and launching your app will take further configuration. Refer to Meta's [Get Started for Tech Providers](https://developers.facebook.com/docs/whatsapp/solution-providers/become-a-tech-provider-legacy-flow#step-5--scale-your-solution) Steps 5 and beyond for more information. Refer to [App Review](https://developers.facebook.com/docs/resp-plat-initiatives/app-review) for more information on the Meta App Review process.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"bda34270-71fa-4af1-ae13-eb5ce75a8f2a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"ffb3f5061e141eef2a4c02cd0e7247ed1833d22bf0317a1b3efc14773b42585a"}}


node_type: n8n-nodes-base.WooCommerce
name: WooCommerce
display_name: WooCommerce
description: Consume WooCommerce API
category: Other
code_hash: 32e6ebee88d5a70ca7263620ddae947e08465e8c9a0eede9550f542ea9ab9e60
documentation_url: https://docs.n8n.io/integrations/builtin/credentials/woocommerce
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 08:05:31
updated_at: 2025-06-08 08:05:31
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WooCommerce = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ProductDescription_1 = require("./ProductDescription");
  const OrderDescription_1 = require("./OrderDescription");
  const descriptions_1 = require("./descriptions");
  class WooCommerce {
      constructor() {
          this.description = {
              displayName: 'WooCommerce',
              name: 'wooCommerce',
              icon: 'file:wooCommerce.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume WooCommerce API',
              defaults: {
                  name: 'WooCommerce',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wooCommerceApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Order',
                              value: 'order',
                          },
                          {
                              name: 'Product',
                              value: 'product',
                          },
                      ],
                      default: 'product',
                  },
                  ...descriptions_1.customerOperations,
                  ...descriptions_1.customerFields,
                  ...ProductDescription_1.productOperations,
                  ...ProductDescription_1.productFields,
                  ...OrderDescription_1.orderOperations,
                  ...OrderDescription_1.orderFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCategories() {
                      const returnData = [];
                      const categories = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products/categories', {});
                      for (const category of categories) {
                          const categoryName = category.name;
                          const categoryId = category.id;
                          returnData.push({
                              name: categoryName,
                              value: categoryId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products/tags', {});
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.id;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'customer') {
                  if (operation === 'create') {
                      const body = {
                          email: this.getNodeParameter('email', i),
                      };
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (Object.keys(additionalFields).length) {
                          Object.assign(body, (0, GenericFunctions_1.adjustMetadata)(additionalFields));
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/customers', body);
                  }
                  else if (operation === 'delete') {
                      const customerId = this.getNodeParameter('customerId', i);
                      qs.force = true;
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', endpoint, {}, qs);
                  }
                  else if (operation === 'get') {
                      const customerId = this.getNodeParameter('customerId', i);
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', endpoint);
                  }
                  else if (operation === 'getAll') {
                      const filters = this.getNodeParameter('filters', i);
                      const returnAll = this.getNodeParameter('returnAll', i);
                      if (Object.keys(filters).length) {
                          Object.assign(qs, filters);
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/customers', {}, {});
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/customers', {}, qs);
                      }
                  }
                  else if (operation === 'update') {
                      const body = {};
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if (Object.keys(updateFields).length) {
                          Object.assign(body, (0, GenericFunctions_1.adjustMetadata)(updateFields));
                      }
                      const customerId = this.getNodeParameter('customerId', i);
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', endpoint, body);
                  }
              }
              else if (resource === 'product') {
                  if (operation === 'create') {
                      const name = this.getNodeParameter('name', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          name,
                      };
                      (0, GenericFunctions_1.setFields)(additionalFields, body);
                      if (additionalFields.categories) {
                          body.categories = additionalFields.categories.map((category) => ({
                              id: parseInt(category, 10),
                          }));
                      }
                      const images = this.getNodeParameter('imagesUi', i)
                          .imagesValues;
                      if (images) {
                          body.images = images;
                      }
                      const dimension = this.getNodeParameter('dimensionsUi', i)
                          .dimensionsValues;
                      if (dimension) {
                          body.dimensions = dimension;
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/products', body);
                  }
                  if (operation === 'update') {
                      const productId = this.getNodeParameter('productId', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      const body = {};
                      (0, GenericFunctions_1.setFields)(updateFields, body);
                      const images = this.getNodeParameter('imagesUi', i)
                          .imagesValues;
                      if (images) {
                          body.images = images;
                      }
                      const dimension = this.getNodeParameter('dimensionsUi', i)
                          .dimensionsValues;
                      if (dimension) {
                          body.dimensions = dimension;
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', `/products/${productId}`, body);
                  }
                  if (operation === 'get') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', `/products/${productId}`, {}, qs);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      if (options.after) {
                          qs.after = options.after;
                      }
                      if (options.before) {
                          qs.before = options.before;
                      }
                      if (options.category) {
                          qs.category = options.category;
                      }
                      if (options.context) {
                          qs.context = options.context;
                      }
                      if (options.featured) {
                          qs.featured = options.featured;
                      }
                      if (options.maxPrice) {
                          qs.max_price = options.maxPrice;
                      }
                      if (options.minPrice) {
                          qs.max_price = options.minPrice;
                      }
                      if (options.order) {
                          qs.order = options.order;
                      }
                      if (options.orderBy) {
                          qs.orderby = options.orderBy;
                      }
                      if (options.search) {
                          qs.search = options.search;
                      }
                      if (options.sku) {
                          qs.sku = options.sku;
                      }
                      if (options.slug) {
                          qs.slug = options.slug;
                      }
                      if (options.status) {
                          qs.status = options.status;
                      }
                      if (options.stockStatus) {
                          qs.stock_status = options.stockStatus;
                      }
                      if (options.tag) {
                          qs.tag = options.tag;
                      }
                      if (options.taxClass) {
                          qs.tax_class = options.taxClass;
                      }
                      if (options.type) {
                          qs.type = options.type;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products', {}, qs);
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/products', {}, qs);
                      }
                  }
                  if (operation === 'delete') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', `/products/${productId}`, {}, { force: true });
                  }
              }
              if (resource === 'order') {
                  if (operation === 'create') {
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {};
                      (0, GenericFunctions_1.setFields)(additionalFields, body);
                      const billing = this.getNodeParameter('billingUi', i)
                          .billingValues;
                      if (billing !== undefined) {
                          body.billing = billing;
                          (0, GenericFunctions_1.toSnakeCase)(billing);
                      }
                      const shipping = this.getNodeParameter('shippingUi', i)
                          .shippingValues;
                      if (shipping !== undefined) {
                          body.shipping = shipping;
                          (0, GenericFunctions_1.toSnakeCase)(shipping);
                      }
                      const couponLines = this.getNodeParameter('couponLinesUi', i)
                          .couponLinesValues;
                      if (couponLines) {
                          body.coupon_lines = couponLines;
                          (0, GenericFunctions_1.setMetadata)(couponLines);
                          (0, GenericFunctions_1.toSnakeCase)(couponLines);
                      }
                      const feeLines = this.getNodeParameter('feeLinesUi', i)
                          .feeLinesValues;
                      if (feeLines) {
                          body.fee_lines = feeLines;
                          (0, GenericFunctions_1.setMetadata)(feeLines);
                          (0, GenericFunctions_1.toSnakeCase)(feeLines);
                      }
                      const lineItems = this.getNodeParameter('lineItemsUi', i)
                          .lineItemsValues;
                      if (lineItems) {
                          body.line_items = lineItems;
                          (0, GenericFunctions_1.setMetadata)(lineItems);
                          (0, GenericFunctions_1.toSnakeCase)(lineItems);
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      const shippingLines = this.getNodeParameter('shippingLinesUi', i)
                          .shippingLinesValues;
                      if (shippingLines) {
                          body.shipping_lines = shippingLines;
                          (0, GenericFunctions_1.setMetadata)(shippingLines);
                          (0, GenericFunctions_1.toSnakeCase)(shippingLines);
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/orders', body);
                  }
                  if (operation === 'update') {
                      const orderId = this.getNodeParameter('orderId', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      const body = {};
                      if (updateFields.currency) {
                          body.currency = updateFields.currency;
                      }
                      if (updateFields.customerId) {
                          body.customer_id = parseInt(updateFields.customerId, 10);
                      }
                      if (updateFields.customerNote) {
                          body.customer_note = updateFields.customerNote;
                      }
                      if (updateFields.parentId) {
                          body.parent_id = parseInt(updateFields.parentId, 10);
                      }
                      if (updateFields.paymentMethodId) {
                          body.payment_method = updateFields.paymentMethodId;
                      }
                      if (updateFields.paymentMethodTitle) {
                          body.payment_method_title = updateFields.paymentMethodTitle;
                      }
                      if (updateFields.status) {
                          body.status = updateFields.status;
                      }
                      if (updateFields.transactionID) {
                          body.transaction_id = updateFields.transactionID;
                      }
                      const billing = this.getNodeParameter('billingUi', i)
                          .billingValues;
                      if (billing !== undefined) {
                          body.billing = billing;
                          (0, GenericFunctions_1.toSnakeCase)(billing);
                      }
                      const shipping = this.getNodeParameter('shippingUi', i)
                          .shippingValues;
                      if (shipping !== undefined) {
                          body.shipping = shipping;
                          (0, GenericFunctions_1.toSnakeCase)(shipping);
                      }
                      const couponLines = this.getNodeParameter('couponLinesUi', i)
                          .couponLinesValues;
                      if (couponLines) {
                          body.coupon_lines = couponLines;
                          (0, GenericFunctions_1.setMetadata)(couponLines);
                          (0, GenericFunctions_1.toSnakeCase)(couponLines);
                      }
                      const feeLines = this.getNodeParameter('feeLinesUi', i)
                          .feeLinesValues;
                      if (feeLines) {
                          body.fee_lines = feeLines;
                          (0, GenericFunctions_1.setMetadata)(feeLines);
                          (0, GenericFunctions_1.toSnakeCase)(feeLines);
                      }
                      const lineItems = this.getNodeParameter('lineItemsUi', i)
                          .lineItemsValues;
                      if (lineItems) {
                          body.line_items = lineItems;
                          (0, GenericFunctions_1.setMetadata)(lineItems);
                          (0, GenericFunctions_1.toSnakeCase)(lineItems);
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      const shippingLines = this.getNodeParameter('shippingLinesUi', i)
                          .shippingLinesValues;
                      if (shippingLines) {
                          body.shipping_lines = shippingLines;
                          (0, GenericFunctions_1.setMetadata)(shippingLines);
                          (0, GenericFunctions_1.toSnakeCase)(shippingLines);
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', `/orders/${orderId}`, body);
                  }
                  if (operation === 'get') {
                      const orderId = this.getNodeParameter('orderId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', `/orders/${orderId}`, {}, qs);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      if (options.after) {
                          qs.after = options.after;
                      }
                      if (options.before) {
                          qs.before = options.before;
                      }
                      if (options.category) {
                          qs.category = options.category;
                      }
                      if (options.customer) {
                          qs.customer = parseInt(options.customer, 10);
                      }
                      if (options.decimalPoints) {
                          qs.dp = options.decimalPoints;
                      }
                      if (options.product) {
                          qs.product = parseInt(options.product, 10);
                      }
                      if (options.order) {
                          qs.order = options.order;
                      }
                      if (options.orderBy) {
                          qs.orderby = options.orderBy;
                      }
                      if (options.search) {
                          qs.search = options.search;
                      }
                      if (options.status) {
                          qs.status = options.status;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/orders', {}, qs);
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/orders', {}, qs);
                      }
                  }
                  if (operation === 'delete') {
                      const orderId = this.getNodeParameter('orderId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', `/orders/${orderId}`, {}, { force: true });
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.WooCommerce = WooCommerce;
  //# sourceMappingURL=WooCommerce.node.js.map

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

  # WooCommerce credentials

  You can use these credentials to authenticate the following nodes:

  - [WooCommerce](/integrations/builtin/app-nodes/n8n-nodes-base.woocommerce.md)
  - [WooCommerce Trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.woocommercetrigger.md)

  ## Prerequisites

  - Install the [WooCommerce](https://woocommerce.com/){:target=_blank .external-link} plugin on your WordPress website.
  - In WordPress, go to **Settings > Permalinks** and set your WordPress permalinks to use something other than **Plain**.

  ## Supported authentication methods

  - API key

  ## Related resources

  Refer to [WooCommerce's REST API documentation](https://developer.woocommerce.com/docs/getting-started-with-the-woocommerce-rest-api/){:target=_blank .external-link} for more information about the service.

  ## Using API key

  To configure this credential, you'll need:

  - A **Consumer Key**: Created when you generate an API key.
  - A **Consumer Secret**: Created when you generate an API key.
  - A **WooCommerce URL**

  To generate an API key and set up your credential:

  1. Go to **WooCommerce > Settings > Advanced > Rest API > Add key**.
  2. Select **Read/Write** from the **Permissions** dropdown.
  3. Copy the generated **Consumer Key** and **Consumer Secret** and enter them into your n8n credentials.
  4. Enter your WordPress site URL as the **WooCommerce URL**.
  5. By default, n8n passes your credential details in the Authorization header. If you need to pass them as query string parameters instead, turn on **Include Credentials in Query**.

  Refer to [Generate Keys](https://developer.woocommerce.com/docs/getting-started-with-the-woocommerce-rest-api/#3-generate-keys){:target=_blank .external-link} for more information.

  ## Resolve "Consumer key is missing" error

  When you try to connect your credentials, you may receive an error like this: `Consumer key is missing`.

  This occurs when the server can't parse the Authorization header details when authenticating over SSL.

  To resolve it, turn on the **Include Credentials in Query** toggle to pass the consumer key/secret as query string parameters instead and retry the credential.

example_workflow:
  {"nodes":[{"parameters":{},"type":"n8n-nodes-base.node","typeVersion":1,"position":[220,120],"id":"5c2a2373-e2c4-4712-9c5a-64f617f7d42a","name":"Node"}],"connections":{"Node":{"main":[[]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"d152794379ae218a10ea417e70220e2f4a04c8246eca75c46873a3dd689bfbe0"}}


