# nodes

node_type: n8n-nodes-base.Copper
name: Copper
display_name: Copper
description: Consume the Copper API
category: transform
icon: file:copper.svg
code_hash: 58626d8463fe950ea43cdbf38c7f1922aa76e79c36751703680e2885527e52b9
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Copper
documentation_title: Copper node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"copper","description":"Templates for copper"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:44
updated_at: 2025-06-08 18:33:44
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Copper = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Copper {
      constructor() {
          this.description = {
              displayName: 'Copper',
              name: 'copper',
              icon: 'file:copper.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Copper API',
              defaults: {
                  name: 'Copper',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'copperApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                          },
                          {
                              name: 'Customer Source',
                              value: 'customerSource',
                          },
                          {
                              name: 'Lead',
                              value: 'lead',
                          },
                          {
                              name: 'Opportunity',
                              value: 'opportunity',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                          },
                          {
                              name: 'Project',
                              value: 'project',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'company',
                  },
                  ...descriptions_1.companyOperations,
                  ...descriptions_1.companyFields,
                  ...descriptions_1.customerSourceOperations,
                  ...descriptions_1.customerSourceFields,
                  ...descriptions_1.leadOperations,
                  ...descriptions_1.leadFields,
                  ...descriptions_1.opportunityOperations,
                  ...descriptions_1.opportunityFields,
                  ...descriptions_1.personOperations,
                  ...descriptions_1.personFields,
                  ...descriptions_1.projectOperations,
                  ...descriptions_1.projectFields,
                  ...descriptions_1.taskOperations,
                  ...descriptions_1.taskFields,
                  ...descriptions_1.userOperations,
                  ...descriptions_1.userFields,
              ],
          };
      }
      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 === 'company') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustCompanyFields)(additionalFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/companies', body);
                      }
                      else if (operation === 'delete') {
                          const companyId = this.getNodeParameter('companyId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/companies/${companyId}`);
                      }
                      else if (operation === 'get') {
                          const companyId = this.getNodeParameter('companyId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/companies/${companyId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, filterFields);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/companies/search', body);
                      }
                      else if (operation === 'update') {
                          const companyId = this.getNodeParameter('companyId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustCompanyFields)(updateFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/companies/${companyId}`, body);
                      }
                  }
                  else if (resource === 'customerSource') {
                      if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.handleListing.call(this, 'GET', '/customer_sources');
                      }
                  }
                  else if (resource === 'lead') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustLeadFields)(additionalFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/leads', body);
                      }
                      else if (operation === 'delete') {
                          const leadId = this.getNodeParameter('leadId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/leads/${leadId}`);
                      }
                      else if (operation === 'get') {
                          const leadId = this.getNodeParameter('leadId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/leads/${leadId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, filterFields);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/leads/search', body);
                      }
                      else if (operation === 'update') {
                          const leadId = this.getNodeParameter('leadId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustLeadFields)(updateFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/leads/${leadId}`, body);
                      }
                  }
                  else if (resource === 'opportunity') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                              customer_source_id: this.getNodeParameter('customerSourceId', i),
                              primary_contact_id: this.getNodeParameter('primaryContactId', i),
                          };
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/opportunities', body);
                      }
                      else if (operation === 'delete') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/opportunities/${opportunityId}`);
                      }
                      else if (operation === 'get') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/opportunities/${opportunityId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, filterFields);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/opportunities/search', body);
                      }
                      else if (operation === 'update') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/opportunities/${opportunityId}`, body);
                      }
                  }
                  else if (resource === 'person') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustPersonFields)(additionalFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/people', body);
                      }
                      else if (operation === 'delete') {
                          const personId = this.getNodeParameter('personId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/people/${personId}`);
                      }
                      else if (operation === 'get') {
                          const personId = this.getNodeParameter('personId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/people/${personId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, filterFields);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/people/search', body);
                      }
                      else if (operation === 'update') {
                          const personId = this.getNodeParameter('personId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustPersonFields)(updateFields));
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/people/${personId}`, body);
                      }
                  }
                  else if (resource === 'project') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/projects', body);
                      }
                      else if (operation === 'delete') {
                          const projectId = this.getNodeParameter('projectId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/projects/${projectId}`);
                      }
                      else if (operation === 'get') {
                          const projectId = this.getNodeParameter('projectId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/projects/${projectId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, filterFields);
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/projects/search', body);
                      }
                      else if (operation === 'update') {
                          const projectId = this.getNodeParameter('projectId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/projects/${projectId}`, body);
                      }
                  }
                  else if (resource === 'task') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'POST', '/tasks', body);
                      }
                      else if (operation === 'delete') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
                      }
                      else if (operation === 'get') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'GET', `/tasks/${taskId}`);
                      }
                      else if (operation === 'getAll') {
                          const body = {};
                          const filterFields = this.getNodeParameter('filterFields', i);
                          if (Object.keys(filterFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustTaskFields)(filterFields));
                          }
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/tasks/search', body);
                      }
                      else if (operation === 'update') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.copperApiRequest.call(this, 'PUT', `/tasks/${taskId}`, body);
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.handleListing.call(this, 'POST', '/users/search');
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.toString(), json: {} });
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Copper = Copper;
  //# sourceMappingURL=Copper.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CopperApi = void 0;
  class CopperApi {
      constructor() {
          this.name = 'copperApi';
          this.displayName = 'Copper API';
          this.documentationUrl = 'copper';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  required: true,
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
          ];
      }
  }
  exports.CopperApi = CopperApi;
  //# sourceMappingURL=CopperApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CopperApi = void 0;
  class CopperApi {
      constructor() {
          this.name = 'copperApi';
          this.displayName = 'Copper API';
          this.documentationUrl = 'copper';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  required: true,
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
          ];
      }
  }
  exports.CopperApi = CopperApi;
  //# sourceMappingURL=CopperApi.credentials.js.map

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

  # Copper node

  Use the Copper node to automate work in Copper, and integrate Copper with other applications. n8n has built-in support for a wide range of Copper features, including getting, updating, deleting, and creating companies, customer sources, leads, projects and tasks.

  On this page, you'll find a list of operations the Copper node supports and links to more resources.

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

  ## Operations

  * Company
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Customer Source
      * Get All
  * Lead
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Opportunity
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Person
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Project
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Task
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * User
      * Get All

  ## Templates and examples

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

example_workflow:
  {"name":"Copper Example Workflow","nodes":[{"parameters":{},"id":"hvu79zd4is83b1r8jffhqu","name":"Copper","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Cron
name: Cron
display_name: Cron
description: Triggers the workflow at a specific time
category: Other
icon: fa:clock
code_hash: 1007935f771c6c047d905b9d18670c642e442bffb3587f1b054ebd817dc1604c
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Cron = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const cron_1 = require("cron");
  class Cron {
      constructor() {
          this.description = {
              displayName: 'Cron',
              name: 'cron',
              icon: 'fa:clock',
              group: ['trigger', 'schedule'],
              version: 1,
              hidden: true,
              description: 'Triggers the workflow at a specific time',
              eventTriggerDescription: '',
              activationMessage: 'Your cron trigger will now trigger executions on the schedule you have defined.',
              defaults: {
                  name: 'Cron',
                  color: '#29a568',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'This workflow will run on the schedule you define here once you <a data-key="activate">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking ‘execute workflow’',
                      name: 'notice',
                      type: 'notice',
                      default: '',
                  },
                  {
                      displayName: 'Trigger Times',
                      name: 'triggerTimes',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                          multipleValueButtonText: 'Add Time',
                      },
                      default: {},
                      description: 'Triggers for the workflow',
                      placeholder: 'Add Cron Time',
                      options: n8n_workflow_1.NodeHelpers.cronNodeOptions,
                  },
              ],
          };
      }
      async trigger() {
          const triggerTimes = this.getNodeParameter('triggerTimes');
          const cronTimes = (triggerTimes.item || []).map(n8n_workflow_1.toCronExpression);
          const executeTrigger = () => {
              this.emit([this.helpers.returnJsonArray([{}])]);
          };
          const timezone = this.getTimezone();
          const cronJobs = cronTimes.map((cronTime) => new cron_1.CronJob(cronTime, executeTrigger, undefined, true, timezone));
          async function closeFunction() {
              for (const cronJob of cronJobs) {
                  cronJob.stop();
              }
          }
          async function manualTriggerFunction() {
              executeTrigger();
          }
          return {
              closeFunction,
              manualTriggerFunction,
          };
      }
  }
  exports.Cron = Cron;
  //# sourceMappingURL=Cron.node.js.map

example_workflow:
  {"name":"Cron Example Workflow","nodes":[{"parameters":{},"id":"y2j36axk3whaqas73wrgh6","name":"Cron","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Crypto
name: Crypto
display_name: Crypto
description: Provide cryptographic utilities
category: transform
icon: fa:key
code_hash: 7a50ea2285a5de3700af151f5206c08e3d41cc364c489065753c65892983c9f9
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Crypto
documentation_title: Crypto
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"crypto","description":"Templates for crypto"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
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.Crypto = void 0;
  const set_1 = __importDefault(require("lodash/set"));
  const n8n_workflow_1 = require("n8n-workflow");
  const crypto_1 = require("crypto");
  const stream_1 = __importDefault(require("stream"));
  const util_1 = require("util");
  const uuid_1 = require("uuid");
  const pipeline = (0, util_1.promisify)(stream_1.default.pipeline);
  const unsupportedAlgorithms = [
      'RSA-MD4',
      'RSA-MDC2',
      'md4',
      'md4WithRSAEncryption',
      'mdc2',
      'mdc2WithRSA',
  ];
  const supportedAlgorithms = (0, crypto_1.getHashes)()
      .filter((algorithm) => !unsupportedAlgorithms.includes(algorithm))
      .map((algorithm) => ({ name: algorithm, value: algorithm }));
  class Crypto {
      constructor() {
          this.description = {
              displayName: 'Crypto',
              name: 'crypto',
              icon: 'fa:key',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["action"]}}',
              description: 'Provide cryptographic utilities',
              defaults: {
                  name: 'Crypto',
                  color: '#408000',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Action',
                      name: 'action',
                      type: 'options',
                      options: [
                          {
                              name: 'Generate',
                              description: 'Generate random string',
                              value: 'generate',
                              action: 'Generate random string',
                          },
                          {
                              name: 'Hash',
                              description: 'Hash a text or file in a specified format',
                              value: 'hash',
                              action: 'Hash a text or file in a specified format',
                          },
                          {
                              name: 'Hmac',
                              description: 'Hmac a text or file in a specified format',
                              value: 'hmac',
                              action: 'HMAC a text or file in a specified format',
                          },
                          {
                              name: 'Sign',
                              description: 'Sign a string using a private key',
                              value: 'sign',
                              action: 'Sign a string using a private key',
                          },
                      ],
                      default: 'hash',
                  },
                  {
                      displayName: 'Type',
                      name: 'type',
                      displayOptions: {
                          show: {
                              action: ['hash'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'MD5',
                              value: 'MD5',
                          },
                          {
                              name: 'SHA256',
                              value: 'SHA256',
                          },
                          {
                              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',
                          },
                      ],
                      default: 'MD5',
                      description: 'The hash type to use',
                      required: true,
                  },
                  {
                      displayName: 'Binary Data',
                      name: 'binaryData',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              action: ['hash', 'hmac'],
                          },
                      },
                      description: 'Whether the data to hashed should be taken from binary field',
                  },
                  {
                      displayName: 'Binary Property Name',
                      name: 'binaryPropertyName',
                      displayOptions: {
                          show: {
                              action: ['hash', 'hmac'],
                              binaryData: [true],
                          },
                      },
                      type: 'string',
                      default: 'data',
                      description: 'Name of the binary property which contains the input data',
                      required: true,
                  },
                  {
                      displayName: 'Value',
                      name: 'value',
                      displayOptions: {
                          show: {
                              action: ['hash'],
                              binaryData: [false],
                          },
                      },
                      type: 'string',
                      default: '',
                      description: 'The value that should be hashed',
                      required: true,
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              action: ['hash'],
                          },
                      },
                      description: 'Name of the property to which to write the hash',
                  },
                  {
                      displayName: 'Encoding',
                      name: 'encoding',
                      displayOptions: {
                          show: {
                              action: ['hash'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'BASE64',
                              value: 'base64',
                          },
                          {
                              name: 'HEX',
                              value: 'hex',
                          },
                      ],
                      default: 'hex',
                      required: true,
                  },
                  {
                      displayName: 'Type',
                      name: 'type',
                      displayOptions: {
                          show: {
                              action: ['hmac'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'MD5',
                              value: 'MD5',
                          },
                          {
                              name: 'SHA256',
                              value: 'SHA256',
                          },
                          {
                              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',
                          },
                      ],
                      default: 'MD5',
                      description: 'The hash type to use',
                      required: true,
                  },
                  {
                      displayName: 'Value',
                      name: 'value',
                      displayOptions: {
                          show: {
                              action: ['hmac'],
                              binaryData: [false],
                          },
                      },
                      type: 'string',
                      default: '',
                      description: 'The value of which the hmac should be created',
                      required: true,
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              action: ['hmac'],
                          },
                      },
                      description: 'Name of the property to which to write the hmac',
                  },
                  {
                      displayName: 'Secret',
                      name: 'secret',
                      displayOptions: {
                          show: {
                              action: ['hmac'],
                          },
                      },
                      type: 'string',
                      typeOptions: { password: true },
                      default: '',
                      required: true,
                  },
                  {
                      displayName: 'Encoding',
                      name: 'encoding',
                      displayOptions: {
                          show: {
                              action: ['hmac'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'BASE64',
                              value: 'base64',
                          },
                          {
                              name: 'HEX',
                              value: 'hex',
                          },
                      ],
                      default: 'hex',
                      required: true,
                  },
                  {
                      displayName: 'Value',
                      name: 'value',
                      displayOptions: {
                          show: {
                              action: ['sign'],
                              binaryData: [false],
                          },
                      },
                      type: 'string',
                      default: '',
                      description: 'The value that should be signed',
                      required: true,
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              action: ['sign'],
                          },
                      },
                      description: 'Name of the property to which to write the signed value',
                  },
                  {
                      displayName: 'Algorithm Name or ID',
                      name: 'algorithm',
                      displayOptions: {
                          show: {
                              action: ['sign'],
                          },
                      },
                      type: 'options',
                      description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
                      options: supportedAlgorithms,
                      default: '',
                      required: true,
                  },
                  {
                      displayName: 'Encoding',
                      name: 'encoding',
                      displayOptions: {
                          show: {
                              action: ['sign'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'BASE64',
                              value: 'base64',
                          },
                          {
                              name: 'HEX',
                              value: 'hex',
                          },
                      ],
                      default: 'hex',
                      required: true,
                  },
                  {
                      displayName: 'Private Key',
                      name: 'privateKey',
                      displayOptions: {
                          show: {
                              action: ['sign'],
                          },
                      },
                      type: 'string',
                      description: 'Private key to use when signing the string',
                      default: '',
                      required: true,
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              action: ['generate'],
                          },
                      },
                      description: 'Name of the property to which to write the random string',
                  },
                  {
                      displayName: 'Type',
                      name: 'encodingType',
                      displayOptions: {
                          show: {
                              action: ['generate'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'ASCII',
                              value: 'ascii',
                          },
                          {
                              name: 'BASE64',
                              value: 'base64',
                          },
                          {
                              name: 'HEX',
                              value: 'hex',
                          },
                          {
                              name: 'UUID',
                              value: 'uuid',
                          },
                      ],
                      default: 'uuid',
                      description: 'Encoding that will be used to generate string',
                      required: true,
                  },
                  {
                      displayName: 'Length',
                      name: 'stringLength',
                      type: 'number',
                      default: 32,
                      description: 'Length of the generated string',
                      displayOptions: {
                          show: {
                              action: ['generate'],
                              encodingType: ['ascii', 'base64', 'hex'],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const action = this.getNodeParameter('action', 0);
          let item;
          for (let i = 0; i < length; i++) {
              try {
                  item = items[i];
                  const dataPropertyName = this.getNodeParameter('dataPropertyName', i);
                  const value = this.getNodeParameter('value', i, '');
                  let newValue;
                  let binaryProcessed = false;
                  if (action === 'generate') {
                      const encodingType = this.getNodeParameter('encodingType', i);
                      if (encodingType === 'uuid') {
                          newValue = (0, uuid_1.v4)();
                      }
                      else {
                          const stringLength = this.getNodeParameter('stringLength', i);
                          if (encodingType === 'base64') {
                              newValue = (0, crypto_1.randomBytes)(stringLength)
                                  .toString(encodingType)
                                  .replace(/\W/g, '')
                                  .slice(0, stringLength);
                          }
                          else {
                              newValue = (0, crypto_1.randomBytes)(stringLength)
                                  .toString(encodingType)
                                  .slice(0, stringLength);
                          }
                      }
                  }
                  if (action === 'hash' || action === 'hmac') {
                      const type = this.getNodeParameter('type', i);
                      const encoding = this.getNodeParameter('encoding', i);
                      const hashOrHmac = action === 'hash'
                          ? (0, crypto_1.createHash)(type)
                          : (0, crypto_1.createHmac)(type, this.getNodeParameter('secret', i));
                      if (this.getNodeParameter('binaryData', i)) {
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          if (binaryData.id) {
                              const binaryStream = await this.helpers.getBinaryStream(binaryData.id);
                              hashOrHmac.setEncoding(encoding);
                              await pipeline(binaryStream, hashOrHmac);
                              newValue = hashOrHmac.read();
                          }
                          else {
                              newValue = hashOrHmac
                                  .update(Buffer.from(binaryData.data, n8n_workflow_1.BINARY_ENCODING))
                                  .digest(encoding);
                          }
                          binaryProcessed = true;
                      }
                      else {
                          newValue = hashOrHmac.update(value).digest(encoding);
                      }
                  }
                  if (action === 'sign') {
                      const algorithm = this.getNodeParameter('algorithm', i);
                      const encoding = this.getNodeParameter('encoding', i);
                      const privateKey = this.getNodeParameter('privateKey', i);
                      const sign = (0, crypto_1.createSign)(algorithm);
                      sign.write(value);
                      sign.end();
                      newValue = sign.sign(privateKey, encoding);
                  }
                  let newItem;
                  if (dataPropertyName.includes('.')) {
                      newItem = {
                          json: (0, n8n_workflow_1.deepCopy)(item.json),
                          pairedItem: {
                              item: i,
                          },
                      };
                  }
                  else {
                      newItem = {
                          json: { ...item.json },
                          pairedItem: {
                              item: i,
                          },
                      };
                  }
                  if (item.binary !== undefined && !binaryProcessed) {
                      newItem.binary = item.binary;
                  }
                  (0, set_1.default)(newItem, `json.${dataPropertyName}`, newValue);
                  returnData.push(newItem);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: i,
                          },
                      });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Crypto = Crypto;
  //# sourceMappingURL=Crypto.node.js.map

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

  # Crypto

  Use the Crypto node to encrypt data in workflows.

  ## Actions

  * [**Generate** a random string](#generate-parameters)
  * [**Hash** a text or file](#hash-parameters) in a specified format
  * [**Hmac** a text or file](#hmac-parameters) in a specified format
  * [**Sign** a string](#sign-parameters) using a private key

  ## Node parameters

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

  Node parameters depend on the action you select.

  ### Generate parameters

  * **Property Name**: Enter the name of the property to write the random string to.
  * **Type**: Select the encoding type to use to generate the string. Choose from:
  	* **ASCII**
  	* **BASE64**
  	* **HEX**
  	* **UUID**

  ### Hash parameters

  * **Type**: Select the hash type to use. Choose from:
  	* **MD5**
  	* **SHA256**
  	* **SHA3-256**
  	* **SHA3-384**
  	* **SHA3-512**
  	* **SHA385**
  	* **SHA512**
  * **Binary File**: Turn this parameter on if the data you want to hash is from a binary file.
  	* **Value**: If you turn off **Binary File**, enter the value you want to hash.
  	* **Binary Property Name**: If you turn on **Binary File**, enter the name of the binary property that contains the data you want to hash.
  * **Property Name**: Enter the name of the property you want to write the hash to.
  * **Encoding**: Select the encoding type to use. Choose from:
  	* **BASE64**
  	* **HEX**

  ### Hmac parameters

  * **Binary File**: Turn this parameter on if the data you want to encrypt is from a binary file.
  	* **Value**: If you turn off **Binary File**, enter the value you want to encrypt.
  	* **Binary Property Name**: If you turn on **Binary File**, enter the name of the binary property that contains the data you want to encrypt.
  * **Type**: Select the encryption type to use. Choose from:
  	* **MD5**
  	* **SHA256**
  	* **SHA3-256**
  	* **SHA3-384**
  	* **SHA3-512**
  	* **SHA385**
  	* **SHA512**
  * **Property Name**: Enter the name of the property you want to write the hash to.
  * **Secret**: Enter the secret or secret key used for decoding.
  * **Encoding**: Select the encoding type to use. Choose from:
  	* **BASE64**
  	* **HEX**

  ### Sign parameters

  * **Value**: Enter the value you want to sign.
  * **Property Name**: Enter the name of the property you want to write the signed value to.
  * **Algorithm Name or ID**: Choose an algorithm name from the list or specify an ID using an [expression](/code/expressions.md).
  * **Encoding**: Select the encoding type to use. Choose from:
  	* **BASE64**
  	* **HEX**
  * **Private Key**: Enter a private key to use when signing the string.

  ## Templates and examples

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

example_workflow:
  {"name":"Crypto Example Workflow","nodes":[{"parameters":{},"id":"q824d04cfniyxeccj7kt8","name":"Crypto","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.CrateDb
name: CrateDb
display_name: CrateDB
description: Add and update data in CrateDB
category: input
icon: file:cratedb.png
code_hash: 704a03f54931b635bbfaf8d0beb88dca10188c162ebc6170338ec17dfbecd649
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.CrateDb
documentation_title: CrateDB node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"cratedb","description":"Templates for cratedb"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
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.CrateDb = 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 CrateDb {
      constructor() {
          this.description = {
              displayName: 'CrateDB',
              name: 'crateDb',
              icon: 'file:cratedb.png',
              group: ['input'],
              version: 1,
              description: 'Add and update data in CrateDB',
              defaults: {
                  name: 'CrateDB',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'crateDb',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Execute Query',
                              value: 'executeQuery',
                              description: 'Execute an SQL query',
                              action: 'Execute a SQL query',
                          },
                          {
                              name: 'Insert',
                              value: 'insert',
                              description: 'Insert rows in database',
                              action: 'Insert rows in database',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update rows in database',
                              action: 'Update rows in database',
                          },
                      ],
                      default: 'insert',
                  },
                  {
                      displayName: 'Query',
                      name: 'query',
                      type: 'string',
                      noDataExpression: true,
                      typeOptions: {
                          editor: 'sqlEditor',
                          rows: 5,
                          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: 'doc',
                      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: 'doc',
                      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: 'Comma-separated list of the properties 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.',
                                  },
                              ],
                              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.cratedb/">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() {
          var _a;
          const credentials = await this.getCredentials('crateDb');
          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 additionalFields = this.getNodeParameter('additionalFields', 0);
              const mode = (_a = additionalFields.mode) !== null && _a !== void 0 ? _a : 'multiple';
              if (mode === 'independently') {
                  const updateItems = await (0, genericFunctions_1.pgUpdate)(this.getNodeParameter, pgp, db, items, this.continueOnFail());
                  returnItems = this.helpers.returnJsonArray(updateItems);
              }
              else if (mode === 'multiple') {
                  const table = this.getNodeParameter('table', 0);
                  const schema = this.getNodeParameter('schema', 0);
                  const updateKeys = this.getNodeParameter('updateKey', 0)
                      .split(',')
                      .map((column) => column.trim());
                  const columns = this.getNodeParameter('columns', 0)
                      .split(',')
                      .map((column) => column.trim());
                  const queryColumns = columns.slice();
                  updateKeys.forEach((updateKey) => {
                      if (!queryColumns.includes(updateKey)) {
                          columns.unshift(updateKey);
                          queryColumns.unshift('?' + updateKey);
                      }
                  });
                  const cs = new pgp.helpers.ColumnSet(queryColumns, { table: { table, schema } });
                  const where = ' WHERE ' +
                      updateKeys
                          .map((updateKey) => pgp.as.name(updateKey) + ' = ${' + updateKey + '}')
                          .join(' AND ');
                  const returning = (0, genericFunctions_1.generateReturning)(pgp, this.getNodeParameter('returnFields', 0));
                  const queries = [];
                  for (let i = 0; i < items.length; i++) {
                      const itemCopy = (0, genericFunctions_1.getItemCopy)(items[i], columns);
                      queries.push(pgp.helpers.update(itemCopy, cs) +
                          pgp.as.format(where, itemCopy) +
                          returning);
                  }
                  await db.multi(pgp.helpers.concat(queries));
                  returnItems = this.helpers.returnJsonArray((0, genericFunctions_1.getItemsCopy)(items, columns));
              }
          }
          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.CrateDb = CrateDb;
  //# sourceMappingURL=CrateDb.node.js.map

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

  # CrateDB node

  Use the CrateDB node to automate work in CrateDB, and integrate CrateDB with other applications. n8n has built-in support for a wide range of CrateDB features, including executing, inserting, and updating rows in the database.

  On this page, you'll find a list of operations the CrateDB node supports and links to more resources.

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

  ## Operations

  * Execute an SQL query
  * Insert rows in database
  * Update rows in database

  ## Templates and examples

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

  ## Node reference

  ### Specify a column's data type

  To specify a column's data type, append the column name with `:type`, where `type` is the data type you want for the column. For example, if you want to specify the type `int` for the column **id** and type `text` for the column **name**, you can use the following snippet in the **Columns** field: `id:int,name:text`.

example_workflow:
  {"name":"CrateDB Example Workflow","nodes":[{"parameters":{},"id":"ruzy3uvi6k9bca6esyzlos","name":"CrateDB","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Cortex
name: Cortex
display_name: Cortex
description: Apply the Cortex analyzer/responder on the given entity
category: transform
icon: file:cortex.svg
code_hash: 8f389c8f2baaa7c8b3f6baa6e6f1207c28c8d3f75ad14339b2f345e321864b98
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Cortex
documentation_title: Cortex node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"cortex","description":"Templates for cortex"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
source_code:
  "use strict";
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
      if (k2 === undefined) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() { return m[k]; } };
      }
      Object.defineProperty(o, k2, desc);
  }) : (function(o, m, k, k2) {
      if (k2 === undefined) k2 = k;
      o[k2] = m[k];
  }));
  var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
  }) : function(o, v) {
      o["default"] = v;
  });
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
      __setModuleDefault(result, mod);
      return result;
  };
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Cortex = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const AnalyzerDescriptions_1 = require("./AnalyzerDescriptions");
  const ResponderDescription_1 = require("./ResponderDescription");
  const JobDescription_1 = require("./JobDescription");
  const upperFirst_1 = __importDefault(require("lodash/upperFirst"));
  const crypto_1 = require("crypto");
  const changeCase = __importStar(require("change-case"));
  class Cortex {
      constructor() {
          this.description = {
              displayName: 'Cortex',
              name: 'cortex',
              icon: 'file:cortex.svg',
              group: ['transform'],
              subtitle: '={{$parameter["operation"]+ ": " + $parameter["resource"]}}',
              version: 1,
              description: 'Apply the Cortex analyzer/responder on the given entity',
              defaults: {
                  name: 'Cortex',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'cortexApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Analyzer',
                              value: 'analyzer',
                          },
                          {
                              name: 'Job',
                              value: 'job',
                          },
                          {
                              name: 'Responder',
                              value: 'responder',
                          },
                      ],
                      default: 'analyzer',
                      description: 'Choose a resource',
                      required: true,
                  },
                  ...AnalyzerDescriptions_1.analyzersOperations,
                  ...AnalyzerDescriptions_1.analyzerFields,
                  ...ResponderDescription_1.respondersOperations,
                  ...ResponderDescription_1.responderFields,
                  ...JobDescription_1.jobOperations,
                  ...JobDescription_1.jobFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async loadActiveAnalyzers() {
                      const requestResult = await GenericFunctions_1.cortexApiRequest.call(this, 'POST', '/analyzer/_search?range=all');
                      const returnData = [];
                      for (const analyzer of requestResult) {
                          returnData.push({
                              name: analyzer.name,
                              value: `${analyzer.id}::${analyzer.name}`,
                              description: analyzer.description,
                          });
                      }
                      return returnData;
                  },
                  async loadActiveResponders() {
                      const requestResult = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', '/responder');
                      const returnData = [];
                      for (const responder of requestResult) {
                          returnData.push({
                              name: responder.name,
                              value: `${responder.id}::${responder.name}`,
                              description: responder.description,
                          });
                      }
                      return returnData;
                  },
                  async loadObservableOptions() {
                      const selectedAnalyzerId = this.getNodeParameter('analyzer').split('::')[0];
                      const requestResult = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', `/analyzer/${selectedAnalyzerId}`);
                      const returnData = [];
                      for (const dataType of requestResult.dataTypeList) {
                          returnData.push({
                              name: (0, upperFirst_1.default)(dataType),
                              value: dataType,
                          });
                      }
                      return returnData;
                  },
                  async loadDataTypeOptions() {
                      const selectedResponderId = this.getNodeParameter('responder').split('::')[0];
                      const requestResult = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', `/responder/${selectedResponderId}`);
                      const returnData = [];
                      for (const dataType of requestResult.dataTypeList) {
                          returnData.push({
                              value: dataType.split(':')[1],
                              name: changeCase.capitalCase(dataType.split(':')[1]),
                          });
                      }
                      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++) {
              try {
                  if (resource === 'analyzer') {
                      if (operation === 'execute') {
                          let force = false;
                          const analyzer = this.getNodeParameter('analyzer', i);
                          const observableType = this.getNodeParameter('observableType', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const tlp = this.getNodeParameter('tlp', i);
                          const body = {
                              dataType: observableType,
                              tlp,
                          };
                          if (additionalFields.force === true) {
                              force = true;
                          }
                          if (observableType === 'file') {
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                              const fileBufferData = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                              const options = {
                                  formData: {
                                      data: {
                                          value: fileBufferData,
                                          options: {
                                              contentType: binaryData.mimeType,
                                              filename: binaryData.fileName,
                                          },
                                      },
                                      _json: JSON.stringify({
                                          dataType: observableType,
                                          tlp,
                                      }),
                                  },
                              };
                              responseData = (await GenericFunctions_1.cortexApiRequest.call(this, 'POST', `/analyzer/${analyzer.split('::')[0]}/run`, {}, { force }, '', options));
                              continue;
                          }
                          else {
                              const observableValue = this.getNodeParameter('observableValue', i);
                              body.data = observableValue;
                              responseData = (await GenericFunctions_1.cortexApiRequest.call(this, 'POST', `/analyzer/${analyzer.split('::')[0]}/run`, body, { force }));
                          }
                          if (additionalFields.timeout) {
                              responseData = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', `/job/${responseData.id}/waitreport`, {}, { atMost: `${additionalFields.timeout}second` });
                          }
                      }
                  }
                  if (resource === 'job') {
                      if (operation === 'get') {
                          const jobId = this.getNodeParameter('jobId', i);
                          responseData = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', `/job/${jobId}`);
                      }
                      if (operation === 'report') {
                          const jobId = this.getNodeParameter('jobId', i);
                          responseData = await GenericFunctions_1.cortexApiRequest.call(this, 'GET', `/job/${jobId}/report`);
                      }
                  }
                  if (resource === 'responder') {
                      if (operation === 'execute') {
                          const responderId = this.getNodeParameter('responder', i).split('::')[0];
                          const entityType = this.getNodeParameter('entityType', i);
                          const isJSON = this.getNodeParameter('jsonObject', i);
                          let body;
                          if (isJSON) {
                              const entityJson = JSON.parse(this.getNodeParameter('objectData', i));
                              body = {
                                  responderId,
                                  label: (0, GenericFunctions_1.getEntityLabel)(entityJson),
                                  dataType: `thehive:${entityType}`,
                                  data: entityJson,
                                  tlp: entityJson.tlp || 2,
                                  pap: entityJson.pap || 2,
                                  message: entityJson.message || '',
                                  parameters: [],
                              };
                          }
                          else {
                              const values = this.getNodeParameter('parameters', i)
                                  .values;
                              body = {
                                  responderId,
                                  dataType: `thehive:${entityType}`,
                                  data: {
                                      _type: entityType,
                                      ...(0, GenericFunctions_1.prepareParameters)(values),
                                  },
                              };
                              if (entityType === 'alert') {
                                  const artifacts = body.data.artifacts;
                                  if (artifacts) {
                                      const artifactValues = artifacts.artifactValues;
                                      if (artifactValues) {
                                          const artifactData = [];
                                          for (const artifactvalue of artifactValues) {
                                              const element = {};
                                              element.message = artifactvalue.message;
                                              element.tags = (0, GenericFunctions_1.splitTags)(artifactvalue.tags);
                                              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.data.artifacts = artifactData;
                                      }
                                  }
                              }
                              if (entityType === 'case_artifact') {
                                  if (body.data.dataType === 'file') {
                                      const binaryPropertyName = body.data
                                          .binaryPropertyName;
                                      const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                      const fileBufferData = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                                      const sha256 = (0, crypto_1.createHash)('sha256').update(fileBufferData).digest('hex');
                                      body.data.attachment = {
                                          name: binaryData.fileName,
                                          hashes: [
                                              sha256,
                                              (0, crypto_1.createHash)('sha1').update(fileBufferData).digest('hex'),
                                              (0, crypto_1.createHash)('md5').update(fileBufferData).digest('hex'),
                                          ],
                                          size: fileBufferData.byteLength,
                                          contentType: binaryData.mimeType,
                                          id: sha256,
                                      };
                                      delete body.data.binaryPropertyName;
                                  }
                              }
                              body = {
                                  label: (0, GenericFunctions_1.getEntityLabel)(body.data),
                                  ...body,
                              };
                          }
                          responseData = (await GenericFunctions_1.cortexApiRequest.call(this, 'POST', `/responder/${responderId}/run`, body));
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Cortex = Cortex;
  //# sourceMappingURL=Cortex.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CortexApi = void 0;
  class CortexApi {
      constructor() {
          this.name = 'cortexApi';
          this.displayName = 'Cortex API';
          this.documentationUrl = 'cortex';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'cortexApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Cortex Instance',
                  name: 'host',
                  type: 'string',
                  description: 'The URL of the Cortex instance',
                  default: '',
                  placeholder: 'https://localhost:9001',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.cortexApiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.host}}',
                  url: '/api/analyzer',
              },
          };
      }
  }
  exports.CortexApi = CortexApi;
  //# sourceMappingURL=CortexApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CortexApi = void 0;
  class CortexApi {
      constructor() {
          this.name = 'cortexApi';
          this.displayName = 'Cortex API';
          this.documentationUrl = 'cortex';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'cortexApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Cortex Instance',
                  name: 'host',
                  type: 'string',
                  description: 'The URL of the Cortex instance',
                  default: '',
                  placeholder: 'https://localhost:9001',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.cortexApiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.host}}',
                  url: '/api/analyzer',
              },
          };
      }
  }
  exports.CortexApi = CortexApi;
  //# sourceMappingURL=CortexApi.credentials.js.map

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

  # Cortex node

  Use the Cortex node to automate work in Cortex, and integrate Cortex with other applications. n8n has built-in support for a wide range of Cortex features, including executing analyzers, and responders, as well as getting job details.

  On this page, you'll find a list of operations the Cortex node supports and links to more resources.

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

  ## Operations

  * Analyzer
      * Execute Analyzer
  * Job
      * Get job details
      * Get job report
  * Responder
      * Execute Responder

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Cortex Example Workflow","nodes":[{"parameters":{},"id":"fz9rgy5g3njcadps4q3h","name":"Cortex","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.CrowdDev
name: CrowdDev
display_name: crowd.dev
category: transform
icon: file:crowdDev.svg
code_hash: b178a065b61c6a7c856f8750043d0f368f7c2561ccb062a045c83c17eabe4328
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.CrowdDev
documentation_title: crowd.dev node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"crowddev","description":"Templates for crowddev"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
description:
  crowd.dev is an open-source suite of community and data tools built to unlock community-led growth for your organization.

source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CrowdDev = void 0;
  const descriptions_1 = require("./descriptions");
  class CrowdDev {
      constructor() {
          this.description = {
              displayName: 'crowd.dev',
              name: 'crowdDev',
              icon: 'file:crowdDev.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
              description: 'crowd.dev is an open-source suite of community and data tools built to unlock community-led growth for your organization.',
              defaults: {
                  name: 'crowd.dev',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'crowdDevApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  baseURL: '={{$credentials.url}}/api/tenant/{{$credentials.tenantId}}',
                  json: true,
                  skipSslCertificateValidation: '={{ $credentials.allowUnauthorizedCerts }}',
              },
              properties: descriptions_1.allProperties,
          };
      }
  }
  exports.CrowdDev = CrowdDev;
  //# sourceMappingURL=CrowdDev.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CrowdDevApi = void 0;
  class CrowdDevApi {
      constructor() {
          this.name = 'crowdDevApi';
          this.displayName = 'crowd.dev API';
          this.documentationUrl = 'crowddev';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: 'https://app.crowd.dev',
              },
              {
                  displayName: 'Tenant ID',
                  name: 'tenantId',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{"Bearer " + $credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  method: 'POST',
                  baseURL: '={{$credentials.url.replace(/\\/$/, "") + "/api/tenant/" + $credentials.tenantId}}',
                  url: '/member/query',
                  skipSslCertificateValidation: '={{ $credentials.allowUnauthorizedCerts }}',
                  body: {
                      limit: 1,
                      offset: 0,
                  },
              },
          };
      }
  }
  exports.CrowdDevApi = CrowdDevApi;
  //# sourceMappingURL=CrowdDevApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CrowdDevApi = void 0;
  class CrowdDevApi {
      constructor() {
          this.name = 'crowdDevApi';
          this.displayName = 'crowd.dev API';
          this.documentationUrl = 'crowddev';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: 'https://app.crowd.dev',
              },
              {
                  displayName: 'Tenant ID',
                  name: 'tenantId',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{"Bearer " + $credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  method: 'POST',
                  baseURL: '={{$credentials.url.replace(/\\/$/, "") + "/api/tenant/" + $credentials.tenantId}}',
                  url: '/member/query',
                  skipSslCertificateValidation: '={{ $credentials.allowUnauthorizedCerts }}',
                  body: {
                      limit: 1,
                      offset: 0,
                  },
              },
          };
      }
  }
  exports.CrowdDevApi = CrowdDevApi;
  //# sourceMappingURL=CrowdDevApi.credentials.js.map

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

  # crowd.dev node

  Use the crowd.dev node to automate work in crowd.dev and integrate crowd.dev with other applications. n8n has built-in support for a wide range of crowd.dev features, which includes creating, updating, and deleting members, notes, organizations, and tasks.

  On this page, you'll find a list of operations the crowd.dev node supports, and links to more resources.

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

  ## Operations

  * Activity
  	* Create or Update with a Member
  	* Create
  * Automation
  	* Create
  	* Destroy
  	* Find
  	* List
  	* Update
  * Member
  	* Create or Update
  	* Delete
  	* Find
  	* Update
  * Note
  	* Create
  	* Delete
  	* Find
  	* Update
  * Organization
  	* Create
  	* Delete
  	* Find
  	* Update
  * Task
  	* Create
  	* Delete
  	* Find
  	* Update

  ## Templates and examples

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

  ## Related resources

  n8n provides a trigger node for crowd.dev. You can find the trigger node docs [here](/integrations/builtin/trigger-nodes/n8n-nodes-base.crowddevtrigger.md).

  Refer to [crowd.dev's documentation](https://docs.crowd.dev/reference/getting-started-with-crowd-dev-api){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

related_resources:
  [{"title":"here","url":"/integrations/builtin/trigger-nodes/n8n-nodes-base.crowddevtrigger.md","type":"documentation"},{"title":"crowd.dev's documentation","url":"https://docs.crowd.dev/reference/getting-started-with-crowd-dev-api","type":"external"}]

example_workflow:
  {"name":"crowd.dev Example Workflow","nodes":[{"parameters":{},"id":"grwe1s0tv5jz4p6upj1y5m","name":"crowd.dev","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.DateTime
name: DateTime
display_name: Date & Time
description: Allows you to manipulate date and time values
category: transform
icon: fa:clock
code_hash: 5b2d624ad5788edd31b5c0bcec8b91e25d0cdc5ba56f41c1b9e21350e7193fa7
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.DateTime
documentation_title: Date & Time
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"date-and-time","description":"Templates for date-and-time"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DateTime = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const DateTimeV1_node_1 = require("./V1/DateTimeV1.node");
  const DateTimeV2_node_1 = require("./V2/DateTimeV2.node");
  class DateTime extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Date & Time',
              name: 'dateTime',
              icon: 'fa:clock',
              group: ['transform'],
              defaultVersion: 2,
              description: 'Allows you to manipulate date and time values',
              subtitle: '={{$parameter["action"]}}',
          };
          const nodeVersions = {
              1: new DateTimeV1_node_1.DateTimeV1(baseDescription),
              2: new DateTimeV2_node_1.DateTimeV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.DateTime = DateTime;
  //# sourceMappingURL=DateTime.node.js.map

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

  # Date & Time

  The Date & Time node manipulates date and time data and convert it to different formats.

  --8<-- "_snippets/integrations/builtin/core-nodes/schedule/timezone-settings.md"

  /// note | Date and time in other nodes
  You can work with data and time in the Code node, and in expressions in any node. n8n supports Luxon to help work with date and time in JavaScript. Refer to [Date and time with Luxon](/code/cookbook/luxon.md) for more information.
  ///

  ## Operations

  * **Add to a Date**: Add a specified amount of time to a date.
  * **Extract Part of a Date**: Extract part of a date, such as the year, month, or day.
  * **Format a Date**: Transform a date's format to a new format using preset options or a custom expression.
  * **Get Current Date**: Get the current date and choose whether to include the current time or not. Useful for triggering other flows and conditional logic.
  * **Get Time Between Dates**: Calculate the amount of time in specific units between two dates.
  * **Round a Date**: Round a date up or down to the nearest unit of your choice, such as month, day, or hour.
  * **Subtract From a Date**: Subtract a specified amount of time from a date.

  Refer to the sections below for parameters and options specific to each operation.

  ## Add to a Date

  Configure the node for this operation using these parameters:

  * **Date to Add To**: Enter the date you want to change.
  * **Time Unit to Add**: Select the time unit for the **Duration** parameter.
  * **Duration**: Enter the number of time units to add to the date.
  * **Output Field Name**: Enter the name of the field to output the new date to.

  ### Add to a Date options

  This operation has one option: **Include Input Fields**. If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.

  ## Extract Part of a Date

  Configure the node for this operation using these parameters:

  * **Date**: Enter the date you want to round or extract part of.
  * **Part**: Select the part of the date you want to extract. Choose from:
      * **Year**
      * **Month**
      * **Week**
      * **Day**
      * **Hour**
      * **Minute**
      * **Second**
  * **Output Field Name**: Enter the name of the field to output the extracted date part to.

  ### Extract Part of a Date options

  This operation has one option: **Include Input Fields**. If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.

  ## Format a Date

  Configure the node for this operation using these parameters:

  * **Date**: Enter the date you want to format.
  * **Format**: Select the format you want to change the date to. Choose from:
      * **Custom Format**: Enter your own custom format using Luxon's [special tokens](https://moment.github.io/luxon/#/formatting?id=table-of-tokens){:target=_blank .external-link}. Tokens are case-sensitive.
      * **MM/DD/YYYY**: For `4 September 1986`, this formats the date as `09/04/1986`.
      * **YYYY/MM/DD**: For `4 September 1986`, this formats the date as `1986/09/04`.
      * **MMMM DD YYYY**: For `4 September 1986`, this formats the date as `September 04 1986`.
      * **MM-DD-YYYY**: For `4 September 1986`, this formats the date as `09-04-1986`.
      * **YYYY-MM-DD**: For `4 September 1986`, this formats the date as `1986-09-04`.
  * **Output Field Name**: Enter the name of the field to output the formatted date to.

  ### Format a Date options

  This operation includes these options:

  * **Include Input Fields**: If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.
  * **From Date Format**: If the node isn't recognizing the **Date** format correctly, enter the format for that **Date** here so the node can process it properly. Use Luxon's [special tokens](https://moment.github.io/luxon/#/formatting?id=table-of-tokens){:target=_blank .external-link} to enter the format. Tokens are case-sensitive
  * **Use Workflow Timezone**: Whether to use the input's time zone (turned off) or the workflow's timezone (turned on).

  ## Get Current Date

  Configure the node for this operation using these parameters:

  * **Include Current Time**: Choose whether to include the current time (turned on) or to set the time to midnight (turned off).
  * **Output Field Name**: Enter the name of the field to output the current date to.

  ### Get Current Date options

  This operation includes these options:

  * **Include Input Fields**: If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.
  * **Timezone**: Set the timezone to use. If left blank, the node uses the n8n instance's timezone.

  /// note | +00:00 timezone
  Use `GMT` for +00:00 timezone.
  ///

  ## Get Time Between Dates

  Configure the node for this operation using these parameters:

  * **Start Date**: Enter the earlier date you want to compare.
  * **End Date**: Enter the later date you want to compare.
  * **Units**: Select the units you want to calculate the time between. You can include multiple units. Choose from:
      * **Year**
      * **Month**
      * **Week**
      * **Day**
      * **Hour**
      * **Minute**
      * **Second**
      * **Millisecond**
  * **Output Field Name**: Enter the name of the field to output the calculated time between to.

  ### Get Time Between Dates options

  The Get Time Between Dates operation includes the **Include Input Fields** option as well as an **Output as ISO String** option. If you leave this option off, each unit you selected will return its own time difference calculation, for example:

      timeDifference
      years : 1
      months : 3
      days : 13

  If you turn on the **Output as ISO String** option, the node formats the output as a single ISO duration string, for example: `P1Y3M13D`.

  ISO duration format displays a format as `P<n>Y<n>M<n>DT<n>H<n>M<n>S`. `<n>` is the number for the unit after it.

  * P = period (duration). It begins all ISO duration strings.
  * Y = years
  * M = months
  * W = weeks
  * D = days
  * T = delineator between dates and times, used to avoid confusion between months and minutes
  * H = hours
  * M = minutes
  * S = seconds

  Milliseconds don't get their own unit, but instead are decimal seconds. For example, 2.1 milliseconds is `0.0021S`.

  ## Round a Date

  Configure the node for this operation using these parameters:

  * **Date**: Enter the date you'd like to round.
  * **Mode**: Choose whether to **Round Down** or **Round Up**.
  * **To Nearest**: Select the unit you'd like to round to. Choose from:
      * **Year**
      * **Month**
      * **Week**
      * **Day**
      * **Hour**
      * **Minute**
      * **Second**
  * **Output Field Name**: Enter the name of the field to output the rounded date to.

  ### Round a Date options

  This operation has one option: **Include Input Fields**. If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.

  ## Subtract From a Date

  Configure the node for this operation using these parameters:

  * **Date to Subtract From**: Enter the date you'd like to subtract from.
  * **Time Unit to Subtract**: Select the unit for the **Duration** amount you want to subtract.
  * **Duration**: Enter the amount of the time units you want to subtract from the **Date to Subtract From**.
  * **Output Field Name**: Enter the name of the field to output the rounded date to.

  ### Subtract From a Date options

  This operation has one option: **Include Input Fields**. If you'd like to include all of the input fields in the output, turn this option on. If turned off, only the **Output Field Name** and its contents are output.

  ## Templates and examples

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

  ## Related resources

  The Date & Time node uses [Luxon](https://moment.github.io/luxon){:target=_blank .external-link}. You can also use Luxon in the [Code](/code/code-node.md) node and [expressions](/code/expressions.md). Refer to [Date and time with Luxon](/code/cookbook/luxon.md) for more information.

  ### Supported date formats

  n8n supports all date formats [supported by Luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens){:target=_blank .external-link}. Tokens are case-sensitive.

related_resources:
  [{"title":"Luxon","url":"https://moment.github.io/luxon","type":"external"},{"title":"Code","url":"/code/code-node.md","type":"documentation"},{"title":"expressions","url":"/code/expressions.md","type":"documentation"},{"title":"Date and time with Luxon","url":"/code/cookbook/luxon.md","type":"documentation"}]

example_workflow:
  {"name":"Date & Time Example Workflow","nodes":[{"parameters":{},"id":"r2imca5cf5ts5ml1gdtjg","name":"Date & Time","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.CustomerIo
name: CustomerIo
display_name: Customer.io
description: Consume Customer.io API
category: output
icon: file:customerio.svg
code_hash: cea979a578e3bfc8f652d96a2b0de3466bef19f7a53deab9ce49df57f9137c63
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.CustomerIo
documentation_title: Customer.io node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"customerio","description":"Templates for customerio"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:45
updated_at: 2025-06-08 18:33:45
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CustomerIo = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const CampaignDescription_1 = require("./CampaignDescription");
  const CustomerDescription_1 = require("./CustomerDescription");
  const EventDescription_1 = require("./EventDescription");
  const SegmentDescription_1 = require("./SegmentDescription");
  class CustomerIo {
      constructor() {
          this.description = {
              displayName: 'Customer.io',
              name: 'customerIo',
              icon: 'file:customerio.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Customer.io API',
              defaults: {
                  name: 'Customer.io',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'customerIoApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Campaign',
                              value: 'campaign',
                          },
                          {
                              name: 'Segment',
                              value: 'segment',
                          },
                      ],
                      default: 'customer',
                  },
                  ...CampaignDescription_1.campaignOperations,
                  ...CampaignDescription_1.campaignFields,
                  ...CustomerDescription_1.customerOperations,
                  ...CustomerDescription_1.customerFields,
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...SegmentDescription_1.segmentOperations,
                  ...SegmentDescription_1.segmentFields,
              ],
          };
      }
      async execute() {
          const returnData = [];
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const body = {};
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'campaign') {
                      if (operation === 'get') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          const endpoint = `/campaigns/${campaignId}`;
                          responseData = await GenericFunctions_1.customerIoApiRequest.call(this, 'GET', endpoint, body, 'beta');
                          responseData = responseData.campaign;
                      }
                      if (operation === 'getAll') {
                          const endpoint = '/campaigns';
                          responseData = await GenericFunctions_1.customerIoApiRequest.call(this, 'GET', endpoint, body, 'beta');
                          responseData = responseData.campaigns;
                      }
                      if (operation === 'getMetrics') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              const period = this.getNodeParameter('period', i);
                              let endpoint = `/campaigns/${campaignId}/metrics`;
                              if (period !== 'days') {
                                  endpoint = `${endpoint}?period=${period}`;
                              }
                              if (additionalFields.steps) {
                                  body.steps = additionalFields.steps;
                              }
                              if (additionalFields.type) {
                                  if (additionalFields.type === 'urbanAirship') {
                                      additionalFields.type = 'urban_airship';
                                  }
                                  else {
                                      body.type = additionalFields.type;
                                  }
                              }
                              responseData = await GenericFunctions_1.customerIoApiRequest.call(this, 'GET', endpoint, body, 'beta');
                              responseData = responseData.metric;
                          }
                      }
                  }
                  if (resource === 'customer') {
                      if (operation === 'upsert') {
                          const id = this.getNodeParameter('id', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              if (additionalFields.customProperties) {
                                  const data = {};
                                  additionalFields.customProperties.customProperty.map((property) => {
                                      data[property.key] = property.value;
                                  });
                                  body.data = data;
                              }
                              if (additionalFields.email) {
                                  body.email = additionalFields.email;
                              }
                              if (additionalFields.createdAt) {
                                  body.created_at = new Date(additionalFields.createdAt).getTime() / 1000;
                              }
                          }
                          const endpoint = `/customers/${id}`;
                          responseData = await GenericFunctions_1.customerIoApiRequest.call(this, 'PUT', endpoint, body, 'tracking');
                          responseData = Object.assign({ id }, body);
                      }
                      if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          body.id = id;
                          const endpoint = `/customers/${id}`;
                          await GenericFunctions_1.customerIoApiRequest.call(this, 'DELETE', endpoint, body, 'tracking');
                          responseData = {
                              success: true,
                          };
                      }
                  }
                  if (resource === 'event') {
                      if (operation === 'track') {
                          const customerId = this.getNodeParameter('customerId', i);
                          const eventName = this.getNodeParameter('eventName', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          body.name = eventName;
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              const data = {};
                              if (additionalFields.customAttributes) {
                                  additionalFields.customAttributes.customAttribute.map((property) => {
                                      data[property.key] = property.value;
                                  });
                              }
                              if (additionalFields.type) {
                                  data.type = additionalFields.type;
                              }
                              body.data = data;
                          }
                          const endpoint = `/customers/${customerId}/events`;
                          await GenericFunctions_1.customerIoApiRequest.call(this, 'POST', endpoint, body, 'tracking');
                          responseData = {
                              success: true,
                          };
                      }
                      if (operation === 'trackAnonymous') {
                          const eventName = this.getNodeParameter('eventName', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          body.name = eventName;
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              const data = {};
                              if (additionalFields.customAttributes) {
                                  additionalFields.customAttributes.customAttribute.map((property) => {
                                      data[property.key] = property.value;
                                  });
                              }
                              body.data = data;
                          }
                          const endpoint = '/events';
                          await GenericFunctions_1.customerIoApiRequest.call(this, 'POST', endpoint, body, 'tracking');
                          responseData = {
                              success: true,
                          };
                      }
                  }
                  if (resource === 'segment') {
                      const segmentId = this.getNodeParameter('segmentId', i);
                      const customerIds = this.getNodeParameter('customerIds', i);
                      body.id = segmentId;
                      body.ids = customerIds.split(',');
                      let endpoint = '';
                      if (operation === 'add') {
                          endpoint = `/segments/${segmentId}/add_customers`;
                      }
                      else {
                          endpoint = `/segments/${segmentId}/remove_customers`;
                      }
                      responseData = await GenericFunctions_1.customerIoApiRequest.call(this, 'POST', endpoint, body, 'tracking');
                      responseData = {
                          success: true,
                      };
                  }
                  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.CustomerIo = CustomerIo;
  //# sourceMappingURL=CustomerIo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CustomerIoApi = void 0;
  class CustomerIoApi {
      constructor() {
          this.name = 'customerIoApi';
          this.displayName = 'Customer.io API';
          this.documentationUrl = 'customerIo';
          this.properties = [
              {
                  displayName: 'Tracking API Key',
                  name: 'trackingApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Required for tracking API',
                  required: true,
              },
              {
                  displayName: 'Region',
                  name: 'region',
                  type: 'options',
                  options: [
                      {
                          name: 'EU region',
                          value: 'track-eu.customer.io',
                      },
                      {
                          name: 'Global region',
                          value: 'track.customer.io',
                      },
                  ],
                  default: 'track.customer.io',
                  description: 'Should be set based on your account region',
                  hint: 'The region will be omited when being used with the HTTP node',
                  required: true,
              },
              {
                  displayName: 'Tracking Site ID',
                  name: 'trackingSiteId',
                  type: 'string',
                  default: '',
                  description: 'Required for tracking API',
              },
              {
                  displayName: 'App API Key',
                  name: 'appApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Required for App API',
              },
          ];
      }
      async authenticate(credentials, requestOptions) {
          const url = requestOptions.url ? requestOptions.url : requestOptions.uri;
          if (url.includes('track') || url.includes('api.customer.io')) {
              const basicAuthKey = Buffer.from(`${credentials.trackingSiteId}:${credentials.trackingApiKey}`).toString('base64');
              Object.assign(requestOptions.headers, { Authorization: `Basic ${basicAuthKey}` });
          }
          else if (url.includes('beta-api.customer.io')) {
              Object.assign(requestOptions.headers, {
                  Authorization: `Bearer ${credentials.appApiKey}`,
              });
          }
          else {
              throw new Error('Unknown way of authenticating');
          }
          return requestOptions;
      }
  }
  exports.CustomerIoApi = CustomerIoApi;
  //# sourceMappingURL=CustomerIoApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CustomerIoApi = void 0;
  class CustomerIoApi {
      constructor() {
          this.name = 'customerIoApi';
          this.displayName = 'Customer.io API';
          this.documentationUrl = 'customerIo';
          this.properties = [
              {
                  displayName: 'Tracking API Key',
                  name: 'trackingApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Required for tracking API',
                  required: true,
              },
              {
                  displayName: 'Region',
                  name: 'region',
                  type: 'options',
                  options: [
                      {
                          name: 'EU region',
                          value: 'track-eu.customer.io',
                      },
                      {
                          name: 'Global region',
                          value: 'track.customer.io',
                      },
                  ],
                  default: 'track.customer.io',
                  description: 'Should be set based on your account region',
                  hint: 'The region will be omited when being used with the HTTP node',
                  required: true,
              },
              {
                  displayName: 'Tracking Site ID',
                  name: 'trackingSiteId',
                  type: 'string',
                  default: '',
                  description: 'Required for tracking API',
              },
              {
                  displayName: 'App API Key',
                  name: 'appApiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Required for App API',
              },
          ];
      }
      async authenticate(credentials, requestOptions) {
          const url = requestOptions.url ? requestOptions.url : requestOptions.uri;
          if (url.includes('track') || url.includes('api.customer.io')) {
              const basicAuthKey = Buffer.from(`${credentials.trackingSiteId}:${credentials.trackingApiKey}`).toString('base64');
              Object.assign(requestOptions.headers, { Authorization: `Basic ${basicAuthKey}` });
          }
          else if (url.includes('beta-api.customer.io')) {
              Object.assign(requestOptions.headers, {
                  Authorization: `Bearer ${credentials.appApiKey}`,
              });
          }
          else {
              throw new Error('Unknown way of authenticating');
          }
          return requestOptions;
      }
  }
  exports.CustomerIoApi = CustomerIoApi;
  //# sourceMappingURL=CustomerIoApi.credentials.js.map

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

  # Customer.io node

  Use the Customer.io node to automate work in Customer.io, and integrate Customer.io with other applications. n8n has built-in support for a wide range of Customer.io features, including creating and updating customers, tracking events, and getting campaigns.

  On this page, you'll find a list of operations the Customer.io node supports and links to more resources.

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

  ## Operations

  * Customer
      * Create/Update a customer.
      * Delete a customer.
  * Event
      * Track a customer event.
      * Track an anonymous event.
  * Campaign
      * Get
      * Get All
      * Get Metrics
  * Segment
      * Add Customer
      * Remove Customer

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Customer.io Example Workflow","nodes":[{"parameters":{},"id":"782sse8tg1diclrp9pl06g","name":"Customer.io","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Discord
name: Discord
display_name: Discord
description: Sends data to Discord
category: output
icon: file:discord.svg
code_hash: 4995f9ca5c5b57d2486c2e320cc7505238e7f2260861f7e321b44b45ccabeb00
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Discord = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class Discord {
      constructor() {
          this.description = {
              displayName: 'Discord',
              name: 'discord',
              icon: 'file:discord.svg',
              group: ['output'],
              version: 1,
              description: 'Sends data to Discord',
              defaults: {
                  name: 'Discord',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Webhook URL',
                      name: 'webhookUri',
                      type: 'string',
                      required: true,
                      default: '',
                      placeholder: 'https://discord.com/api/webhooks/ID/TOKEN',
                  },
                  {
                      displayName: 'Content',
                      name: 'text',
                      type: 'string',
                      typeOptions: {
                          maxValue: 2000,
                      },
                      default: '',
                      placeholder: 'Hello World!',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Allowed Mentions',
                              name: 'allowedMentions',
                              type: 'json',
                              typeOptions: { alwaysOpenEditWindow: true, editor: 'code' },
                              default: '',
                          },
                          {
                              displayName: 'Attachments',
                              name: 'attachments',
                              type: 'json',
                              typeOptions: { alwaysOpenEditWindow: true, editor: 'code' },
                              default: '',
                          },
                          {
                              displayName: 'Avatar URL',
                              name: 'avatarUrl',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Components',
                              name: 'components',
                              type: 'json',
                              typeOptions: { alwaysOpenEditWindow: true, editor: 'code' },
                              default: '',
                          },
                          {
                              displayName: 'Embeds',
                              name: 'embeds',
                              type: 'json',
                              typeOptions: { alwaysOpenEditWindow: true, editor: 'code' },
                              default: '',
                          },
                          {
                              displayName: 'Flags',
                              name: 'flags',
                              type: 'number',
                              default: '',
                          },
                          {
                              displayName: 'JSON Payload',
                              name: 'payloadJson',
                              type: 'json',
                              typeOptions: { alwaysOpenEditWindow: true, editor: 'code' },
                              default: '',
                          },
                          {
                              displayName: 'Username',
                              name: 'username',
                              type: 'string',
                              default: '',
                              placeholder: 'User',
                          },
                          {
                              displayName: 'TTS',
                              name: 'tts',
                              type: 'boolean',
                              default: false,
                              description: 'Whether this message be sent as a Text To Speech message',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          var _a;
          const returnData = [];
          const webhookUri = this.getNodeParameter('webhookUri', 0, '');
          if (!webhookUri)
              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook uri is required.');
          const items = this.getInputData();
          const length = items.length;
          for (let i = 0; i < length; i++) {
              const body = {};
              const iterationWebhookUri = this.getNodeParameter('webhookUri', i);
              body.content = this.getNodeParameter('text', i);
              const options = this.getNodeParameter('options', i);
              if (!body.content && !options.embeds) {
                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Either content or embeds must be set.', {
                      itemIndex: i,
                  });
              }
              if (options.embeds) {
                  try {
                      body.embeds = JSON.parse(options.embeds);
                  }
                  catch (e) {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Embeds must be valid JSON.', {
                          itemIndex: i,
                      });
                  }
                  if (!Array.isArray(body.embeds)) {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Embeds must be an array of embeds.', {
                          itemIndex: i,
                      });
                  }
              }
              if (options.username) {
                  body.username = options.username;
              }
              if (options.components) {
                  try {
                      body.components = JSON.parse(options.components);
                  }
                  catch (e) {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Components must be valid JSON.', {
                          itemIndex: i,
                      });
                  }
              }
              if (options.allowed_mentions) {
                  body.allowed_mentions = (0, n8n_workflow_1.jsonParse)(options.allowed_mentions);
              }
              if (options.avatarUrl) {
                  body.avatar_url = options.avatarUrl;
              }
              if (options.flags) {
                  body.flags = options.flags;
              }
              if (options.tts) {
                  body.tts = options.tts;
              }
              if (options.payloadJson) {
                  body.payload_json = (0, n8n_workflow_1.jsonParse)(options.payloadJson);
              }
              if (options.attachments) {
                  body.attachments = (0, n8n_workflow_1.jsonParse)(options.attachments);
              }
              if (!body.content)
                  delete body.content;
              if (!body.username)
                  delete body.username;
              if (!body.avatar_url)
                  delete body.avatar_url;
              if (!body.embeds)
                  delete body.embeds;
              if (!body.allowed_mentions)
                  delete body.allowed_mentions;
              if (!body.flags)
                  delete body.flags;
              if (!body.components)
                  delete body.components;
              if (!body.payload_json)
                  delete body.payload_json;
              if (!body.attachments)
                  delete body.attachments;
              let requestOptions;
              if (!body.payload_json) {
                  requestOptions = {
                      resolveWithFullResponse: true,
                      method: 'POST',
                      body,
                      uri: iterationWebhookUri,
                      headers: {
                          'content-type': 'application/json; charset=utf-8',
                      },
                      json: true,
                  };
              }
              else {
                  requestOptions = {
                      resolveWithFullResponse: true,
                      method: 'POST',
                      body,
                      uri: iterationWebhookUri,
                      headers: {
                          'content-type': 'multipart/form-data; charset=utf-8',
                      },
                  };
              }
              let maxTries = 5;
              let response;
              do {
                  try {
                      response = await this.helpers.request(requestOptions);
                      const resetAfter = response.headers['x-ratelimit-reset-after'] * 1000;
                      const remainingRatelimit = response.headers['x-ratelimit-remaining'];
                      if (!+remainingRatelimit) {
                          await (0, n8n_workflow_1.sleep)(resetAfter !== null && resetAfter !== void 0 ? resetAfter : 1000);
                      }
                      break;
                  }
                  catch (error) {
                      if (error.statusCode === 429) {
                          const retryAfter = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.headers['retry-after']) || 1000;
                          await (0, n8n_workflow_1.sleep)(+retryAfter);
                          continue;
                      }
                      throw error;
                  }
              } while (--maxTries);
              if (maxTries <= 0) {
                  throw new n8n_workflow_1.NodeApiError(this.getNode(), {
                      error: 'Could not send Webhook message. Max amount of rate-limit retries reached.',
                  });
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Discord = Discord;
  //# sourceMappingURL=Discord.node.js.map

example_workflow:
  {"name":"Discord Example Workflow","nodes":[{"parameters":{},"id":"nenmjwhlmmqob88gy6qhs","name":"Discord","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.DebugHelper
name: DebugHelper
display_name: DebugHelper
description: Causes problems intentionally and generates useful data for debugging
category: output
icon: file:DebugHelper.svg
code_hash: 99860b55ee895e997c0b43cadcbc1cd28f38a4470e193192da8c35415129dd2e
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.DebugHelper
documentation_title: Debug Helper
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"debughelper","description":"Templates for debughelper"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DebugHelper = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const randomData_1 = require("./randomData");
  const minifaker_1 = require("minifaker");
  const functions_1 = require("./functions");
  class DebugHelper {
      constructor() {
          this.description = {
              displayName: 'DebugHelper',
              name: 'debugHelper',
              icon: 'file:DebugHelper.svg',
              group: ['output'],
              subtitle: '={{$parameter["category"]}}',
              description: 'Causes problems intentionally and generates useful data for debugging',
              version: 1,
              defaults: {
                  name: 'DebugHelper',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [],
              properties: [
                  {
                      displayName: 'Category',
                      name: 'category',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Do Nothing',
                              value: 'doNothing',
                              description: 'Does nothing',
                          },
                          {
                              name: 'Throw Error',
                              value: 'throwError',
                              description: 'Throws an error with the specified type and message',
                          },
                          {
                              name: 'Out Of Memory',
                              value: 'oom',
                              description: 'Generates a large amount of memory to cause an out of memory error',
                          },
                          {
                              name: 'Generate Random Data',
                              value: 'randomData',
                              description: 'Generates random data sets',
                          },
                      ],
                      default: 'throwError',
                  },
                  {
                      displayName: 'Error Type',
                      name: 'throwErrorType',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'NodeApiError',
                              value: 'NodeApiError',
                          },
                          {
                              name: 'NodeOperationError',
                              value: 'NodeOperationError',
                          },
                          {
                              name: 'Error',
                              value: 'Error',
                          },
                      ],
                      default: 'NodeApiError',
                      displayOptions: {
                          show: {
                              category: ['throwError'],
                          },
                      },
                  },
                  {
                      displayName: 'Error Message',
                      name: 'throwErrorMessage',
                      type: 'string',
                      default: 'Node has thrown an error',
                      description: 'The message to send as part of the error',
                      displayOptions: {
                          show: {
                              category: ['throwError'],
                          },
                      },
                  },
                  {
                      displayName: 'Memory Size to Generate',
                      name: 'memorySizeValue',
                      type: 'number',
                      default: 10,
                      description: 'The approximate amount of memory to generate. Be generous...',
                      displayOptions: {
                          show: {
                              category: ['oom'],
                          },
                      },
                  },
                  {
                      displayName: 'Data Type',
                      name: 'randomDataType',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Address',
                              value: 'address',
                          },
                          {
                              name: 'Coordinates',
                              value: 'latLong',
                          },
                          {
                              name: 'Credit Card',
                              value: 'creditCard',
                          },
                          {
                              name: 'Email',
                              value: 'email',
                          },
                          {
                              name: 'IPv4',
                              value: 'ipv4',
                          },
                          {
                              name: 'IPv6',
                              value: 'ipv6',
                          },
                          {
                              name: 'MAC',
                              value: 'macAddress',
                          },
                          {
                              name: 'NanoIds',
                              value: 'nanoid',
                          },
                          {
                              name: 'URL',
                              value: 'url',
                          },
                          {
                              name: 'User Data',
                              value: 'user',
                          },
                          {
                              name: 'UUID',
                              value: 'uuid',
                          },
                          {
                              name: 'Version',
                              value: 'semver',
                          },
                      ],
                      default: 'user',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                          },
                      },
                  },
                  {
                      displayName: 'NanoId Alphabet',
                      name: 'nanoidAlphabet',
                      type: 'string',
                      default: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
                      description: 'The alphabet to use for generating the nanoIds',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                              randomDataType: ['nanoid'],
                          },
                      },
                  },
                  {
                      displayName: 'NanoId Length',
                      name: 'nanoidLength',
                      type: 'string',
                      default: '16',
                      description: 'The length of each nanoIds',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                              randomDataType: ['nanoid'],
                          },
                      },
                  },
                  {
                      displayName: 'Seed',
                      name: 'randomDataSeed',
                      type: 'string',
                      default: '',
                      placeholder: 'Leave empty for random seed',
                      description: 'If set, seed to use for generating the data (same seed will generate the same data)',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                          },
                      },
                  },
                  {
                      displayName: 'Number of Items to Generate',
                      name: 'randomDataCount',
                      type: 'number',
                      default: 10,
                      description: 'The number of random data items to generate into an array',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                          },
                      },
                  },
                  {
                      displayName: 'Output as Single Array',
                      name: 'randomDataSingleArray',
                      type: 'boolean',
                      default: false,
                      description: 'Whether to output a single array instead of multiple items',
                      displayOptions: {
                          show: {
                              category: ['randomData'],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const category = this.getNodeParameter('category', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  switch (category) {
                      case 'doNothing':
                          break;
                      case 'throwError':
                          const throwErrorType = this.getNodeParameter('throwErrorType', 0);
                          const throwErrorMessage = this.getNodeParameter('throwErrorMessage', 0);
                          switch (throwErrorType) {
                              case 'NodeApiError':
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: throwErrorMessage }, { message: throwErrorMessage });
                              case 'NodeOperationError':
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), throwErrorMessage, {
                                      message: throwErrorMessage,
                                  });
                              case 'Error':
                                  throw new Error(throwErrorMessage);
                              default:
                                  break;
                          }
                      case 'oom':
                          const memorySizeValue = this.getNodeParameter('memorySizeValue', 0);
                          (0, functions_1.runGarbageCollector)();
                          const memUsed = (0, functions_1.generateGarbageMemory)(memorySizeValue);
                          items[i].json = memUsed;
                          returnData.push(items[i]);
                          break;
                      case 'randomData':
                          const randomDataType = this.getNodeParameter('randomDataType', 0);
                          const randomDataCount = this.getNodeParameter('randomDataCount', 0);
                          const randomDataSeed = this.getNodeParameter('randomDataSeed', 0);
                          const randomDataSingleArray = this.getNodeParameter('randomDataSingleArray', 0);
                          const newItem = {
                              json: {},
                              pairedItem: { item: i },
                          };
                          if (randomDataSeed !== '') {
                              (0, minifaker_1.setSeed)(randomDataSeed);
                          }
                          let randomFn = randomData_1.generateRandomUser;
                          switch (randomDataType) {
                              case 'user':
                                  randomFn = randomData_1.generateRandomUser;
                                  break;
                              case 'email':
                                  randomFn = randomData_1.generateRandomEmail;
                                  break;
                              case 'address':
                                  randomFn = randomData_1.generateRandomAddress;
                                  break;
                              case 'creditCard':
                                  randomFn = randomData_1.generateCreditCard;
                                  break;
                              case 'uuid':
                                  randomFn = randomData_1.generateUUID;
                                  break;
                              case 'macAddress':
                                  randomFn = randomData_1.generateMAC;
                                  break;
                              case 'ipv4':
                                  randomFn = randomData_1.generateIPv4;
                                  break;
                              case 'ipv6':
                                  randomFn = randomData_1.generateIPv6;
                                  break;
                              case 'latLong':
                                  randomFn = randomData_1.generateLocation;
                                  break;
                              case 'semver':
                                  randomFn = randomData_1.generateVersion;
                                  break;
                              case 'url':
                                  randomFn = randomData_1.generateURL;
                                  break;
                              case 'nanoid':
                                  const nanoidAlphabet = this.getNodeParameter('nanoidAlphabet', 0);
                                  const nanoidLength = this.getNodeParameter('nanoidLength', 0);
                                  randomFn = () => (0, randomData_1.generateNanoid)(nanoidAlphabet, nanoidLength);
                                  break;
                          }
                          const generatedItems = (0, minifaker_1.array)(randomDataCount, randomFn);
                          if (randomDataSingleArray) {
                              newItem.json = { generatedItems };
                              returnData.push(newItem);
                          }
                          else {
                              for (const generatedItem of generatedItems) {
                                  returnData.push({
                                      json: generatedItem,
                                      pairedItem: { item: i },
                                  });
                              }
                          }
                          break;
                      default:
                          break;
                  }
              }
              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.DebugHelper = DebugHelper;
  //# sourceMappingURL=DebugHelper.node.js.map

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

  # Debug Helper

  Use the Debug Helper node to trigger different error types or generate random datasets to help test n8n workflows.

  ## Operations

  Define the operation by selecting the **Category**:

  * **Do Nothing**: Don't do anything.
  * [**Throw Error**](#throw-error): Throw an error with the specified type and message.
  * [**Out Of Memory**](#out-of-memory): Generate a specific memory size to simulate being out of memory.
  * [**Generate Random Data**](#generate-random-data): Generate some random data in a selected format.

  ## Node parameters

  The node parameters depend on the **Category** selected. The **Do Nothing** Category has no other parameters.

  ### Throw Error

  * **Error Type**: Select the type of error to throw. Choose from:
  	* **NodeApiError**
  	* **NodeOperationError**
  	* **Error**
  * **Error Message**: Enter the error message to throw.

  ### Out Of Memory

  The Out of Memory Category adds one parameter, the **Memory Size to Generate**. Enter the approximate amount of memory to generate.

  ### Generate Random Data

  * **Data Type**: Choose the type of random data you'd like to generate. Options include:
  	* **Address**
  	* **Coordinates**
  	* **Credit Card**
  	* **Email**
  	* **IPv4**
  	* **IPv6**
  	* **MAC**
  	* **Nanoids**: If you select this data type, you'll also need to enter:
  		* **Nanoid Alphabet**: The alphabet the generator will use to generate the nanoids.
  		* **Nanoid Length**: The length of each nanoid.
  	* **URL**
  	* **User Data**
  	* **UUID**
  	* **Version**
  * **Seed**: If you'd like to generate the data using a specific seed, enter it here. This ensures the data gets generated consistently. If you'd rather use random data generation, leave this field empty.
  * **Number of Items to Generate**: Enter the number of random items you'd like to generate.
  * **Output as Single Array**: Whether to generate the data as a single array (turned on) or multiple items (turned off).

  ## Templates and examples

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

example_workflow:
  {"name":"DebugHelper Example Workflow","nodes":[{"parameters":{},"id":"qe8tq4h0k07g0g83vz5ov6","name":"DebugHelper","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Discourse
name: Discourse
display_name: Discourse
description: Consume Discourse API
category: input
icon: file:discourse.svg
code_hash: 2f5ce8de0ffd9c8043ec6593bec94991a63023117f784366a8628ec0778e08cf
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Discourse
documentation_title: Discourse node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"discourse","description":"Templates for discourse"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Discourse = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const PostDescription_1 = require("./PostDescription");
  const CategoryDescription_1 = require("./CategoryDescription");
  const GroupDescription_1 = require("./GroupDescription");
  const UserDescription_1 = require("./UserDescription");
  const UserGroupDescription_1 = require("./UserGroupDescription");
  class Discourse {
      constructor() {
          this.description = {
              displayName: 'Discourse',
              name: 'discourse',
              icon: 'file:discourse.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Discourse API',
              defaults: {
                  name: 'Discourse',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'discourseApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Category',
                              value: 'category',
                          },
                          {
                              name: 'Group',
                              value: 'group',
                          },
                          {
                              name: 'Post',
                              value: 'post',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'User Group',
                              value: 'userGroup',
                          },
                      ],
                      default: 'post',
                  },
                  ...CategoryDescription_1.categoryOperations,
                  ...CategoryDescription_1.categoryFields,
                  ...GroupDescription_1.groupOperations,
                  ...GroupDescription_1.groupFields,
                  ...PostDescription_1.postOperations,
                  ...PostDescription_1.postFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
                  ...UserGroupDescription_1.userGroupOperations,
                  ...UserGroupDescription_1.userGroupFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCategories() {
                      const returnData = [];
                      const { category_list } = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', '/categories.json');
                      for (const category of category_list.categories) {
                          returnData.push({
                              name: category.name,
                              value: category.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 === 'category') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const color = this.getNodeParameter('color', i);
                          const textColor = this.getNodeParameter('textColor', i);
                          const body = {
                              name,
                              color,
                              text_color: textColor,
                          };
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'POST', '/categories.json', body);
                          responseData = responseData.category;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', '/categories.json', {}, qs);
                          responseData = responseData.category_list.categories;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const categoryId = this.getNodeParameter('categoryId', i);
                          const name = this.getNodeParameter('name', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              name,
                          };
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'PUT', `/categories/${categoryId}.json`, body);
                          responseData = responseData.category;
                      }
                  }
                  if (resource === 'group') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'POST', '/admin/groups.json', {
                              group: body,
                          });
                          responseData = responseData.basic_group;
                      }
                      if (operation === 'get') {
                          const name = this.getNodeParameter('name', i);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', `/groups/${name}`, {}, qs);
                          responseData = responseData.group;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', '/groups.json', {}, qs);
                          responseData = responseData.groups;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const groupId = this.getNodeParameter('groupId', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'PUT', `/groups/${groupId}.json`, {
                              group: body,
                          });
                      }
                  }
                  if (resource === 'post') {
                      if (operation === 'create') {
                          const content = this.getNodeParameter('content', i);
                          const title = this.getNodeParameter('title', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              title,
                              raw: content,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'POST', '/posts.json', body);
                      }
                      if (operation === 'get') {
                          const postId = this.getNodeParameter('postId', i);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', `/posts/${postId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const limit = this.getNodeParameter('limit', i, 0);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', '/posts.json', {}, qs);
                          responseData = responseData.latest_posts;
                          let lastPost = responseData.pop();
                          let previousLastPostID;
                          while (lastPost.id !== previousLastPostID) {
                              if (limit && responseData.length > limit) {
                                  break;
                              }
                              const chunk = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', `/posts.json?before=${lastPost.id}`, {}, qs);
                              responseData = responseData.concat(chunk.latest_posts);
                              previousLastPostID = lastPost.id;
                              lastPost = responseData.pop();
                          }
                          responseData.push(lastPost);
                          if (!returnAll) {
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const postId = this.getNodeParameter('postId', i);
                          const content = this.getNodeParameter('content', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              raw: content,
                          };
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'PUT', `/posts/${postId}.json`, body);
                          responseData = responseData.post;
                      }
                  }
                  if (resource === 'user') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const email = this.getNodeParameter('email', i);
                          const password = this.getNodeParameter('password', i);
                          const username = this.getNodeParameter('username', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                              password,
                              email,
                              username,
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'POST', '/users.json', body);
                      }
                      if (operation === 'get') {
                          const by = this.getNodeParameter('by', i);
                          let endpoint = '';
                          if (by === 'username') {
                              const username = this.getNodeParameter('username', i);
                              endpoint = `/users/${username}`;
                          }
                          else if (by === 'externalId') {
                              const externalId = this.getNodeParameter('externalId', i);
                              endpoint = `/u/by-external/${externalId}.json`;
                          }
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', endpoint);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const flag = this.getNodeParameter('flag', i);
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'GET', `/admin/users/list/${flag}.json`, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'userGroup') {
                      if (operation === 'add') {
                          const usernames = this.getNodeParameter('usernames', i);
                          const groupId = this.getNodeParameter('groupId', i);
                          const body = {
                              usernames,
                          };
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'PUT', `/groups/${groupId}/members.json`, body);
                      }
                      if (operation === 'remove') {
                          const usernames = this.getNodeParameter('usernames', i);
                          const groupId = this.getNodeParameter('groupId', i);
                          const body = {
                              usernames,
                          };
                          responseData = await GenericFunctions_1.discourseApiRequest.call(this, 'DELETE', `/groups/${groupId}/members.json`, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Discourse = Discourse;
  //# sourceMappingURL=Discourse.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiscourseApi = void 0;
  class DiscourseApi {
      constructor() {
          this.name = 'discourseApi';
          this.displayName = 'Discourse API';
          this.documentationUrl = 'discourse';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  required: true,
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  required: true,
                  type: 'string',
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: '={{$credentials.url}}',
                  url: '/groups.json',
                  method: 'GET',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              'Api-Key': credentials.apiKey,
              'Api-Username': credentials.username,
          };
          if (requestOptions.method === 'GET') {
              delete requestOptions.body;
          }
          return requestOptions;
      }
  }
  exports.DiscourseApi = DiscourseApi;
  //# sourceMappingURL=DiscourseApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DiscourseApi = void 0;
  class DiscourseApi {
      constructor() {
          this.name = 'discourseApi';
          this.displayName = 'Discourse API';
          this.documentationUrl = 'discourse';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  required: true,
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  required: true,
                  type: 'string',
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: '={{$credentials.url}}',
                  url: '/groups.json',
                  method: 'GET',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              'Api-Key': credentials.apiKey,
              'Api-Username': credentials.username,
          };
          if (requestOptions.method === 'GET') {
              delete requestOptions.body;
          }
          return requestOptions;
      }
  }
  exports.DiscourseApi = DiscourseApi;
  //# sourceMappingURL=DiscourseApi.credentials.js.map

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

  # Discourse node

  Use the Discourse node to automate work in Discourse, and integrate Discourse with other applications. n8n has built-in support for a wide range of Discourse features, including creating, getting, updating, and removing categories, groups, posts, and users.

  On this page, you'll find a list of operations the Discourse node supports and links to more resources.

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

  ## Operations

  * Category
      * Create a category
      * Get all categories
      * Update a category
  * Group
      * Create a group
      * Get a group
      * Get all groups
      * Update a group
  * Post
      * Create a post
      * Get a post
      * Get all posts
      * Update a post
  * User
      * Create a user
      * Get a user
      * Get all users
  * User Group
      * Create a user to group
      * Remove user from group

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Discourse Example Workflow","nodes":[{"parameters":{},"id":"gl3e50jxbm6a18tp0oy1fm","name":"Discourse","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Demio
name: Demio
display_name: Demio
description: Consume the Demio API
category: output
icon: file:demio.svg
code_hash: d6ea744bbf875d383eda88e547a021439f0d054f320f0c969131e2c79ffbec5f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Demio
documentation_title: Demio node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"demio","description":"Templates for demio"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Demio = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const EventDescription_1 = require("./EventDescription");
  const ReportDescription_1 = require("./ReportDescription");
  class Demio {
      constructor() {
          this.description = {
              displayName: 'Demio',
              name: 'demio',
              icon: 'file:demio.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Demio API',
              defaults: {
                  name: 'Demio',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'demioApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Report',
                              value: 'report',
                          },
                      ],
                      default: 'event',
                  },
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...ReportDescription_1.reportOperations,
                  ...ReportDescription_1.reportFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getEvents() {
                      const returnData = [];
                      const events = await GenericFunctions_1.demioApiRequest.call(this, 'GET', '/events', {}, { type: 'upcoming' });
                      for (const event of events) {
                          returnData.push({
                              name: event.name,
                              value: event.id,
                          });
                      }
                      return returnData;
                  },
                  async getEventSessions() {
                      const eventId = this.getCurrentNodeParameter('eventId');
                      const qs = {};
                      const resource = this.getCurrentNodeParameter('resource');
                      if (resource !== 'report') {
                          qs.active = true;
                      }
                      const returnData = [];
                      const { dates } = await GenericFunctions_1.demioApiRequest.call(this, 'GET', `/event/${eventId}`, {});
                      for (const date of dates) {
                          returnData.push({
                              name: date.datetime,
                              value: date.date_id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          var _a;
          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 === 'event') {
                      if (operation === 'get') {
                          const id = this.getNodeParameter('eventId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.date_id !== undefined) {
                              responseData = await GenericFunctions_1.demioApiRequest.call(this, 'GET', `/event/${id}/date/${additionalFields.date_id}`);
                          }
                          else {
                              Object.assign(qs, additionalFields);
                              responseData = await GenericFunctions_1.demioApiRequest.call(this, 'GET', `/event/${id}`, {}, qs);
                          }
                      }
                      if (operation === 'getAll') {
                          const filters = this.getNodeParameter('filters', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          Object.assign(qs, filters);
                          responseData = await GenericFunctions_1.demioApiRequest.call(this, 'GET', '/events', {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'register') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const firstName = this.getNodeParameter('firstName', i);
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name: firstName,
                              email,
                              id: eventId,
                          };
                          Object.assign(body, additionalFields);
                          if (additionalFields.customFieldsUi) {
                              const customFields = ((_a = additionalFields.customFieldsUi) === null || _a === void 0 ? void 0 : _a.customFieldsValues) || [];
                              const data = customFields.reduce((obj, value) => Object.assign(obj, { [`${value.fieldId}`]: value.value }), {});
                              Object.assign(body, data);
                              delete additionalFields.customFields;
                          }
                          responseData = await GenericFunctions_1.demioApiRequest.call(this, 'PUT', '/event/register', body);
                      }
                  }
                  if (resource === 'report') {
                      if (operation === 'get') {
                          const sessionId = this.getNodeParameter('dateId', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          responseData = await GenericFunctions_1.demioApiRequest.call(this, 'GET', `/report/${sessionId}/participants`, {}, qs);
                          responseData = responseData.participants;
                      }
                  }
                  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.Demio = Demio;
  //# sourceMappingURL=Demio.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DemioApi = void 0;
  class DemioApi {
      constructor() {
          this.name = 'demioApi';
          this.displayName = 'Demio API';
          this.documentationUrl = 'demio';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'apiSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.DemioApi = DemioApi;
  //# sourceMappingURL=DemioApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DemioApi = void 0;
  class DemioApi {
      constructor() {
          this.name = 'demioApi';
          this.displayName = 'Demio API';
          this.documentationUrl = 'demio';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'apiSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.DemioApi = DemioApi;
  //# sourceMappingURL=DemioApi.credentials.js.map

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

  # Demio node

  Use the Demio node to automate work in Demio, and integrate Demio with other applications. n8n has built-in support for a wide range of Demio features, including getting, and registering events and reports.

  On this page, you'll find a list of operations the Demio node supports and links to more resources.

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

  ## Operations

  * Event
      * Get an event
      * Get all events
      * Register someone to an event
  * Report
      * Get an event report

  ## Templates and examples

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

example_workflow:
  {"name":"Demio Example Workflow","nodes":[{"parameters":{},"id":"8hei87bd8st954tqzy0z15","name":"Demio","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.DeepL
name: DeepL
display_name: DeepL
description: Translate data using DeepL
category: Other
icon: file:deepl.svg
code_hash: 2f0799ff8ae4cf89ec968e13020a9731fa3ab1c20901ec795d3ba76c39ab01da
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.DeepL
documentation_title: DeepL node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"deepl","description":"Templates for deepl"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DeepL = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const TextDescription_1 = require("./TextDescription");
  class DeepL {
      constructor() {
          this.description = {
              displayName: 'DeepL',
              name: 'deepL',
              icon: 'file:deepl.svg',
              group: ['input', 'output'],
              version: 1,
              description: 'Translate data using DeepL',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'DeepL',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'deepLApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Language',
                              value: 'language',
                          },
                      ],
                      default: 'language',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['language'],
                          },
                      },
                      options: [
                          {
                              name: 'Translate',
                              value: 'translate',
                              description: 'Translate data',
                              action: 'Translate a language',
                          },
                      ],
                      default: 'translate',
                  },
                  ...TextDescription_1.textOperations,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLanguages() {
                      const returnData = [];
                      const languages = await GenericFunctions_1.deepLApiRequest.call(this, 'GET', '/languages', {}, { type: 'target' });
                      for (const language of languages) {
                          returnData.push({
                              name: language.name,
                              value: language.language,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const length = items.length;
          const responseData = [];
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', i);
                  const operation = this.getNodeParameter('operation', i);
                  const additionalFields = this.getNodeParameter('additionalFields', i);
                  if (resource === 'language') {
                      if (operation === 'translate') {
                          let body = {};
                          const text = this.getNodeParameter('text', i);
                          const translateTo = this.getNodeParameter('translateTo', i);
                          body = { target_lang: translateTo, text };
                          if (additionalFields.sourceLang !== undefined) {
                              body.source_lang = ['EN-GB', 'EN-US'].includes(additionalFields.sourceLang)
                                  ? 'EN'
                                  : additionalFields.sourceLang;
                          }
                          const { translations } = await GenericFunctions_1.deepLApiRequest.call(this, 'GET', '/translate', body);
                          const [translation] = translations;
                          const translationJsonArray = this.helpers.returnJsonArray(translation);
                          const executionData = this.helpers.constructExecutionMetaData(translationJsonArray, {
                              itemData: { item: i },
                          });
                          responseData.push(...executionData);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = {
                          json: {},
                          error: error.message,
                          itemIndex: i,
                      };
                      responseData.push(executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [responseData];
      }
  }
  exports.DeepL = DeepL;
  //# sourceMappingURL=DeepL.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DeepLApi = void 0;
  class DeepLApi {
      constructor() {
          this.name = 'deepLApi';
          this.displayName = 'DeepL API';
          this.documentationUrl = 'deepL';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Plan',
                  name: 'apiPlan',
                  type: 'options',
                  options: [
                      {
                          name: 'Pro Plan',
                          value: 'pro',
                      },
                      {
                          name: 'Free Plan',
                          value: 'free',
                      },
                  ],
                  default: 'pro',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  qs: {
                      auth_key: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.apiPlan === "pro" ? "https://api.deepl.com/v2" : "https://api-free.deepl.com/v2" }}',
                  url: '/usage',
              },
          };
      }
  }
  exports.DeepLApi = DeepLApi;
  //# sourceMappingURL=DeepLApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DeepLApi = void 0;
  class DeepLApi {
      constructor() {
          this.name = 'deepLApi';
          this.displayName = 'DeepL API';
          this.documentationUrl = 'deepL';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Plan',
                  name: 'apiPlan',
                  type: 'options',
                  options: [
                      {
                          name: 'Pro Plan',
                          value: 'pro',
                      },
                      {
                          name: 'Free Plan',
                          value: 'free',
                      },
                  ],
                  default: 'pro',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  qs: {
                      auth_key: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.apiPlan === "pro" ? "https://api.deepl.com/v2" : "https://api-free.deepl.com/v2" }}',
                  url: '/usage',
              },
          };
      }
  }
  exports.DeepLApi = DeepLApi;
  //# sourceMappingURL=DeepLApi.credentials.js.map

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

  # DeepL node

  Use the DeepL node to automate work in DeepL, and integrate DeepL with other applications. n8n has built-in support for a wide range of DeepL features, including translating languages.

  On this page, you'll find a list of operations the DeepL node supports and links to more resources.

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

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

  ## Operations

  * Language
      * Translate data

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"DeepL Example Workflow","nodes":[{"parameters":{},"id":"5ivk69lnllfya1urje55cp","name":"DeepL","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Dhl
name: Dhl
display_name: DHL
description: Consume DHL API
category: input
icon: file:dhl.svg
code_hash: 5ba971626f7a362156d95e63342aa84feae7892e38bf3e03ba7b6fd0027b98f6
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Dhl
documentation_title: DHL node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"dhl","description":"Templates for dhl"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Dhl = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Dhl {
      constructor() {
          this.description = {
              displayName: 'DHL',
              name: 'dhl',
              icon: 'file:dhl.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume DHL API',
              defaults: {
                  name: 'DHL',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'dhlApi',
                      required: true,
                      testedBy: 'dhlApiCredentialTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      noDataExpression: true,
                      type: 'hidden',
                      options: [
                          {
                              name: 'Shipment',
                              value: 'shipment',
                          },
                      ],
                      default: 'shipment',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['shipment'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Tracking Details',
                              value: 'get',
                              action: 'Get tracking details for a shipment',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Tracking Number',
                      name: 'trackingNumber',
                      type: 'string',
                      required: true,
                      default: '',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: "Recipient's Postal Code",
                              name: 'recipientPostalCode',
                              type: 'string',
                              default: '',
                              description: "DHL will return more detailed information on the shipment when you provide the Recipient's Postal Code - it acts as a verification step",
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async dhlApiCredentialTest(credential) {
                      try {
                          await GenericFunctions_1.validateCredentials.call(this, credential.data);
                      }
                      catch (error) {
                          if (error.statusCode === 401) {
                              return {
                                  status: 'Error',
                                  message: 'The API Key included in the request is invalid',
                              };
                          }
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'shipment') {
                      if (operation === 'get') {
                          const trackingNumber = this.getNodeParameter('trackingNumber', i);
                          const options = this.getNodeParameter('options', i);
                          qs = {
                              trackingNumber,
                          };
                          Object.assign(qs, options);
                          responseData = await GenericFunctions_1.dhlApiRequest.call(this, 'GET', '/track/shipments', {}, qs);
                          returnData.push(...responseData.shipments);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.description });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Dhl = Dhl;
  //# sourceMappingURL=Dhl.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DhlApi = void 0;
  class DhlApi {
      constructor() {
          this.name = 'dhlApi';
          this.displayName = 'DHL API';
          this.documentationUrl = 'dhl';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.DhlApi = DhlApi;
  //# sourceMappingURL=DhlApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DhlApi = void 0;
  class DhlApi {
      constructor() {
          this.name = 'dhlApi';
          this.displayName = 'DHL API';
          this.documentationUrl = 'dhl';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.DhlApi = DhlApi;
  //# sourceMappingURL=DhlApi.credentials.js.map

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

  # DHL node

  Use the DHL node to automate work in DHL, and integrate DHL with other applications. n8n has built-in support for a wide range of DHL features, including tracking shipment. 

  On this page, you'll find a list of operations the DHL node supports and links to more resources.

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

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

  ## Operations

  * Shipment
      * Get Tracking Details

  ## Templates and examples

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

example_workflow:
  {"name":"DHL Example Workflow","nodes":[{"parameters":{},"id":"vwzjr07yn5pvrmh98c3se","name":"DHL","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Disqus
name: Disqus
display_name: Disqus
description: Access data on Disqus
category: input
icon: file:disqus.png
code_hash: c60402500e1aea71c7e4e7a76fe768b72f3894831b6a69851fd8ec5bdfa43931
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Disqus
documentation_title: Disqus node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"disqus","description":"Templates for disqus"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Disqus = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Disqus {
      constructor() {
          this.description = {
              displayName: 'Disqus',
              name: 'disqus',
              icon: 'file:disqus.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Access data on Disqus',
              defaults: {
                  name: 'Disqus',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'disqusApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Forum',
                              value: 'forum',
                          },
                      ],
                      default: 'forum',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Return forum details',
                              action: 'Get a forum',
                          },
                          {
                              name: 'Get All Categories',
                              value: 'getCategories',
                              description: 'Return a list of categories within a forum',
                              action: 'Get all categories in a forum',
                          },
                          {
                              name: 'Get All Threads',
                              value: 'getThreads',
                              description: 'Return a list of threads within a forum',
                              action: 'Get all threads in a forum',
                          },
                          {
                              name: 'Get All Posts',
                              value: 'getPosts',
                              description: 'Return a list of posts within a forum',
                              action: 'Get all posts in a forum',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Forum Name',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['forum'],
                          },
                      },
                      description: 'The short name(aka ID) of the forum to get',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['forum'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Attach',
                              name: 'attach',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Counters',
                                      value: 'counters',
                                  },
                                  {
                                      name: 'followsForum',
                                      value: 'followsForum',
                                  },
                                  {
                                      name: 'forumCanDisableAds',
                                      value: 'forumCanDisableAds',
                                  },
                                  {
                                      name: 'forumDaysAlive',
                                      value: 'forumDaysAlive',
                                  },
                                  {
                                      name: 'forumFeatures',
                                      value: 'forumFeatures',
                                  },
                                  {
                                      name: 'forumForumCategory',
                                      value: 'forumForumCategory',
                                  },
                                  {
                                      name: 'forumIntegration',
                                      value: 'forumIntegration',
                                  },
                                  {
                                      name: 'forumNewPolicy',
                                      value: 'forumNewPolicy',
                                  },
                                  {
                                      name: 'forumPermissions',
                                      value: 'forumPermissions',
                                  },
                              ],
                              default: [],
                          },
                          {
                              displayName: 'Related',
                              name: 'related',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'author',
                                      value: 'author',
                                  },
                              ],
                              default: [],
                              description: 'You may specify relations to include with your response',
                          },
                      ],
                  },
                  {
                      displayName: 'Forum Name',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getPosts'],
                              resource: ['forum'],
                          },
                      },
                      description: 'The short name(aka ID) of the forum to get',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getPosts'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getPosts'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['getPosts'],
                              resource: ['forum'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Filters',
                              name: 'filters',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Has_Bad_Word',
                                      value: 'Has_Bad_Word',
                                  },
                                  {
                                      name: 'Has_Link',
                                      value: 'Has_Link',
                                  },
                                  {
                                      name: 'Has_Low_Rep_Author',
                                      value: 'Has_Low_Rep_Author',
                                  },
                                  {
                                      name: 'Has_Media',
                                      value: 'Has_Media',
                                  },
                                  {
                                      name: 'Is_Anonymous',
                                      value: 'Is_Anonymous',
                                  },
                                  {
                                      name: 'Is_At_Flag_Limit',
                                      value: 'Is_At_Flag_Limit',
                                  },
                                  {
                                      name: 'Is_Flagged',
                                      value: 'Is_Flagged',
                                  },
                                  {
                                      name: 'Is_Toxic',
                                      value: 'Is_Toxic',
                                  },
                                  {
                                      name: 'Modified_By_Rule',
                                      value: 'Modified_By_Rule',
                                  },
                                  {
                                      name: 'No_Issue',
                                      value: 'No_Issue',
                                  },
                                  {
                                      name: 'Shadow_Banned',
                                      value: 'Shadow_Banned',
                                  },
                              ],
                              default: [],
                              description: 'You may specify filters for your response',
                          },
                          {
                              displayName: 'Include',
                              name: 'include',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Approved',
                                      value: 'approved',
                                  },
                              ],
                              default: [],
                              description: 'You may specify relations to include with your response',
                          },
                          {
                              displayName: 'Order',
                              name: 'order',
                              type: 'options',
                              options: [
                                  {
                                      name: 'ASC',
                                      value: 'asc',
                                  },
                                  {
                                      name: 'DESC',
                                      value: 'desc',
                                  },
                              ],
                              default: 'asc',
                              description: 'You may specify order to sort your response',
                          },
                          {
                              displayName: 'Query',
                              name: 'query',
                              type: 'string',
                              default: '',
                              description: 'You may specify query forChoices: asc, desc your response',
                          },
                          {
                              displayName: 'Related',
                              name: 'related',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Thread',
                                      value: 'thread',
                                  },
                              ],
                              default: [],
                              description: 'You may specify relations to include with your response',
                          },
                          {
                              displayName: 'Since',
                              name: 'since',
                              type: 'dateTime',
                              default: '',
                              description: 'Unix timestamp (or ISO datetime standard)',
                          },
                      ],
                  },
                  {
                      displayName: 'Forum Name',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getCategories'],
                              resource: ['forum'],
                          },
                      },
                      description: 'The short name(aka ID) of the forum to get Categories',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getCategories'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getCategories'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['getCategories'],
                              resource: ['forum'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Order',
                              name: 'order',
                              type: 'options',
                              options: [
                                  {
                                      name: 'ASC',
                                      value: 'asc',
                                  },
                                  {
                                      name: 'DESC',
                                      value: 'desc',
                                  },
                              ],
                              default: 'asc',
                              description: 'You may specify order to sort your response',
                          },
                      ],
                  },
                  {
                      displayName: 'Forum Name',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getThreads'],
                              resource: ['forum'],
                          },
                      },
                      description: 'The short name(aka ID) of the forum to get Threads',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getThreads'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['forum'],
                              operation: ['getThreads'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['getThreads'],
                              resource: ['forum'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Related',
                              name: 'related',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'author',
                                      value: 'author',
                                  },
                                  {
                                      name: 'Forum',
                                      value: 'forum',
                                  },
                              ],
                              default: [],
                              description: 'You may specify relations to include with your response',
                          },
                          {
                              displayName: 'Include',
                              name: 'include',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Closed',
                                      value: 'closed',
                                  },
                                  {
                                      name: 'Open',
                                      value: 'open',
                                  },
                                  {
                                      name: 'Killed',
                                      value: 'killed',
                                  },
                              ],
                              default: [],
                              description: 'You may specify relations to include with your response',
                          },
                          {
                              displayName: 'Order',
                              name: 'order',
                              type: 'options',
                              options: [
                                  {
                                      name: 'ASC',
                                      value: 'asc',
                                  },
                                  {
                                      name: 'DESC',
                                      value: 'desc',
                                  },
                              ],
                              default: 'asc',
                              description: 'You may specify order to sort your response',
                          },
                          {
                              displayName: 'Since',
                              name: 'since',
                              type: 'dateTime',
                              default: '',
                              description: 'Unix timestamp (or ISO datetime standard)',
                          },
                          {
                              displayName: 'Thread',
                              name: 'thread',
                              type: 'string',
                              default: '',
                              description: 'Looks up a thread by ID. You may pass us the "ident" query type instead of an ID by including "forum". You may pass us the "link" query type to filter by URL. You must pass the "forum" if you do not have the Pro API Access addon.',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let endpoint = '';
          let requestMethod = '';
          let qs;
          for (let i = 0; i < items.length; i++) {
              try {
                  qs = {};
                  if (resource === 'forum') {
                      if (operation === 'get') {
                          requestMethod = 'GET';
                          endpoint = 'forums/details.json';
                          const id = this.getNodeParameter('id', i);
                          qs.forum = id;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          try {
                              const responseData = await GenericFunctions_1.disqusApiRequest.call(this, requestMethod, qs, endpoint);
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.response), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          catch (error) {
                              throw error;
                          }
                      }
                      else if (operation === 'getPosts') {
                          requestMethod = 'GET';
                          endpoint = 'forums/listPosts.json';
                          const id = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs.forum = id;
                          qs.limit = 100;
                          try {
                              let responseData = {};
                              if (returnAll) {
                                  responseData.response = await GenericFunctions_1.disqusApiRequestAllItems.call(this, requestMethod, qs, endpoint);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.limit = limit;
                                  responseData = await GenericFunctions_1.disqusApiRequest.call(this, requestMethod, qs, endpoint);
                              }
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.response), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          catch (error) {
                              throw error;
                          }
                      }
                      else if (operation === 'getCategories') {
                          requestMethod = 'GET';
                          endpoint = 'forums/listCategories.json';
                          const id = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          qs.forum = id;
                          qs.limit = 100;
                          try {
                              let responseData = {};
                              if (returnAll) {
                                  responseData.response = await GenericFunctions_1.disqusApiRequestAllItems.call(this, requestMethod, qs, endpoint);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.limit = limit;
                                  responseData = (await GenericFunctions_1.disqusApiRequest.call(this, requestMethod, qs, endpoint));
                              }
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.response), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          catch (error) {
                              throw error;
                          }
                      }
                      else if (operation === 'getThreads') {
                          requestMethod = 'GET';
                          endpoint = 'forums/listThreads.json';
                          const id = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs.forum = id;
                          qs.limit = 100;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          try {
                              let responseData = {};
                              if (returnAll) {
                                  responseData.response = await GenericFunctions_1.disqusApiRequestAllItems.call(this, requestMethod, qs, endpoint);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.limit = limit;
                                  responseData = await GenericFunctions_1.disqusApiRequest.call(this, requestMethod, qs, endpoint);
                              }
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.response), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          catch (error) {
                              throw error;
                          }
                      }
                      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,
                      });
                  }
              }
              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.Disqus = Disqus;
  //# sourceMappingURL=Disqus.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DisqusApi = void 0;
  class DisqusApi {
      constructor() {
          this.name = 'disqusApi';
          this.displayName = 'Disqus API';
          this.documentationUrl = 'disqus';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Visit your account details page, and grab the Access Token. See <a href="https://disqus.com/api/docs/auth/">Disqus auth</a>.',
              },
          ];
      }
  }
  exports.DisqusApi = DisqusApi;
  //# sourceMappingURL=DisqusApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DisqusApi = void 0;
  class DisqusApi {
      constructor() {
          this.name = 'disqusApi';
          this.displayName = 'Disqus API';
          this.documentationUrl = 'disqus';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Visit your account details page, and grab the Access Token. See <a href="https://disqus.com/api/docs/auth/">Disqus auth</a>.',
              },
          ];
      }
  }
  exports.DisqusApi = DisqusApi;
  //# sourceMappingURL=DisqusApi.credentials.js.map

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

  # Disqus node

  Use the Disqus node to automate work in Disqus, and integrate Disqus with other applications. n8n has built-in support for a wide range of Disqus features, including returning forums.

  On this page, you'll find a list of operations the Disqus node supports and links to more resources.

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

  ## Operations

  * Forum
      * Return forum details
      * Return a list of categories within a forum
      * Return a list of threads within a forum
      * Return a list of posts within a forum

  ## Templates and examples

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

example_workflow:
  {"name":"Disqus Example Workflow","nodes":[{"parameters":{},"id":"pduiqnx1ec1cz2nqt82vn","name":"Disqus","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Drift
name: Drift
display_name: Drift
description: Consume Drift API
category: output
icon: file:drift.png
code_hash: 0f95bfe43e877d5dbf5e06e74b9a9896c10df575ba3080ff99a30f95cb5f3625
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Drift
documentation_title: Drift node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"drift","description":"Templates for drift"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:47
updated_at: 2025-06-08 18:33:47
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Drift = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  class Drift {
      constructor() {
          this.description = {
              displayName: 'Drift',
              name: 'drift',
              icon: 'file:drift.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Drift API',
              defaults: {
                  name: 'Drift',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'driftApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'driftOAuth2Api',
                      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: 'Contact',
                              value: 'contact',
                          },
                      ],
                      default: 'contact',
                  },
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
              ],
          };
      }
      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 === 'contact') {
                      if (operation === 'create') {
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                          };
                          if (additionalFields.name) {
                              body.name = additionalFields.name;
                          }
                          if (additionalFields.phone) {
                              body.phone = additionalFields.phone;
                          }
                          responseData = await GenericFunctions_1.driftApiRequest.call(this, 'POST', '/contacts', {
                              attributes: body,
                          });
                          responseData = responseData.data;
                      }
                      if (operation === 'update') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.phone) {
                              body.phone = updateFields.phone;
                          }
                          if (updateFields.email) {
                              body.email = updateFields.email;
                          }
                          responseData = await GenericFunctions_1.driftApiRequest.call(this, 'PATCH', `/contacts/${contactId}`, {
                              attributes: body,
                          });
                          responseData = responseData.data;
                      }
                      if (operation === 'get') {
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.driftApiRequest.call(this, 'GET', `/contacts/${contactId}`);
                          responseData = responseData.data;
                      }
                      if (operation === 'getCustomAttributes') {
                          responseData = await GenericFunctions_1.driftApiRequest.call(this, 'GET', '/contacts/attributes');
                          responseData = responseData.data.properties;
                      }
                      if (operation === 'delete') {
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.driftApiRequest.call(this, 'DELETE', `/contacts/${contactId}`);
                          responseData = { success: true };
                      }
                  }
                  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.Drift = Drift;
  //# sourceMappingURL=Drift.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DriftApi = void 0;
  class DriftApi {
      constructor() {
          this.name = 'driftApi';
          this.displayName = 'Drift API';
          this.documentationUrl = 'drift';
          this.properties = [
              {
                  displayName: 'Personal Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Visit your account details page, and grab the Access Token. See <a href="https://devdocs.drift.com/docs/quick-start">Drift auth</a>.',
              },
          ];
      }
  }
  exports.DriftApi = DriftApi;
  //# sourceMappingURL=DriftApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DriftOAuth2Api = void 0;
  class DriftOAuth2Api {
      constructor() {
          this.name = 'driftOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Drift OAuth2 API';
          this.documentationUrl = 'drift';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://dev.drift.com/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://driftapi.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.DriftOAuth2Api = DriftOAuth2Api;
  //# sourceMappingURL=DriftOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DriftApi = void 0;
  class DriftApi {
      constructor() {
          this.name = 'driftApi';
          this.displayName = 'Drift API';
          this.documentationUrl = 'drift';
          this.properties = [
              {
                  displayName: 'Personal Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Visit your account details page, and grab the Access Token. See <a href="https://devdocs.drift.com/docs/quick-start">Drift auth</a>.',
              },
          ];
      }
  }
  exports.DriftApi = DriftApi;
  //# sourceMappingURL=DriftApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DriftOAuth2Api = void 0;
  class DriftOAuth2Api {
      constructor() {
          this.name = 'driftOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Drift OAuth2 API';
          this.documentationUrl = 'drift';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://dev.drift.com/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://driftapi.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.DriftOAuth2Api = DriftOAuth2Api;
  //# sourceMappingURL=DriftOAuth2Api.credentials.js.map

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

  # Drift node

  Use the Drift node to automate work in Drift, and integrate Drift with other applications. n8n has built-in support for a wide range of Drift features, including creating, updating, deleting, and getting contacts. 

  On this page, you'll find a list of operations the Drift node supports and links to more resources.

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

  ## Operations

  * Contact
      * Create a contact
      * Get custom attributes
      * Delete a contact
      * Get a contact
      * Update a contact

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Drift Example Workflow","nodes":[{"parameters":{},"id":"ww40prs64o1sj3wtgn18h","name":"Drift","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.EmailReadImap
name: EmailReadImap
display_name: Email Trigger (IMAP)
description: Triggers the workflow when a new email is received
category: trigger
icon: fa:inbox
code_hash: b3d4946398bf3fb32954b1d50cef910b0831f468d4d364cf5288676b41d43a53
example_parameters: {"pollTimes":{"item":[{"mode":"everyMinute"}]}}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.EmailReadImap = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const EmailReadImapV1_node_1 = require("./v1/EmailReadImapV1.node");
  const EmailReadImapV2_node_1 = require("./v2/EmailReadImapV2.node");
  class EmailReadImap extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Email Trigger (IMAP)',
              name: 'emailReadImap',
              icon: 'fa:inbox',
              group: ['trigger'],
              description: 'Triggers the workflow when a new email is received',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new EmailReadImapV1_node_1.EmailReadImapV1(baseDescription),
              2: new EmailReadImapV2_node_1.EmailReadImapV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.EmailReadImap = EmailReadImap;
  //# sourceMappingURL=EmailReadImap.node.js.map

example_workflow:
  {"name":"Email Trigger (IMAP) Example Workflow","nodes":[{"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]}},"id":"36ebepsgqekvp7gxjjhr1s","name":"Email Trigger (IMAP)","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.EditImage
name: EditImage
display_name: Background Color
description: Adds a blur to the image and so makes it less sharp
category: transform
icon: fa:image
code_hash: 091299be6339bea30743c8263f8773f388c8c9ce936efa20be50765b608a38c7
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.EditImage
documentation_title: Edit Image
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"edit-image","description":"Templates for edit-image"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
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.EditImage = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const gm_1 = __importDefault(require("gm"));
  const tmp_promise_1 = require("tmp-promise");
  const path_1 = require("path");
  const fs_1 = require("fs");
  const util_1 = require("util");
  const fsWriteFileAsync = (0, util_1.promisify)(fs_1.writeFile);
  const get_system_fonts_1 = __importDefault(require("get-system-fonts"));
  const nodeOperations = [
      {
          name: 'Blur',
          value: 'blur',
          description: 'Adds a blur to the image and so makes it less sharp',
          action: 'Blur Image',
      },
      {
          name: 'Border',
          value: 'border',
          description: 'Adds a border to the image',
          action: 'Border Image',
      },
      {
          name: 'Composite',
          value: 'composite',
          description: 'Composite image on top of another one',
          action: 'Composite Image',
      },
      {
          name: 'Create',
          value: 'create',
          description: 'Create a new image',
          action: 'Create Image',
      },
      {
          name: 'Crop',
          value: 'crop',
          description: 'Crops the image',
          action: 'Crop Image',
      },
      {
          name: 'Draw',
          value: 'draw',
          description: 'Draw on image',
          action: 'Draw Image',
      },
      {
          name: 'Rotate',
          value: 'rotate',
          description: 'Rotate image',
          action: 'Rotate Image',
      },
      {
          name: 'Resize',
          value: 'resize',
          description: 'Change the size of image',
          action: 'Resize Image',
      },
      {
          name: 'Shear',
          value: 'shear',
          description: 'Shear image along the X or Y axis',
          action: 'Shear Image',
      },
      {
          name: 'Text',
          value: 'text',
          description: 'Adds text to image',
          action: 'Apply Text to Image',
      },
      {
          name: 'Transparent',
          value: 'transparent',
          description: 'Make a color in image transparent',
          action: 'Add Transparency to Image',
      },
  ];
  const nodeOperationOptions = [
      {
          displayName: 'Background Color',
          name: 'backgroundColor',
          type: 'color',
          default: '#ffffff00',
          typeOptions: {
              showAlpha: true,
          },
          displayOptions: {
              show: {
                  operation: ['create'],
              },
          },
          description: 'The background color of the image to create',
      },
      {
          displayName: 'Image Width',
          name: 'width',
          type: 'number',
          default: 50,
          typeOptions: {
              minValue: 1,
          },
          displayOptions: {
              show: {
                  operation: ['create'],
              },
          },
          description: 'The width of the image to create',
      },
      {
          displayName: 'Image Height',
          name: 'height',
          type: 'number',
          default: 50,
          typeOptions: {
              minValue: 1,
          },
          displayOptions: {
              show: {
                  operation: ['create'],
              },
          },
          description: 'The height of the image to create',
      },
      {
          displayName: 'Primitive',
          name: 'primitive',
          type: 'options',
          displayOptions: {
              show: {
                  operation: ['draw'],
              },
          },
          options: [
              {
                  name: 'Circle',
                  value: 'circle',
              },
              {
                  name: 'Line',
                  value: 'line',
              },
              {
                  name: 'Rectangle',
                  value: 'rectangle',
              },
          ],
          default: 'rectangle',
          description: 'The primitive to draw',
      },
      {
          displayName: 'Color',
          name: 'color',
          type: 'color',
          default: '#ff000000',
          typeOptions: {
              showAlpha: true,
          },
          displayOptions: {
              show: {
                  operation: ['draw'],
              },
          },
          description: 'The color of the primitive to draw',
      },
      {
          displayName: 'Start Position X',
          name: 'startPositionX',
          type: 'number',
          default: 50,
          displayOptions: {
              show: {
                  operation: ['draw'],
                  primitive: ['circle', 'line', 'rectangle'],
              },
          },
          description: 'X (horizontal) start position of the primitive',
      },
      {
          displayName: 'Start Position Y',
          name: 'startPositionY',
          type: 'number',
          default: 50,
          displayOptions: {
              show: {
                  operation: ['draw'],
                  primitive: ['circle', 'line', 'rectangle'],
              },
          },
          description: 'Y (horizontal) start position of the primitive',
      },
      {
          displayName: 'End Position X',
          name: 'endPositionX',
          type: 'number',
          default: 250,
          displayOptions: {
              show: {
                  operation: ['draw'],
                  primitive: ['circle', 'line', 'rectangle'],
              },
          },
          description: 'X (horizontal) end position of the primitive',
      },
      {
          displayName: 'End Position Y',
          name: 'endPositionY',
          type: 'number',
          default: 250,
          displayOptions: {
              show: {
                  operation: ['draw'],
                  primitive: ['circle', 'line', 'rectangle'],
              },
          },
          description: 'Y (horizontal) end position of the primitive',
      },
      {
          displayName: 'Corner Radius',
          name: 'cornerRadius',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['draw'],
                  primitive: ['rectangle'],
              },
          },
          description: 'The radius of the corner to create round corners',
      },
      {
          displayName: 'Text',
          name: 'text',
          typeOptions: {
              rows: 5,
          },
          type: 'string',
          default: '',
          placeholder: 'Text to render',
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'Text to write on the image',
      },
      {
          displayName: 'Font Size',
          name: 'fontSize',
          type: 'number',
          default: 18,
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'Size of the text',
      },
      {
          displayName: 'Font Color',
          name: 'fontColor',
          type: 'color',
          default: '#000000',
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'Color of the text',
      },
      {
          displayName: 'Position X',
          name: 'positionX',
          type: 'number',
          default: 50,
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'X (horizontal) position of the text',
      },
      {
          displayName: 'Position Y',
          name: 'positionY',
          type: 'number',
          default: 50,
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'Y (vertical) position of the text',
      },
      {
          displayName: 'Max Line Length',
          name: 'lineLength',
          type: 'number',
          typeOptions: {
              minValue: 1,
          },
          default: 80,
          displayOptions: {
              show: {
                  operation: ['text'],
              },
          },
          description: 'Max amount of characters in a line before a line-break should get added',
      },
      {
          displayName: 'Blur',
          name: 'blur',
          type: 'number',
          typeOptions: {
              minValue: 0,
              maxValue: 1000,
          },
          default: 5,
          displayOptions: {
              show: {
                  operation: ['blur'],
              },
          },
          description: 'How strong the blur should be',
      },
      {
          displayName: 'Sigma',
          name: 'sigma',
          type: 'number',
          typeOptions: {
              minValue: 0,
              maxValue: 1000,
          },
          default: 2,
          displayOptions: {
              show: {
                  operation: ['blur'],
              },
          },
          description: 'The sigma of the blur',
      },
      {
          displayName: 'Border Width',
          name: 'borderWidth',
          type: 'number',
          default: 10,
          displayOptions: {
              show: {
                  operation: ['border'],
              },
          },
          description: 'The width of the border',
      },
      {
          displayName: 'Border Height',
          name: 'borderHeight',
          type: 'number',
          default: 10,
          displayOptions: {
              show: {
                  operation: ['border'],
              },
          },
          description: 'The height of the border',
      },
      {
          displayName: 'Border Color',
          name: 'borderColor',
          type: 'color',
          default: '#000000',
          displayOptions: {
              show: {
                  operation: ['border'],
              },
          },
          description: 'Color of the border',
      },
      {
          displayName: 'Composite Image Property',
          name: 'dataPropertyNameComposite',
          type: 'string',
          default: '',
          placeholder: 'data2',
          displayOptions: {
              show: {
                  operation: ['composite'],
              },
          },
          description: 'The name of the binary property which contains the data of the image to composite on top of image which is found in Property Name',
      },
      {
          displayName: 'Operator',
          name: 'operator',
          type: 'options',
          displayOptions: {
              show: {
                  operation: ['composite'],
              },
          },
          options: [
              {
                  name: 'Add',
                  value: 'Add',
              },
              {
                  name: 'Atop',
                  value: 'Atop',
              },
              {
                  name: 'Bumpmap',
                  value: 'Bumpmap',
              },
              {
                  name: 'Copy',
                  value: 'Copy',
              },
              {
                  name: 'Copy Black',
                  value: 'CopyBlack',
              },
              {
                  name: 'Copy Blue',
                  value: 'CopyBlue',
              },
              {
                  name: 'Copy Cyan',
                  value: 'CopyCyan',
              },
              {
                  name: 'Copy Green',
                  value: 'CopyGreen',
              },
              {
                  name: 'Copy Magenta',
                  value: 'CopyMagenta',
              },
              {
                  name: 'Copy Opacity',
                  value: 'CopyOpacity',
              },
              {
                  name: 'Copy Red',
                  value: 'CopyRed',
              },
              {
                  name: 'Copy Yellow',
                  value: 'CopyYellow',
              },
              {
                  name: 'Difference',
                  value: 'Difference',
              },
              {
                  name: 'Divide',
                  value: 'Divide',
              },
              {
                  name: 'In',
                  value: 'In',
              },
              {
                  name: 'Minus',
                  value: 'Minus',
              },
              {
                  name: 'Multiply',
                  value: 'Multiply',
              },
              {
                  name: 'Out',
                  value: 'Out',
              },
              {
                  name: 'Over',
                  value: 'Over',
              },
              {
                  name: 'Plus',
                  value: 'Plus',
              },
              {
                  name: 'Subtract',
                  value: 'Subtract',
              },
              {
                  name: 'Xor',
                  value: 'Xor',
              },
          ],
          default: 'Over',
          description: 'The operator to use to combine the images',
      },
      {
          displayName: 'Position X',
          name: 'positionX',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['composite'],
              },
          },
          description: 'X (horizontal) position of composite image',
      },
      {
          displayName: 'Position Y',
          name: 'positionY',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['composite'],
              },
          },
          description: 'Y (vertical) position of composite image',
      },
      {
          displayName: 'Width',
          name: 'width',
          type: 'number',
          default: 500,
          displayOptions: {
              show: {
                  operation: ['crop'],
              },
          },
          description: 'Crop width',
      },
      {
          displayName: 'Height',
          name: 'height',
          type: 'number',
          default: 500,
          displayOptions: {
              show: {
                  operation: ['crop'],
              },
          },
          description: 'Crop height',
      },
      {
          displayName: 'Position X',
          name: 'positionX',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['crop'],
              },
          },
          description: 'X (horizontal) position to crop from',
      },
      {
          displayName: 'Position Y',
          name: 'positionY',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['crop'],
              },
          },
          description: 'Y (vertical) position to crop from',
      },
      {
          displayName: 'Width',
          name: 'width',
          type: 'number',
          default: 500,
          displayOptions: {
              show: {
                  operation: ['resize'],
              },
          },
          description: 'New width of the image',
      },
      {
          displayName: 'Height',
          name: 'height',
          type: 'number',
          default: 500,
          displayOptions: {
              show: {
                  operation: ['resize'],
              },
          },
          description: 'New height of the image',
      },
      {
          displayName: 'Option',
          name: 'resizeOption',
          type: 'options',
          options: [
              {
                  name: 'Ignore Aspect Ratio',
                  value: 'ignoreAspectRatio',
                  description: 'Ignore aspect ratio and resize exactly to specified values',
              },
              {
                  name: 'Maximum Area',
                  value: 'maximumArea',
                  description: 'Specified values are maximum area',
              },
              {
                  name: 'Minimum Area',
                  value: 'minimumArea',
                  description: 'Specified values are minimum area',
              },
              {
                  name: 'Only if Larger',
                  value: 'onlyIfLarger',
                  description: 'Resize only if image is larger than width or height',
              },
              {
                  name: 'Only if Smaller',
                  value: 'onlyIfSmaller',
                  description: 'Resize only if image is smaller than width or height',
              },
              {
                  name: 'Percent',
                  value: 'percent',
                  description: 'Width and height are specified in percents',
              },
          ],
          default: 'maximumArea',
          displayOptions: {
              show: {
                  operation: ['resize'],
              },
          },
          description: 'How to resize the image',
      },
      {
          displayName: 'Rotate',
          name: 'rotate',
          type: 'number',
          typeOptions: {
              minValue: -360,
              maxValue: 360,
          },
          default: 0,
          displayOptions: {
              show: {
                  operation: ['rotate'],
              },
          },
          description: 'How much the image should be rotated',
      },
      {
          displayName: 'Background Color',
          name: 'backgroundColor',
          type: 'color',
          default: '#ffffffff',
          typeOptions: {
              showAlpha: true,
          },
          displayOptions: {
              show: {
                  operation: ['rotate'],
              },
          },
          description: 'The color to use for the background when image gets rotated by anything which is not a multiple of 90',
      },
      {
          displayName: 'Degrees X',
          name: 'degreesX',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['shear'],
              },
          },
          description: 'X (horizontal) shear degrees',
      },
      {
          displayName: 'Degrees Y',
          name: 'degreesY',
          type: 'number',
          default: 0,
          displayOptions: {
              show: {
                  operation: ['shear'],
              },
          },
          description: 'Y (vertical) shear degrees',
      },
      {
          displayName: 'Color',
          name: 'color',
          type: 'color',
          default: '#ff0000',
          displayOptions: {
              show: {
                  operation: ['transparent'],
              },
          },
          description: 'The color to make transparent',
      },
  ];
  class EditImage {
      constructor() {
          this.description = {
              displayName: 'Edit Image',
              name: 'editImage',
              icon: 'fa:image',
              group: ['transform'],
              version: 1,
              description: 'Edits an image like blur, resize or adding border and text',
              defaults: {
                  name: 'Edit Image',
                  color: '#553399',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Get Information',
                              value: 'information',
                              description: 'Returns image information like resolution',
                          },
                          {
                              name: 'Multi Step',
                              value: 'multiStep',
                              description: 'Perform multiple operations',
                          },
                          ...nodeOperations,
                      ].sort((a, b) => {
                          if (a.name.toLowerCase() < b.name.toLowerCase()) {
                              return -1;
                          }
                          if (a.name.toLowerCase() > b.name.toLowerCase()) {
                              return 1;
                          }
                          return 0;
                      }),
                      default: 'border',
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      description: 'Name of the binary property in which the image data can be found',
                  },
                  {
                      displayName: 'Operations',
                      name: 'operations',
                      placeholder: 'Add Operation',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                          sortable: true,
                      },
                      displayOptions: {
                          show: {
                              operation: ['multiStep'],
                          },
                      },
                      description: 'The operations to perform',
                      default: {},
                      options: [
                          {
                              name: 'operations',
                              displayName: 'Operations',
                              values: [
                                  {
                                      displayName: 'Operation',
                                      name: 'operation',
                                      type: 'options',
                                      noDataExpression: true,
                                      options: nodeOperations,
                                      default: '',
                                  },
                                  ...nodeOperationOptions,
                                  {
                                      displayName: 'Font Name or ID',
                                      name: 'font',
                                      type: 'options',
                                      displayOptions: {
                                          show: {
                                              operation: ['text'],
                                          },
                                      },
                                      typeOptions: {
                                          loadOptionsMethod: 'getFonts',
                                      },
                                      default: 'default',
                                      description: 'The font to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                                  },
                              ],
                          },
                      ],
                  },
                  ...nodeOperationOptions,
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          hide: {
                              operation: ['information'],
                          },
                      },
                      options: [
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              default: '',
                              description: 'File name to set in binary data',
                          },
                          {
                              displayName: 'Font Name or ID',
                              name: 'font',
                              type: 'options',
                              displayOptions: {
                                  show: {
                                      '/operation': ['text'],
                                  },
                              },
                              typeOptions: {
                                  loadOptionsMethod: 'getFonts',
                              },
                              default: 'default',
                              description: 'The font to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Format',
                              name: 'format',
                              type: 'options',
                              options: [
                                  {
                                      name: 'bmp',
                                      value: 'bmp',
                                  },
                                  {
                                      name: 'gif',
                                      value: 'gif',
                                  },
                                  {
                                      name: 'jpeg',
                                      value: 'jpeg',
                                  },
                                  {
                                      name: 'png',
                                      value: 'png',
                                  },
                                  {
                                      name: 'tiff',
                                      value: 'tiff',
                                  },
                                  {
                                      name: 'WebP',
                                      value: 'webp',
                                  },
                              ],
                              default: 'jpeg',
                              description: 'Set the output image format',
                          },
                          {
                              displayName: 'Quality',
                              name: 'quality',
                              type: 'number',
                              typeOptions: {
                                  minValue: 0,
                                  maxValue: 100,
                              },
                              default: 100,
                              displayOptions: {
                                  show: {
                                      format: ['jpeg', 'png', 'tiff'],
                                  },
                              },
                              description: 'Sets the jpeg|png|tiff compression level from 0 to 100 (best)',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getFonts() {
                      const files = await (0, get_system_fonts_1.default)();
                      const returnData = [];
                      files.forEach((entry) => {
                          const pathParts = (0, path_1.parse)(entry);
                          if (!pathParts.ext) {
                              return;
                          }
                          returnData.push({
                              name: pathParts.name,
                              value: entry,
                          });
                      });
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      returnData.unshift({
                          name: 'default',
                          value: 'default',
                      });
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let item;
          for (let itemIndex = 0; itemIndex < length; itemIndex++) {
              try {
                  item = items[itemIndex];
                  const operation = this.getNodeParameter('operation', itemIndex);
                  const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
                  const options = this.getNodeParameter('options', itemIndex, {});
                  const cleanupFunctions = [];
                  let gmInstance;
                  const requiredOperationParameters = {
                      blur: ['blur', 'sigma'],
                      border: ['borderColor', 'borderWidth', 'borderHeight'],
                      create: ['backgroundColor', 'height', 'width'],
                      crop: ['height', 'positionX', 'positionY', 'width'],
                      composite: ['dataPropertyNameComposite', 'operator', 'positionX', 'positionY'],
                      draw: [
                          'color',
                          'cornerRadius',
                          'endPositionX',
                          'endPositionY',
                          'primitive',
                          'startPositionX',
                          'startPositionY',
                      ],
                      information: [],
                      resize: ['height', 'resizeOption', 'width'],
                      rotate: ['backgroundColor', 'rotate'],
                      shear: ['degreesX', 'degreesY'],
                      text: ['font', 'fontColor', 'fontSize', 'lineLength', 'positionX', 'positionY', 'text'],
                      transparent: ['color'],
                  };
                  let operations = [];
                  if (operation === 'multiStep') {
                      const operationsData = this.getNodeParameter('operations', itemIndex, {
                          operations: [],
                      });
                      operations = operationsData.operations;
                  }
                  else {
                      const operationParameters = {};
                      requiredOperationParameters[operation].forEach((parameterName) => {
                          try {
                              operationParameters[parameterName] = this.getNodeParameter(parameterName, itemIndex);
                          }
                          catch (error) { }
                      });
                      operations = [
                          {
                              operation,
                              ...operationParameters,
                          },
                      ];
                  }
                  if (operations[0].operation !== 'create') {
                      this.helpers.assertBinaryData(itemIndex, dataPropertyName);
                      const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(itemIndex, dataPropertyName);
                      gmInstance = (0, gm_1.default)(binaryDataBuffer);
                      gmInstance = gmInstance.background('transparent');
                  }
                  const newItem = {
                      json: item.json,
                      binary: {},
                      pairedItem: {
                          item: itemIndex,
                      },
                  };
                  if (operation === 'information') {
                      const imageData = await new Promise((resolve, reject) => {
                          gmInstance = gmInstance.identify((error, data) => {
                              if (error) {
                                  reject(error);
                                  return;
                              }
                              resolve(data);
                          });
                      });
                      newItem.json = imageData;
                  }
                  for (let i = 0; i < operations.length; i++) {
                      const operationData = operations[i];
                      if (operationData.operation === 'blur') {
                          gmInstance = gmInstance.blur(operationData.blur, operationData.sigma);
                      }
                      else if (operationData.operation === 'border') {
                          gmInstance = gmInstance
                              .borderColor(operationData.borderColor)
                              .border(operationData.borderWidth, operationData.borderHeight);
                      }
                      else if (operationData.operation === 'composite') {
                          const positionX = operationData.positionX;
                          const positionY = operationData.positionY;
                          const operator = operationData.operator;
                          const geometryString = (positionX >= 0 ? '+' : '') + positionX + (positionY >= 0 ? '+' : '') + positionY;
                          const binaryPropertyName = operationData.dataPropertyNameComposite;
                          this.helpers.assertBinaryData(itemIndex, binaryPropertyName);
                          const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName);
                          const { fd, path, cleanup } = await (0, tmp_promise_1.file)();
                          cleanupFunctions.push(cleanup);
                          await fsWriteFileAsync(fd, binaryDataBuffer);
                          if (operations[0].operation === 'create') {
                              gmInstance = (0, gm_1.default)(gmInstance.stream('png'))
                                  .compose(operator)
                                  .geometry(geometryString)
                                  .composite(path);
                          }
                          else {
                              gmInstance = gmInstance.compose(operator).geometry(geometryString).composite(path);
                          }
                          if (operations.length !== i + 1) {
                              gmInstance = (0, gm_1.default)(gmInstance.stream());
                          }
                      }
                      else if (operationData.operation === 'create') {
                          gmInstance = (0, gm_1.default)(operationData.width, operationData.height, operationData.backgroundColor);
                          if (!options.format) {
                              options.format = 'png';
                          }
                      }
                      else if (operationData.operation === 'crop') {
                          gmInstance = gmInstance.crop(operationData.width, operationData.height, operationData.positionX, operationData.positionY);
                      }
                      else if (operationData.operation === 'draw') {
                          gmInstance = gmInstance.fill(operationData.color);
                          if (operationData.primitive === 'line') {
                              gmInstance = gmInstance.drawLine(operationData.startPositionX, operationData.startPositionY, operationData.endPositionX, operationData.endPositionY);
                          }
                          else if (operationData.primitive === 'circle') {
                              gmInstance = gmInstance.drawCircle(operationData.startPositionX, operationData.startPositionY, operationData.endPositionX, operationData.endPositionY);
                          }
                          else if (operationData.primitive === 'rectangle') {
                              gmInstance = gmInstance.drawRectangle(operationData.startPositionX, operationData.startPositionY, operationData.endPositionX, operationData.endPositionY, operationData.cornerRadius || undefined);
                          }
                      }
                      else if (operationData.operation === 'resize') {
                          const resizeOption = operationData.resizeOption;
                          let option = '@';
                          if (resizeOption === 'ignoreAspectRatio') {
                              option = '!';
                          }
                          else if (resizeOption === 'minimumArea') {
                              option = '^';
                          }
                          else if (resizeOption === 'onlyIfSmaller') {
                              option = '<';
                          }
                          else if (resizeOption === 'onlyIfLarger') {
                              option = '>';
                          }
                          else if (resizeOption === 'percent') {
                              option = '%';
                          }
                          gmInstance = gmInstance.resize(operationData.width, operationData.height, option);
                      }
                      else if (operationData.operation === 'rotate') {
                          gmInstance = gmInstance.rotate(operationData.backgroundColor, operationData.rotate);
                      }
                      else if (operationData.operation === 'shear') {
                          gmInstance = gmInstance.shear(operationData.degreesX, operationData.degreesY);
                      }
                      else if (operationData.operation === 'text') {
                          const lines = [];
                          let currentLine = '';
                          operationData.text.split('\n').forEach((textLine) => {
                              textLine.split(' ').forEach((textPart) => {
                                  if (currentLine.length + textPart.length + 1 >
                                      operationData.lineLength) {
                                      lines.push(currentLine.trim());
                                      currentLine = `${textPart} `;
                                      return;
                                  }
                                  currentLine += `${textPart} `;
                              });
                              lines.push(currentLine.trim());
                              currentLine = '';
                          });
                          const renderText = lines.join('\n');
                          const font = options.font || operationData.font;
                          if (font && font !== 'default') {
                              gmInstance = gmInstance.font(font);
                          }
                          gmInstance = gmInstance
                              .fill(operationData.fontColor)
                              .fontSize(operationData.fontSize)
                              .drawText(operationData.positionX, operationData.positionY, renderText);
                      }
                      else if (operationData.operation === 'transparent') {
                          gmInstance = gmInstance.transparent(operationData.color);
                      }
                  }
                  if (item.binary !== undefined && newItem.binary) {
                      Object.assign(newItem.binary, item.binary);
                      if (newItem.binary[dataPropertyName]) {
                          newItem.binary[dataPropertyName] = (0, n8n_workflow_1.deepCopy)(newItem.binary[dataPropertyName]);
                      }
                  }
                  if (newItem.binary[dataPropertyName] === undefined) {
                      newItem.binary[dataPropertyName] = {
                          data: '',
                          mimeType: '',
                      };
                  }
                  if (options.quality !== undefined) {
                      gmInstance = gmInstance.quality(options.quality);
                  }
                  if (options.format !== undefined) {
                      gmInstance = gmInstance.setFormat(options.format);
                      newItem.binary[dataPropertyName].fileExtension = options.format;
                      newItem.binary[dataPropertyName].mimeType = `image/${options.format}`;
                      const fileName = newItem.binary[dataPropertyName].fileName;
                      if (fileName === null || fileName === void 0 ? void 0 : fileName.includes('.')) {
                          newItem.binary[dataPropertyName].fileName =
                              fileName.split('.').slice(0, -1).join('.') + '.' + options.format;
                      }
                  }
                  if (options.fileName !== undefined) {
                      newItem.binary[dataPropertyName].fileName = options.fileName;
                  }
                  returnData.push(await new Promise((resolve, reject) => {
                      gmInstance.toBuffer(async (error, buffer) => {
                          cleanupFunctions.forEach(async (cleanup) => cleanup());
                          if (error) {
                              return reject(error);
                          }
                          const binaryData = await this.helpers.prepareBinaryData(Buffer.from(buffer));
                          newItem.binary[dataPropertyName] = {
                              ...newItem.binary[dataPropertyName],
                              ...binaryData,
                          };
                          return resolve(newItem);
                      });
                  }));
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: itemIndex,
                          },
                      });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.EditImage = EditImage;
  //# sourceMappingURL=EditImage.node.js.map

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

  # Edit Image

  Use the Edit Image node to manipulate and edit images.

  /// note | Dependencies
  1. If you aren't running n8n on Docker, you need to install [GraphicsMagick](http://www.graphicsmagick.org/README.html){:target=_blank .external-link}.
  2. You need to use a node such as the [Read/Write Files from Disk](/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile.md) node or the [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/index.md) node to pass the image file as a data property to the Edit Image node.
  ///

  ## Operations

  - Add a **Blur** to the image to reduce sharpness
  - Add a **Border** to the image
  - **Composite** an image on top of another image
  - **Create** a new image
  - **Crop** the image
  - **Draw** on an image
  - **Get Information** about the image
  - **Multi Step** perform multiple operations on the image
  - **Resize**: Change the size of the image
  - **Rotate** the image
  - **Shear** image along the X or Y axis
  - Add **Text** to the image
  - Make a color in image **Transparent**

  ## Node parameters

  The parameters for this node depend on the operation you select.

  ### Blur parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Blur**: Enter a number to set how strong the blur should be, between 0 and 1000. Higher numbers create blurrier images.
  * **Sigma**: Enter a number to set the stigma for the blur, between 0 and 1000. Higher numbers create blurrier images.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Border parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Border Width**: Enter the width of the border.
  * **Border Height**: Enter the height of the border.
  * **Border Color**: Set the color for the border. You can either enter a hex or select the color swatch to open a color picker.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Composite parameters

  * **Property Name**: Enter the name of the binary property that stores the image data. This image is your base image.
  * **Composite Image Property**: Enter the name of the binary property that stores image to composite on top of the **Property Name** image.
  * **Operator**: Select composite operator, which determines how the composite works. Options include:
  	* **Add**
  	* **Atop**
  	* **Bumpmap**
  	* **Copy**
  	* **Copy Black**
  	* **Copy Blue**
  	* **Copy Cyan**
  	* **Copy Green**
  	* **Copy Magenta**
  	* **Copy Opacity**
  	* **Copy Red**
  	* **Copy Yellow**
  	* **Difference**
  	* **Divide**
  	* **In**
  	* **Minus**
  	* **Multiply**
  	* **Out**
  	* **Over**
  	* **Plus**
  	* **Subtract**
  	* **Xor**
  * **Position X**: Enter the x axis position (horizontal) of the composite image.
  * **Position Y**: Enter the y axis position (vertical) of the composite image.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Create parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Background Color**: Set the background color for the image. You can either enter a hex or select the color swatch to open a color picker.
  * **Image Width**: Enter the width of the image.
  * **Image Height**: Enter the height of the image.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Crop parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Width**: Enter the width you'd like to crop to.
  * **Height**: Enter the height you'd like to crop to.
  * **Position X**: Enter the x axis position (horizontal) to start the crop from.
  * **Position Y**: Enter the y axis position (vertical) to start the crop from.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Draw parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Primitive**: Select the primitive shape to draw. Choose from:
  	* **Circle**
  	* **Line**
  	* **Rectangle**
  * **Color**: Set the color for the primitive. You can either enter a hex or select the color swatch to open a color picker.
  * **Start Position X**: Enter the x axis position (horizontal) to start drawing from.
  * **Start Position Y**: Enter the y axis position (vertical) to start drawing from.
  * **End Position X**: Enter the x axis position (horizontal) to stop drawing at.
  * **End Position Y**: Enter the y axis position (vertical) to start drawing at.
  * **Corner Radius**: Enter a number to set the corner radius. Adding a corner radius will round the corners of the drawn primitive.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Get Information parameters

  For this operation, you only need to add the **Property Name** of the binary property that stores the image data.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Multi Step parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Operations**: Add the operations you want the multi step operation to perform. You can use any of the other operations.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Resize parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Width**: Enter the new width you'd like for the image.
  * **Height**: Enter the new height you'd like for the image.
  * **Option**: Select how you'd like to resize the image. Choose from:
  	* **Ignore Aspect Ratio**: Ignore the aspect ratio and resize to the exact height and width you've entered.
  	* **Maximum Area**: The height and width you've entered is the maximum area/size for the image. The image maintains its aspect ratio and won't be larger than the height and/or width you've entered.
  	* **Minimum Area**: The height and width you've entered is the minimum area/size for the image. The image maintains its aspect ratio and won't be smaller than the height and/or width you've entered.
  	* **Only if Larger**: Resize the image only if it's larger than the width and height you entered. The image maintains its aspect ratio.
  	* **Only if Smaller**: Resize the image only if it's smaller than the width and height you entered. The image maintains its aspect ratio.
  	* **Percent**: Resize the image using the width and height as percentages of the original image.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Rotate parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Rotate**: Enter the number of degrees to rotate the image, from --360 to 360.
  * **Background Color**: Set the background color for the image. You can either enter a hex or select the color swatch to open a color picker. This color is used to fill in the empty background whenever the image is rotated by multiples of 90 degrees. If multipled of 90 degrees are used for the **Rotate** field, the background color isn't used.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Shear parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Degrees X**: Enter the number of degrees to shear from the x axis.
  * **Degrees Y**: Enter the number of degrees to shear from the y axis.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Text parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Text**: Enter the text you'd like to write on the image.
  * **Font Size**: Select the font size for the text.
  * **Font Color**: Set the font color. You can either enter a hex or select the color swatch to open a color picker.
  * **Position X**: Enter the x axis position (horizontal) to begin the text at.
  * **Position Y**: Enter the y axis position (vertical) to begin the text at.
  * **Max Line Length**: Enter the maximum amount of characters in a line before adding a line break.

  Refer to [Node options](#node-options) for optional configuration options.

  ### Transparent parameters

  * **Property Name**: Enter the name of the binary property that stores the image data.
  * **Color**: Set the color to make transparent. You can either enter a hex or select the color swatch to open a color picker.

  Refer to [Node options](#node-options) for optional configuration options.

  ## Node options

  - **File Name**: Enter the filename of the output file.
  - **Format**: Enter the image format of the output file. Choose from:
  	- **bmp**
  	- **gif**
  	- **jpeg**
  	- **png**
  	- **tiff**
  	- **WebP**

  The **Text** operation also includes the option for **Font Name or ID**. Select the text font from the dropdown or specify an ID using an [expression](/code/expressions.md).

  ## Templates and examples

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

example_workflow:
  {"name":"Background Color Example Workflow","nodes":[{"parameters":{},"id":"gpqloh1gai5zzkonqy6zkc","name":"Background Color","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.E2eTest
name: E2eTest
display_name: E2E Test
description: Dummy node used for e2e testing
category: output
icon: fa:play
code_hash: 2bdc344d2866f7e3a961538270c732f5f44ed4b8e88d8287b757f159df2aac08
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.E2eTest = void 0;
  const mock_1 = require("./mock");
  class E2eTest {
      constructor() {
          this.description = {
              displayName: 'E2E Test',
              name: 'e2eTest',
              icon: 'fa:play',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"]}}',
              description: 'Dummy node used for e2e testing',
              defaults: {
                  name: 'E2E Test',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Remote Options',
                              value: 'remoteOptions',
                          },
                          {
                              name: 'Resource Locator',
                              value: 'resourceLocator',
                          },
                          {
                              name: 'Resource Mapping Component',
                              value: 'resourceMapper',
                          },
                      ],
                      default: 'remoteOptions',
                  },
                  {
                      displayName: 'Field ID',
                      name: 'fieldId',
                      type: 'string',
                      default: '',
                  },
                  {
                      displayName: 'Remote Options Name or ID',
                      name: 'remoteOptions',
                      description: 'Remote options to load. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                      type: 'options',
                      typeOptions: {
                          loadOptionsDependsOn: ['fieldId'],
                          loadOptionsMethod: 'getOptions',
                      },
                      required: true,
                      default: [],
                      displayOptions: {
                          show: {
                              operation: ['remoteOptions'],
                          },
                      },
                  },
                  {
                      displayName: 'Resource Locator',
                      name: 'rlc',
                      type: 'resourceLocator',
                      default: { mode: 'list', value: '' },
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['resourceLocator'],
                          },
                      },
                      modes: [
                          {
                              displayName: 'From List',
                              name: 'list',
                              type: 'list',
                              typeOptions: {
                                  searchListMethod: 'optionsSearch',
                                  searchable: true,
                              },
                          },
                          {
                              displayName: 'By URL',
                              name: 'url',
                              type: 'string',
                              placeholder: 'https://example.com/user/a4071e98-7d40-41fb-8911-ce3e7bf94fb2',
                              validation: [
                                  {
                                      type: 'regex',
                                      properties: {
                                          regex: 'https://example.com/user/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}',
                                          errorMessage: 'Not a valid example URL',
                                      },
                                  },
                              ],
                              extractValue: {
                                  type: 'regex',
                                  regex: 'https://example.com/user/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})',
                              },
                          },
                          {
                              displayName: 'ID',
                              name: 'id',
                              type: 'string',
                              validation: [
                                  {
                                      type: 'regex',
                                      properties: {
                                          regex: '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}',
                                          errorMessage: 'Not a valid UUI',
                                      },
                                  },
                              ],
                              placeholder: 'a4071e98-7d40-41fb-8911-ce3e7bf94fb2',
                          },
                      ],
                  },
                  {
                      displayName: 'Resource Mapping Component',
                      name: 'resourceMapper',
                      type: 'resourceMapper',
                      noDataExpression: true,
                      default: {
                          mappingMode: 'defineBelow',
                          value: null,
                      },
                      required: true,
                      typeOptions: {
                          loadOptionsDependsOn: ['fieldId'],
                          resourceMapper: {
                              resourceMapperMethod: 'getMappingColumns',
                              mode: 'upsert',
                              fieldWords: {
                                  singular: 'column',
                                  plural: 'columns',
                              },
                              addAllFields: true,
                              multiKeyMatch: false,
                          },
                      },
                      displayOptions: {
                          show: {
                              operation: ['resourceMapper'],
                          },
                      },
                  },
                  {
                      displayName: 'Other Non Important Field',
                      name: 'otherField',
                      type: 'string',
                      default: '',
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getOptions() {
                      return mock_1.remoteOptions;
                  },
              },
              listSearch: {
                  async optionsSearch(filter, paginationToken) {
                      const pageSize = 5;
                      let results = mock_1.searchOptions;
                      if (filter) {
                          results = results.filter((option) => option.name.includes(filter));
                      }
                      const offset = paginationToken ? parseInt(paginationToken, 10) : 0;
                      results = results.slice(offset, offset + pageSize);
                      return {
                          results,
                          paginationToken: offset + pageSize,
                      };
                  },
              },
              resourceMapping: {
                  async getMappingColumns() {
                      return mock_1.resourceMapperFields;
                  },
              },
          };
      }
      async execute() {
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'resourceMapper') {
              const rmValue = this.getNodeParameter('resourceMapper.value', 0);
              if (rmValue) {
                  return [[{ json: rmValue }]];
              }
          }
          return [mock_1.returnData];
      }
  }
  exports.E2eTest = E2eTest;
  //# sourceMappingURL=E2eTest.node.js.map

example_workflow:
  {"name":"E2E Test Example Workflow","nodes":[{"parameters":{},"id":"oftn3augfzizw7muyc3hj","name":"E2E Test","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Dropcontact
name: Dropcontact
display_name: Dropcontact
description: Find B2B emails and enrich contacts
category: transform
icon: file:dropcontact.svg
code_hash: cd7a9edf467fd1288617b3ecb6e11942c3dab69d3fc91a543624ca2bed582dc6
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Dropcontact
documentation_title: Dropcontact node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"dropcontact","description":"Templates for dropcontact"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Dropcontact = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunction_1 = require("./GenericFunction");
  class Dropcontact {
      constructor() {
          this.description = {
              displayName: 'Dropcontact',
              name: 'dropcontact',
              icon: 'file:dropcontact.svg',
              group: ['transform'],
              version: 1,
              description: 'Find B2B emails and enrich contacts',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Dropcontact',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'dropcontactApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      noDataExpression: true,
                      name: 'resource',
                      type: 'options',
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                      ],
                      default: 'contact',
                      required: true,
                  },
                  {
                      displayName: 'Operation',
                      noDataExpression: true,
                      name: 'operation',
                      type: 'options',
                      options: [
                          {
                              name: 'Enrich',
                              value: 'enrich',
                              description: 'Find B2B emails and enrich your contact from his name and his website',
                              action: 'Find B2B emails',
                          },
                          {
                              name: 'Fetch Request',
                              value: 'fetchRequest',
                          },
                      ],
                      default: 'enrich',
                      required: true,
                  },
                  {
                      displayName: 'Request ID',
                      name: 'requestId',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['contact'],
                              operation: ['fetchRequest'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      displayOptions: {
                          show: {
                              resource: ['contact'],
                              operation: ['enrich'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'Simplify Output (Faster)',
                      name: 'simplify',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['contact'],
                              operation: ['enrich'],
                          },
                      },
                      default: false,
                      description: 'When off, waits for the contact data before completing. Waiting time can be adjusted with Extend Wait Time option. When on, returns a request_id that can be used later in the Fetch Request operation.',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['contact'],
                              operation: ['enrich'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Company SIREN Number',
                              name: 'num_siren',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Company SIRET Code',
                              name: 'siret',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Company Name',
                              name: 'company',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Country',
                              name: 'country',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'First Name',
                              name: 'first_name',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Full Name',
                              name: 'full_name',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Last Name',
                              name: 'last_name',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'LinkedIn Profile',
                              name: 'linkedin',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Phone Number',
                              name: 'phone',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Website',
                              name: 'website',
                              type: 'string',
                              default: '',
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['contact'],
                              operation: ['enrich'],
                          },
                      },
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Data Fetch Wait Time',
                              name: 'waitTime',
                              type: 'number',
                              typeOptions: {
                                  minValue: 1,
                              },
                              displayOptions: {
                                  show: {
                                      '/simplify': [false],
                                  },
                              },
                              default: 45,
                              description: 'When not simplifying the response, data will be fetched in two steps. This parameter controls how long to wait (in seconds) before trying the second step.',
                          },
                          {
                              displayName: 'French Company Enrich',
                              name: 'siren',
                              type: 'boolean',
                              default: false,
                              description: 'Whether you want the <a href="https://en.wikipedia.org/wiki/SIREN_code" target="_blank">SIREN number</a>, NAF code, TVA number, company address and informations about the company leader. Only applies to french companies.',
                          },
                          {
                              displayName: 'Language',
                              name: 'language',
                              type: 'options',
                              options: [
                                  {
                                      name: 'English',
                                      value: 'en',
                                  },
                                  {
                                      name: 'French',
                                      value: 'fr',
                                  },
                              ],
                              default: 'en',
                              description: 'Whether the response is in English or French',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const entryData = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          if (resource === 'contact') {
              if (operation === 'enrich') {
                  const options = this.getNodeParameter('options', 0);
                  const data = [];
                  const simplify = this.getNodeParameter('simplify', 0);
                  const siren = options.siren === true ? true : false;
                  const language = options.language ? options.language : 'en';
                  for (let i = 0; i < entryData.length; i++) {
                      const email = this.getNodeParameter('email', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {};
                      if (email !== '') {
                          body.email = email;
                      }
                      Object.assign(body, additionalFields);
                      data.push(body);
                  }
                  responseData = (await GenericFunction_1.dropcontactApiRequest.call(this, 'POST', '/batch', { data, siren, language }, {}));
                  if (!responseData.success) {
                      if (this.continueOnFail()) {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: responseData.reason || 'invalid request' }), {
                              itemData: (0, GenericFunction_1.mapPairedItemsFrom)(entryData),
                          });
                          returnData.push(...executionData);
                      }
                      else {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), {
                              error: responseData.reason || 'invalid request',
                          });
                      }
                  }
                  if (!simplify) {
                      const waitTime = this.getNodeParameter('options.waitTime', 0, 45);
                      const delay = async (ms) => new Promise((res) => setTimeout(res, ms * 1000));
                      await delay(waitTime);
                      responseData = await GenericFunction_1.dropcontactApiRequest.call(this, 'GET', `/batch/${responseData.request_id}`, {}, {});
                      if (!responseData.success) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: responseData.reason }), {
                                  itemData: (0, GenericFunction_1.mapPairedItemsFrom)(entryData),
                              });
                              returnData.push(...executionData);
                          }
                          else {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), {
                                  error: responseData.reason,
                                  description: 'Hint: Increase the Wait Time to avoid this error',
                              });
                          }
                      }
                      else {
                          responseData.data.forEach((d, index) => {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(d), { itemData: { item: index } });
                              returnData.push(...executionData);
                          });
                      }
                  }
                  else {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), {
                          itemData: (0, GenericFunction_1.mapPairedItemsFrom)(entryData),
                      });
                      returnData.push(...executionData);
                  }
              }
              if (operation === 'fetchRequest') {
                  for (let i = 0; i < entryData.length; i++) {
                      const requestId = this.getNodeParameter('requestId', i);
                      responseData = (await GenericFunction_1.dropcontactApiRequest.call(this, 'GET', `/batch/${requestId}`, {}, {}));
                      if (!responseData.success) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: responseData.reason || 'invalid request' }), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          else {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), {
                                  error: responseData.reason || 'invalid request',
                              });
                          }
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData.data), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
          }
          return [returnData];
      }
  }
  exports.Dropcontact = Dropcontact;
  //# sourceMappingURL=Dropcontact.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropcontactApi = void 0;
  class DropcontactApi {
      constructor() {
          this.name = 'dropcontactApi';
          this.displayName = 'Dropcontact API';
          this.documentationUrl = 'dropcontact';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'user-agent': 'n8n',
                      'X-Access-Token': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.dropcontact.io',
                  url: '/batch',
                  method: 'POST',
                  body: {
                      data: [{ email: '' }],
                  },
              },
          };
      }
  }
  exports.DropcontactApi = DropcontactApi;
  //# sourceMappingURL=DropcontactApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropcontactApi = void 0;
  class DropcontactApi {
      constructor() {
          this.name = 'dropcontactApi';
          this.displayName = 'Dropcontact API';
          this.documentationUrl = 'dropcontact';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'user-agent': 'n8n',
                      'X-Access-Token': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.dropcontact.io',
                  url: '/batch',
                  method: 'POST',
                  body: {
                      data: [{ email: '' }],
                  },
              },
          };
      }
  }
  exports.DropcontactApi = DropcontactApi;
  //# sourceMappingURL=DropcontactApi.credentials.js.map

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

  # Dropcontact node

  Use the Dropcontact node to automate work in Dropcontact, and integrate Dropcontact with other applications. n8n has built-in support for a wide range of Dropcontact features, including  fetching contacts. 

  On this page, you'll find a list of operations the Dropcontact node supports and links to more resources.

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

  ## Operations

  **Contact**
  - Enrich
  - Fetch Request

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Dropcontact Example Workflow","nodes":[{"parameters":{},"id":"jfv1c0xrr0clhpjo4z0p1","name":"Dropcontact","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.ERPNext
name: ERPNext
display_name: ERPNext
description: Consume ERPNext API
category: output
icon: file:erpnext.svg
code_hash: 29efdfa1b7a2885ae746d55c9bf1487a1cb4ad084e0eae6cb82e06adccb14e19
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ERPNext
documentation_title: ERPNext node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"erpnext","description":"Templates for erpnext"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ERPNext = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const DocumentDescription_1 = require("./DocumentDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  const utils_1 = require("./utils");
  class ERPNext {
      constructor() {
          this.description = {
              displayName: 'ERPNext',
              name: 'erpNext',
              icon: 'file:erpnext.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
              description: 'Consume ERPNext API',
              defaults: {
                  name: 'ERPNext',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'erpNextApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Document',
                              value: 'document',
                          },
                      ],
                      default: 'document',
                  },
                  ...DocumentDescription_1.documentOperations,
                  ...DocumentDescription_1.documentFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getDocTypes() {
                      const data = await GenericFunctions_1.erpNextApiRequestAllItems.call(this, 'data', 'GET', '/api/resource/DocType', {});
                      const docTypes = data.map(({ name }) => {
                          return { name, value: encodeURI(name) };
                      });
                      return (0, utils_1.processNames)(docTypes);
                  },
                  async getDocFilters() {
                      const docType = this.getCurrentNodeParameter('docType');
                      const { data } = await GenericFunctions_1.erpNextApiRequest.call(this, 'GET', `/api/resource/DocType/${docType}`, {});
                      const docFields = data.fields.map(({ label, fieldname }) => {
                          return { name: label, value: fieldname };
                      });
                      docFields.unshift({ name: '*', value: '*' });
                      return (0, utils_1.processNames)(docFields);
                  },
                  async getDocFields() {
                      const docType = this.getCurrentNodeParameter('docType');
                      const { data } = await GenericFunctions_1.erpNextApiRequest.call(this, 'GET', `/api/resource/DocType/${docType}`, {});
                      const docFields = data.fields.map(({ label, fieldname }) => {
                          return { name: label, value: fieldname };
                      });
                      return (0, utils_1.processNames)(docFields);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let responseData;
          const body = {};
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              if (resource === 'document') {
                  if (operation === 'get') {
                      const docType = this.getNodeParameter('docType', i);
                      const documentName = this.getNodeParameter('documentName', i);
                      responseData = await GenericFunctions_1.erpNextApiRequest.call(this, 'GET', `/api/resource/${docType}/${documentName}`);
                      responseData = responseData.data;
                  }
                  if (operation === 'getAll') {
                      const docType = this.getNodeParameter('docType', i);
                      const endpoint = `/api/resource/${docType}`;
                      const { fields, filters } = this.getNodeParameter('options', i);
                      if (fields) {
                          if (fields.includes('*')) {
                              qs.fields = JSON.stringify(['*']);
                          }
                          else {
                              qs.fields = JSON.stringify(fields);
                          }
                      }
                      if (filters) {
                          qs.filters = JSON.stringify(filters.customProperty.map((filter) => {
                              return [docType, filter.field, (0, utils_1.toSQL)(filter.operator), filter.value];
                          }));
                      }
                      const returnAll = this.getNodeParameter('returnAll', i);
                      if (!returnAll) {
                          const limit = this.getNodeParameter('limit', i);
                          qs.limit_page_length = limit;
                          qs.limit_start = 0;
                          responseData = await GenericFunctions_1.erpNextApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = responseData.data;
                      }
                      else {
                          responseData = await GenericFunctions_1.erpNextApiRequestAllItems.call(this, 'data', 'GET', endpoint, {}, qs);
                      }
                  }
                  else if (operation === 'create') {
                      const properties = this.getNodeParameter('properties', i);
                      if (!properties.customProperty.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter at least one property for the document to create.', { itemIndex: i });
                      }
                      properties.customProperty.forEach((property) => {
                          body[property.field] = property.value;
                      });
                      const docType = this.getNodeParameter('docType', i);
                      responseData = await GenericFunctions_1.erpNextApiRequest.call(this, 'POST', `/api/resource/${docType}`, body);
                      responseData = responseData.data;
                  }
                  else if (operation === 'delete') {
                      const docType = this.getNodeParameter('docType', i);
                      const documentName = this.getNodeParameter('documentName', i);
                      responseData = await GenericFunctions_1.erpNextApiRequest.call(this, 'DELETE', `/api/resource/${docType}/${documentName}`);
                  }
                  else if (operation === 'update') {
                      const properties = this.getNodeParameter('properties', i);
                      if (!properties.customProperty.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter at least one property for the document to update.', { itemIndex: i });
                      }
                      properties.customProperty.forEach((property) => {
                          body[property.field] = property.value;
                      });
                      const docType = this.getNodeParameter('docType', i);
                      const documentName = this.getNodeParameter('documentName', i);
                      responseData = await GenericFunctions_1.erpNextApiRequest.call(this, 'PUT', `/api/resource/${docType}/${documentName}`, body);
                      responseData = responseData.data;
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.ERPNext = ERPNext;
  //# sourceMappingURL=ERPNext.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ERPNextApi = void 0;
  class ERPNextApi {
      constructor() {
          this.name = 'erpNextApi';
          this.displayName = 'ERPNext API';
          this.documentationUrl = 'erpnext';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'apiSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'n8n',
                  description: 'Subdomain of cloud-hosted ERPNext instance. For example, "n8n" is the subdomain in: <code>https://n8n.erpnext.com</code>',
                  displayOptions: {
                      show: {
                          environment: ['cloudHosted'],
                      },
                  },
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'options',
                  default: 'erpnext.com',
                  options: [
                      {
                          name: 'erpnext.com',
                          value: 'erpnext.com',
                      },
                      {
                          name: 'frappe.cloud',
                          value: 'frappe.cloud',
                      },
                  ],
                  description: 'Domain for your cloud hosted ERPNext instance.',
                  displayOptions: {
                      show: {
                          environment: ['cloudHosted'],
                      },
                  },
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  description: 'Fully qualified domain name of self-hosted ERPNext instance',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=token {{$credentials.apiKey}}:{{$credentials.apiSecret}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.environment === "cloudHosted" ? "https://" + $credentials.subdomain + "." + $credentials.domain : $credentials.domain}}',
                  url: '/api/method/frappe.auth.get_logged_user',
                  skipSslCertificateValidation: '={{ $credentials.allowUnauthorizedCerts }}',
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'message',
                          value: undefined,
                          message: 'Unable to authenticate, Check the credentials and the url',
                      },
                  },
              ],
          };
      }
  }
  exports.ERPNextApi = ERPNextApi;
  //# sourceMappingURL=ERPNextApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ERPNextApi = void 0;
  class ERPNextApi {
      constructor() {
          this.name = 'erpNextApi';
          this.displayName = 'ERPNext API';
          this.documentationUrl = 'erpnext';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'apiSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'n8n',
                  description: 'Subdomain of cloud-hosted ERPNext instance. For example, "n8n" is the subdomain in: <code>https://n8n.erpnext.com</code>',
                  displayOptions: {
                      show: {
                          environment: ['cloudHosted'],
                      },
                  },
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'options',
                  default: 'erpnext.com',
                  options: [
                      {
                          name: 'erpnext.com',
                          value: 'erpnext.com',
                      },
                      {
                          name: 'frappe.cloud',
                          value: 'frappe.cloud',
                      },
                  ],
                  description: 'Domain for your cloud hosted ERPNext instance.',
                  displayOptions: {
                      show: {
                          environment: ['cloudHosted'],
                      },
                  },
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  description: 'Fully qualified domain name of self-hosted ERPNext instance',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=token {{$credentials.apiKey}}:{{$credentials.apiSecret}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.environment === "cloudHosted" ? "https://" + $credentials.subdomain + "." + $credentials.domain : $credentials.domain}}',
                  url: '/api/method/frappe.auth.get_logged_user',
                  skipSslCertificateValidation: '={{ $credentials.allowUnauthorizedCerts }}',
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'message',
                          value: undefined,
                          message: 'Unable to authenticate, Check the credentials and the url',
                      },
                  },
              ],
          };
      }
  }
  exports.ERPNextApi = ERPNextApi;
  //# sourceMappingURL=ERPNextApi.credentials.js.map

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

  # ERPNext node

  Use the ERPNext node to automate work in ERPNext, and integrate ERPNext with other applications. n8n has built-in support for a wide range of ERPNext features, including creating, updating, retrieving, and deleting documents. 

  On this page, you'll find a list of operations the ERPNext node supports and links to more resources.

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

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

  ## Operations

  **Document**
  - Create a document
  - Delete a document
  - Retrieve a document
  - Retrieve all documents
  - Update a document

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"ERPNext Example Workflow","nodes":[{"parameters":{},"id":"325l80ku2uf6ny4grd4778","name":"ERPNext","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Dropbox
name: Dropbox
display_name: Dropbox
description: Access data on Dropbox
category: input
icon: file:dropbox.svg
code_hash: 2c1ed766c39f4be2f863f96b50ead7190d2e4a9f8197ac574ea1410e58165ea2
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Dropbox
documentation_title: Dropbox node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"dropbox","description":"Templates for dropbox"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:48
updated_at: 2025-06-08 18:33:48
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Dropbox = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Dropbox {
      constructor() {
          this.description = {
              displayName: 'Dropbox',
              name: 'dropbox',
              icon: 'file:dropbox.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Access data on Dropbox',
              defaults: {
                  name: 'Dropbox',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'dropboxApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'dropboxOAuth2Api',
                      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',
                      description: 'Means of authenticating with the service',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Folder',
                              value: 'folder',
                          },
                          {
                              name: 'Search',
                              value: 'search',
                          },
                      ],
                      default: 'file',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['file'],
                          },
                      },
                      options: [
                          {
                              name: 'Copy',
                              value: 'copy',
                              description: 'Copy a file',
                              action: 'Copy a file',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a file',
                              action: 'Delete a file',
                          },
                          {
                              name: 'Download',
                              value: 'download',
                              description: 'Download a file',
                              action: 'Download a file',
                          },
                          {
                              name: 'Move',
                              value: 'move',
                              description: 'Move a file',
                              action: 'Move a file',
                          },
                          {
                              name: 'Upload',
                              value: 'upload',
                              description: 'Upload a file',
                              action: 'Upload a file',
                          },
                      ],
                      default: 'upload',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['folder'],
                          },
                      },
                      options: [
                          {
                              name: 'Copy',
                              value: 'copy',
                              description: 'Copy a folder',
                              action: 'Copy a folder',
                          },
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a folder',
                              action: 'Create a folder',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a folder',
                              action: 'Delete a folder',
                          },
                          {
                              name: 'List',
                              value: 'list',
                              description: 'Return the files and folders in a given folder',
                              action: 'List a folder',
                          },
                          {
                              name: 'Move',
                              value: 'move',
                              description: 'Move a folder',
                              action: 'Move a folder',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['search'],
                          },
                      },
                      options: [
                          {
                              name: 'Query',
                              value: 'query',
                              action: 'Query',
                          },
                      ],
                      default: 'query',
                  },
                  {
                      displayName: 'From Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['copy'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/original.txt',
                      description: 'The path of file or folder to copy',
                  },
                  {
                      displayName: 'To Path',
                      name: 'toPath',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['copy'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/copy.txt',
                      description: 'The destination path of file or folder',
                  },
                  {
                      displayName: 'Delete Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['delete'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The path to delete. Can be a single file or a whole folder.',
                  },
                  {
                      displayName: 'From Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/old_name.txt',
                      description: 'The path of file or folder to move',
                  },
                  {
                      displayName: 'To Path',
                      name: 'toPath',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/new_name.txt',
                      description: 'The new path of file or folder',
                  },
                  {
                      displayName: 'File Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['download'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The file path of the file to download. Has to contain the full path.',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      required: true,
                      default: 'data',
                      displayOptions: {
                          show: {
                              operation: ['download'],
                              resource: ['file'],
                          },
                      },
                      description: 'Name of the binary property to which to write the data of the read file',
                  },
                  {
                      displayName: 'File Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The file path of the file to upload. Has to contain the full path. The parent folder has to exist. Existing files get overwritten.',
                  },
                  {
                      displayName: 'Binary Data',
                      name: 'binaryData',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      description: 'Whether the data to upload should be taken from binary field',
                  },
                  {
                      displayName: 'File Content',
                      name: 'fileContent',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                              binaryData: [false],
                          },
                      },
                      placeholder: '',
                      description: 'The text content of the file to upload',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                              binaryData: [true],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property which contains the data for the file to be uploaded',
                  },
                  {
                      displayName: 'Query',
                      name: 'query',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['query'],
                              resource: ['search'],
                          },
                      },
                      description: 'The string to search for. May match across multiple fields based on the request arguments.',
                  },
                  {
                      displayName: 'File Status',
                      name: 'fileStatus',
                      type: 'options',
                      options: [
                          {
                              name: 'Active',
                              value: 'active',
                          },
                          {
                              name: 'Deleted',
                              value: 'deleted',
                          },
                      ],
                      default: 'active',
                      displayOptions: {
                          show: {
                              operation: ['query'],
                              resource: ['search'],
                          },
                      },
                      description: 'The string to search for. May match across multiple fields based on the request arguments.',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['query'],
                              resource: ['search'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      typeOptions: {
                          minValue: 1,
                      },
                      displayOptions: {
                          show: {
                              resource: ['search'],
                              operation: ['query'],
                              returnAll: [false],
                          },
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Simplify',
                      name: 'simple',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['query'],
                              resource: ['search'],
                          },
                      },
                      default: true,
                      description: 'Whether to return a simplified version of the response instead of the raw data',
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      type: 'collection',
                      placeholder: 'Add Filter',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['search'],
                              operation: ['query'],
                          },
                      },
                      options: [
                          {
                              displayName: 'File Categories',
                              name: 'file_categories',
                              type: 'multiOptions',
                              options: [
                                  {
                                      name: 'Audio (mp3, qav, mid, etc.)',
                                      value: 'audio',
                                  },
                                  {
                                      name: 'Document (doc, docx, txt, etc.)',
                                      value: 'document',
                                  },
                                  {
                                      name: 'Dropbox Paper',
                                      value: 'paper',
                                  },
                                  {
                                      name: 'Folder',
                                      value: 'folder',
                                  },
                                  {
                                      name: 'Image (jpg, png, gif, etc.)',
                                      value: 'image',
                                  },
                                  {
                                      name: 'Other',
                                      value: 'other',
                                  },
                                  {
                                      name: 'PDF',
                                      value: 'pdf',
                                  },
                                  {
                                      name: 'Presentation (ppt, pptx, key, etc.)',
                                      value: 'presentation',
                                  },
                                  {
                                      name: 'Spreadsheet (xlsx, xls, csv, etc.)',
                                      value: 'spreadsheet',
                                  },
                                  {
                                      name: 'Video (avi, wmv, mp4, etc.)',
                                      value: 'video',
                                  },
                              ],
                              default: [],
                          },
                          {
                              displayName: 'File Extensions',
                              name: 'file_extensions',
                              type: 'string',
                              default: '',
                              description: 'Multiple file extensions can be set separated by comma. Example: jpg,pdf.',
                          },
                          {
                              displayName: 'Folder',
                              name: 'path',
                              type: 'string',
                              default: '',
                              description: 'If this field is not specified, this module searches the entire Dropbox',
                          },
                      ],
                  },
                  {
                      displayName: 'Folder',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['folder'],
                          },
                      },
                      placeholder: '/invoices/2019',
                      description: 'The folder to create. The parent folder has to exist.',
                  },
                  {
                      displayName: 'Folder Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              resource: ['folder'],
                          },
                      },
                      placeholder: '/invoices/2019/',
                      description: 'The path of which to list the content',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              resource: ['folder'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      typeOptions: {
                          minValue: 1,
                      },
                      displayOptions: {
                          show: {
                              resource: ['folder'],
                              operation: ['list'],
                              returnAll: [false],
                          },
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      type: 'collection',
                      placeholder: 'Add Filter',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['folder'],
                              operation: ['list'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Include Deleted',
                              name: 'include_deleted',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the results will include entries for files and folders that used to exist but were deleted. The default for this field is False.',
                          },
                          {
                              displayName: 'Include Shared Members',
                              name: 'include_has_explicit_shared_members',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the results will include a flag for each file indicating whether or not that file has any explicit members. The default for this field is False.',
                          },
                          {
                              displayName: 'Include Mounted Folders',
                              name: 'include_mounted_folders',
                              type: 'boolean',
                              default: true,
                              description: 'Whether the results will include entries under mounted folders which includes app folder, shared folder and team folder. The default for this field is True.',
                          },
                          {
                              displayName: 'Include Non Downloadable Files',
                              name: 'include_non_downloadable_files',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to include files that are not downloadable, i.e. Google Docs. The default for this field is True.',
                          },
                          {
                              displayName: 'Recursive',
                              name: 'recursive',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. The default for this field is False.',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let endpoint = '';
          let requestMethod = '';
          let returnAll = false;
          let property = '';
          let body;
          let options;
          const query = {};
          let headers = {};
          let simple = false;
          const { accessType } = await GenericFunctions_1.getCredentials.call(this);
          if (accessType === 'full') {
              const { root_info: { root_namespace_id }, } = await GenericFunctions_1.getRootDirectory.call(this);
              headers = {
                  'dropbox-api-path-root': JSON.stringify({
                      '.tag': 'root',
                      root: root_namespace_id,
                  }),
              };
          }
          for (let i = 0; i < items.length; i++) {
              try {
                  body = {};
                  if (resource === 'file') {
                      if (operation === 'download') {
                          requestMethod = 'POST';
                          query.arg = JSON.stringify({
                              path: this.getNodeParameter('path', i),
                          });
                          endpoint = 'https://content.dropboxapi.com/2/files/download';
                      }
                      else if (operation === 'upload') {
                          requestMethod = 'POST';
                          headers['Content-Type'] = 'application/octet-stream';
                          query.arg = JSON.stringify({
                              mode: 'overwrite',
                              path: this.getNodeParameter('path', i),
                          });
                          endpoint = 'https://content.dropboxapi.com/2/files/upload';
                          options = { json: false };
                          if (this.getNodeParameter('binaryData', i)) {
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              this.helpers.assertBinaryData(i, binaryPropertyName);
                              body = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          }
                          else {
                              body = Buffer.from(this.getNodeParameter('fileContent', i), 'utf8');
                          }
                      }
                  }
                  else if (resource === 'folder') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          body = {
                              path: this.getNodeParameter('path', i),
                          };
                          endpoint = 'https://api.dropboxapi.com/2/files/create_folder_v2';
                      }
                      else if (operation === 'list') {
                          returnAll = this.getNodeParameter('returnAll', 0);
                          const filters = this.getNodeParameter('filters', i);
                          property = 'entries';
                          requestMethod = 'POST';
                          body = {
                              path: this.getNodeParameter('path', i),
                              limit: 1000,
                          };
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', 0);
                              body.limit = limit;
                          }
                          Object.assign(body, filters);
                          endpoint = 'https://api.dropboxapi.com/2/files/list_folder';
                      }
                  }
                  else if (resource === 'search') {
                      if (operation === 'query') {
                          returnAll = this.getNodeParameter('returnAll', 0);
                          simple = this.getNodeParameter('simple', 0);
                          const filters = this.getNodeParameter('filters', i);
                          property = 'matches';
                          requestMethod = 'POST';
                          body = {
                              query: this.getNodeParameter('query', i),
                              options: {
                                  filename_only: true,
                              },
                          };
                          if (filters.file_extensions) {
                              filters.file_extensions = filters.file_extensions.split(',');
                          }
                          Object.assign(body.options, filters);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              Object.assign(body.options, { max_results: limit });
                          }
                          endpoint = 'https://api.dropboxapi.com/2/files/search_v2';
                      }
                  }
                  if (['file', 'folder', 'search'].includes(resource)) {
                      if (operation === 'copy') {
                          requestMethod = 'POST';
                          body = {
                              from_path: this.getNodeParameter('path', i),
                              to_path: this.getNodeParameter('toPath', i),
                          };
                          endpoint = 'https://api.dropboxapi.com/2/files/copy_v2';
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'POST';
                          body = {
                              path: this.getNodeParameter('path', i),
                          };
                          endpoint = 'https://api.dropboxapi.com/2/files/delete_v2';
                      }
                      else if (operation === 'move') {
                          requestMethod = 'POST';
                          body = {
                              from_path: this.getNodeParameter('path', i),
                              to_path: this.getNodeParameter('toPath', i),
                          };
                          endpoint = 'https://api.dropboxapi.com/2/files/move_v2';
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  if (resource === 'file' && operation === 'download') {
                      options = { encoding: null };
                  }
                  let responseData;
                  if (returnAll) {
                      responseData = await GenericFunctions_1.dropboxpiRequestAllItems.call(this, property, requestMethod, endpoint, body, query, headers);
                  }
                  else {
                      responseData = await GenericFunctions_1.dropboxApiRequest.call(this, requestMethod, endpoint, body, query, headers, options);
                  }
                  if (resource === 'file' && operation === 'upload') {
                      const data = JSON.parse(responseData);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (resource === 'file' && operation === 'download') {
                      const newItem = {
                          json: items[i].json,
                          binary: {},
                          pairedItem: { item: i },
                      };
                      if (items[i].binary !== undefined) {
                          Object.assign(newItem.binary, items[i].binary);
                      }
                      items[i] = newItem;
                      const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
                      const filePathDownload = this.getNodeParameter('path', i);
                      items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(Buffer.from(responseData), filePathDownload);
                  }
                  else if (resource === 'folder' && operation === 'list') {
                      const propNames = {
                          id: 'id',
                          name: 'name',
                          client_modified: 'lastModifiedClient',
                          server_modified: 'lastModifiedServer',
                          rev: 'rev',
                          size: 'contentSize',
                          '.tag': 'type',
                          content_hash: 'contentHash',
                          path_lower: 'pathLower',
                          path_display: 'pathDisplay',
                          has_explicit_shared_members: 'hasExplicitSharedMembers',
                          is_downloadable: 'isDownloadable',
                      };
                      if (!returnAll) {
                          responseData = responseData.entries;
                      }
                      for (const item of responseData) {
                          const newItem = {};
                          for (const propName of Object.keys(propNames)) {
                              if (item[propName] !== undefined) {
                                  newItem[propNames[propName]] = item[propName];
                              }
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(newItem), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
                  else if (resource === 'search' && operation === 'query') {
                      let data = responseData;
                      if (returnAll) {
                          data = simple ? (0, GenericFunctions_1.simplify)(responseData) : responseData;
                      }
                      else {
                          data = simple
                              ? (0, GenericFunctions_1.simplify)(responseData[property])
                              : responseData[property];
                      }
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      if (resource === 'file' && operation === 'download') {
                          items[i].json = { error: error.message };
                      }
                      else {
                          returnData.push({ json: { error: error.message } });
                      }
                      continue;
                  }
                  throw error;
              }
          }
          if (resource === 'file' && operation === 'download') {
              return [items];
          }
          else {
              return [returnData];
          }
      }
  }
  exports.Dropbox = Dropbox;
  //# sourceMappingURL=Dropbox.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropboxApi = void 0;
  class DropboxApi {
      constructor() {
          this.name = 'dropboxApi';
          this.displayName = 'Dropbox API';
          this.documentationUrl = 'dropbox';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'APP Access Type',
                  name: 'accessType',
                  type: 'options',
                  options: [
                      {
                          name: 'App Folder',
                          value: 'folder',
                      },
                      {
                          name: 'Full Dropbox',
                          value: 'full',
                      },
                  ],
                  default: 'full',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.dropboxapi.com/2',
                  url: '/users/get_current_account',
                  method: 'POST',
              },
          };
      }
  }
  exports.DropboxApi = DropboxApi;
  //# sourceMappingURL=DropboxApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropboxOAuth2Api = void 0;
  const scopes = ['files.content.write', 'files.content.read', 'sharing.read', 'account_info.read'];
  class DropboxOAuth2Api {
      constructor() {
          this.name = 'dropboxOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Dropbox OAuth2 API';
          this.documentationUrl = 'dropbox';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://www.dropbox.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.dropboxapi.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'token_access_type=offline&force_reapprove=true',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
              {
                  displayName: 'APP Access Type',
                  name: 'accessType',
                  type: 'options',
                  options: [
                      {
                          name: 'App Folder',
                          value: 'folder',
                      },
                      {
                          name: 'Full Dropbox',
                          value: 'full',
                      },
                  ],
                  default: 'full',
              },
          ];
      }
  }
  exports.DropboxOAuth2Api = DropboxOAuth2Api;
  //# sourceMappingURL=DropboxOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropboxApi = void 0;
  class DropboxApi {
      constructor() {
          this.name = 'dropboxApi';
          this.displayName = 'Dropbox API';
          this.documentationUrl = 'dropbox';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'APP Access Type',
                  name: 'accessType',
                  type: 'options',
                  options: [
                      {
                          name: 'App Folder',
                          value: 'folder',
                      },
                      {
                          name: 'Full Dropbox',
                          value: 'full',
                      },
                  ],
                  default: 'full',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.dropboxapi.com/2',
                  url: '/users/get_current_account',
                  method: 'POST',
              },
          };
      }
  }
  exports.DropboxApi = DropboxApi;
  //# sourceMappingURL=DropboxApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DropboxOAuth2Api = void 0;
  const scopes = ['files.content.write', 'files.content.read', 'sharing.read', 'account_info.read'];
  class DropboxOAuth2Api {
      constructor() {
          this.name = 'dropboxOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Dropbox OAuth2 API';
          this.documentationUrl = 'dropbox';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://www.dropbox.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.dropboxapi.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'token_access_type=offline&force_reapprove=true',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
              {
                  displayName: 'APP Access Type',
                  name: 'accessType',
                  type: 'options',
                  options: [
                      {
                          name: 'App Folder',
                          value: 'folder',
                      },
                      {
                          name: 'Full Dropbox',
                          value: 'full',
                      },
                  ],
                  default: 'full',
              },
          ];
      }
  }
  exports.DropboxOAuth2Api = DropboxOAuth2Api;
  //# sourceMappingURL=DropboxOAuth2Api.credentials.js.map

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

  # Dropbox node

  Use the Dropbox node to automate work in Dropbox, and integrate Dropbox with other applications. n8n has built-in support for a wide range of Dropbox features, including creating, downloading, moving, and copying files and folders.

  On this page, you'll find a list of operations the Dropbox node supports and links to more resources.

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

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

  ## Operations

  * File
      * Copy a file
      * Delete a file
      * Download a file
      * Move a file
      * Upload a file
  * Folder
      * Copy a folder
      * Create a folder
      * Delete a folder
      * Return the files and folders in a given folder
      * Move a folder
  * Search
      * Query

  ## Templates and examples

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

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

example_workflow:
  {"name":"Dropbox Example Workflow","nodes":[{"parameters":{},"id":"3eaakq7p13069ytfo7y1xo","name":"Dropbox","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


