# nodes

node_type: n8n-nodes-base.Bubble
name: Bubble
display_name: Bubble
description: Consume the Bubble Data API
category: transform
icon: file:bubble.svg
code_hash: 4ea5888876efa4a1c16ff346276bc08b8a08076dbe41f7205d5b5ca1cfb18705
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Bubble
documentation_title: Bubble node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"bubble","description":"Templates for bubble"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:41
updated_at: 2025-06-08 18:33:41
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Bubble = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const ObjectDescription_1 = require("./ObjectDescription");
  class Bubble {
      constructor() {
          this.description = {
              displayName: 'Bubble',
              name: 'bubble',
              icon: 'file:bubble.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Bubble Data API',
              defaults: {
                  name: 'Bubble',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'bubbleApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Object',
                              value: 'object',
                          },
                      ],
                      default: 'object',
                  },
                  ...ObjectDescription_1.objectOperations,
                  ...ObjectDescription_1.objectFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const qs = {};
          const returnData = [];
          for (let i = 0; i < items.length; i++) {
              if (resource === 'object') {
                  if (operation === 'create') {
                      const typeNameInput = this.getNodeParameter('typeName', i);
                      const typeName = typeNameInput.replace(/\s/g, '').toLowerCase();
                      const { property } = this.getNodeParameter('properties', i);
                      const body = {};
                      property.forEach((data) => (body[data.key] = data.value));
                      responseData = await GenericFunctions_1.bubbleApiRequest.call(this, 'POST', `/obj/${typeName}`, body, {});
                  }
                  else if (operation === 'delete') {
                      const typeNameInput = this.getNodeParameter('typeName', i);
                      const typeName = typeNameInput.replace(/\s/g, '').toLowerCase();
                      const objectId = this.getNodeParameter('objectId', i);
                      const endpoint = `/obj/${typeName}/${objectId}`;
                      responseData = await GenericFunctions_1.bubbleApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      responseData = { success: true };
                  }
                  else if (operation === 'get') {
                      const typeNameInput = this.getNodeParameter('typeName', i);
                      const typeName = typeNameInput.replace(/\s/g, '').toLowerCase();
                      const objectId = this.getNodeParameter('objectId', i);
                      const endpoint = `/obj/${typeName}/${objectId}`;
                      responseData = await GenericFunctions_1.bubbleApiRequest.call(this, 'GET', endpoint, {}, {});
                      responseData = responseData.response;
                  }
                  else if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', 0);
                      const typeNameInput = this.getNodeParameter('typeName', i);
                      const typeName = typeNameInput.replace(/\s/g, '').toLowerCase();
                      const endpoint = `/obj/${typeName}`;
                      const jsonParameters = this.getNodeParameter('jsonParameters', 0);
                      const options = this.getNodeParameter('options', i);
                      if (!jsonParameters) {
                          if (options.filters) {
                              const { filter } = options.filters;
                              qs.constraints = JSON.stringify(filter);
                          }
                      }
                      else {
                          const filter = options.filtersJson;
                          const data = (0, GenericFunctions_1.validateJSON)(filter);
                          if (data === undefined) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Filters must be a valid JSON', {
                                  itemIndex: i,
                              });
                          }
                          qs.constraints = JSON.stringify(data);
                      }
                      if (options.sort) {
                          const { sortValue } = options.sort;
                          Object.assign(qs, sortValue);
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.bubbleApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunctions_1.bubbleApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = responseData.response.results;
                      }
                  }
                  else if (operation === 'update') {
                      const typeNameInput = this.getNodeParameter('typeName', i);
                      const typeName = typeNameInput.replace(/\s/g, '').toLowerCase();
                      const objectId = this.getNodeParameter('objectId', i);
                      const endpoint = `/obj/${typeName}/${objectId}`;
                      const { property } = this.getNodeParameter('properties', i);
                      const body = {};
                      property.forEach((data) => (body[data.key] = data.value));
                      responseData = await GenericFunctions_1.bubbleApiRequest.call(this, 'PATCH', endpoint, body, {});
                      responseData = { success: true };
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Bubble = Bubble;
  //# sourceMappingURL=Bubble.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BubbleApi = void 0;
  class BubbleApi {
      constructor() {
          this.name = 'bubbleApi';
          this.displayName = 'Bubble API';
          this.documentationUrl = 'bubble';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'App Name',
                  name: 'appName',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'live',
                  options: [
                      {
                          name: 'Development',
                          value: 'development',
                      },
                      {
                          name: 'Live',
                          value: 'live',
                      },
                  ],
              },
              {
                  displayName: 'Hosting',
                  name: 'hosting',
                  type: 'options',
                  default: 'bubbleHosted',
                  options: [
                      {
                          name: 'Bubble-Hosted',
                          value: 'bubbleHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'string',
                  placeholder: 'mydomain.com',
                  default: '',
                  displayOptions: {
                      show: {
                          hosting: ['selfHosted'],
                      },
                  },
              },
          ];
      }
  }
  exports.BubbleApi = BubbleApi;
  //# sourceMappingURL=BubbleApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BubbleApi = void 0;
  class BubbleApi {
      constructor() {
          this.name = 'bubbleApi';
          this.displayName = 'Bubble API';
          this.documentationUrl = 'bubble';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'App Name',
                  name: 'appName',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'live',
                  options: [
                      {
                          name: 'Development',
                          value: 'development',
                      },
                      {
                          name: 'Live',
                          value: 'live',
                      },
                  ],
              },
              {
                  displayName: 'Hosting',
                  name: 'hosting',
                  type: 'options',
                  default: 'bubbleHosted',
                  options: [
                      {
                          name: 'Bubble-Hosted',
                          value: 'bubbleHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Domain',
                  name: 'domain',
                  type: 'string',
                  placeholder: 'mydomain.com',
                  default: '',
                  displayOptions: {
                      show: {
                          hosting: ['selfHosted'],
                      },
                  },
              },
          ];
      }
  }
  exports.BubbleApi = BubbleApi;
  //# sourceMappingURL=BubbleApi.credentials.js.map

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

  # Bubble node

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

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

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

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

  ## Operations

  * Object
      * Create
      * Delete
      * Get
      * Get All
      * Update

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Brandfetch
name: Brandfetch
display_name: Brandfetch
description: Consume Brandfetch API
category: output
icon: file:brandfetch.png
code_hash: 37953ddb0d892d663b7a8e1111feeb644f02c854a5c9bccf11b590e68ff5d7e1
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Brandfetch
documentation_title: Brandfetch node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"brandfetch","description":"Templates for brandfetch"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:41
updated_at: 2025-06-08 18:33:41
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Brandfetch = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Brandfetch {
      constructor() {
          this.description = {
              displayName: 'Brandfetch',
              name: 'Brandfetch',
              icon: 'file:brandfetch.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"]}}',
              description: 'Consume Brandfetch API',
              defaults: {
                  name: 'Brandfetch',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'brandfetchApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Color',
                              value: 'color',
                              description: "Return a company's colors",
                              action: "Return a company's colors",
                          },
                          {
                              name: 'Company',
                              value: 'company',
                              description: "Return a company's data",
                              action: "Return a company's data",
                          },
                          {
                              name: 'Font',
                              value: 'font',
                              description: "Return a company's fonts",
                              action: "Return a company's fonts",
                          },
                          {
                              name: 'Industry',
                              value: 'industry',
                              description: "Return a company's industry",
                              action: "Return a company's industry",
                          },
                          {
                              name: 'Logo',
                              value: 'logo',
                              description: "Return a company's logo & icon",
                              action: "Return a company's logo & icon",
                          },
                      ],
                      default: 'logo',
                  },
                  {
                      displayName: 'Domain',
                      name: 'domain',
                      type: 'string',
                      default: '',
                      description: 'The domain name of the company',
                      required: true,
                  },
                  {
                      displayName: 'Download',
                      name: 'download',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['logo'],
                          },
                      },
                      description: 'Name of the binary property to which to write the data of the read file',
                  },
                  {
                      displayName: 'Image Type',
                      name: 'imageTypes',
                      type: 'multiOptions',
                      displayOptions: {
                          show: {
                              operation: ['logo'],
                              download: [true],
                          },
                      },
                      options: [
                          {
                              name: 'Icon',
                              value: 'icon',
                          },
                          {
                              name: 'Logo',
                              value: 'logo',
                          },
                      ],
                      default: ['logo', 'icon'],
                      required: true,
                  },
                  {
                      displayName: 'Image Format',
                      name: 'imageFormats',
                      type: 'multiOptions',
                      displayOptions: {
                          show: {
                              operation: ['logo'],
                              download: [true],
                          },
                      },
                      options: [
                          {
                              name: 'PNG',
                              value: 'png',
                          },
                          {
                              name: 'SVG',
                              value: 'svg',
                          },
                      ],
                      default: ['png'],
                      description: 'The image format in which the logo should be returned as',
                      required: true,
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const length = items.length;
          const operation = this.getNodeParameter('operation', 0);
          const responseData = [];
          for (let i = 0; i < length; i++) {
              try {
                  if (operation === 'logo') {
                      const domain = this.getNodeParameter('domain', i);
                      const download = this.getNodeParameter('download', i);
                      const body = {
                          domain,
                      };
                      const response = await GenericFunctions_1.brandfetchApiRequest.call(this, 'POST', '/logo', body);
                      if (download) {
                          const imageTypes = this.getNodeParameter('imageTypes', i);
                          const imageFormats = this.getNodeParameter('imageFormats', i);
                          const newItem = {
                              json: {},
                              binary: {},
                          };
                          if (items[i].binary !== undefined) {
                              Object.assign(newItem.binary, items[i].binary);
                          }
                          newItem.json = response.response;
                          for (const imageType of imageTypes) {
                              for (const imageFormat of imageFormats) {
                                  const url = response.response[imageType][imageFormat === 'png' ? 'image' : imageFormat];
                                  if (url !== null) {
                                      const data = await GenericFunctions_1.brandfetchApiRequest.call(this, 'GET', '', {}, {}, url, {
                                          json: false,
                                          encoding: null,
                                      });
                                      newItem.binary[`${imageType}_${imageFormat}`] =
                                          await this.helpers.prepareBinaryData(data, `${imageType}_${domain}.${imageFormat}`);
                                      items[i] = newItem;
                                  }
                                  items[i] = newItem;
                              }
                          }
                          if (Object.keys(items[i].binary).length === 0) {
                              delete items[i].binary;
                          }
                      }
                      else {
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response.response), { itemData: { item: i } });
                          responseData.push(...executionData);
                      }
                  }
                  if (operation === 'color') {
                      const domain = this.getNodeParameter('domain', i);
                      const body = {
                          domain,
                      };
                      const response = await GenericFunctions_1.brandfetchApiRequest.call(this, 'POST', '/color', body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } });
                      responseData.push(...executionData);
                  }
                  if (operation === 'font') {
                      const domain = this.getNodeParameter('domain', i);
                      const body = {
                          domain,
                      };
                      const response = await GenericFunctions_1.brandfetchApiRequest.call(this, 'POST', '/font', body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } });
                      responseData.push(...executionData);
                  }
                  if (operation === 'company') {
                      const domain = this.getNodeParameter('domain', i);
                      const body = {
                          domain,
                      };
                      const response = await GenericFunctions_1.brandfetchApiRequest.call(this, 'POST', '/company', body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } });
                      responseData.push(...executionData);
                  }
                  if (operation === 'industry') {
                      const domain = this.getNodeParameter('domain', i);
                      const body = {
                          domain,
                      };
                      const response = await GenericFunctions_1.brandfetchApiRequest.call(this, 'POST', '/industry', body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } });
                      responseData.push(...executionData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      responseData.push({ error: error.message, json: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          if (operation === 'logo' && this.getNodeParameter('download', 0)) {
              return [items];
          }
          else {
              return [responseData];
          }
      }
  }
  exports.Brandfetch = Brandfetch;
  //# sourceMappingURL=Brandfetch.node.js.map

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

  // --- Next Credential File ---

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

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

  # Brandfetch node

  Use the Brandfetch node to automate work in Brandfetch, and integrate Brandfetch with other applications. n8n has built-in support for a wide range of Brandfetch features, including returning a company’s information.

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

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

  ## Operations

  * Return a company's colors
  * Return a company's data
  * Return a company's fonts
  * Return a company's industry
  * Return a company's logo & icon

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Box
name: Box
display_name: Box
description: Consume Box API
category: input
icon: file:box.png
code_hash: adbb3d35327ec674e32fee22a6b0472a3aba104f8f8ea1cb269791562cce9f7f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Box
documentation_title: Box node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"box","description":"Templates for box"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:41
updated_at: 2025-06-08 18:33:41
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.Box = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const FileDescription_1 = require("./FileDescription");
  const FolderDescription_1 = require("./FolderDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  const change_case_1 = require("change-case");
  class Box {
      constructor() {
          this.description = {
              displayName: 'Box',
              name: 'box',
              icon: 'file:box.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Box API',
              defaults: {
                  name: 'Box',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'boxOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Folder',
                              value: 'folder',
                          },
                      ],
                      default: 'file',
                  },
                  ...FileDescription_1.fileOperations,
                  ...FileDescription_1.fileFields,
                  ...FolderDescription_1.folderOperations,
                  ...FolderDescription_1.folderFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const timezone = this.getTimezone();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'file') {
                      if (operation === 'copy') {
                          const fileId = this.getNodeParameter('fileId', i);
                          const parentId = this.getNodeParameter('parentId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {};
                          if (additionalFields.name) {
                              body.name = additionalFields.name;
                          }
                          if (parentId) {
                              body.parent = { id: parentId };
                          }
                          else {
                              body.parent = { id: 0 };
                          }
                          if (additionalFields.fields) {
                              qs.fields = additionalFields.fields;
                          }
                          if (additionalFields.version) {
                              body.version = additionalFields.version;
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', `/files/${fileId}/copy`, body, qs);
                      }
                      if (operation === 'delete') {
                          const fileId = this.getNodeParameter('fileId', i);
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'DELETE', `/files/${fileId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'download') {
                          const fileId = this.getNodeParameter('fileId', i);
                          const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', `/files/${fileId}`);
                          const fileName = responseData.name;
                          let mimeType;
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', `/files/${fileId}/content`, {}, {}, undefined, { encoding: null, resolveWithFullResponse: true });
                          const newItem = {
                              json: items[i].json,
                              binary: {},
                          };
                          if (mimeType === undefined && responseData.headers['content-type']) {
                              mimeType = responseData.headers['content-type'];
                          }
                          if (items[i].binary !== undefined) {
                              Object.assign(newItem.binary, items[i].binary);
                          }
                          items[i] = newItem;
                          const data = Buffer.from(responseData.body);
                          items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data, fileName, mimeType);
                      }
                      if (operation === 'get') {
                          const fileId = this.getNodeParameter('fileId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.fields) {
                              qs.fields = additionalFields.fields;
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', `/files/${fileId}`, {}, qs);
                      }
                      if (operation === 'search') {
                          const query = this.getNodeParameter('query', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const tz = this.getTimezone();
                          qs.type = 'file';
                          qs.query = query;
                          Object.assign(qs, additionalFields);
                          if (qs.content_types) {
                              qs.content_types = qs.content_types.split(',');
                          }
                          if (additionalFields.createdRangeUi) {
                              const createdRangeValues = additionalFields.createdRangeUi
                                  .createdRangeValuesUi;
                              if (createdRangeValues) {
                                  const from = moment_timezone_1.default.tz(createdRangeValues.from, tz).format();
                                  const to = moment_timezone_1.default.tz(createdRangeValues.to, tz).format();
                                  qs.created_at_range = `${from},${to}`;
                              }
                              delete qs.createdRangeUi;
                          }
                          if (additionalFields.updatedRangeUi) {
                              const updateRangeValues = additionalFields.updatedRangeUi
                                  .updatedRangeValuesUi;
                              if (updateRangeValues) {
                                  qs.updated_at_range = `${moment_timezone_1.default.tz(updateRangeValues.from, tz).format()},${moment_timezone_1.default
                                      .tz(updateRangeValues.to, tz)
                                      .format()}`;
                              }
                              delete qs.updatedRangeUi;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.boxApiRequestAllItems.call(this, 'entries', 'GET', '/search', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', '/search', {}, qs);
                              responseData = responseData.entries;
                          }
                      }
                      if (operation === 'share') {
                          const fileId = this.getNodeParameter('fileId', i);
                          const role = this.getNodeParameter('role', i);
                          const accessibleBy = this.getNodeParameter('accessibleBy', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              accessible_by: {},
                              item: {
                                  id: fileId,
                                  type: 'file',
                              },
                              role: role === 'coOwner' ? 'co-owner' : (0, change_case_1.noCase)(role),
                              ...options,
                          };
                          if (body.fields) {
                              qs.fields = body.fields;
                              delete body.fields;
                          }
                          if (body.expires_at) {
                              body.expires_at = moment_timezone_1.default.tz(body.expires_at, timezone).format();
                          }
                          if (body.notify) {
                              qs.notify = body.notify;
                              delete body.notify;
                          }
                          if (accessibleBy === 'user') {
                              const useEmail = this.getNodeParameter('useEmail', i);
                              if (useEmail) {
                                  body.accessible_by.login = this.getNodeParameter('email', i);
                              }
                              else {
                                  body.accessible_by.id = this.getNodeParameter('userId', i);
                              }
                          }
                          else {
                              body.accessible_by.id = this.getNodeParameter('groupId', i);
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
                      }
                      if (operation === 'upload') {
                          const parentId = this.getNodeParameter('parentId', i);
                          const isBinaryData = this.getNodeParameter('binaryData', i);
                          const fileName = this.getNodeParameter('fileName', i);
                          const attributes = {};
                          if (parentId !== '') {
                              attributes.parent = { id: parentId };
                          }
                          else {
                              attributes.parent = { id: 0 };
                          }
                          if (isBinaryData) {
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                              const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                              const body = {};
                              attributes.name = fileName || binaryData.fileName;
                              body.attributes = JSON.stringify(attributes);
                              body.file = {
                                  value: binaryDataBuffer,
                                  options: {
                                      filename: binaryData.fileName,
                                      contentType: binaryData.mimeType,
                                  },
                              };
                              responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', '', {}, {}, 'https://upload.box.com/api/2.0/files/content', { formData: body });
                              responseData = responseData.entries;
                          }
                          else {
                              const content = this.getNodeParameter('fileContent', i);
                              if (fileName === '') {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'File name must be set!', {
                                      itemIndex: i,
                                  });
                              }
                              attributes.name = fileName;
                              const body = {};
                              body.attributes = JSON.stringify(attributes);
                              body.file = {
                                  value: Buffer.from(content),
                                  options: {
                                      filename: fileName,
                                      contentType: 'text/plain',
                                  },
                              };
                              responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', '', {}, {}, 'https://upload.box.com/api/2.0/files/content', { formData: body });
                              responseData = responseData.entries;
                          }
                      }
                  }
                  if (resource === 'folder') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const parentId = this.getNodeParameter('parentId', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              name,
                          };
                          if (parentId) {
                              body.parent = { id: parentId };
                          }
                          else {
                              body.parent = { id: 0 };
                          }
                          if (options.access) {
                              body.folder_upload_email = {
                                  access: options.access,
                              };
                          }
                          if (options.fields) {
                              qs.fields = options.fields;
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', '/folders', body, qs);
                      }
                      if (operation === 'delete') {
                          const folderId = this.getNodeParameter('folderId', i);
                          const recursive = this.getNodeParameter('recursive', i);
                          qs.recursive = recursive;
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'DELETE', `/folders/${folderId}`, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const folderId = this.getNodeParameter('folderId', i);
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', `/folders/${folderId}`, qs);
                      }
                      if (operation === 'search') {
                          const query = this.getNodeParameter('query', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const tz = this.getTimezone();
                          qs.type = 'folder';
                          qs.query = query;
                          Object.assign(qs, additionalFields);
                          if (qs.content_types) {
                              qs.content_types = qs.content_types.split(',');
                          }
                          if (additionalFields.createdRangeUi) {
                              const createdRangeValues = additionalFields.createdRangeUi
                                  .createdRangeValuesUi;
                              if (createdRangeValues) {
                                  qs.created_at_range = `${moment_timezone_1.default.tz(createdRangeValues.from, tz).format()},${moment_timezone_1.default
                                      .tz(createdRangeValues.to, tz)
                                      .format()}`;
                              }
                              delete qs.createdRangeUi;
                          }
                          if (additionalFields.updatedRangeUi) {
                              const updateRangeValues = additionalFields.updatedRangeUi
                                  .updatedRangeValuesUi;
                              if (updateRangeValues) {
                                  qs.updated_at_range = `${moment_timezone_1.default.tz(updateRangeValues.from, tz).format()},${moment_timezone_1.default
                                      .tz(updateRangeValues.to, tz)
                                      .format()}`;
                              }
                              delete qs.updatedRangeUi;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.boxApiRequestAllItems.call(this, 'entries', 'GET', '/search', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.boxApiRequest.call(this, 'GET', '/search', {}, qs);
                              responseData = responseData.entries;
                          }
                      }
                      if (operation === 'share') {
                          const folderId = this.getNodeParameter('folderId', i);
                          const role = this.getNodeParameter('role', i);
                          const accessibleBy = this.getNodeParameter('accessibleBy', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              accessible_by: {},
                              item: {
                                  id: folderId,
                                  type: 'folder',
                              },
                              role: role === 'coOwner' ? 'co-owner' : (0, change_case_1.noCase)(role),
                              ...options,
                          };
                          if (body.fields) {
                              qs.fields = body.fields;
                              delete body.fields;
                          }
                          if (body.expires_at) {
                              body.expires_at = moment_timezone_1.default.tz(body.expires_at, timezone).format();
                          }
                          if (body.notify) {
                              qs.notify = body.notify;
                              delete body.notify;
                          }
                          if (accessibleBy === 'user') {
                              const useEmail = this.getNodeParameter('useEmail', i);
                              if (useEmail) {
                                  body.accessible_by.login = this.getNodeParameter('email', i);
                              }
                              else {
                                  body.accessible_by.id = this.getNodeParameter('userId', i);
                              }
                          }
                          else {
                              body.accessible_by.id = this.getNodeParameter('groupId', i);
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'POST', '/collaborations', body, qs);
                      }
                      if (operation === 'update') {
                          const folderId = this.getNodeParameter('folderId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (updateFields.fields) {
                              qs.fields = updateFields.fields;
                              delete updateFields.fields;
                          }
                          const body = {
                              ...updateFields,
                          };
                          if (body.parentId) {
                              body.parent = {
                                  id: body.parentId,
                              };
                              delete body.parentId;
                          }
                          if (body.tags) {
                              body.tags = body.tags.split(',');
                          }
                          responseData = await GenericFunctions_1.boxApiRequest.call(this, 'PUT', `/folders/${folderId}`, body, qs);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          if (resource === 'file' && operation === 'download') {
              return [items];
          }
          else {
              return [returnData];
          }
      }
  }
  exports.Box = Box;
  //# sourceMappingURL=Box.node.js.map

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

  // --- Next Credential File ---

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

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

  # Box node

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

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

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

  ## Operations

  * File
      * Copy a file
      * Delete a file
      * Download a file
      * Get a file
      * Search files
      * Share a file
      * Upload a file
  * Folder
      * Create a folder
      * Get a folder
      * Delete a folder
      * Search files
      * Share a folder
      * Update folder

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Brevo
name: Brevo
display_name: Brevo
description: Consume Brevo API
category: transform
icon: file:brevo.svg
code_hash: 691cbbec034dc3012f9590e1c47879bb65e1a6a21fdb311777d7aac37a33cc62
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Brevo
documentation_title: Brevo node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"brevo","description":"Templates for brevo"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:41
updated_at: 2025-06-08 18:33:41
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Brevo = void 0;
  const AttributeDescription_1 = require("./AttributeDescription");
  const ContactDescription_1 = require("./ContactDescription");
  const EmailDescription_1 = require("./EmailDescription");
  const SenderDescrition_1 = require("./SenderDescrition");
  class Brevo {
      constructor() {
          this.description = {
              displayName: 'Brevo',
              name: 'sendInBlue',
              icon: 'file:brevo.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Brevo API',
              defaults: {
                  name: 'Brevo',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sendInBlueApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  baseURL: 'https://api.brevo.com',
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Contact Attribute',
                              value: 'attribute',
                          },
                          {
                              name: 'Email',
                              value: 'email',
                          },
                          {
                              name: 'Sender',
                              value: 'sender',
                          },
                      ],
                      default: 'email',
                  },
                  ...AttributeDescription_1.attributeOperations,
                  ...AttributeDescription_1.attributeFields,
                  ...SenderDescrition_1.senderOperations,
                  ...SenderDescrition_1.senderFields,
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...EmailDescription_1.emailOperations,
                  ...EmailDescription_1.emailFields,
              ],
          };
      }
  }
  exports.Brevo = Brevo;
  //# sourceMappingURL=Brevo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BrevoApi = void 0;
  class BrevoApi {
      constructor() {
          this.name = 'sendInBlueApi';
          this.displayName = 'Brevo';
          this.documentationUrl = 'brevo';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'api-key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.brevo.com/v3',
                  url: '/account',
              },
          };
      }
  }
  exports.BrevoApi = BrevoApi;
  //# sourceMappingURL=BrevoApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BrevoApi = void 0;
  class BrevoApi {
      constructor() {
          this.name = 'sendInBlueApi';
          this.displayName = 'Brevo';
          this.documentationUrl = 'brevo';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'api-key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.brevo.com/v3',
                  url: '/account',
              },
          };
      }
  }
  exports.BrevoApi = BrevoApi;
  //# sourceMappingURL=BrevoApi.credentials.js.map

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

  # Brevo node

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

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

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

  ## Operations

  * Contact
      * Create
      * Create or Update
      * Delete
      * Get
      * Get All
      * Update
  * Contact Attribute
      * Create
      * Delete
      * Get All
      * Update
  * Email
      * Send
      * Send Template
  * Sender
      * Create
      * Delete
      * Get All

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Chargebee
name: Chargebee
display_name: Chargebee
description: Retrieve data from Chargebee API
category: input
icon: file:chargebee.png
code_hash: 367d5735be9647c6eb21693357b0c24ebb1278532c2a8ccca6cbdb452bd9038f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Chargebee
documentation_title: Chargebee node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"chargebee","description":"Templates for chargebee"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:41
updated_at: 2025-06-08 18:33:41
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Chargebee = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class Chargebee {
      constructor() {
          this.description = {
              displayName: 'Chargebee',
              name: 'chargebee',
              icon: 'file:chargebee.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Retrieve data from Chargebee API',
              defaults: {
                  name: 'Chargebee',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'chargebeeApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Invoice',
                              value: 'invoice',
                          },
                          {
                              name: 'Subscription',
                              value: 'subscription',
                          },
                      ],
                      default: 'invoice',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['customer'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a customer',
                              action: 'Create a customer',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Properties',
                      name: 'properties',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['customer'],
                          },
                      },
                      default: {},
                      description: 'Properties to set on the new user',
                      placeholder: 'Add Property',
                      options: [
                          {
                              displayName: 'User ID',
                              name: 'id',
                              type: 'string',
                              default: '',
                              description: 'ID for the new customer. If not given, this will be auto-generated.',
                          },
                          {
                              displayName: 'First Name',
                              name: 'first_name',
                              type: 'string',
                              default: '',
                              description: 'The first name of the customer',
                          },
                          {
                              displayName: 'Last Name',
                              name: 'last_name',
                              type: 'string',
                              default: '',
                              description: 'The last name of the customer',
                          },
                          {
                              displayName: 'Email',
                              name: 'email',
                              type: 'string',
                              placeholder: 'name@email.com',
                              default: '',
                              description: 'The email address of the customer',
                          },
                          {
                              displayName: 'Phone',
                              name: 'phone',
                              type: 'string',
                              default: '',
                              description: 'The phone number of the customer',
                          },
                          {
                              displayName: 'Company',
                              name: 'company',
                              type: 'string',
                              default: '',
                              description: 'The company of the customer',
                          },
                          {
                              displayName: 'Custom Properties',
                              name: 'customProperties',
                              placeholder: 'Add Custom Property',
                              description: 'Adds a custom property to set also values which have not been predefined',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: true,
                              },
                              default: {},
                              options: [
                                  {
                                      name: 'property',
                                      displayName: 'Property',
                                      values: [
                                          {
                                              displayName: 'Property Name',
                                              name: 'name',
                                              type: 'string',
                                              default: '',
                                              description: 'Name of the property to set',
                                          },
                                          {
                                              displayName: 'Property Value',
                                              name: 'value',
                                              type: 'string',
                                              default: '',
                                              description: 'Value of the property to set',
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      default: 'list',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['invoice'],
                          },
                      },
                      options: [
                          {
                              name: 'List',
                              value: 'list',
                              description: 'Return the invoices',
                              action: 'List an invoice',
                          },
                          {
                              name: 'PDF Invoice URL',
                              value: 'pdfUrl',
                              description: 'Get URL for the invoice PDF',
                              action: 'Get URL for the invoice PDF',
                          },
                      ],
                  },
                  {
                      displayName: 'Max Results',
                      name: 'maxResults',
                      type: 'number',
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      default: 10,
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              resource: ['invoice'],
                          },
                      },
                      description: 'Max. amount of results to return(< 100).',
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      placeholder: 'Add Filter',
                      description: 'Filter for invoices',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              resource: ['invoice'],
                          },
                      },
                      options: [
                          {
                              name: 'date',
                              displayName: 'Invoice Date',
                              values: [
                                  {
                                      displayName: 'Operation',
                                      name: 'operation',
                                      type: 'options',
                                      noDataExpression: true,
                                      options: [
                                          {
                                              name: 'Is',
                                              value: 'is',
                                          },
                                          {
                                              name: 'Is Not',
                                              value: 'is_not',
                                          },
                                          {
                                              name: 'After',
                                              value: 'after',
                                          },
                                          {
                                              name: 'Before',
                                              value: 'before',
                                          },
                                      ],
                                      default: 'after',
                                      description: 'Operation to decide where the the data should be mapped to',
                                  },
                                  {
                                      displayName: 'Date',
                                      name: 'value',
                                      type: 'dateTime',
                                      default: '',
                                      description: 'Query date',
                                  },
                              ],
                          },
                          {
                              name: 'total',
                              displayName: 'Invoice Amount',
                              values: [
                                  {
                                      displayName: 'Operation',
                                      name: 'operation',
                                      type: 'options',
                                      noDataExpression: true,
                                      options: [
                                          {
                                              name: 'Greater Equal Than',
                                              value: 'gte',
                                          },
                                          {
                                              name: 'Greater Than',
                                              value: 'gt',
                                          },
                                          {
                                              name: 'Is',
                                              value: 'is',
                                          },
                                          {
                                              name: 'Is Not',
                                              value: 'is_not',
                                          },
                                          {
                                              name: 'Less Equal Than',
                                              value: 'lte',
                                          },
                                          {
                                              name: 'Less Than',
                                              value: 'lt',
                                          },
                                      ],
                                      default: 'gt',
                                      description: 'Operation to decide where the the data should be mapped to',
                                  },
                                  {
                                      displayName: 'Amount',
                                      name: 'value',
                                      type: 'number',
                                      typeOptions: {
                                          numberPrecision: 2,
                                      },
                                      default: 0,
                                      description: 'Query amount',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Invoice ID',
                      name: 'invoiceId',
                      description: 'The ID of the invoice to get',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['pdfUrl'],
                              resource: ['invoice'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['subscription'],
                          },
                      },
                      options: [
                          {
                              name: 'Cancel',
                              value: 'cancel',
                              description: 'Cancel a subscription',
                              action: 'Cancel a subscription',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a subscription',
                              action: 'Delete a subscription',
                          },
                      ],
                      default: 'delete',
                  },
                  {
                      displayName: 'Subscription ID',
                      name: 'subscriptionId',
                      description: 'The ID of the subscription to cancel',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['cancel'],
                              resource: ['subscription'],
                          },
                      },
                  },
                  {
                      displayName: 'Schedule End of Term',
                      name: 'endOfTerm',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['cancel'],
                              resource: ['subscription'],
                          },
                      },
                      description: 'Whether it will not cancel it directly in will instead schedule the cancelation for the end of the term',
                  },
                  {
                      displayName: 'Subscription ID',
                      name: 'subscriptionId',
                      description: 'The ID of the subscription to delete',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['delete'],
                              resource: ['subscription'],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const credentials = await this.getCredentials('chargebeeApi');
          const baseUrl = `https://${credentials.accountName}.chargebee.com/api/v2`;
          let body;
          let qs;
          for (let i = 0; i < items.length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', i);
                  const operation = this.getNodeParameter('operation', i);
                  let requestMethod = 'GET';
                  let endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'customer') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const properties = this.getNodeParameter('properties', i, {});
                          for (const key of Object.keys(properties)) {
                              if (key === 'customProperties' &&
                                  properties.customProperties.property !== undefined) {
                                  for (const customProperty of properties.customProperties
                                      .property) {
                                      qs[customProperty.name] = customProperty.value;
                                  }
                              }
                              else {
                                  qs[key] = properties[key];
                              }
                          }
                          endpoint = 'customers';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'invoice') {
                      if (operation === 'list') {
                          endpoint = 'invoices';
                          qs['sort_by[desc]'] = 'date';
                          qs.limit = this.getNodeParameter('maxResults', i, {});
                          const setFilters = this.getNodeParameter('filters', i, {});
                          let filter;
                          let value;
                          for (const filterProperty of Object.keys(setFilters)) {
                              for (filter of setFilters[filterProperty]) {
                                  value = filter.value;
                                  if (filterProperty === 'date') {
                                      value = Math.floor(new Date(value).getTime() / 1000);
                                  }
                                  qs[`${filterProperty}[${filter.operation}]`] = value;
                              }
                          }
                      }
                      else if (operation === 'pdfUrl') {
                          requestMethod = 'POST';
                          const invoiceId = this.getNodeParameter('invoiceId', i);
                          endpoint = `invoices/${invoiceId.trim()}/pdf`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'subscription') {
                      if (operation === 'cancel') {
                          requestMethod = 'POST';
                          const subscriptionId = this.getNodeParameter('subscriptionId', i, '');
                          body.end_of_term = this.getNodeParameter('endOfTerm', i, false);
                          endpoint = `subscriptions/${subscriptionId.trim()}/cancel`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'POST';
                          const subscriptionId = this.getNodeParameter('subscriptionId', i, '');
                          endpoint = `subscriptions/${subscriptionId.trim()}/delete`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const options = {
                      method: requestMethod,
                      body,
                      qs,
                      uri: `${baseUrl}/${endpoint}`,
                      auth: {
                          user: credentials.apiKey,
                          pass: '',
                      },
                      json: true,
                  };
                  let responseData;
                  try {
                      responseData = await this.helpers.request(options);
                  }
                  catch (error) {
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
                  if (resource === 'invoice' && operation === 'list') {
                      responseData.list.forEach((data) => {
                          responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ ...data.invoice }), { itemData: { item: i } });
                          returnData.push(...responseData);
                      });
                  }
                  else if (resource === 'invoice' && operation === 'pdfUrl') {
                      const data = {};
                      Object.assign(data, items[i].json);
                      data.pdfUrl = responseData.download.download_url;
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ ...data }), { itemData: { item: i } });
                      returnData.push(...responseData);
                  }
                  else {
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Chargebee = Chargebee;
  //# sourceMappingURL=Chargebee.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ChargebeeApi = void 0;
  class ChargebeeApi {
      constructor() {
          this.name = 'chargebeeApi';
          this.displayName = 'Chargebee API';
          this.documentationUrl = 'chargebee';
          this.properties = [
              {
                  displayName: 'Account Name',
                  name: 'accountName',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Api Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.ChargebeeApi = ChargebeeApi;
  //# sourceMappingURL=ChargebeeApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ChargebeeApi = void 0;
  class ChargebeeApi {
      constructor() {
          this.name = 'chargebeeApi';
          this.displayName = 'Chargebee API';
          this.documentationUrl = 'chargebee';
          this.properties = [
              {
                  displayName: 'Account Name',
                  name: 'accountName',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Api Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.ChargebeeApi = ChargebeeApi;
  //# sourceMappingURL=ChargebeeApi.credentials.js.map

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

  # Chargebee node

  Use the Chargebee node to automate work in Chargebee, and integrate Chargebee with other applications. n8n has built-in support for a wide range of Chargebee features, including creating customers, returning invoices, and canceling subscriptions.

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

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

  ## Operations

  * Customer
      * Create a customer
  * Invoice
      * Return the invoices
      * Get URL for the invoice PDF
  * Subscription
      * Cancel a subscription
      * Delete a subscription

  ## Templates and examples

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

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


node_type: n8n-nodes-base.CircleCi
name: CircleCi
display_name: CircleCI
description: Consume CircleCI API
category: output
icon: file:circleCi.png
code_hash: b4f772e8c2b54b7f9a6a77051c090ed520de646b39b5959bd158b0d90c5f4723
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.CircleCi
documentation_title: CircleCI node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"circleci","description":"Templates for circleci"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:42
updated_at: 2025-06-08 18:33:42
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CircleCi = void 0;
  const PipelineDescription_1 = require("./PipelineDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class CircleCi {
      constructor() {
          this.description = {
              displayName: 'CircleCI',
              name: 'circleCi',
              icon: 'file:circleCi.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume CircleCI API',
              defaults: {
                  name: 'CircleCI',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'circleCiApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Pipeline',
                              value: 'pipeline',
                          },
                      ],
                      default: 'pipeline',
                  },
                  ...PipelineDescription_1.pipelineOperations,
                  ...PipelineDescription_1.pipelineFields,
              ],
          };
      }
      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 === 'pipeline') {
                      if (operation === 'get') {
                          const vcs = this.getNodeParameter('vcs', i);
                          let slug = this.getNodeParameter('projectSlug', i);
                          const pipelineNumber = this.getNodeParameter('pipelineNumber', i);
                          slug = slug.replace(new RegExp(/\//g), '%2F');
                          const endpoint = `/project/${vcs}/${slug}/pipeline/${pipelineNumber}`;
                          responseData = await GenericFunctions_1.circleciApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      }
                      if (operation === 'getAll') {
                          const vcs = this.getNodeParameter('vcs', i);
                          const filters = this.getNodeParameter('filters', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          let slug = this.getNodeParameter('projectSlug', i);
                          slug = slug.replace(new RegExp(/\//g), '%2F');
                          if (filters.branch) {
                              qs.branch = filters.branch;
                          }
                          const endpoint = `/project/${vcs}/${slug}/pipeline`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.circleciApiRequestAllItems.call(this, 'items', 'GET', endpoint, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.circleciApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                              responseData = responseData.splice(0, qs.limit);
                          }
                          responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      }
                      if (operation === 'trigger') {
                          const vcs = this.getNodeParameter('vcs', i);
                          let slug = this.getNodeParameter('projectSlug', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          slug = slug.replace(new RegExp(/\//g), '%2F');
                          const endpoint = `/project/${vcs}/${slug}/pipeline`;
                          const body = {};
                          if (additionalFields.branch) {
                              body.branch = additionalFields.branch;
                          }
                          if (additionalFields.tag) {
                              body.tag = additionalFields.tag;
                          }
                          responseData = await GenericFunctions_1.circleciApiRequest.call(this, 'POST', endpoint, body, qs);
                          responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      }
                  }
                  returnData.push(...responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.CircleCi = CircleCi;
  //# sourceMappingURL=CircleCi.node.js.map

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CircleCiApi = void 0;
  class CircleCiApi {
      constructor() {
          this.name = 'circleCiApi';
          this.displayName = 'CircleCI API';
          this.documentationUrl = 'circleCi';
          this.properties = [
              {
                  displayName: 'Personal API Token',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.CircleCiApi = CircleCiApi;
  //# sourceMappingURL=CircleCiApi.credentials.js.map

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

  # CircleCI node

  Use the CircleCI node to automate work in CircleCI, and integrate CircleCI with other applications. n8n has built-in support for a wide range of CircleCI features, including getting and triggering pipelines.

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

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

  ## Operations

  * Pipeline
      * Get a pipeline
      * Get all pipelines
      * Trigger a pipeline

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Clearbit
name: Clearbit
display_name: Clearbit
description: Consume Clearbit API
category: output
icon: file:clearbit.svg
code_hash: eec0f3d468a671e9f42c4a28863ea587e325aa5b5f1d6f33e1124d6a60740257
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Clearbit
documentation_title: Clearbit node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"clearbit","description":"Templates for clearbit"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:42
updated_at: 2025-06-08 18:33:42
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Clearbit = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const CompanyDescription_1 = require("./CompanyDescription");
  const PersonDescription_1 = require("./PersonDescription");
  class Clearbit {
      constructor() {
          this.description = {
              displayName: 'Clearbit',
              name: 'clearbit',
              icon: 'file:clearbit.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume Clearbit API',
              defaults: {
                  name: 'Clearbit',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'clearbitApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                              description: 'The Company API allows you to look up a company by their domain',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                              description: 'The Person API lets you retrieve social information associated with an email address, such as a person’s name, location and Twitter handle',
                          },
                      ],
                      default: 'company',
                  },
                  ...CompanyDescription_1.companyOperations,
                  ...CompanyDescription_1.companyFields,
                  ...PersonDescription_1.personOperations,
                  ...PersonDescription_1.personFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'person') {
                      if (operation === 'enrich') {
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.email = email;
                          if (additionalFields.givenName) {
                              qs.given_name = additionalFields.givenName;
                          }
                          if (additionalFields.familyName) {
                              qs.family_name = additionalFields.familyName;
                          }
                          if (additionalFields.ipAddress) {
                              qs.ip_address = additionalFields.ipAddress;
                          }
                          if (additionalFields.location) {
                              qs.location = additionalFields.location;
                          }
                          if (additionalFields.company) {
                              qs.company = additionalFields.company;
                          }
                          if (additionalFields.companyDomain) {
                              qs.company_domain = additionalFields.companyDomain;
                          }
                          if (additionalFields.linkedIn) {
                              qs.linkedin = additionalFields.linkedIn;
                          }
                          if (additionalFields.twitter) {
                              qs.twitter = additionalFields.twitter;
                          }
                          if (additionalFields.facebook) {
                              qs.facebook = additionalFields.facebook;
                          }
                          responseData = await GenericFunctions_1.clearbitApiRequest.call(this, 'GET', `${resource}-stream`, '/v2/people/find', {}, qs);
                      }
                  }
                  if (resource === 'company') {
                      if (operation === 'enrich') {
                          const domain = this.getNodeParameter('domain', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.domain = domain;
                          if (additionalFields.companyName) {
                              qs.company_name = additionalFields.companyName;
                          }
                          if (additionalFields.linkedin) {
                              qs.linkedin = additionalFields.linkedin;
                          }
                          if (additionalFields.twitter) {
                              qs.twitter = additionalFields.twitter;
                          }
                          if (additionalFields.facebook) {
                              qs.facebook = additionalFields.facebook;
                          }
                          responseData = await GenericFunctions_1.clearbitApiRequest.call(this, 'GET', `${resource}-stream`, '/v2/companies/find', {}, qs);
                      }
                      if (operation === 'autocomplete') {
                          const name = this.getNodeParameter('name', i);
                          qs.query = name;
                          responseData = await GenericFunctions_1.clearbitApiRequest.call(this, 'GET', 'autocomplete', '/v1/companies/suggest', {}, qs);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Clearbit = Clearbit;
  //# sourceMappingURL=Clearbit.node.js.map

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

  // --- Next Credential File ---

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

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

  # Clearbit node

  Use the Clearbit node to automate work in Clearbit, and integrate Clearbit with other applications. n8n has built-in support for a wide range of Clearbit features, including autocompleting and looking up companies and persons.

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

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

  ## Operations

  * Company
      * Auto-complete company names and retrieve logo and domain
      * Look up person and company data based on an email or domain
  * Person
      * Look up a person and company data based on an email or domain

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Clockify
name: Clockify
display_name: Clockify
description: Consume Clockify REST API
category: transform
icon: file:clockify.svg
code_hash: 41064737ff7074e050dad37d7450df2ee493f2db1129fb3a189207435c99426f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Clockify
documentation_title: Clockify node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"clockify","description":"Templates for clockify"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:42
updated_at: 2025-06-08 18:33:42
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.Clockify = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ClientDescription_1 = require("./ClientDescription");
  const ProjectDescription_1 = require("./ProjectDescription");
  const TagDescription_1 = require("./TagDescription");
  const TaskDescription_1 = require("./TaskDescription");
  const TimeEntryDescription_1 = require("./TimeEntryDescription");
  const UserDescription_1 = require("./UserDescription");
  const WorkspaceDescription_1 = require("./WorkspaceDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class Clockify {
      constructor() {
          this.description = {
              displayName: 'Clockify',
              name: 'clockify',
              icon: 'file:clockify.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Clockify REST API',
              defaults: {
                  name: 'Clockify',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'clockifyApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Client',
                              value: 'client',
                          },
                          {
                              name: 'Project',
                              value: 'project',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'Time Entry',
                              value: 'timeEntry',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'Workspace',
                              value: 'workspace',
                          },
                      ],
                      default: 'project',
                  },
                  ...ClientDescription_1.clientOperations,
                  ...ProjectDescription_1.projectOperations,
                  ...TagDescription_1.tagOperations,
                  ...TaskDescription_1.taskOperations,
                  ...TimeEntryDescription_1.timeEntryOperations,
                  ...UserDescription_1.userOperations,
                  ...WorkspaceDescription_1.workspaceOperations,
                  ...WorkspaceDescription_1.workspaceFields,
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspaceId',
                      type: 'options',
                      description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
                      typeOptions: {
                          loadOptionsMethod: 'listWorkspaces',
                      },
                      required: true,
                      default: [],
                      displayOptions: {
                          hide: {
                              resource: ['workspace'],
                          },
                      },
                  },
                  ...ClientDescription_1.clientFields,
                  ...ProjectDescription_1.projectFields,
                  ...TagDescription_1.tagFields,
                  ...TaskDescription_1.taskFields,
                  ...UserDescription_1.userFields,
                  ...TimeEntryDescription_1.timeEntryFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async listWorkspaces() {
                      const rtv = [];
                      const workspaces = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', 'workspaces');
                      if (undefined !== workspaces) {
                          workspaces.forEach((value) => {
                              rtv.push({
                                  name: value.name,
                                  value: value.id,
                              });
                          });
                      }
                      return rtv;
                  },
                  async loadUsersForWorkspace() {
                      const rtv = [];
                      const workspaceId = this.getCurrentNodeParameter('workspaceId');
                      if (undefined !== workspaceId) {
                          const resource = `workspaces/${workspaceId}/users`;
                          const users = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', resource);
                          if (undefined !== users) {
                              users.forEach((value) => {
                                  rtv.push({
                                      name: value.name,
                                      value: value.id,
                                  });
                              });
                          }
                      }
                      return rtv;
                  },
                  async loadClientsForWorkspace() {
                      const rtv = [];
                      const workspaceId = this.getCurrentNodeParameter('workspaceId');
                      if (undefined !== workspaceId) {
                          const resource = `workspaces/${workspaceId}/clients`;
                          const clients = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', resource);
                          if (undefined !== clients) {
                              clients.forEach((value) => {
                                  rtv.push({
                                      name: value.name,
                                      value: value.id,
                                  });
                              });
                          }
                      }
                      return rtv;
                  },
                  async loadProjectsForWorkspace() {
                      const rtv = [];
                      const workspaceId = this.getCurrentNodeParameter('workspaceId');
                      if (undefined !== workspaceId) {
                          const resource = `workspaces/${workspaceId}/projects`;
                          const users = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', resource);
                          if (undefined !== users) {
                              users.forEach((value) => {
                                  rtv.push({
                                      name: value.name,
                                      value: value.id,
                                  });
                              });
                          }
                      }
                      return rtv;
                  },
                  async loadTagsForWorkspace() {
                      const rtv = [];
                      const workspaceId = this.getCurrentNodeParameter('workspaceId');
                      if (undefined !== workspaceId) {
                          const resource = `workspaces/${workspaceId}/tags`;
                          const users = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', resource);
                          if (undefined !== users) {
                              users.forEach((value) => {
                                  rtv.push({
                                      name: value.name,
                                      value: value.id,
                                  });
                              });
                          }
                      }
                      return rtv;
                  },
                  async loadCustomFieldsForWorkspace() {
                      const rtv = [];
                      const workspaceId = this.getCurrentNodeParameter('workspaceId');
                      if (undefined !== workspaceId) {
                          const resource = `workspaces/${workspaceId}/custom-fields`;
                          const customFields = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', resource);
                          for (const customField of customFields) {
                              rtv.push({
                                  name: customField.name,
                                  value: customField.id,
                              });
                          }
                      }
                      return rtv;
                  },
              },
          };
      }
      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 === 'client') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'POST', `/workspaces/${workspaceId}/clients`, body, qs);
                      }
                      if (operation === 'delete') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const clientId = this.getNodeParameter('clientId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'DELETE', `/workspaces/${workspaceId}/clients/${clientId}`, {}, qs);
                      }
                      if (operation === 'update') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const clientId = this.getNodeParameter('clientId', i);
                          const name = this.getNodeParameter('name', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              name,
                          };
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'PUT', `/workspaces/${workspaceId}/clients/${clientId}`, body, qs);
                      }
                      if (operation === 'get') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const clientId = this.getNodeParameter('clientId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/clients/${clientId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/clients`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/clients`, {}, qs);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  if (resource === 'project') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          Object.assign(body, additionalFields);
                          if (body.estimateUi) {
                              body.estimate = body.estimateUi.estimateValues;
                              delete body.estimateUi;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'POST', `/workspaces/${workspaceId}/projects`, body, qs);
                      }
                      if (operation === 'delete') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'DELETE', `/workspaces/${workspaceId}/projects/${projectId}`, {}, qs);
                      }
                      if (operation === 'get') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/projects/${projectId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/projects`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/projects`, {}, qs);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                      if (operation === 'update') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          if (body.estimateUi) {
                              body.estimate = body.estimateUi.estimateValues;
                              delete body.estimateUi;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'PUT', `/workspaces/${workspaceId}/projects/${projectId}`, body, qs);
                      }
                  }
                  if (resource === 'tag') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'POST', `/workspaces/${workspaceId}/tags`, body, qs);
                      }
                      if (operation === 'delete') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const tagId = this.getNodeParameter('tagId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'DELETE', `/workspaces/${workspaceId}/tags/${tagId}`, {}, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/tags`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/tags`, {}, qs);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                      if (operation === 'update') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const tagId = this.getNodeParameter('tagId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'PUT', `/workspaces/${workspaceId}/tags/${tagId}`, body, qs);
                      }
                  }
                  if (resource === 'task') {
                      if (operation === 'create') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          Object.assign(body, additionalFields);
                          if (body.estimate) {
                              const [hour, minute] = body.estimate.split(':');
                              body.estimate = `PT${hour}H${minute}M`;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'POST', `/workspaces/${workspaceId}/projects/${projectId}/tasks`, body, qs);
                      }
                      if (operation === 'delete') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'DELETE', `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, {}, qs);
                      }
                      if (operation === 'get') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/projects/${projectId}/tasks`, {}, qs);
                          }
                          else {
                              qs['page-size'] = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/projects/${projectId}/tasks`, {}, qs);
                          }
                      }
                      if (operation === 'update') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const projectId = this.getNodeParameter('projectId', i);
                          const taskId = this.getNodeParameter('taskId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          if (body.estimate) {
                              const [hour, minute] = body.estimate.split(':');
                              body.estimate = `PT${hour}H${minute}M`;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'PUT', `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, body, qs);
                      }
                  }
                  if (resource === 'timeEntry') {
                      if (operation === 'create') {
                          const timezone = this.getTimezone();
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const start = this.getNodeParameter('start', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              start: moment_timezone_1.default.tz(start, timezone).utc().format(),
                          };
                          Object.assign(body, additionalFields);
                          if (body.end) {
                              body.end = moment_timezone_1.default.tz(body.end, timezone).utc().format();
                          }
                          if (body.customFieldsUi) {
                              const customFields = body.customFieldsUi
                                  .customFieldsValues;
                              body.customFields = customFields;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'POST', `/workspaces/${workspaceId}/time-entries`, body, qs);
                      }
                      if (operation === 'delete') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const timeEntryId = this.getNodeParameter('timeEntryId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'DELETE', `/workspaces/${workspaceId}/time-entries/${timeEntryId}`, {}, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const timeEntryId = this.getNodeParameter('timeEntryId', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/time-entries/${timeEntryId}`, {}, qs);
                      }
                      if (operation === 'update') {
                          const timezone = this.getTimezone();
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const timeEntryId = this.getNodeParameter('timeEntryId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          if (body.end) {
                              body.end = moment_timezone_1.default.tz(body.end, timezone).utc().format();
                          }
                          if (body.start) {
                              body.start = moment_timezone_1.default.tz(body.start, timezone).utc().format();
                          }
                          else {
                              const { timeInterval: { start }, } = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', `/workspaces/${workspaceId}/time-entries/${timeEntryId}`, {}, qs);
                              body.start = start;
                          }
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'PUT', `/workspaces/${workspaceId}/time-entries/${timeEntryId}`, body, qs);
                      }
                  }
                  if (resource === 'user') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const workspaceId = this.getNodeParameter('workspaceId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/users`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clockifyApiRequestAllItems.call(this, 'GET', `/workspaces/${workspaceId}/users`, {}, qs);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  if (resource === 'workspace') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.clockifyApiRequest.call(this, 'GET', '/workspaces', {}, qs);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Clockify = Clockify;
  //# sourceMappingURL=Clockify.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClockifyApi = void 0;
  class ClockifyApi {
      constructor() {
          this.name = 'clockifyApi';
          this.displayName = 'Clockify API';
          this.documentationUrl = 'clockify';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Api-Key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.clockify.me/api/v1',
                  url: '/workspaces',
              },
          };
      }
  }
  exports.ClockifyApi = ClockifyApi;
  //# sourceMappingURL=ClockifyApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClockifyApi = void 0;
  class ClockifyApi {
      constructor() {
          this.name = 'clockifyApi';
          this.displayName = 'Clockify API';
          this.documentationUrl = 'clockify';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Api-Key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.clockify.me/api/v1',
                  url: '/workspaces',
              },
          };
      }
  }
  exports.ClockifyApi = ClockifyApi;
  //# sourceMappingURL=ClockifyApi.credentials.js.map

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

  # Clockify node

  Use the Clockify node to automate work in Clockify, and integrate Clockify with other applications. n8n has built-in support for a wide range of Clockify features, including creating, updating, getting, and deleting tasks, time entries, projects, and tags.

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

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

  ## Operations

  * Project
      * Create a project
      * Delete a project
      * Get a project
      * Get all projects
      * Update a project
  * Tag
      * Create a tag
      * Delete a tag
      * Get all tags
      * Update a tag
  * Task
      * Create a task
      * Delete a task
      * Get a task
      * Get all tasks
      * Update a task
  * Time Entry
      * Create a time entry
      * Delete a time entry
      * Get time entry
      * Update a time entry

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.ClickUp
name: ClickUp
display_name: ClickUp
description: Consume ClickUp API (Beta)
category: output
icon: file:clickup.svg
code_hash: a2d9a4ef05079c6644a086b884c5177b197bc8821bcd47ba8e9331a962758bd4
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ClickUp
documentation_title: ClickUp node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"clickup","description":"Templates for clickup"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:42
updated_at: 2025-06-08 18:33:42
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.ClickUp = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const ChecklistDescription_1 = require("./ChecklistDescription");
  const ChecklistItemDescription_1 = require("./ChecklistItemDescription");
  const CommentDescription_1 = require("./CommentDescription");
  const FolderDescription_1 = require("./FolderDescription");
  const GoalDescription_1 = require("./GoalDescription");
  const GoalKeyResultDescription_1 = require("./GoalKeyResultDescription");
  const TaskDescription_1 = require("./TaskDescription");
  const TaskListDescription_1 = require("./TaskListDescription");
  const TaskTagDescription_1 = require("./TaskTagDescription");
  const SpaceTagDescription_1 = require("./SpaceTagDescription");
  const TaskDependencyDescription_1 = require("./TaskDependencyDescription");
  const TimeEntryDescription_1 = require("./TimeEntryDescription");
  const TimeEntryTagDescription_1 = require("./TimeEntryTagDescription");
  const ListDescription_1 = require("./ListDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class ClickUp {
      constructor() {
          this.description = {
              displayName: 'ClickUp',
              name: 'clickUp',
              icon: 'file:clickup.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Consume ClickUp API (Beta)',
              defaults: {
                  name: 'ClickUp',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'clickUpApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'clickUpOAuth2Api',
                      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: 'Checklist',
                              value: 'checklist',
                          },
                          {
                              name: 'Checklist Item',
                              value: 'checklistItem',
                          },
                          {
                              name: 'Comment',
                              value: 'comment',
                          },
                          {
                              name: 'Folder',
                              value: 'folder',
                          },
                          {
                              name: 'Goal',
                              value: 'goal',
                          },
                          {
                              name: 'Goal Key Result',
                              value: 'goalKeyResult',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                          {
                              name: 'Space Tag',
                              value: 'spaceTag',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'Task Dependency',
                              value: 'taskDependency',
                          },
                          {
                              name: 'Task List',
                              value: 'taskList',
                          },
                          {
                              name: 'Task Tag',
                              value: 'taskTag',
                          },
                          {
                              name: 'Time Entry',
                              value: 'timeEntry',
                          },
                          {
                              name: 'Time Entry Tag',
                              value: 'timeEntryTag',
                          },
                      ],
                      default: 'task',
                  },
                  ...ChecklistDescription_1.checklistOperations,
                  ...ChecklistDescription_1.checklistFields,
                  ...ChecklistItemDescription_1.checklistItemOperations,
                  ...ChecklistItemDescription_1.checklistItemFields,
                  ...CommentDescription_1.commentOperations,
                  ...CommentDescription_1.commentFields,
                  ...FolderDescription_1.folderOperations,
                  ...FolderDescription_1.folderFields,
                  ...GoalDescription_1.goalOperations,
                  ...GoalDescription_1.goalFields,
                  ...GoalKeyResultDescription_1.goalKeyResultOperations,
                  ...GoalKeyResultDescription_1.goalKeyResultFields,
                  ...TaskTagDescription_1.taskTagOperations,
                  ...TaskTagDescription_1.taskTagFields,
                  ...TaskListDescription_1.taskListOperations,
                  ...TaskListDescription_1.taskListFields,
                  ...SpaceTagDescription_1.spaceTagOperations,
                  ...SpaceTagDescription_1.spaceTagFields,
                  ...TaskDescription_1.taskOperations,
                  ...TaskDescription_1.taskFields,
                  ...TaskDependencyDescription_1.taskDependencyOperations,
                  ...TaskDependencyDescription_1.taskDependencyFields,
                  ...TimeEntryDescription_1.timeEntryOperations,
                  ...TimeEntryDescription_1.timeEntryFields,
                  ...TaskDependencyDescription_1.taskDependencyFields,
                  ...TimeEntryTagDescription_1.timeEntryTagOperations,
                  ...TimeEntryTagDescription_1.timeEntryTagFields,
                  ...ListDescription_1.listOperations,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTeams() {
                      const returnData = [];
                      const { teams } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', '/team');
                      for (const team of teams) {
                          const teamName = team.name;
                          const teamId = team.id;
                          returnData.push({
                              name: teamName,
                              value: teamId,
                          });
                      }
                      return returnData;
                  },
                  async getSpaces() {
                      const teamId = this.getCurrentNodeParameter('team');
                      const returnData = [];
                      const { spaces } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/space`);
                      for (const space of spaces) {
                          const spaceName = space.name;
                          const spaceId = space.id;
                          returnData.push({
                              name: spaceName,
                              value: spaceId,
                          });
                      }
                      return returnData;
                  },
                  async getFolders() {
                      const spaceId = this.getCurrentNodeParameter('space');
                      const returnData = [];
                      const { folders } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/space/${spaceId}/folder`);
                      for (const folder of folders) {
                          const folderName = folder.name;
                          const folderId = folder.id;
                          returnData.push({
                              name: folderName,
                              value: folderId,
                          });
                      }
                      return returnData;
                  },
                  async getLists() {
                      const folderId = this.getCurrentNodeParameter('folder');
                      const returnData = [];
                      const { lists } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/folder/${folderId}/list`);
                      for (const list of lists) {
                          const listName = list.name;
                          const listId = list.id;
                          returnData.push({
                              name: listName,
                              value: listId,
                          });
                      }
                      return returnData;
                  },
                  async getFolderlessLists() {
                      const spaceId = this.getCurrentNodeParameter('space');
                      const returnData = [];
                      const { lists } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/space/${spaceId}/list`);
                      for (const list of lists) {
                          const listName = list.name;
                          const listId = list.id;
                          returnData.push({
                              name: listName,
                              value: listId,
                          });
                      }
                      return returnData;
                  },
                  async getAssignees() {
                      const listId = this.getCurrentNodeParameter('list');
                      const taskId = this.getCurrentNodeParameter('task');
                      const returnData = [];
                      let url;
                      if (listId) {
                          url = `/list/${listId}/member`;
                      }
                      else if (taskId) {
                          url = `/task/${taskId}/member`;
                      }
                      else {
                          return returnData;
                      }
                      const { members } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', url);
                      for (const member of members) {
                          const memberName = member.username;
                          const menberId = member.id;
                          returnData.push({
                              name: memberName,
                              value: menberId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const spaceId = this.getCurrentNodeParameter('space');
                      const returnData = [];
                      const { tags } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/space/${spaceId}/tag`);
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.name;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getTimeEntryTags() {
                      const teamId = this.getCurrentNodeParameter('team');
                      const returnData = [];
                      const { data: tags } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/time_entries/tags`);
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = JSON.stringify(tag);
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getStatuses() {
                      const listId = this.getCurrentNodeParameter('list');
                      const returnData = [];
                      const { statuses } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}`);
                      for (const status of statuses) {
                          const statusName = status.status;
                          const statusId = status.status;
                          returnData.push({
                              name: statusName,
                              value: statusId,
                          });
                      }
                      return returnData;
                  },
                  async getCustomFields() {
                      const listId = this.getCurrentNodeParameter('list');
                      const returnData = [];
                      const { fields } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}/field`);
                      for (const field of fields) {
                          const fieldName = field.name;
                          const fieldId = field.id;
                          returnData.push({
                              name: fieldName,
                              value: fieldId,
                          });
                      }
                      return returnData;
                  },
                  async getTasks() {
                      const listId = this.getCurrentNodeParameter('list');
                      const archived = this.getCurrentNodeParameter('archived');
                      const returnData = [];
                      const { tasks } = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}/task?archived=${archived}`);
                      for (const task of tasks) {
                          const taskName = task.name;
                          const taskId = task.id;
                          returnData.push({
                              name: taskName,
                              value: taskId,
                          });
                      }
                      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 === 'checklist') {
                      if (operation === 'create') {
                          const taskId = this.getNodeParameter('task', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/task/${taskId}/checklist`, body);
                          responseData = responseData.checklist;
                      }
                      if (operation === 'delete') {
                          const checklistId = this.getNodeParameter('checklist', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/checklist/${checklistId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const checklistId = this.getNodeParameter('checklist', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.position) {
                              body.position = updateFields.position;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/checklist/${checklistId}`, body);
                          responseData = responseData.checklist;
                      }
                  }
                  if (resource === 'checklistItem') {
                      if (operation === 'create') {
                          const checklistId = this.getNodeParameter('checklist', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          if (additionalFields.assignee) {
                              body.assignee = parseInt(additionalFields.assignee, 10);
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/checklist/${checklistId}/checklist_item`, body);
                          responseData = responseData.checklist;
                      }
                      if (operation === 'delete') {
                          const checklistId = this.getNodeParameter('checklist', i);
                          const checklistItemId = this.getNodeParameter('checklistItem', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/checklist/${checklistId}/checklist_item/${checklistItemId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const checklistId = this.getNodeParameter('checklist', i);
                          const checklistItemId = this.getNodeParameter('checklistItem', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.parent) {
                              body.parent = updateFields.parent;
                          }
                          if (updateFields.assignee) {
                              body.assignee = parseInt(updateFields.assignee, 10);
                          }
                          if (updateFields.resolved) {
                              body.resolved = updateFields.resolved;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/checklist/${checklistId}/checklist_item/${checklistItemId}`, body);
                          responseData = responseData.checklist;
                      }
                  }
                  if (resource === 'comment') {
                      if (operation === 'create') {
                          const commentOn = this.getNodeParameter('commentOn', i);
                          const id = this.getNodeParameter('id', i);
                          const commentText = this.getNodeParameter('commentText', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              comment_text: commentText,
                          };
                          if (additionalFields.assignee) {
                              body.assignee = parseInt(additionalFields.assignee, 10);
                          }
                          if (additionalFields.notifyAll) {
                              body.notify_all = additionalFields.notifyAll;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/${commentOn}/${id}/comment`, body);
                      }
                      if (operation === 'delete') {
                          const commentId = this.getNodeParameter('comment', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/comment/${commentId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'getAll') {
                          const commentsOn = this.getNodeParameter('commentsOn', i);
                          const id = this.getNodeParameter('id', i);
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/${commentsOn}/${id}/comment`, {}, qs);
                          responseData = responseData.comments;
                          responseData = responseData.splice(0, qs.limit);
                      }
                      if (operation === 'update') {
                          const commentId = this.getNodeParameter('comment', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.commentText) {
                              body.comment_text = updateFields.commentText;
                          }
                          if (updateFields.assignee) {
                              body.assignee = parseInt(updateFields.assignee, 10);
                          }
                          if (updateFields.resolved) {
                              body.resolved = updateFields.resolved;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/comment/${commentId}`, body);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'folder') {
                      if (operation === 'create') {
                          const spaceId = this.getNodeParameter('space', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/space/${spaceId}/folder`, body);
                      }
                      if (operation === 'delete') {
                          const folderId = this.getNodeParameter('folder', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/folder/${folderId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const folderId = this.getNodeParameter('folder', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/folder/${folderId}`);
                      }
                      if (operation === 'getAll') {
                          const filters = this.getNodeParameter('filters', i);
                          const spaceId = this.getNodeParameter('space', i);
                          if (filters.archived) {
                              qs.archived = filters.archived;
                          }
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/space/${spaceId}/folder`, {}, qs);
                          responseData = responseData.folders;
                          responseData = responseData.splice(0, qs.limit);
                      }
                      if (operation === 'update') {
                          const folderId = this.getNodeParameter('folder', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/folder/${folderId}`, body);
                      }
                  }
                  if (resource === 'goal') {
                      if (operation === 'create') {
                          const teamId = this.getNodeParameter('team', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          if (additionalFields.dueDate) {
                              body.due_date = new Date(additionalFields.dueDate).getTime();
                          }
                          if (additionalFields.description) {
                              body.description = additionalFields.description;
                          }
                          if (additionalFields.multipleOwners) {
                              body.multiple_owners = additionalFields.multipleOwners;
                          }
                          if (additionalFields.color) {
                              body.color = additionalFields.color;
                          }
                          if (additionalFields.owners) {
                              body.owners = additionalFields.owners
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/goal`, body);
                          responseData = responseData.goal;
                      }
                      if (operation === 'delete') {
                          const goalId = this.getNodeParameter('goal', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/goal/${goalId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const goalId = this.getNodeParameter('goal', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/goal/${goalId}`);
                          responseData = responseData.goal;
                      }
                      if (operation === 'getAll') {
                          const teamId = this.getNodeParameter('team', i);
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/goal`, {}, qs);
                          responseData = responseData.goals;
                          responseData = responseData.splice(0, qs.limit);
                      }
                      if (operation === 'update') {
                          const goalId = this.getNodeParameter('goal', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.dueDate) {
                              body.due_date = new Date(updateFields.dueDate).getTime();
                          }
                          if (updateFields.description) {
                              body.description = updateFields.description;
                          }
                          if (updateFields.color) {
                              body.color = updateFields.color;
                          }
                          if (updateFields.addOwners) {
                              body.add_owners = updateFields.addOwners
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          if (updateFields.removeOwners) {
                              body.rem_owners = updateFields.removeOwners
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/goal/${goalId}`, body);
                          responseData = responseData.goal;
                      }
                  }
                  if (resource === 'goalKeyResult') {
                      if (operation === 'create') {
                          const goalId = this.getNodeParameter('goal', i);
                          const name = this.getNodeParameter('name', i);
                          const type = this.getNodeParameter('type', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                              type,
                          };
                          if (type === 'number' || type === 'currency') {
                              if (!additionalFields.unit) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Unit field must be set', {
                                      itemIndex: i,
                                  });
                              }
                          }
                          if (type === 'number' ||
                              type === 'percentaje' ||
                              type === 'automatic' ||
                              type === 'currency') {
                              if (additionalFields.stepsStart === undefined ||
                                  !additionalFields.stepsEnd === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Steps start and steps end fields must be set', { itemIndex: i });
                              }
                          }
                          if (additionalFields.unit) {
                              body.unit = additionalFields.unit;
                          }
                          if (additionalFields.stepsStart) {
                              body.steps_start = additionalFields.stepsStart;
                          }
                          if (additionalFields.stepsEnd) {
                              body.steps_end = additionalFields.stepsEnd;
                          }
                          if (additionalFields.taskIds) {
                              body.task_ids = additionalFields.taskIds.split(',');
                          }
                          if (additionalFields.listIds) {
                              body.list_ids = additionalFields.listIds.split(',');
                          }
                          if (additionalFields.owners) {
                              body.owners = additionalFields.owners
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/goal/${goalId}/key_result`, body);
                          responseData = responseData.key_result;
                      }
                      if (operation === 'delete') {
                          const keyResultId = this.getNodeParameter('keyResult', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/key_result/${keyResultId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const keyResultId = this.getNodeParameter('keyResult', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.note) {
                              body.note = updateFields.note;
                          }
                          if (updateFields.stepsCurrent) {
                              body.steps_current = updateFields.stepsCurrent;
                          }
                          if (updateFields.stepsStart) {
                              body.steps_start = updateFields.stepsStart;
                          }
                          if (updateFields.stepsEnd) {
                              body.steps_end = updateFields.stepsEnd;
                          }
                          if (updateFields.unit) {
                              body.unit = updateFields.unit;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/key_result/${keyResultId}`, body);
                          responseData = responseData.key_result;
                      }
                  }
                  if (resource === 'guest') {
                      if (operation === 'create') {
                          const teamId = this.getNodeParameter('team', i);
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                          };
                          if (additionalFields.canEditTags) {
                              body.can_edit_tags = additionalFields.canEditTags;
                          }
                          if (additionalFields.canSeeTimeSpend) {
                              body.can_see_time_spend = additionalFields.canSeeTimeSpend;
                          }
                          if (additionalFields.canSeeTimeEstimated) {
                              body.can_see_time_estimated = additionalFields.canSeeTimeEstimated;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/guest`, body);
                          responseData = responseData.team;
                      }
                      if (operation === 'delete') {
                          const teamId = this.getNodeParameter('team', i);
                          const guestId = this.getNodeParameter('guest', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/team/${teamId}/guest/${guestId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const teamId = this.getNodeParameter('team', i);
                          const guestId = this.getNodeParameter('guest', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/guest/${guestId}`);
                          responseData = responseData.team;
                      }
                      if (operation === 'update') {
                          const teamId = this.getNodeParameter('team', i);
                          const guestId = this.getNodeParameter('guest', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.username) {
                              body.username = updateFields.username;
                          }
                          if (updateFields.canEditTags) {
                              body.can_edit_tags = updateFields.canEditTags;
                          }
                          if (updateFields.canSeeTimeSpend) {
                              body.can_see_time_spend = updateFields.canSeeTimeSpend;
                          }
                          if (updateFields.canSeeTimeEstimated) {
                              body.can_see_time_estimated = updateFields.canSeeTimeEstimated;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/team/${teamId}/guest/${guestId}`, body);
                          responseData = responseData.team;
                      }
                  }
                  if (resource === 'task') {
                      if (operation === 'create') {
                          const listId = this.getNodeParameter('list', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          if (additionalFields.customFieldsJson) {
                              const customFields = (0, GenericFunctions_1.validateJSON)(additionalFields.customFieldsJson);
                              if (customFields === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Custom Fields: Invalid JSON', {
                                      itemIndex: i,
                                  });
                              }
                              body.custom_fields = customFields;
                          }
                          if (additionalFields.content) {
                              body.content = additionalFields.content;
                          }
                          if (additionalFields.assignees) {
                              body.assignees = additionalFields.assignees;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.status) {
                              body.status = additionalFields.status;
                          }
                          if (additionalFields.priority) {
                              body.priority = additionalFields.priority;
                          }
                          if (additionalFields.dueDate) {
                              body.due_date = new Date(additionalFields.dueDate).getTime();
                          }
                          if (additionalFields.dueDateTime) {
                              body.due_date_time = additionalFields.dueDateTime;
                          }
                          if (additionalFields.timeEstimate) {
                              body.time_estimate = additionalFields.timeEstimate * 6000;
                          }
                          if (additionalFields.startDate) {
                              body.start_date = new Date(additionalFields.startDate).getTime();
                          }
                          if (additionalFields.startDateTime) {
                              body.start_date_time = additionalFields.startDateTime;
                          }
                          if (additionalFields.notifyAll) {
                              body.notify_all = additionalFields.notifyAll;
                          }
                          if (additionalFields.parentId) {
                              body.parent = additionalFields.parentId;
                          }
                          if (additionalFields.markdownContent) {
                              delete body.content;
                              body.markdown_content = additionalFields.content;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/list/${listId}/task`, body);
                      }
                      if (operation === 'update') {
                          const taskId = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              assignees: {
                                  add: [],
                                  rem: [],
                              },
                          };
                          if (updateFields.content) {
                              body.content = updateFields.content;
                          }
                          if (updateFields.priority) {
                              body.priority = updateFields.priority;
                          }
                          if (updateFields.dueDate) {
                              body.due_date = new Date(updateFields.dueDate).getTime();
                          }
                          if (updateFields.dueDateTime) {
                              body.due_date_time = updateFields.dueDateTime;
                          }
                          if (updateFields.timeEstimate) {
                              body.time_estimate = updateFields.timeEstimate * 6000;
                          }
                          if (updateFields.startDate) {
                              body.start_date = new Date(updateFields.startDate).getTime();
                          }
                          if (updateFields.startDateTime) {
                              body.start_date_time = updateFields.startDateTime;
                          }
                          if (updateFields.notifyAll) {
                              body.notify_all = updateFields.notifyAll;
                          }
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.parentId) {
                              body.parent = updateFields.parentId;
                          }
                          if (updateFields.addAssignees) {
                              body.assignees.add = updateFields.addAssignees
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          if (updateFields.removeAssignees) {
                              body.assignees.rem = updateFields.removeAssignees
                                  .split(',')
                                  .map((e) => parseInt(e, 10));
                          }
                          if (updateFields.status) {
                              body.status = updateFields.status;
                          }
                          if (updateFields.markdownContent) {
                              delete body.content;
                              body.markdown_content = updateFields.content;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/task/${taskId}`, body);
                      }
                      if (operation === 'get') {
                          const taskId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/task/${taskId}`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          if (filters.archived) {
                              qs.archived = filters.archived;
                          }
                          if (filters.subtasks) {
                              qs.subtasks = filters.subtasks;
                          }
                          if (filters.includeClosed) {
                              qs.include_closed = filters.includeClosed;
                          }
                          if (filters.orderBy) {
                              qs.order_by = filters.orderBy;
                          }
                          if (filters.statuses) {
                              qs.statuses = filters.statuses;
                          }
                          if (filters.assignees) {
                              qs.assignees = filters.assignees;
                          }
                          if (filters.tags) {
                              qs.tags = filters.tags;
                          }
                          if (filters.dueDateGt) {
                              qs.due_date_gt = new Date(filters.dueDateGt).getTime();
                          }
                          if (filters.dueDateLt) {
                              qs.due_date_lt = new Date(filters.dueDateLt).getTime();
                          }
                          if (filters.dateCreatedGt) {
                              qs.date_created_gt = new Date(filters.dateCreatedGt).getTime();
                          }
                          if (filters.dateCreatedLt) {
                              qs.date_created_lt = new Date(filters.dateCreatedLt).getTime();
                          }
                          if (filters.dateUpdatedGt) {
                              qs.date_updated_gt = new Date(filters.dateUpdatedGt).getTime();
                          }
                          if (filters.dateUpdatedLt) {
                              qs.date_updated_lt = new Date(filters.dateUpdatedLt).getTime();
                          }
                          if (filters.customFieldsUi) {
                              const customFieldsValues = filters.customFieldsUi
                                  .customFieldsValues;
                              if (customFieldsValues) {
                                  const customFields = [];
                                  for (const customFieldValue of customFieldsValues) {
                                      customFields.push({
                                          field_id: customFieldValue.fieldId,
                                          operator: customFieldValue.operator === 'equal' ? '=' : customFieldValue.operator,
                                          value: customFieldValue.value,
                                      });
                                  }
                                  qs.custom_fields = JSON.stringify(customFields);
                              }
                          }
                          const listId = this.getNodeParameter('list', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clickupApiRequestAllItems.call(this, 'tasks', 'GET', `/list/${listId}/task`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clickupApiRequestAllItems.call(this, 'tasks', 'GET', `/list/${listId}/task`, {}, qs);
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                      if (operation === 'member') {
                          const taskId = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/task/${taskId}/member`, {}, qs);
                              responseData = responseData.members;
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/task/${taskId}/member`, {}, qs);
                              responseData = responseData.members;
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                      if (operation === 'setCustomField') {
                          const taskId = this.getNodeParameter('task', i);
                          const fieldId = this.getNodeParameter('field', i);
                          const value = this.getNodeParameter('value', i);
                          const jsonParse = this.getNodeParameter('jsonParse', i);
                          const body = {};
                          body.value = value;
                          if (jsonParse) {
                              body.value = (0, GenericFunctions_1.validateJSON)(body.value);
                              if (body.value === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Value is invalid JSON!', {
                                      itemIndex: i,
                                  });
                              }
                          }
                          else {
                              if (!isNaN(body.value)) {
                                  body.value = parseInt(body.value, 10);
                              }
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/task/${taskId}/field/${fieldId}`, body);
                      }
                      if (operation === 'delete') {
                          const taskId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/task/${taskId}`, {});
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'taskTag') {
                      if (operation === 'add') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const name = this.getNodeParameter('tagName', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/task/${taskId}/tag/${name}`, {}, additionalFields);
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const name = this.getNodeParameter('tagName', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/task/${taskId}/tag/${name}`, {}, additionalFields);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'taskList') {
                      if (operation === 'add') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const listId = this.getNodeParameter('listId', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/list/${listId}/task/${taskId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const listId = this.getNodeParameter('listId', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/list/${listId}/task/${taskId}`);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'taskDependency') {
                      if (operation === 'create') {
                          const taskId = this.getNodeParameter('task', i);
                          const dependsOnTaskId = this.getNodeParameter('dependsOnTask', i);
                          const body = {};
                          body.depends_on = dependsOnTaskId;
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/task/${taskId}/dependency`, body);
                          responseData = { success: true };
                      }
                      if (operation === 'delete') {
                          const taskId = this.getNodeParameter('task', i);
                          const dependsOnTaskId = this.getNodeParameter('dependsOnTask', i);
                          qs.depends_on = dependsOnTaskId;
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/task/${taskId}/dependency`, {}, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'timeEntry') {
                      if (operation === 'update') {
                          const teamId = this.getNodeParameter('team', i);
                          const timeEntryId = this.getNodeParameter('timeEntry', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const timezone = this.getTimezone();
                          const body = {};
                          Object.assign(body, updateFields);
                          if (body.start) {
                              body.start = moment_timezone_1.default.tz(body.start, timezone).valueOf();
                          }
                          if (body.duration) {
                              body.duration = body.duration * 60000;
                          }
                          if (body.task) {
                              body.tid = body.task;
                              body.custom_task_ids = true;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/team/${teamId}/time_entries/${timeEntryId}`, body);
                          responseData = responseData.data;
                      }
                      if (operation === 'getAll') {
                          const teamId = this.getNodeParameter('team', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          const timezone = this.getTimezone();
                          Object.assign(qs, filters);
                          if (filters.start_date) {
                              qs.start_date = moment_timezone_1.default.tz(qs.start_date, timezone).valueOf();
                          }
                          if (filters.end_date) {
                              qs.end_date = moment_timezone_1.default.tz(qs.end_date, timezone).valueOf();
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/time_entries`, {}, qs);
                          responseData = responseData.data;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'get') {
                          const teamId = this.getNodeParameter('team', i);
                          const running = this.getNodeParameter('running', i);
                          let endpoint = `/team/${teamId}/time_entries/current`;
                          if (!running) {
                              const timeEntryId = this.getNodeParameter('timeEntry', i);
                              endpoint = `/team/${teamId}/time_entries/${timeEntryId}`;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.data;
                      }
                      if (operation === 'create') {
                          const teamId = this.getNodeParameter('team', i);
                          const taskId = this.getNodeParameter('task', i);
                          const start = this.getNodeParameter('start', i);
                          const duration = this.getNodeParameter('duration', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const timezone = this.getTimezone();
                          const body = {
                              start: moment_timezone_1.default.tz(start, timezone).valueOf(),
                              duration: duration * 60000,
                              tid: taskId,
                          };
                          Object.assign(body, additionalFields);
                          if (body.tags) {
                              body.tags = body.tags.map((tag) => JSON.parse(tag));
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries`, body);
                          responseData = responseData.data;
                      }
                      if (operation === 'start') {
                          const teamId = this.getNodeParameter('team', i);
                          const taskId = this.getNodeParameter('task', i);
                          const body = {};
                          body.tid = taskId;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries/start`, body);
                          responseData = responseData.data;
                      }
                      if (operation === 'stop') {
                          const teamId = this.getNodeParameter('team', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries/stop`);
                          if (responseData.data) {
                              responseData = responseData.data;
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'There seems to be nothing to stop.', {
                                  itemIndex: i,
                              });
                          }
                      }
                      if (operation === 'delete') {
                          const teamId = this.getNodeParameter('team', i);
                          const timeEntryId = this.getNodeParameter('timeEntry', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/team/${teamId}/time_entries/${timeEntryId}`);
                          responseData = responseData.data;
                      }
                  }
                  if (resource === 'timeEntryTag') {
                      if (operation === 'add') {
                          const teamId = this.getNodeParameter('team', i);
                          const timeEntryIds = this.getNodeParameter('timeEntryIds', i);
                          const tagsUi = this.getNodeParameter('tagsUi', i);
                          const body = {};
                          body.time_entry_ids = timeEntryIds.split(',');
                          if (tagsUi) {
                              const tags = tagsUi.tagsValues;
                              if (tags === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one tag must be set', {
                                      itemIndex: i,
                                  });
                              }
                              body.tags = tags;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries/tags`, body);
                          responseData = { success: true };
                      }
                      if (operation === 'getAll') {
                          const teamId = this.getNodeParameter('team', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/team/${teamId}/time_entries/tags`);
                          responseData = responseData.data;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'remove') {
                          const teamId = this.getNodeParameter('team', i);
                          const timeEntryIds = this.getNodeParameter('timeEntryIds', i);
                          const tagNames = this.getNodeParameter('tagNames', i);
                          const body = {};
                          body.time_entry_ids = timeEntryIds.split(',');
                          body.tags = tagNames.map((tag) => JSON.parse(tag).name);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/team/${teamId}/time_entries/tags`, body);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'spaceTag') {
                      if (operation === 'create') {
                          const spaceId = this.getNodeParameter('space', i);
                          const name = this.getNodeParameter('name', i);
                          const foregroundColor = this.getNodeParameter('foregroundColor', i);
                          const backgroundColor = this.getNodeParameter('backgroundColor', i);
                          const body = {
                              tag: {
                                  name,
                                  tag_bg: backgroundColor,
                                  tag_fg: foregroundColor,
                              },
                          };
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/space/${spaceId}/tag`, body);
                          responseData = { success: true };
                      }
                      if (operation === 'delete') {
                          const spaceId = this.getNodeParameter('space', i);
                          const name = this.getNodeParameter('name', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/space/${spaceId}/tag/${name}`);
                          responseData = { success: true };
                      }
                      if (operation === 'getAll') {
                          const spaceId = this.getNodeParameter('space', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/space/${spaceId}/tag`);
                          responseData = responseData.tags;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const spaceId = this.getNodeParameter('space', i);
                          const tagName = this.getNodeParameter('name', i);
                          const newTagName = this.getNodeParameter('newName', i);
                          const foregroundColor = this.getNodeParameter('foregroundColor', i);
                          const backgroundColor = this.getNodeParameter('backgroundColor', i);
                          const body = {
                              tag: {
                                  name: newTagName,
                                  tag_bg: backgroundColor,
                                  tag_fg: foregroundColor,
                              },
                          };
                          await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/space/${spaceId}/tag/${tagName}`, body);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'list') {
                      if (operation === 'create') {
                          const spaceId = this.getNodeParameter('space', i);
                          const folderless = this.getNodeParameter('folderless', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          if (additionalFields.content) {
                              body.content = additionalFields.content;
                          }
                          if (additionalFields.dueDate) {
                              body.due_date = new Date(additionalFields.dueDate).getTime();
                          }
                          if (additionalFields.dueDateTime) {
                              body.due_date_time = additionalFields.dueDateTime;
                          }
                          if (additionalFields.priority) {
                              body.priority = additionalFields.priority;
                          }
                          if (additionalFields.assignee) {
                              body.assignee = parseInt(additionalFields.assignee, 10);
                          }
                          if (additionalFields.status) {
                              body.status = additionalFields.status;
                          }
                          if (folderless) {
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/space/${spaceId}/list`, body);
                          }
                          else {
                              const folderId = this.getNodeParameter('folder', i);
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'POST', `/folder/${folderId}/list`, body);
                          }
                      }
                      if (operation === 'member') {
                          const listId = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}/member`, {}, qs);
                              responseData = responseData.members;
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}/member`, {}, qs);
                              responseData = responseData.members;
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                      if (operation === 'customFields') {
                          const listId = this.getNodeParameter('list', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}/field`);
                          responseData = responseData.fields;
                      }
                      if (operation === 'delete') {
                          const listId = this.getNodeParameter('list', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'DELETE', `/list/${listId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const listId = this.getNodeParameter('list', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', `/list/${listId}`);
                      }
                      if (operation === 'getAll') {
                          const filters = this.getNodeParameter('filters', i);
                          const spaceId = this.getNodeParameter('space', i);
                          const folderless = this.getNodeParameter('folderless', i);
                          if (filters.archived) {
                              qs.archived = filters.archived;
                          }
                          let endpoint = `/space/${spaceId}/list`;
                          if (!folderless) {
                              const folderId = this.getNodeParameter('folder', i);
                              endpoint = `/folder/${folderId}/list`;
                          }
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = responseData.lists;
                          responseData = responseData.splice(0, qs.limit);
                      }
                      if (operation === 'update') {
                          const listId = this.getNodeParameter('list', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.content) {
                              body.content = updateFields.content;
                          }
                          if (updateFields.dueDate) {
                              body.due_date = new Date(updateFields.dueDate).getTime();
                          }
                          if (updateFields.dueDateTime) {
                              body.due_date_time = updateFields.dueDateTime;
                          }
                          if (updateFields.priority) {
                              body.priority = updateFields.priority;
                          }
                          if (updateFields.assignee) {
                              body.assignee = parseInt(updateFields.assignee, 10);
                          }
                          if (updateFields.unsetStatus) {
                              body.unset_status = updateFields.unsetStatus;
                          }
                          responseData = await GenericFunctions_1.clickupApiRequest.call(this, 'PUT', `/list/${listId}`, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.ClickUp = ClickUp;
  //# sourceMappingURL=ClickUp.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClickUpApi = void 0;
  class ClickUpApi {
      constructor() {
          this.name = 'clickUpApi';
          this.displayName = 'ClickUp API';
          this.documentationUrl = 'clickUp';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.clickup.com/api/v2',
                  url: '/team',
              },
          };
      }
  }
  exports.ClickUpApi = ClickUpApi;
  //# sourceMappingURL=ClickUpApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClickUpOAuth2Api = void 0;
  class ClickUpOAuth2Api {
      constructor() {
          this.name = 'clickUpOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'ClickUp OAuth2 API';
          this.documentationUrl = 'clickUp';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://app.clickup.com/api',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.clickup.com/api/v2/oauth/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ClickUpOAuth2Api = ClickUpOAuth2Api;
  //# sourceMappingURL=ClickUpOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClickUpApi = void 0;
  class ClickUpApi {
      constructor() {
          this.name = 'clickUpApi';
          this.displayName = 'ClickUp API';
          this.documentationUrl = 'clickUp';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.clickup.com/api/v2',
                  url: '/team',
              },
          };
      }
  }
  exports.ClickUpApi = ClickUpApi;
  //# sourceMappingURL=ClickUpApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ClickUpOAuth2Api = void 0;
  class ClickUpOAuth2Api {
      constructor() {
          this.name = 'clickUpOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'ClickUp OAuth2 API';
          this.documentationUrl = 'clickUp';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://app.clickup.com/api',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.clickup.com/api/v2/oauth/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ClickUpOAuth2Api = ClickUpOAuth2Api;
  //# sourceMappingURL=ClickUpOAuth2Api.credentials.js.map

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

  # ClickUp node

  Use the ClickUp node to automate work in ClickUp, and integrate ClickUp with other applications. n8n has built-in support for a wide range of ClickUp features, including creating, getting, deleting, and updating folders, checklists, tags, comments, and goals.

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

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

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

  ## Operations

  * Checklist
      * Create a checklist
      * Delete a checklist
      * Update a checklist
  * Checklist Item
      * Create a checklist item
      * Delete a checklist item
      * Update a checklist item
  * Comment
      * Create a comment
      * Delete a comment
      * Get all comments
      * Update a comment
  * Folder
      * Create a folder
      * Delete a folder
      * Get a folder
      * Get all folders
      * Update a folder
  * Goal
      * Create a goal
      * Delete a goal
      * Get a goal
      * Get all goals
      * Update a goal
  * Goal Key Result
      * Create a key result
      * Delete a key result
      * Update a key result
  * List
      * Create a list
      * Retrieve list's custom fields
      * Delete a list
      * Get a list
      * Get all lists
      * Get list members
      * Update a list
  * Space Tag
      * Create a space tag
      * Delete a space tag
      * Get all space tags
      * Update a space tag
  * Task
      * Create a task
      * Delete a task
      * Get a task
      * Get all tasks
      * Get task members
      * Set a custom field
      * Update a task
  * Task List
      * Add a task to a list
      * Remove a task from a list
  * Task Tag
      * Add a tag to a task
      * Remove a tag from a task
  * Task Dependency
      * Create a task dependency
      * Delete a task dependency
  * Time Entry
      * Create a time entry
      * Delete a time entry
      * Get a time entry
      * Get all time entries
      * Start a time entry
      * Stop the current running timer
      * Update a time Entry
  * Time Entry Tag
      * Add tag to time entry
      * Get all time entry tags
      * Remove tag from time entry

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Cloudflare
name: Cloudflare
display_name: Cloudflare
description: Consume Cloudflare API
category: input
icon: file:cloudflare.svg
code_hash: 6fde79b2d00dc711ed477b46193db62b6bd974cc9bf41b1bebfaad9f4398d1c5
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Cloudflare
documentation_title: Cloudflare node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"cloudflare","description":"Templates for cloudflare"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-08 18:33:42
updated_at: 2025-06-08 18:33:42
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Cloudflare = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ZoneCertificateDescription_1 = require("./ZoneCertificateDescription");
  class Cloudflare {
      constructor() {
          this.description = {
              displayName: 'Cloudflare',
              name: 'cloudflare',
              icon: 'file:cloudflare.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Cloudflare API',
              defaults: {
                  name: 'Cloudflare',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'cloudflareApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Zone Certificate',
                              value: 'zoneCertificate',
                          },
                      ],
                      default: 'zoneCertificate',
                  },
                  ...ZoneCertificateDescription_1.zoneCertificateOperations,
                  ...ZoneCertificateDescription_1.zoneCertificateFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getZones() {
                      const returnData = [];
                      const { result: zones } = await GenericFunctions_1.cloudflareApiRequest.call(this, 'GET', '/zones');
                      for (const zone of zones) {
                          returnData.push({
                              name: zone.name,
                              value: zone.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 === 'zoneCertificate') {
                      if (operation === 'delete') {
                          const zoneId = this.getNodeParameter('zoneId', i);
                          const certificateId = this.getNodeParameter('certificateId', i);
                          responseData = await GenericFunctions_1.cloudflareApiRequest.call(this, 'DELETE', `/zones/${zoneId}/origin_tls_client_auth/${certificateId}`, {});
                          responseData = responseData.result;
                      }
                      if (operation === 'get') {
                          const zoneId = this.getNodeParameter('zoneId', i);
                          const certificateId = this.getNodeParameter('certificateId', i);
                          responseData = await GenericFunctions_1.cloudflareApiRequest.call(this, 'GET', `/zones/${zoneId}/origin_tls_client_auth/${certificateId}`, {});
                          responseData = responseData.result;
                      }
                      if (operation === 'getMany') {
                          const zoneId = this.getNodeParameter('zoneId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i, {});
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.cloudflareApiRequestAllItems.call(this, 'result', 'GET', `/zones/${zoneId}/origin_tls_client_auth`, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              Object.assign(qs, { per_page: limit });
                              responseData = await GenericFunctions_1.cloudflareApiRequest.call(this, 'GET', `/zones/${zoneId}/origin_tls_client_auth`, {}, qs);
                              responseData = responseData.result;
                          }
                      }
                      if (operation === 'upload') {
                          const zoneId = this.getNodeParameter('zoneId', i);
                          const certificate = this.getNodeParameter('certificate', i);
                          const privateKey = this.getNodeParameter('privateKey', i);
                          const body = {
                              certificate,
                              private_key: privateKey,
                          };
                          responseData = await GenericFunctions_1.cloudflareApiRequest.call(this, 'POST', `/zones/${zoneId}/origin_tls_client_auth`, body, qs);
                          responseData = responseData.result;
                      }
                  }
                  returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), {
                      itemData: { item: i },
                  }));
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: { error: error.message } });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Cloudflare = Cloudflare;
  //# sourceMappingURL=Cloudflare.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CloudflareApi = void 0;
  class CloudflareApi {
      constructor() {
          this.name = 'cloudflareApi';
          this.displayName = 'Cloudflare API';
          this.documentationUrl = 'cloudflare';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.cloudflare.com/client/v4/user/tokens/verify',
              },
          };
      }
  }
  exports.CloudflareApi = CloudflareApi;
  //# sourceMappingURL=CloudflareApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CloudflareApi = void 0;
  class CloudflareApi {
      constructor() {
          this.name = 'cloudflareApi';
          this.displayName = 'Cloudflare API';
          this.documentationUrl = 'cloudflare';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.cloudflare.com/client/v4/user/tokens/verify',
              },
          };
      }
  }
  exports.CloudflareApi = CloudflareApi;
  //# sourceMappingURL=CloudflareApi.credentials.js.map

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

  # Cloudflare node

  Use the Cloudflare node to automate work in Cloudflare, and integrate Cloudflare with other applications. n8n has built-in support for a wide range of Cloudflare features, including deleting, getting, and uploading zone certificates.

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

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

  ## Operations

  * Zone Certificate
  	* Delete
  	* Get
  	* Get Many
  	* Upload

  ## Templates and examples

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

  ## Related resources

  Refer to [Cloudflare's API documentation on zone-level authentication](https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-properties){:target=_blank .external-link} for more information on this service.

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

related_resources:
  [{"title":"Cloudflare's API documentation on zone-level authentication","url":"https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-properties","type":"api"}]

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


node_type: n8n-nodes-base.Compression
name: Compression
display_name: Compression
description: Compress and decompress files
category: transform
icon: fa:file-archive
code_hash: 9a2aa09c05ff773f096e2cae51c7267a5809dc8931ea7f87deb9dc17178877bc
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Compression
documentation_title: Compression
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"compression","description":"Templates for compression"}]
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";
  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;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Compression = void 0;
  const fflate = __importStar(require("fflate"));
  const util_1 = require("util");
  const gunzip = (0, util_1.promisify)(fflate.gunzip);
  const gzip = (0, util_1.promisify)(fflate.gzip);
  const unzip = (0, util_1.promisify)(fflate.unzip);
  const zip = (0, util_1.promisify)(fflate.zip);
  const mime = __importStar(require("mime-types"));
  const ALREADY_COMPRESSED = [
      '7z',
      'aifc',
      'bz2',
      'doc',
      'docx',
      'gif',
      'gz',
      'heic',
      'heif',
      'jpg',
      'jpeg',
      'mov',
      'mp3',
      'mp4',
      'pdf',
      'png',
      'ppt',
      'pptx',
      'rar',
      'webm',
      'webp',
      'xls',
      'xlsx',
      'zip',
  ];
  class Compression {
      constructor() {
          this.description = {
              displayName: 'Compression',
              name: 'compression',
              icon: 'fa:file-archive',
              group: ['transform'],
              subtitle: '={{$parameter["operation"]}}',
              version: 1,
              description: 'Compress and decompress files',
              defaults: {
                  name: 'Compression',
                  color: '#408000',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Compress',
                              value: 'compress',
                          },
                          {
                              name: 'Decompress',
                              value: 'decompress',
                          },
                      ],
                      default: 'decompress',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['compress', 'decompress'],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property which contains the data for the file(s) to be compress/decompress. Multiple can be used separated by a comma (,).',
                  },
                  {
                      displayName: 'Output Format',
                      name: 'outputFormat',
                      type: 'options',
                      default: '',
                      options: [
                          {
                              name: 'Gzip',
                              value: 'gzip',
                          },
                          {
                              name: 'Zip',
                              value: 'zip',
                          },
                      ],
                      displayOptions: {
                          show: {
                              operation: ['compress'],
                          },
                      },
                      description: 'Format of the output file',
                  },
                  {
                      displayName: 'File Name',
                      name: 'fileName',
                      type: 'string',
                      default: '',
                      placeholder: 'data.zip',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['compress'],
                              outputFormat: ['zip'],
                          },
                      },
                      description: 'Name of the file to be compressed',
                  },
                  {
                      displayName: 'Binary Property Output',
                      name: 'binaryPropertyOutput',
                      type: 'string',
                      default: 'data',
                      displayOptions: {
                          show: {
                              outputFormat: ['zip'],
                              operation: ['compress'],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property to which to write the data of the compressed files',
                  },
                  {
                      displayName: 'Output Prefix',
                      name: 'outputPrefix',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['compress'],
                              outputFormat: ['gzip'],
                          },
                      },
                      description: 'Prefix use for all gzip compressed files',
                  },
                  {
                      displayName: 'Output Prefix',
                      name: 'outputPrefix',
                      type: 'string',
                      default: 'file_',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['decompress'],
                          },
                      },
                      description: 'Prefix use for all decompressed files',
                  },
              ],
          };
      }
      async execute() {
          var _a, _b, _c, _d;
          const items = this.getInputData();
          const length = items.length;
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (operation === 'decompress') {
                      const binaryPropertyNames = this.getNodeParameter('binaryPropertyName', 0)
                          .split(',')
                          .map((key) => key.trim());
                      const outputPrefix = this.getNodeParameter('outputPrefix', 0);
                      const binaryObject = {};
                      let zipIndex = 0;
                      for (const [index, binaryPropertyName] of binaryPropertyNames.entries()) {
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          if (((_a = binaryData.fileExtension) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'zip') {
                              const files = await unzip(binaryDataBuffer);
                              for (const key of Object.keys(files)) {
                                  if (key.includes('__MACOSX')) {
                                      continue;
                                  }
                                  const data = await this.helpers.prepareBinaryData(Buffer.from(files[key].buffer), key);
                                  binaryObject[`${outputPrefix}${zipIndex++}`] = data;
                              }
                          }
                          else if (((_b = binaryData.fileExtension) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'gz') {
                              const file = await gunzip(binaryDataBuffer);
                              const fileName = (_c = binaryData.fileName) === null || _c === void 0 ? void 0 : _c.split('.')[0];
                              const propertyName = `${outputPrefix}${index}`;
                              binaryObject[propertyName] = await this.helpers.prepareBinaryData(Buffer.from(file.buffer), fileName);
                              const fileExtension = mime.extension(binaryObject[propertyName].mimeType);
                              binaryObject[propertyName].fileName = `${fileName}.${fileExtension}`;
                              binaryObject[propertyName].fileExtension = fileExtension;
                          }
                      }
                      returnData.push({
                          json: items[i].json,
                          binary: binaryObject,
                          pairedItem: {
                              item: i,
                          },
                      });
                  }
                  if (operation === 'compress') {
                      const binaryPropertyNames = this.getNodeParameter('binaryPropertyName', 0)
                          .split(',')
                          .map((key) => key.trim());
                      const outputFormat = this.getNodeParameter('outputFormat', 0);
                      const zipData = {};
                      const binaryObject = {};
                      for (const [index, binaryPropertyName] of binaryPropertyNames.entries()) {
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          if (outputFormat === 'zip') {
                              zipData[binaryData.fileName] = [
                                  binaryDataBuffer,
                                  {
                                      level: ALREADY_COMPRESSED.includes(binaryData.fileExtension) ? 0 : 6,
                                  },
                              ];
                          }
                          else if (outputFormat === 'gzip') {
                              const outputPrefix = this.getNodeParameter('outputPrefix', 0);
                              const data = await gzip(binaryDataBuffer);
                              const fileName = (_d = binaryData.fileName) === null || _d === void 0 ? void 0 : _d.split('.')[0];
                              binaryObject[`${outputPrefix}${index}`] = await this.helpers.prepareBinaryData(Buffer.from(data), `${fileName}.gzip`);
                          }
                      }
                      if (outputFormat === 'zip') {
                          const fileName = this.getNodeParameter('fileName', 0);
                          const binaryPropertyOutput = this.getNodeParameter('binaryPropertyOutput', 0);
                          const buffer = await zip(zipData);
                          const data = await this.helpers.prepareBinaryData(Buffer.from(buffer), fileName);
                          returnData.push({
                              json: items[i].json,
                              binary: {
                                  [binaryPropertyOutput]: data,
                              },
                              pairedItem: {
                                  item: i,
                              },
                          });
                      }
                      if (outputFormat === 'gzip') {
                          returnData.push({
                              json: items[i].json,
                              binary: binaryObject,
                              pairedItem: {
                                  item: i,
                              },
                          });
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: i,
                          },
                      });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Compression = Compression;
  //# sourceMappingURL=Compression.node.js.map

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

  # Compression

  Use the Compression node to compress and decompress files. Supports Zip and Gzip formats.

  ## Node parameters

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

  The node parameters depend on which **Operation** you select. Choose to:

  * **Compress**: Create a compressed file from your input data.
  * **Decompress**: Decompress an existing compressed file.

  Refer to the sections below for parameters specific to each **Operation**.

  ### Compress

  - **Input Binary Field(s)**: Enter the name of the fields in the input data that contain the binary files you want to compress. To compress more than one file, use a comma-separated list.
  - **Output Format**: Choose whether to format the compressed output as **Zip** or **Gzip**.
  - **File Name**: Enter the name of the zip file the node creates.
  - **Put Output File in Field**: Enter the name of the field in the output data to contain the file.

  ### Decompress

  - **Put Output File in Field**: Enter the name of the fields in the input data that contain the binary files you want to decompress. To decompress more than one file, use a comma-separated list.
  - **Output Prefix**: Enter a prefix to add to the output file name.

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Coda
name: Coda
display_name: Coda
description: Consume Coda API
category: output
icon: file:coda.svg
code_hash: 5dd1a766378cacc5c6b79498186281fd173e22556616300209e9994394f87c9e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Coda
documentation_title: Coda node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"coda","description":"Templates for coda"}]
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.Coda = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const TableDescription_1 = require("./TableDescription");
  const FormulaDescription_1 = require("./FormulaDescription");
  const ControlDescription_1 = require("./ControlDescription");
  const ViewDescription_1 = require("./ViewDescription");
  class Coda {
      constructor() {
          this.description = {
              displayName: 'Coda',
              name: 'coda',
              icon: 'file:coda.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Coda API',
              defaults: {
                  name: 'Coda',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'codaApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Control',
                              value: 'control',
                              description: 'Controls provide a user-friendly way to input a value that can affect other parts of the doc',
                          },
                          {
                              name: 'Formula',
                              value: 'formula',
                              description: 'Formulas can be great for performing one-off computations',
                          },
                          {
                              name: 'Table',
                              value: 'table',
                              description: 'Access data of tables in documents',
                          },
                          {
                              name: 'View',
                              value: 'view',
                              description: 'Access data of views in documents',
                          },
                      ],
                      default: 'table',
                  },
                  ...TableDescription_1.tableOperations,
                  ...TableDescription_1.tableFields,
                  ...FormulaDescription_1.formulaOperations,
                  ...FormulaDescription_1.formulaFields,
                  ...ControlDescription_1.controlOperations,
                  ...ControlDescription_1.controlFields,
                  ...ViewDescription_1.viewOperations,
                  ...ViewDescription_1.viewFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getDocs() {
                      const returnData = [];
                      const qs = {};
                      const docs = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', '/docs', {}, qs);
                      for (const doc of docs) {
                          const docName = doc.name;
                          const docId = doc.id;
                          returnData.push({
                              name: docName,
                              value: docId,
                          });
                      }
                      return returnData;
                  },
                  async getTables() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const tables = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables`, {});
                      for (const table of tables) {
                          const tableName = table.name;
                          const tableId = table.id;
                          returnData.push({
                              name: tableName,
                              value: tableId,
                          });
                      }
                      return returnData;
                  },
                  async getColumns() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const tableId = this.getCurrentNodeParameter('tableId');
                      const columns = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${tableId}/columns`, {});
                      for (const column of columns) {
                          const columnName = column.name;
                          const columnId = column.id;
                          returnData.push({
                              name: columnName,
                              value: columnId,
                          });
                      }
                      return returnData;
                  },
                  async getViews() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const views = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables?tableTypes=view`, {});
                      for (const view of views) {
                          const viewName = view.name;
                          const viewId = view.id;
                          returnData.push({
                              name: viewName,
                              value: viewId,
                          });
                      }
                      return returnData;
                  },
                  async getFormulas() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const formulas = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/formulas`, {});
                      for (const formula of formulas) {
                          const formulaName = formula.name;
                          const formulaId = formula.id;
                          returnData.push({
                              name: formulaName,
                              value: formulaId,
                          });
                      }
                      return returnData;
                  },
                  async getViewRows() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const viewId = this.getCurrentNodeParameter('viewId');
                      const viewRows = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${viewId}/rows`, {});
                      for (const viewRow of viewRows) {
                          const viewRowName = viewRow.name;
                          const viewRowId = viewRow.id;
                          returnData.push({
                              name: viewRowName,
                              value: viewRowId,
                          });
                      }
                      return returnData;
                  },
                  async getViewColumns() {
                      const returnData = [];
                      const docId = this.getCurrentNodeParameter('docId');
                      const viewId = this.getCurrentNodeParameter('viewId');
                      const viewColumns = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${viewId}/columns`, {});
                      for (const viewColumn of viewColumns) {
                          const viewColumnName = viewColumn.name;
                          const viewColumnId = viewColumn.id;
                          returnData.push({
                              name: viewColumnName,
                              value: viewColumnId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const returnData = [];
          const items = this.getInputData();
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          let qs = {};
          const operation = this.getNodeParameter('operation', 0);
          if (resource === 'table') {
              if (operation === 'createRow') {
                  try {
                      const sendData = {};
                      for (let i = 0; i < items.length; i++) {
                          qs = {};
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const options = this.getNodeParameter('options', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
                          if (options.disableParsing) {
                              qs.disableParsing = options.disableParsing;
                          }
                          const cells = [];
                          cells.length = 0;
                          for (const key of Object.keys(items[i].json)) {
                              cells.push({
                                  column: key,
                                  value: items[i].json[key],
                              });
                          }
                          if (sendData[endpoint] === undefined) {
                              sendData[endpoint] = {
                                  rows: [],
                                  qs,
                              };
                          }
                          sendData[endpoint].rows.push({ cells });
                          if (options.keyColumns) {
                              sendData[endpoint].keyColumns = options.keyColumns.split(',');
                          }
                      }
                      for (const endpoint of Object.keys(sendData)) {
                          await GenericFunctions_1.codaApiRequest.call(this, 'POST', endpoint, sendData[endpoint], sendData[endpoint].qs);
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          return [this.helpers.returnJsonArray({ error: error.message })];
                      }
                      throw error;
                  }
                  return [items];
              }
              if (operation === 'getRow') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const options = this.getNodeParameter('options', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/rows/${rowId}`;
                          if (options.useColumnNames === false) {
                              qs.useColumnNames = options.useColumnNames;
                          }
                          else {
                              qs.useColumnNames = true;
                          }
                          if (options.valueFormat) {
                              qs.valueFormat = options.valueFormat;
                          }
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                          if (options.rawData === true) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                          else {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({
                                  id: responseData.id,
                                  ...responseData.values,
                              }), { itemData: { item: i } });
                              returnData.push(...executionData);
                          }
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'getAllRows') {
                  const docId = this.getNodeParameter('docId', 0);
                  const returnAll = this.getNodeParameter('returnAll', 0);
                  const tableId = this.getNodeParameter('tableId', 0);
                  const options = this.getNodeParameter('options', 0);
                  const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
                  if (options.useColumnNames === false) {
                      qs.useColumnNames = options.useColumnNames;
                  }
                  else {
                      qs.useColumnNames = true;
                  }
                  if (options.valueFormat) {
                      qs.valueFormat = options.valueFormat;
                  }
                  if (options.sortBy) {
                      qs.sortBy = options.sortBy;
                  }
                  if (options.visibleOnly) {
                      qs.visibleOnly = options.visibleOnly;
                  }
                  if (options.query) {
                      qs.query = options.query;
                  }
                  try {
                      if (returnAll) {
                          responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = responseData.items;
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          return [this.helpers.returnJsonArray({ error: error.message })];
                      }
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
                  if (options.rawData === true) {
                      return [this.helpers.returnJsonArray(responseData)];
                  }
                  else {
                      for (const item of responseData) {
                          returnData.push({
                              id: item.id,
                              ...item.values,
                          });
                      }
                      return [this.helpers.returnJsonArray(returnData)];
                  }
              }
              if (operation === 'deleteRow') {
                  try {
                      const sendData = {};
                      for (let i = 0; i < items.length; i++) {
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
                          if (sendData[endpoint] === undefined) {
                              sendData[endpoint] = [];
                          }
                          sendData[endpoint].push(rowId);
                      }
                      for (const endpoint of Object.keys(sendData)) {
                          await GenericFunctions_1.codaApiRequest.call(this, 'DELETE', endpoint, { rowIds: sendData[endpoint] }, qs);
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          return [this.helpers.returnJsonArray({ error: error.message })];
                      }
                      throw error;
                  }
                  return [items];
              }
              if (operation === 'pushButton') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const columnId = this.getNodeParameter('columnId', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/rows/${rowId}/buttons/${columnId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'POST', endpoint, {});
                          returnData.push(responseData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [this.helpers.returnJsonArray(returnData)];
              }
              if (operation === 'getColumn') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const columnId = this.getNodeParameter('columnId', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/columns/${columnId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {});
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [this.helpers.returnJsonArray(returnData)];
              }
              if (operation === 'getAllColumns') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const docId = this.getNodeParameter('docId', i);
                          const tableId = this.getNodeParameter('tableId', i);
                          const endpoint = `/docs/${docId}/tables/${tableId}/columns`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                          }
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
          }
          if (resource === 'formula') {
              if (operation === 'get') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const formulaId = this.getNodeParameter('formulaId', i);
                          const endpoint = `/docs/${docId}/formulas/${formulaId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {});
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'getAll') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const docId = this.getNodeParameter('docId', i);
                          const endpoint = `/docs/${docId}/formulas`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                          }
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
          }
          if (resource === 'control') {
              if (operation === 'get') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const controlId = this.getNodeParameter('controlId', i);
                          const endpoint = `/docs/${docId}/controls/${controlId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {});
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'getAll') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const docId = this.getNodeParameter('docId', i);
                          const endpoint = `/docs/${docId}/controls`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                          }
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
          }
          if (resource === 'view') {
              if (operation === 'get') {
                  for (let i = 0; i < items.length; i++) {
                      const docId = this.getNodeParameter('docId', i);
                      const viewId = this.getNodeParameter('viewId', i);
                      const endpoint = `/docs/${docId}/tables/${viewId}`;
                      responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  return [returnData];
              }
              if (operation === 'getAll') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const docId = this.getNodeParameter('docId', i);
                          const endpoint = `/docs/${docId}/tables?tableTypes=view`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                          }
                          responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...responseData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'getAllViewRows') {
                  const docId = this.getNodeParameter('docId', 0);
                  const returnAll = this.getNodeParameter('returnAll', 0);
                  const viewId = this.getNodeParameter('viewId', 0);
                  const options = this.getNodeParameter('options', 0);
                  const endpoint = `/docs/${docId}/tables/${viewId}/rows`;
                  if (options.useColumnNames === false) {
                      qs.useColumnNames = options.useColumnNames;
                  }
                  else {
                      qs.useColumnNames = true;
                  }
                  if (options.valueFormat) {
                      qs.valueFormat = options.valueFormat;
                  }
                  if (options.sortBy) {
                      qs.sortBy = options.sortBy;
                  }
                  if (options.query) {
                      qs.query = options.query;
                  }
                  try {
                      if (returnAll) {
                          responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                          responseData = responseData.items;
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          return [this.helpers.returnJsonArray({ error: error.message })];
                      }
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
                  if (options.rawData === true) {
                      return [this.helpers.returnJsonArray(responseData)];
                  }
                  else {
                      for (const item of responseData) {
                          returnData.push({
                              id: item.id,
                              ...item.values,
                          });
                      }
                      return [this.helpers.returnJsonArray(returnData)];
                  }
              }
              if (operation === 'deleteViewRow') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const viewId = this.getNodeParameter('viewId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'DELETE', endpoint);
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'pushViewButton') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const docId = this.getNodeParameter('docId', i);
                          const viewId = this.getNodeParameter('viewId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const columnId = this.getNodeParameter('columnId', i);
                          const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}/buttons/${columnId}`;
                          responseData = await GenericFunctions_1.codaApiRequest.call(this, 'POST', endpoint);
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'getAllViewColumns') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const docId = this.getNodeParameter('docId', i);
                          const viewId = this.getNodeParameter('viewId', i);
                          const endpoint = `/docs/${docId}/tables/${viewId}/columns`;
                          if (returnAll) {
                              responseData = await GenericFunctions_1.codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.codaApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.items;
                          }
                          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.messsage }), { itemData: { item: i } });
                              returnData.push(...executionErrorData);
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'updateViewRow') {
                  for (let i = 0; i < items.length; i++) {
                      try {
                          qs = {};
                          const docId = this.getNodeParameter('docId', i);
                          const viewId = this.getNodeParameter('viewId', i);
                          const rowId = this.getNodeParameter('rowId', i);
                          const keyName = this.getNodeParameter('keyName', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {};
                          const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
                          if (options.disableParsing) {
                              qs.disableParsing = options.disableParsing;
                          }
                          const cells = [];
                          cells.length = 0;
                          for (const key of Object.keys(items[i].json[keyName])) {
                              cells.push({
                                  column: key,
                                  value: items[i].json[keyName][key],
                              });
                          }
                          body.row = {
                              cells,
                          };
                          await GenericFunctions_1.codaApiRequest.call(this, 'PUT', endpoint, body, qs);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              items[i].json = { error: error.message };
                              continue;
                          }
                          throw error;
                      }
                  }
                  return [items];
              }
          }
          return [];
      }
  }
  exports.Coda = Coda;
  //# sourceMappingURL=Coda.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CodaApi = void 0;
  class CodaApi {
      constructor() {
          this.name = 'codaApi';
          this.displayName = 'Coda API';
          this.documentationUrl = 'coda';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.CodaApi = CodaApi;
  //# sourceMappingURL=CodaApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CodaApi = void 0;
  class CodaApi {
      constructor() {
          this.name = 'codaApi';
          this.displayName = 'Coda API';
          this.documentationUrl = 'coda';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.CodaApi = CodaApi;
  //# sourceMappingURL=CodaApi.credentials.js.map

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

  # Coda node

  Use the Coda node to automate work in Coda, and integrate Coda with other applications. n8n has built-in support for a wide range of Coda features, including creating, getting, and deleting controls, formulas, tables, and views.

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

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

  ## Operations

  * Control
      * Get a control
      * Get all controls
  * Formula
      * Get a formula
      * Get all formulas
  * Table
      * Create/Insert a row
      * Delete one or multiple rows
      * Get all columns
      * Get all the rows
      * Get a column
      * Get a row
      * Pushes a button
  * View
      * Delete view row
      * Get a view
      * Get all views
      * Get all views columns
      * Get all views rows
      * Update row
      * Push view button

  ## Templates and examples

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

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


node_type: n8n-nodes-base.ConvertKit
name: ConvertKit
display_name: ConvertKit
description: Consume ConvertKit API
category: input
icon: file:convertKit.svg
code_hash: f7753276ed6031dda1d07432d51218d88822fad961e6f03e0d1ec1709895c87f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ConvertKit
documentation_title: ConvertKit node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"convertkit","description":"Templates for convertkit"}]
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.ConvertKit = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const CustomFieldDescription_1 = require("./CustomFieldDescription");
  const FormDescription_1 = require("./FormDescription");
  const SequenceDescription_1 = require("./SequenceDescription");
  const TagDescription_1 = require("./TagDescription");
  const TagSubscriberDescription_1 = require("./TagSubscriberDescription");
  class ConvertKit {
      constructor() {
          this.description = {
              displayName: 'ConvertKit',
              name: 'convertKit',
              icon: 'file:convertKit.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume ConvertKit API',
              defaults: {
                  name: 'ConvertKit',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'convertKitApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Custom Field',
                              value: 'customField',
                          },
                          {
                              name: 'Form',
                              value: 'form',
                          },
                          {
                              name: 'Sequence',
                              value: 'sequence',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                          {
                              name: 'Tag Subscriber',
                              value: 'tagSubscriber',
                          },
                      ],
                      default: 'form',
                  },
                  ...CustomFieldDescription_1.customFieldOperations,
                  ...CustomFieldDescription_1.customFieldFields,
                  ...FormDescription_1.formOperations,
                  ...FormDescription_1.formFields,
                  ...SequenceDescription_1.sequenceOperations,
                  ...SequenceDescription_1.sequenceFields,
                  ...TagDescription_1.tagOperations,
                  ...TagDescription_1.tagFields,
                  ...TagSubscriberDescription_1.tagSubscriberOperations,
                  ...TagSubscriberDescription_1.tagSubscriberFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTags() {
                      const returnData = [];
                      const { tags } = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/tags');
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.id;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getForms() {
                      const returnData = [];
                      const { forms } = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/forms');
                      for (const form of forms) {
                          const formName = form.name;
                          const formId = form.id;
                          returnData.push({
                              name: formName,
                              value: formId,
                          });
                      }
                      return returnData;
                  },
                  async getSequences() {
                      const returnData = [];
                      const { courses } = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/sequences');
                      for (const course of courses) {
                          const courseName = course.name;
                          const courseId = course.id;
                          returnData.push({
                              name: courseName,
                              value: courseId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const 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 === 'customField') {
                      if (operation === 'create') {
                          const label = this.getNodeParameter('label', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', '/custom_fields', { label }, qs);
                      }
                      if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'DELETE', `/custom_fields/${id}`);
                      }
                      if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', `/custom_fields/${id}`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/custom_fields');
                          responseData = responseData.custom_fields;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const label = this.getNodeParameter('label', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'PUT', `/custom_fields/${id}`, {
                              label,
                          });
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'form') {
                      if (operation === 'addSubscriber') {
                          const email = this.getNodeParameter('email', i);
                          const formId = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                          };
                          if (additionalFields.firstName) {
                              body.first_name = additionalFields.firstName;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.fieldsUi) {
                              const fieldValues = additionalFields.fieldsUi
                                  .fieldsValues;
                              if (fieldValues) {
                                  body.fields = {};
                                  for (const fieldValue of fieldValues) {
                                      body.fields[fieldValue.key] = fieldValue.value;
                                  }
                              }
                          }
                          const { subscription } = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', `/forms/${formId}/subscribe`, body);
                          responseData = subscription;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/forms');
                          responseData = responseData.forms;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                      if (operation === 'getSubscriptions') {
                          const formId = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.subscriberState) {
                              qs.subscriber_state = additionalFields.subscriberState;
                          }
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', `/forms/${formId}/subscriptions`, {}, qs);
                          responseData = responseData.subscriptions;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                  }
                  if (resource === 'sequence') {
                      if (operation === 'addSubscriber') {
                          const email = this.getNodeParameter('email', i);
                          const sequenceId = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                          };
                          if (additionalFields.firstName) {
                              body.first_name = additionalFields.firstName;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.fieldsUi) {
                              const fieldValues = additionalFields.fieldsUi
                                  .fieldsValues;
                              if (fieldValues) {
                                  body.fields = {};
                                  for (const fieldValue of fieldValues) {
                                      body.fields[fieldValue.key] = fieldValue.value;
                                  }
                              }
                          }
                          const { subscription } = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', `/sequences/${sequenceId}/subscribe`, body);
                          responseData = subscription;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/sequences');
                          responseData = responseData.courses;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                      if (operation === 'getSubscriptions') {
                          const sequenceId = this.getNodeParameter('id', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.subscriberState) {
                              qs.subscriber_state = additionalFields.subscriberState;
                          }
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', `/sequences/${sequenceId}/subscriptions`, {}, qs);
                          responseData = responseData.subscriptions;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                  }
                  if (resource === 'tag') {
                      if (operation === 'create') {
                          const names = this.getNodeParameter('name', i)
                              .split(',')
                              .map((e) => ({ name: e }));
                          const body = {
                              tag: names,
                          };
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', '/tags', body);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', '/tags');
                          responseData = responseData.tags;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                  }
                  if (resource === 'tagSubscriber') {
                      if (operation === 'add') {
                          const tagId = this.getNodeParameter('tagId', i);
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                          };
                          if (additionalFields.firstName) {
                              body.first_name = additionalFields.firstName;
                          }
                          if (additionalFields.fieldsUi) {
                              const fieldValues = additionalFields.fieldsUi
                                  .fieldsValues;
                              if (fieldValues) {
                                  body.fields = {};
                                  for (const fieldValue of fieldValues) {
                                      body.fields[fieldValue.key] = fieldValue.value;
                                  }
                              }
                          }
                          const { subscription } = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', `/tags/${tagId}/subscribe`, body);
                          responseData = subscription;
                      }
                      if (operation === 'getAll') {
                          const tagId = this.getNodeParameter('tagId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'GET', `/tags/${tagId}/subscriptions`);
                          responseData = responseData.subscriptions;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                      if (operation === 'delete') {
                          const tagId = this.getNodeParameter('tagId', i);
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.convertKitApiRequest.call(this, 'POST', `/tags/${tagId}>/unsubscribe`, { email });
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.ConvertKit = ConvertKit;
  //# sourceMappingURL=ConvertKit.node.js.map

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

  // --- Next Credential File ---

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

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

  # ConvertKit node

  Use the ConvertKit node to automate work in ConvertKit, and integrate ConvertKit with other applications. n8n has built-in support for a wide range of ConvertKit features, including creating and deleting custom fields, getting tags, and adding subscribers.

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

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

  ## Operations

  * Custom Field
      * Create a field
      * Delete a field
      * Get all fields
      * Update a field
  * Form
      * Add a subscriber
      * Get all forms
      * List subscriptions to a form including subscriber data
  * Sequence
      * Add a subscriber
      * Get all sequences
      * Get all subscriptions to a sequence including subscriber data
  * Tag
      * Create a tag
      * Get all tags
  * Tag Subscriber
      * Add a tag to a subscriber
      * List subscriptions to a tag including subscriber data
      * Delete a tag from a subscriber

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Contentful
name: Contentful
display_name: Contentful
description: Consume Contentful API
category: input
icon: file:contentful.png
code_hash: 6f3781a04c10511e8692ba49827eb10317ba66b23720b978e9ec69423e57ea05
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Contentful
documentation_title: Contentful node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"contentful","description":"Templates for contentful"}]
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";
  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;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Contentful = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const SpaceDescription = __importStar(require("./SpaceDescription"));
  const ContentTypeDescription = __importStar(require("./ContentTypeDescription"));
  const EntryDescription = __importStar(require("./EntryDescription"));
  const AssetDescription = __importStar(require("./AssetDescription"));
  const LocaleDescription = __importStar(require("./LocaleDescription"));
  class Contentful {
      constructor() {
          this.description = {
              displayName: 'Contentful',
              name: 'contentful',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              icon: 'file:contentful.png',
              group: ['input'],
              version: 1,
              description: 'Consume Contentful API',
              defaults: {
                  name: 'Contentful',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'contentfulApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Source',
                      name: 'source',
                      type: 'options',
                      default: 'deliveryApi',
                      description: 'Pick where your data comes from, delivery or preview API',
                      options: [
                          {
                              name: 'Delivery API',
                              value: 'deliveryApi',
                          },
                          {
                              name: 'Preview API',
                              value: 'previewApi',
                          },
                      ],
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          AssetDescription.resource,
                          ContentTypeDescription.resource,
                          EntryDescription.resource,
                          LocaleDescription.resource,
                          SpaceDescription.resource,
                      ],
                      default: 'entry',
                  },
                  ...SpaceDescription.operations,
                  ...ContentTypeDescription.operations,
                  ...EntryDescription.operations,
                  ...AssetDescription.operations,
                  ...LocaleDescription.operations,
                  ...SpaceDescription.fields,
                  ...ContentTypeDescription.fields,
                  ...EntryDescription.fields,
                  ...AssetDescription.fields,
                  ...LocaleDescription.fields,
              ],
          };
      }
      async execute() {
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const items = this.getInputData();
          const returnData = [];
          const qs = {};
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'space') {
                      if (operation === 'get') {
                          const credentials = await this.getCredentials('contentfulApi');
                          responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}`);
                      }
                  }
                  if (resource === 'contentType') {
                      if (operation === 'get') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const env = this.getNodeParameter('environmentId', 0);
                          const id = this.getNodeParameter('contentTypeId', 0);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/content_types/${id}`);
                          if (!additionalFields.rawData) {
                              responseData = responseData.fields;
                          }
                      }
                  }
                  if (resource === 'entry') {
                      if (operation === 'get') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const env = this.getNodeParameter('environmentId', 0);
                          const id = this.getNodeParameter('entryId', 0);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/entries/${id}`, {}, qs);
                          if (!additionalFields.rawData) {
                              responseData = responseData.fields;
                          }
                      }
                      else if (operation === 'getAll') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const rawData = additionalFields.rawData;
                          additionalFields.rawData = undefined;
                          const env = this.getNodeParameter('environmentId', i);
                          Object.assign(qs, additionalFields);
                          if (qs.equal) {
                              const [atribute, value] = qs.equal.split('=');
                              qs[atribute] = value;
                              delete qs.equal;
                          }
                          if (qs.notEqual) {
                              const [atribute, value] = qs.notEqual.split('=');
                              qs[atribute] = value;
                              delete qs.notEqual;
                          }
                          if (qs.include) {
                              const [atribute, value] = qs.include.split('=');
                              qs[atribute] = value;
                              delete qs.include;
                          }
                          if (qs.exclude) {
                              const [atribute, value] = qs.exclude.split('=');
                              qs[atribute] = value;
                              delete qs.exclude;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.contentfulApiRequestAllItems.call(this, 'items', 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/entries`, {}, qs);
                              if (!rawData) {
                                  const assets = [];
                                  responseData.map((asset) => {
                                      assets.push(asset.fields);
                                  });
                                  responseData = assets;
                              }
                          }
                          else {
                              const limit = this.getNodeParameter('limit', 0);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/entries`, {}, qs);
                              responseData = responseData.items;
                              if (!rawData) {
                                  const assets = [];
                                  responseData.map((asset) => {
                                      assets.push(asset.fields);
                                  });
                                  responseData = assets;
                              }
                          }
                      }
                  }
                  if (resource === 'asset') {
                      if (operation === 'get') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const env = this.getNodeParameter('environmentId', 0);
                          const id = this.getNodeParameter('assetId', 0);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/assets/${id}`, {}, qs);
                          if (!additionalFields.rawData) {
                              responseData = responseData.fields;
                          }
                      }
                      else if (operation === 'getAll') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const rawData = additionalFields.rawData;
                          additionalFields.rawData = undefined;
                          const env = this.getNodeParameter('environmentId', i);
                          Object.assign(qs, additionalFields);
                          if (qs.equal) {
                              const [atribute, value] = qs.equal.split('=');
                              qs[atribute] = value;
                              delete qs.equal;
                          }
                          if (qs.notEqual) {
                              const [atribute, value] = qs.notEqual.split('=');
                              qs[atribute] = value;
                              delete qs.notEqual;
                          }
                          if (qs.include) {
                              const [atribute, value] = qs.include.split('=');
                              qs[atribute] = value;
                              delete qs.include;
                          }
                          if (qs.exclude) {
                              const [atribute, value] = qs.exclude.split('=');
                              qs[atribute] = value;
                              delete qs.exclude;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.contentfulApiRequestAllItems.call(this, 'items', 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/assets`, {}, qs);
                              if (!rawData) {
                                  const assets = [];
                                  responseData.map((asset) => {
                                      assets.push(asset.fields);
                                  });
                                  responseData = assets;
                              }
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/assets`, {}, qs);
                              responseData = responseData.items;
                              if (!rawData) {
                                  const assets = [];
                                  responseData.map((asset) => {
                                      assets.push(asset.fields);
                                  });
                                  responseData = assets;
                              }
                          }
                      }
                  }
                  if (resource === 'locale') {
                      if (operation === 'getAll') {
                          const credentials = await this.getCredentials('contentfulApi');
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const env = this.getNodeParameter('environmentId', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.contentfulApiRequestAllItems.call(this, 'items', 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/locales`, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', 0);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.contentfulApiRequest.call(this, 'GET', `/spaces/${credentials === null || credentials === void 0 ? void 0 : credentials.spaceId}/environments/${env}/locales`, {}, qs);
                              responseData = responseData.items;
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Contentful = Contentful;
  //# sourceMappingURL=Contentful.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ContentfulApi = void 0;
  class ContentfulApi {
      constructor() {
          this.name = 'contentfulApi';
          this.displayName = 'Contentful API';
          this.documentationUrl = 'contentful';
          this.properties = [
              {
                  displayName: 'Space ID',
                  name: 'spaceId',
                  type: 'string',
                  default: '',
                  required: true,
                  description: 'The ID for the Contentful space',
              },
              {
                  displayName: 'Content Delivery API Access Token',
                  name: 'ContentDeliveryaccessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Access token that has access to the space. Can be left empty if only Delivery API should be used.',
              },
              {
                  displayName: 'Content Preview API Access Token',
                  name: 'ContentPreviewaccessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Access token that has access to the space. Can be left empty if only Preview API should be used.',
              },
          ];
      }
  }
  exports.ContentfulApi = ContentfulApi;
  //# sourceMappingURL=ContentfulApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ContentfulApi = void 0;
  class ContentfulApi {
      constructor() {
          this.name = 'contentfulApi';
          this.displayName = 'Contentful API';
          this.documentationUrl = 'contentful';
          this.properties = [
              {
                  displayName: 'Space ID',
                  name: 'spaceId',
                  type: 'string',
                  default: '',
                  required: true,
                  description: 'The ID for the Contentful space',
              },
              {
                  displayName: 'Content Delivery API Access Token',
                  name: 'ContentDeliveryaccessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Access token that has access to the space. Can be left empty if only Delivery API should be used.',
              },
              {
                  displayName: 'Content Preview API Access Token',
                  name: 'ContentPreviewaccessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Access token that has access to the space. Can be left empty if only Preview API should be used.',
              },
          ];
      }
  }
  exports.ContentfulApi = ContentfulApi;
  //# sourceMappingURL=ContentfulApi.credentials.js.map

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

  # Contentful node

  Use the Contentful node to automate work in Contentful, and integrate Contentful with other applications. n8n has built-in support for a wide range of Contentful features, including getting assets, content types, entries, locales, and space.

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

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

  ## Operations

  * Asset
      * Get
      * Get All
  * Content Type
      * Get
  * Entry
      * Get
      * Get All
  * Locale
      * Get All
  * Space
      * Get

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Code
name: Code
display_name: Code
description: Run custom JavaScript or Python code
category: transform
icon: fa:code
code_hash: 97df4024967b2e5c96a0738b9aaa3e94926e65bbe65b3a7e0f0b3e45baa8c879
documentation_url: https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.code
documentation_title: LangChain Code node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"langchain-code","description":"Templates for langchain-code"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
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.Code = void 0;
  const JavascriptCodeDescription_1 = require("./descriptions/JavascriptCodeDescription");
  const PythonCodeDescription_1 = require("./descriptions/PythonCodeDescription");
  const JavaScriptSandbox_1 = require("./JavaScriptSandbox");
  const PythonSandbox_1 = require("./PythonSandbox");
  const Sandbox_1 = require("./Sandbox");
  const utils_1 = require("./utils");
  const { CODE_ENABLE_STDOUT } = process.env;
  class Code {
      constructor() {
          this.description = {
              displayName: 'Code',
              name: 'code',
              icon: 'fa:code',
              group: ['transform'],
              version: [1, 2],
              defaultVersion: 2,
              description: 'Run custom JavaScript or Python code',
              defaults: {
                  name: 'Code',
                  color: '#FF9922',
              },
              inputs: ['main'],
              outputs: ['main'],
              parameterPane: 'wide',
              properties: [
                  {
                      displayName: 'Mode',
                      name: 'mode',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Run Once for All Items',
                              value: 'runOnceForAllItems',
                              description: 'Run this code only once, no matter how many input items there are',
                          },
                          {
                              name: 'Run Once for Each Item',
                              value: 'runOnceForEachItem',
                              description: 'Run this code as many times as there are input items',
                          },
                      ],
                      default: 'runOnceForAllItems',
                  },
                  {
                      displayName: 'Language',
                      name: 'language',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              '@version': [2],
                          },
                      },
                      options: [
                          {
                              name: 'JavaScript',
                              value: 'javaScript',
                          },
                          {
                              name: 'Python (Beta)',
                              value: 'python',
                          },
                      ],
                      default: 'javaScript',
                  },
                  {
                      displayName: 'Language',
                      name: 'language',
                      type: 'hidden',
                      displayOptions: {
                          show: {
                              '@version': [1],
                          },
                      },
                      default: 'javaScript',
                  },
                  ...JavascriptCodeDescription_1.javascriptCodeDescription,
                  ...PythonCodeDescription_1.pythonCodeDescription,
              ],
          };
      }
      async execute() {
          const nodeMode = this.getNodeParameter('mode', 0);
          const workflowMode = this.getMode();
          const node = this.getNode();
          const language = node.typeVersion === 2
              ? this.getNodeParameter('language', 0)
              : 'javaScript';
          const codeParameterName = language === 'python' ? 'pythonCode' : 'jsCode';
          const getSandbox = (index = 0) => {
              const code = this.getNodeParameter(codeParameterName, index);
              const context = Sandbox_1.getSandboxContext.call(this, index);
              if (nodeMode === 'runOnceForAllItems') {
                  context.items = context.$input.all();
              }
              else {
                  context.item = context.$input.item;
              }
              const Sandbox = language === 'python' ? PythonSandbox_1.PythonSandbox : JavaScriptSandbox_1.JavaScriptSandbox;
              const sandbox = new Sandbox(context, code, index, this.helpers);
              sandbox.on('output', workflowMode === 'manual'
                  ? this.sendMessageToUI
                  : CODE_ENABLE_STDOUT === 'true'
                      ? (...args) => console.log(`[Workflow "${this.getWorkflow().id}"][Node "${node.name}"]`, ...args)
                      : () => { });
              return sandbox;
          };
          if (nodeMode === 'runOnceForAllItems') {
              const sandbox = getSandbox();
              let items;
              try {
                  items = await sandbox.runCodeAllItems();
              }
              catch (error) {
                  if (!this.continueOnFail())
                      throw error;
                  items = [{ json: { error: error.message } }];
              }
              for (const item of items) {
                  (0, utils_1.standardizeOutput)(item.json);
              }
              return [items];
          }
          const returnData = [];
          const items = this.getInputData();
          for (let index = 0; index < items.length; index++) {
              const sandbox = getSandbox(index);
              let result;
              try {
                  result = await sandbox.runCodeEachItem();
              }
              catch (error) {
                  if (!this.continueOnFail())
                      throw error;
                  returnData.push({ json: { error: error.message } });
              }
              if (result) {
                  returnData.push({
                      json: (0, utils_1.standardizeOutput)(result.json),
                      pairedItem: { item: index },
                      ...(result.binary && { binary: result.binary }),
                  });
              }
          }
          return [returnData];
      }
  }
  exports.Code = Code;
  //# sourceMappingURL=Code.node.js.map

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

  # LangChain Code node

  Use the LangChain Code node to import LangChain. This means if there is functionality you need that n8n hasn't created a node for, you can still use it. By configuring the LangChain Code node connectors you can use it as a normal node, root node or sub-node.

  On this page, you'll find the node parameters, guidance on configuring the node, and links to more resources.

  /// note | Not available on Cloud
  This node is only available on self-hosted n8n.
  ///

  ## Node parameters

  ### Add Code

  Add your custom code. Choose either **Execute** or **Supply Data** mode. You can only use one mode.

  Unlike the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md), the LangChain Code node doesn't support Python.

  * **Execute**: use the LangChain Code node like n8n's own Code node. This takes input data from the workflow, processes it, and returns it as the node output. This mode requires a main input and output. You must create these connections in **Inputs** and **Outputs**.
  * **Supply Data**: use the LangChain Code node as a sub-node, sending data to a root node. This uses an output other than main.

  By default, you can't load built-in or external modules in this node. Self-hosted users can [enable built-in and external modules](/hosting/configuration/configuration-methods.md).

  ### Inputs

  Choose the input types. 

  The main input is the normal connector found in all n8n workflows. If you have a main input and output set in the node, **Execute** code is required.

  ### Outputs

  Choose the output types. 

  The main output is the normal connector found in all n8n workflows. If you have a main input and output set in the node, **Execute** code is required.

  ## Node inputs and outputs configuration

  By configuring the LangChain Code node connectors (inputs and outputs) you can use it as an app node, root node or sub-node.

  ![Screenshot of a workflow with four LangChain nodes, configured as different node types](/_images/integrations/builtin/cluster-nodes/langchaincode/create-node-types.png)

  | Node type | Inputs | Outputs | Code mode |
  | --------- | ------ | ------- | --------- |
  | App node. Similar to the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md). | Main | Main | Execute |
  | Root node | Main; at least one other type | Main | Execute |
  | Sub-node | - | A type other than main. Must match the input type you want to connect to. | Supply Data |
  | Sub-node with sub-nodes | A type other than main |A type other than main. Must match the input type you want to connect to. | Supply Data |

  ## Built-in methods

  n8n provides these methods to make it easier to perform common tasks in the LangChain Code node.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/langchaincode/builtin-methods.md"

  ## Templates and examples

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

  ## Related resources

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
  --8<-- "_glossary/ai-glossary.md"

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


node_type: n8n-nodes-base.Cockpit
name: Cockpit
display_name: Cockpit
description: Consume Cockpit API
category: output
icon: file:cockpit.png
code_hash: 44a2a2fa971e41be52bf195599c4f3c927e29f2c0a47fad162ddfbcbb144574e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Cockpit
documentation_title: Cockpit node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"cockpit","description":"Templates for cockpit"}]
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.Cockpit = void 0;
  const CollectionDescription_1 = require("./CollectionDescription");
  const CollectionFunctions_1 = require("./CollectionFunctions");
  const FormDescription_1 = require("./FormDescription");
  const FormFunctions_1 = require("./FormFunctions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const SingletonDescription_1 = require("./SingletonDescription");
  const SingletonFunctions_1 = require("./SingletonFunctions");
  class Cockpit {
      constructor() {
          this.description = {
              displayName: 'Cockpit',
              name: 'cockpit',
              icon: 'file:cockpit.png',
              group: ['output'],
              version: 1,
              subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
              description: 'Consume Cockpit API',
              defaults: {
                  name: 'Cockpit',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'cockpitApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      default: 'collection',
                      options: [
                          {
                              name: 'Collection',
                              value: 'collection',
                          },
                          {
                              name: 'Form',
                              value: 'form',
                          },
                          {
                              name: 'Singleton',
                              value: 'singleton',
                          },
                      ],
                  },
                  ...CollectionDescription_1.collectionOperations,
                  ...CollectionDescription_1.collectionFields,
                  ...FormDescription_1.formOperations,
                  ...FormDescription_1.formFields,
                  ...SingletonDescription_1.singletonOperations,
                  ...SingletonDescription_1.singletonFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCollections() {
                      const collections = await CollectionFunctions_1.getAllCollectionNames.call(this);
                      return collections.map((itemName) => {
                          return {
                              name: itemName,
                              value: itemName,
                          };
                      });
                  },
                  async getSingletons() {
                      const singletons = await SingletonFunctions_1.getAllSingletonNames.call(this);
                      return singletons.map((itemName) => {
                          return {
                              name: itemName,
                              value: itemName,
                          };
                      });
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'collection') {
                      const collectionName = this.getNodeParameter('collection', i);
                      if (operation === 'create') {
                          const data = GenericFunctions_1.createDataFromParameters.call(this, i);
                          responseData = await CollectionFunctions_1.createCollectionEntry.call(this, collectionName, data);
                      }
                      else if (operation === 'getAll') {
                          const options = this.getNodeParameter('options', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              options.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await CollectionFunctions_1.getAllCollectionEntries.call(this, collectionName, options);
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const data = GenericFunctions_1.createDataFromParameters.call(this, i);
                          responseData = await CollectionFunctions_1.createCollectionEntry.call(this, collectionName, data, id);
                      }
                  }
                  else if (resource === 'form') {
                      const formName = this.getNodeParameter('form', i);
                      if (operation === 'submit') {
                          const form = GenericFunctions_1.createDataFromParameters.call(this, i);
                          responseData = await FormFunctions_1.submitForm.call(this, formName, form);
                      }
                  }
                  else if (resource === 'singleton') {
                      const singletonName = this.getNodeParameter('singleton', i);
                      if (operation === 'get') {
                          responseData = await SingletonFunctions_1.getSingleton.call(this, singletonName);
                      }
                  }
                  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.Cockpit = Cockpit;
  //# sourceMappingURL=Cockpit.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CockpitApi = void 0;
  class CockpitApi {
      constructor() {
          this.name = 'cockpitApi';
          this.displayName = 'Cockpit API';
          this.documentationUrl = 'cockpit';
          this.properties = [
              {
                  displayName: 'Cockpit URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.CockpitApi = CockpitApi;
  //# sourceMappingURL=CockpitApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CockpitApi = void 0;
  class CockpitApi {
      constructor() {
          this.name = 'cockpitApi';
          this.displayName = 'Cockpit API';
          this.documentationUrl = 'cockpit';
          this.properties = [
              {
                  displayName: 'Cockpit URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.CockpitApi = CockpitApi;
  //# sourceMappingURL=CockpitApi.credentials.js.map

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

  # Cockpit node

  Use the Cockpit node to automate work in Cockpit, and integrate Cockpit with other applications. n8n has built-in support for a wide range of Cockpit features, including creating a collection entry, storing data from a form submission, and getting singletons.

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

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

  ## Operations

  * Collection
      * Create a collection entry
      * Get all collection entries
      * Update a collection entry
  * Form
      * Store data from a form submission
  * Singleton
      * Get a singleton

  ## Templates and examples

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

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


node_type: n8n-nodes-base.CoinGecko
name: CoinGecko
display_name: CoinGecko
description: Consume CoinGecko API
category: output
icon: file:coinGecko.svg
code_hash: aaa78f27ab82cdfe6f8cd785e12016812261d619aa833ab5952f9999f55f44ab
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.CoinGecko
documentation_title: CoinGecko node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"coingecko","description":"Templates for coingecko"}]
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";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.CoinGecko = void 0;
  const CoinDescription_1 = require("./CoinDescription");
  const EventDescription_1 = require("./EventDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class CoinGecko {
      constructor() {
          this.description = {
              displayName: 'CoinGecko',
              name: 'coinGecko',
              icon: 'file:coinGecko.svg',
              group: ['output'],
              version: 1,
              description: 'Consume CoinGecko API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'CoinGecko',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Coin',
                              value: 'coin',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                      ],
                      default: 'coin',
                  },
                  ...CoinDescription_1.coinOperations,
                  ...CoinDescription_1.coinFields,
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCurrencies() {
                      const returnData = [];
                      const currencies = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/simple/supported_vs_currencies');
                      currencies.sort();
                      for (const currency of currencies) {
                          returnData.push({
                              name: currency.toUpperCase(),
                              value: currency,
                          });
                      }
                      return returnData;
                  },
                  async getCoins() {
                      const returnData = [];
                      const coins = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/coins/list');
                      for (const coin of coins) {
                          returnData.push({
                              name: coin.symbol.toUpperCase(),
                              value: coin.id,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getExchanges() {
                      const returnData = [];
                      const exchanges = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/exchanges/list');
                      for (const exchange of exchanges) {
                          returnData.push({
                              name: exchange.name,
                              value: exchange.id,
                          });
                      }
                      return returnData;
                  },
                  async getEventCountryCodes() {
                      const returnData = [];
                      const countryCodes = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/events/countries');
                      for (const code of countryCodes.data) {
                          if (!code.code) {
                              continue;
                          }
                          returnData.push({
                              name: code.country,
                              value: code.code,
                          });
                      }
                      return returnData;
                  },
                  async getEventTypes() {
                      const returnData = [];
                      const eventTypes = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/events/types');
                      for (const type of eventTypes.data) {
                          returnData.push({
                              name: type,
                              value: type,
                          });
                      }
                      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 === 'coin') {
                      if (operation === 'get') {
                          const options = this.getNodeParameter('options', i);
                          qs.community_data = false;
                          qs.developer_data = false;
                          qs.localization = false;
                          qs.market_data = false;
                          qs.sparkline = false;
                          qs.tickers = false;
                          Object.assign(qs, options);
                          const searchBy = this.getNodeParameter('searchBy', i);
                          if (searchBy === 'coinId') {
                              const coinId = this.getNodeParameter('coinId', i);
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${coinId}`, {}, qs);
                          }
                          if (searchBy === 'contractAddress') {
                              const platformId = this.getNodeParameter('platformId', i);
                              const contractAddress = this.getNodeParameter('contractAddress', i);
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${platformId}/contract/${contractAddress}`, {}, qs);
                          }
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          let limit;
                          responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/coins/list', {}, qs);
                          if (!returnAll) {
                              limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'market') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const baseCurrency = this.getNodeParameter('baseCurrency', i);
                          const options = this.getNodeParameter('options', i);
                          qs.vs_currency = baseCurrency;
                          Object.assign(qs, options);
                          if (options.price_change_percentage) {
                              qs.price_change_percentage = options.price_change_percentage.join(',');
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.coinGeckoRequestAllItems.call(this, '', 'GET', '/coins/markets', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/coins/markets', {}, qs);
                          }
                      }
                      if (operation === 'price') {
                          const searchBy = this.getNodeParameter('searchBy', i);
                          const quoteCurrencies = this.getNodeParameter('quoteCurrencies', i);
                          const options = this.getNodeParameter('options', i);
                          qs.vs_currencies = quoteCurrencies.join(',');
                          Object.assign(qs, options);
                          if (searchBy === 'coinId') {
                              const baseCurrencies = this.getNodeParameter('baseCurrencies', i);
                              qs.ids = baseCurrencies.join(',');
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/simple/price', {}, qs);
                          }
                          if (searchBy === 'contractAddress') {
                              const platformId = this.getNodeParameter('platformId', i);
                              const contractAddresses = this.getNodeParameter('contractAddresses', i);
                              qs.contract_addresses = contractAddresses;
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/simple/token_price/${platformId}`, {}, qs);
                          }
                      }
                      if (operation === 'ticker') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const coinId = this.getNodeParameter('coinId', i);
                          const options = this.getNodeParameter('options', i);
                          Object.assign(qs, options);
                          if (options.exchange_ids) {
                              qs.exchange_ids = options.exchange_ids.join(',');
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.coinGeckoRequestAllItems.call(this, 'tickers', 'GET', `/coins/${coinId}/tickers`, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${coinId}/tickers`, {}, qs);
                              responseData = responseData.tickers;
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'history') {
                          const coinId = this.getNodeParameter('coinId', i);
                          const date = this.getNodeParameter('date', i);
                          const options = this.getNodeParameter('options', i);
                          Object.assign(qs, options);
                          qs.date = (0, moment_timezone_1.default)(date).format('DD-MM-YYYY');
                          responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${coinId}/history`, {}, qs);
                      }
                      if (operation === 'marketChart') {
                          let respData;
                          const searchBy = this.getNodeParameter('searchBy', i);
                          const quoteCurrency = this.getNodeParameter('quoteCurrency', i);
                          const days = this.getNodeParameter('days', i);
                          qs.vs_currency = quoteCurrency;
                          qs.days = days;
                          if (searchBy === 'coinId') {
                              const coinId = this.getNodeParameter('baseCurrency', i);
                              respData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${coinId}/market_chart`, {}, qs);
                          }
                          if (searchBy === 'contractAddress') {
                              const platformId = this.getNodeParameter('platformId', i);
                              const contractAddress = this.getNodeParameter('contractAddress', i);
                              respData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${platformId}/contract/${contractAddress}/market_chart`, {}, qs);
                          }
                          responseData = [];
                          for (let idx = 0; idx < respData.prices.length; idx++) {
                              const [time, price] = respData.prices[idx];
                              const marketCaps = respData.market_caps[idx][1];
                              const totalVolume = respData.total_volumes[idx][1];
                              responseData.push({
                                  time: (0, moment_timezone_1.default)(time).toISOString(),
                                  price,
                                  marketCaps,
                                  totalVolume,
                              });
                          }
                      }
                      if (operation === 'candlestick') {
                          const baseCurrency = this.getNodeParameter('baseCurrency', i);
                          const quoteCurrency = this.getNodeParameter('quoteCurrency', i);
                          const days = this.getNodeParameter('days', i);
                          qs.vs_currency = quoteCurrency;
                          qs.days = days;
                          responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/coins/${baseCurrency}/ohlc`, {}, qs);
                          for (let idx = 0; idx < responseData.length; idx++) {
                              const [time, open, high, low, close] = responseData[idx];
                              responseData[idx] = {
                                  time: (0, moment_timezone_1.default)(time).toISOString(),
                                  open,
                                  high,
                                  low,
                                  close,
                              };
                          }
                      }
                  }
                  if (resource === 'event') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          Object.assign(qs, options);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.coinGeckoRequestAllItems.call(this, 'data', 'GET', '/events', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/events', {}, qs);
                              responseData = responseData.data;
                          }
                      }
                  }
                  if (resource === 'simple') {
                      if (operation === 'price') {
                          const ids = this.getNodeParameter('ids', i);
                          const currencies = this.getNodeParameter('currencies', i);
                          const options = this.getNodeParameter('options', i);
                          qs.ids = ids;
                          qs.vs_currencies = currencies.join(',');
                          Object.assign(qs, options);
                          responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', '/simple/price', {}, qs);
                      }
                      if (operation === 'tokenPrice') {
                          const id = this.getNodeParameter('id', i);
                          const contractAddresses = this.getNodeParameter('contractAddresses', i);
                          const currencies = this.getNodeParameter('currencies', i);
                          const options = this.getNodeParameter('options', i);
                          qs.contract_addresses = contractAddresses;
                          qs.vs_currencies = currencies.join(',');
                          Object.assign(qs, options);
                          responseData = await GenericFunctions_1.coinGeckoApiRequest.call(this, 'GET', `/simple/token_price/${id}`, {}, qs);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {} });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.CoinGecko = CoinGecko;
  //# sourceMappingURL=CoinGecko.node.js.map

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

  # CoinGecko node

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

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

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

  ## Operations

  * Coin
      * Get a candlestick open-high-low-close chart for the selected currency
      * Get current data for a coin
      * Get all coins
      * Get historical data (name, price, market, stats) at a given date for a coin
      * Get prices and market related data for all trading pairs that match the selected currency
      * Get historical market data include price, market cap, and 24h volume (granularity auto)
      * Get the current price of any cryptocurrencies in any other supported currencies that you need
      * Get coin tickers
  * Event
      * Get all events

  ## Templates and examples

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

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


node_type: n8n-nodes-base.CompareDatasets
name: CompareDatasets
display_name: Compare Datasets
description: Compare two inputs for changes
category: transform
icon: file:compare.svg
code_hash: 1228e4985663cca8c9ac56b8daa9c825e9d730846ba5c2722fa65a302c81ee00
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.CompareDatasets
documentation_title: Compare Datasets
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"compare-datasets","description":"Templates for compare-datasets"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
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.CompareDatasets = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class CompareDatasets {
      constructor() {
          this.description = {
              displayName: 'Compare Datasets',
              name: 'compareDatasets',
              icon: 'file:compare.svg',
              group: ['transform'],
              version: [1, 2, 2.1, 2.2, 2.3],
              description: 'Compare two inputs for changes',
              defaults: { name: 'Compare Datasets' },
              inputs: ['main', 'main'],
              inputNames: ['Input A', 'Input B'],
              requiredInputs: 1,
              outputs: ['main', 'main', 'main', 'main'],
              outputNames: ['In A only', 'Same', 'Different', 'In B only'],
              properties: [
                  {
                      displayName: 'Items from different branches are paired together when the fields below match. If paired, the rest of the fields are compared to determine whether the items are the same or different',
                      name: 'infoBox',
                      type: 'notice',
                      default: '',
                  },
                  {
                      displayName: 'Fields to Match',
                      name: 'mergeByFields',
                      type: 'fixedCollection',
                      placeholder: 'Add Fields to Match',
                      default: { values: [{ field1: '', field2: '' }] },
                      typeOptions: {
                          multipleValues: true,
                      },
                      options: [
                          {
                              displayName: 'Values',
                              name: 'values',
                              values: [
                                  {
                                      displayName: 'Input A Field',
                                      name: 'field1',
                                      type: 'string',
                                      default: '',
                                      placeholder: 'e.g. id',
                                      hint: ' Enter the field name as text',
                                      requiresDataPath: 'single',
                                  },
                                  {
                                      displayName: 'Input B Field',
                                      name: 'field2',
                                      type: 'string',
                                      default: '',
                                      placeholder: 'e.g. id',
                                      hint: ' Enter the field name as text',
                                      requiresDataPath: 'single',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'When There Are Differences',
                      name: 'resolve',
                      type: 'options',
                      default: 'preferInput2',
                      options: [
                          {
                              name: 'Use Input A Version',
                              value: 'preferInput1',
                          },
                          {
                              name: 'Use Input B Version',
                              value: 'preferInput2',
                          },
                          {
                              name: 'Use a Mix of Versions',
                              value: 'mix',
                              description: 'Output uses different inputs for different fields',
                          },
                          {
                              name: 'Include Both Versions',
                              value: 'includeBoth',
                              description: 'Output contains all data (but structure more complex)',
                          },
                      ],
                      displayOptions: {
                          show: {
                              '@version': [1, 2],
                          },
                      },
                  },
                  {
                      displayName: 'When There Are Differences',
                      name: 'resolve',
                      type: 'options',
                      default: 'includeBoth',
                      options: [
                          {
                              name: 'Use Input A Version',
                              value: 'preferInput1',
                          },
                          {
                              name: 'Use Input B Version',
                              value: 'preferInput2',
                          },
                          {
                              name: 'Use a Mix of Versions',
                              value: 'mix',
                              description: 'Output uses different inputs for different fields',
                          },
                          {
                              name: 'Include Both Versions',
                              value: 'includeBoth',
                              description: 'Output contains all data (but structure more complex)',
                          },
                      ],
                      displayOptions: {
                          hide: {
                              '@version': [1, 2],
                          },
                      },
                  },
                  {
                      displayName: 'Fuzzy Compare',
                      name: 'fuzzyCompare',
                      type: 'boolean',
                      default: false,
                      description: "Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
                      displayOptions: {
                          hide: {
                              '@version': [1],
                          },
                      },
                  },
                  {
                      displayName: 'Prefer',
                      name: 'preferWhenMix',
                      type: 'options',
                      default: 'input1',
                      options: [
                          {
                              name: 'Input A Version',
                              value: 'input1',
                          },
                          {
                              name: 'Input B Version',
                              value: 'input2',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resolve: ['mix'],
                          },
                      },
                  },
                  {
                      displayName: 'For Everything Except',
                      name: 'exceptWhenMix',
                      type: 'string',
                      default: '',
                      placeholder: 'e.g. id, country',
                      hint: 'Enter the names of the input fields as text, separated by commas',
                      displayOptions: {
                          show: {
                              resolve: ['mix'],
                          },
                      },
                      requiresDataPath: 'multiple',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Fields to Skip Comparing',
                              name: 'skipFields',
                              type: 'string',
                              default: '',
                              placeholder: 'e.g. updated_at, updated_by',
                              hint: 'Enter the field names as text, separated by commas',
                              description: "Fields that shouldn't be included when checking whether two items are the same",
                              requiresDataPath: 'multiple',
                          },
                          {
                              displayName: 'Fuzzy Compare',
                              name: 'fuzzyCompare',
                              type: 'boolean',
                              default: false,
                              description: "Whether to tolerate small type differences when comparing fields. E.g. the number 3 and the string '3' are treated as the same.",
                              displayOptions: {
                                  show: {
                                      '@version': [1],
                                  },
                              },
                          },
                          {
                              displayName: 'Disable Dot Notation',
                              name: 'disableDotNotation',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to disallow referencing child fields using `parent.child` in the field name',
                          },
                          {
                              displayName: 'Multiple Matches',
                              name: 'multipleMatches',
                              type: 'options',
                              default: 'first',
                              options: [
                                  {
                                      name: 'Include First Match Only',
                                      value: 'first',
                                      description: 'Only ever output a single item per match',
                                  },
                                  {
                                      name: 'Include All Matches',
                                      value: 'all',
                                      description: 'Output multiple items if there are multiple matches',
                                  },
                              ],
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const matchFields = (0, GenericFunctions_1.checkMatchFieldsInput)(this.getNodeParameter('mergeByFields.values', 0, []));
          const options = this.getNodeParameter('options', 0, {});
          options.nodeVersion = this.getNode().typeVersion;
          if (options.nodeVersion >= 2) {
              options.fuzzyCompare = this.getNodeParameter('fuzzyCompare', 0, false);
          }
          let input1 = this.getInputData(0);
          let input2 = this.getInputData(1);
          if (options.nodeVersion < 2.2) {
              input1 = (0, GenericFunctions_1.checkInputAndThrowError)(input1, matchFields.map((pair) => pair.field1), options.disableDotNotation || false, 'Input A');
              input2 = (0, GenericFunctions_1.checkInputAndThrowError)(input2, matchFields.map((pair) => pair.field2), options.disableDotNotation || false, 'Input B');
          }
          else {
              input1 = (0, GenericFunctions_1.checkInput)(input1);
              input2 = (0, GenericFunctions_1.checkInput)(input2);
          }
          const resolve = this.getNodeParameter('resolve', 0, '');
          options.resolve = resolve;
          if (resolve === 'mix') {
              options.preferWhenMix = this.getNodeParameter('preferWhenMix', 0, '');
              options.exceptWhenMix = this.getNodeParameter('exceptWhenMix', 0, '');
          }
          const matches = (0, GenericFunctions_1.findMatches)(input1, input2, matchFields, options);
          return matches;
      }
  }
  exports.CompareDatasets = CompareDatasets;
  //# sourceMappingURL=CompareDatasets.node.js.map

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

  # Compare Datasets

  The Compare Datasets node helps you compare data from two input streams.

  ## Node parameters

  1. Decide which fields to compare. In **Input A Field**, enter the name of the field you want to use from input stream A. In **Input B Field**, enter the name of the field you want to use from input stream B. 
  2. **Optional**: You can compare by multiple fields. Select **Add Fields to Match** to set up more comparisons.
  3. Choose how to handle differences between the datasets. In **When There Are Differences**, select one of the following:
  	* **Use Input A Version** to treat input stream A as the source of truth.
  	* **Use Input B Version** to treat input stream B as the source of truth.
  	* **Use a Mix of Versions** to use different inputs for different fields.
  		* Use **Prefer** to select either **Input A Version** or **Input B Version** as the main source of truth.
  		* Enter input fields that are exceptions to **For Everything Except** to pull from the other input source. To add multiple input fields, enter a comma-separated list.
  	* **Include Both Versions** to include both input streams in the output, which may make the structure more complex.
  4. Decide whether to use **Fuzzy Compare**. When turned on, the comparison will tolerate small type differences when comparing fields. For example, the number 3 and the string `3` are treated as the same with **Fuzzy Compare** turned on, but wouldn't be treated the same with it turned off.

  ## Understand item comparison

  Item comparison is a two stage process:

  1. n8n checks if the values of the fields you selected to compare match across both inputs.
  2. If the fields to compare match, n8n then compares all fields within the items, to determine if the items are the same or different.

  ## Node options

  Use the node **Options** to refine your comparison or tweak comparison behavior.

  ### Fields to Skip Comparing

  Enter field names that you want to ignore in the comparison.

  For example, if you compare the two datasets below using `person.language` as the **Fields to Match**, n8n returns them as different. If you add `person.name` to **Fields to Skip Comparing**, n8n returns them as matching.

  ```json
  	// Input 1
  	[
  		{
  			"person":
  			{
  				"name":	"Stefan",
  				"language":	"de"
  			}
  		},
  		{
  			"person":
  			{
  				"name":	"Jim",
  				"language":	"en"
  			}
  		},
  		{
  			"person":
  			{
  				"name":	"Hans",
  				"language":	"de"
  			}
  		}
  	]
  	// Input 2
  		[
  		{
  			"person":
  			{
  				"name":	"Sara",
  				"language":	"de"
  			}
  		},
  		{
  			"person":
  			{
  				"name":	"Jane",
  				"language":	"en"
  			}
  		},
  		{
  			"person":
  			{
  				"name":	"Harriet",
  				"language":	"de"
  			}
  		}
  	]
  ```

  ### Disable Dot Notation

  Whether to disallow referencing child fields using `parent.child` in the field name (turned on) or allow it (turned off, default).

  ### Multiple Matches

  Choose how to handle duplicate data. The default is **Include All Matches**. You can choose **Include First Match Only**.

  For example, given these two datasets:
  ```json
  	// Input 1
  	[
  		{
  			"fruit": {
  				"type": "apple",
  				"color": "red"
  			}
  		},
  				{
  			"fruit": {
  				"type": "apple",
  				"color": "red"
  			}
  		},
  				{
  			"fruit": {
  				"type": "banana",
  				"color": "yellow"
  			}
  		}
  	]
  	// Input 2
  	[
  		{
  			"fruit": {
  				"type": "apple",
  				"color": "red"
  			}
  		},
  				{
  			"fruit": {
  				"type": "apple",
  				"color": "red"
  			}
  		},
  				{
  			"fruit": {
  				"type": "banana",
  				"color": "yellow"
  			}
  		}
  	]
  ```

  n8n returns three items in the **Same Branch** tab. The data is the same in both branches.

  If you select **Include First Match Only**, n8n returns two items, in the **Same Branch** tab. The data is the same in both branches, but n8n only returns the first occurrence of the matching "apple" items.


  ## Understand the output

  There are four output options:

  * **In A only Branch**: Contains data that occurs only in the first input.
  * **Same Branch**: Contains data that's the same in both inputs.
  * **Different Branch**: Contains data that's different between inputs.
  * **In B only Branch**: Contains data that occurs only in the second output.

  ## Templates and examples

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

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


