# nodes

node_type: n8n-nodes-base.Bannerbear
name: Bannerbear
display_name: Bannerbear
description: Consume Bannerbear API
category: output
icon: file:bannerbear.png
code_hash: 285a9cea793b026b5d569fa900e48a5cb72787561f0321668a1e0796c15e52d9
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Bannerbear
documentation_title: Bannerbear node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"bannerbear","description":"Templates for bannerbear"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"image","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:19
updated_at: 2025-06-12 08:58:19
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Bannerbear = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ImageDescription_1 = require("./ImageDescription");
  const TemplateDescription_1 = require("./TemplateDescription");
  class Bannerbear {
      constructor() {
          this.description = {
              displayName: 'Bannerbear',
              name: 'bannerbear',
              icon: 'file:bannerbear.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Bannerbear API',
              defaults: {
                  name: 'Bannerbear',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'bannerbearApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Image',
                              value: 'image',
                          },
                          {
                              name: 'Template',
                              value: 'template',
                          },
                      ],
                      default: 'image',
                  },
                  ...ImageDescription_1.imageOperations,
                  ...ImageDescription_1.imageFields,
                  ...TemplateDescription_1.templateOperations,
                  ...TemplateDescription_1.templateFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTemplates() {
                      const returnData = [];
                      const templates = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', '/templates');
                      for (const template of templates) {
                          const templateName = template.name;
                          const templateId = template.uid;
                          returnData.push({
                              name: templateName,
                              value: templateId,
                          });
                      }
                      return returnData;
                  },
                  async getModificationNames() {
                      const templateId = this.getCurrentNodeParameter('templateId');
                      const returnData = [];
                      const { available_modifications } = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', `/templates/${templateId}`);
                      for (const modification of available_modifications) {
                          const modificationName = modification.name;
                          const modificationId = modification.name;
                          returnData.push({
                              name: modificationName,
                              value: modificationId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'image') {
                  if (operation === 'create') {
                      const templateId = this.getNodeParameter('templateId', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const modifications = this.getNodeParameter('modificationsUi', i)
                          .modificationsValues;
                      const body = {
                          template: templateId,
                      };
                      if (additionalFields.webhookUrl) {
                          body.webhook_url = additionalFields.webhookUrl;
                      }
                      if (additionalFields.metadata) {
                          body.metadata = additionalFields.metadata;
                      }
                      if (modifications) {
                          body.modifications = (0, GenericFunctions_1.keysToSnakeCase)(modifications);
                          for (const modification of body.modifications) {
                              for (const key of Object.keys(modification)) {
                                  if (modification[key] === '') {
                                      delete modification[key];
                                  }
                              }
                          }
                      }
                      responseData = await GenericFunctions_1.bannerbearApiRequest.call(this, 'POST', '/images', body);
                      if (additionalFields.waitForImage && responseData.status !== 'completed') {
                          let maxTries = additionalFields.waitForImageMaxTries || 3;
                          const promise = async (uid) => {
                              let data = {};
                              return new Promise((resolve, reject) => {
                                  const timeout = setInterval(async () => {
                                      data = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', `/images/${uid}`);
                                      if (data.status === 'completed') {
                                          clearInterval(timeout);
                                          resolve(data);
                                      }
                                      if (--maxTries === 0) {
                                          clearInterval(timeout);
                                          reject(new Error('Image did not finish processing after multiple tries.'));
                                      }
                                  }, 2000);
                              });
                          };
                          responseData = await promise(responseData.uid);
                      }
                  }
                  if (operation === 'get') {
                      const imageId = this.getNodeParameter('imageId', i);
                      responseData = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', `/images/${imageId}`);
                  }
              }
              if (resource === 'template') {
                  if (operation === 'get') {
                      const templateId = this.getNodeParameter('templateId', i);
                      responseData = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', `/templates/${templateId}`);
                  }
                  if (operation === 'getAll') {
                      responseData = await GenericFunctions_1.bannerbearApiRequest.call(this, 'GET', '/templates');
                  }
              }
              if (Array.isArray(responseData)) {
                  returnData.push.apply(returnData, responseData);
              }
              else {
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Bannerbear = Bannerbear;
  //# sourceMappingURL=Bannerbear.node.js.map

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

  // --- Next Credential File ---

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

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

  # Bannerbear node

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

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

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

  ## Operations

  * Image
      * Create an image
      * Get an image
  * Template
      * Get a template
      * Get all templates

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"image","options":[{"name":"Image","value":"image"},{"name":"Template","value":"template"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ImageDescription_1.imageOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ImageDescription_1.imageFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TemplateDescription_1.templateOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TemplateDescription_1.templateFields"}]


node_type: n8n-nodes-base.Bitly
name: Bitly
display_name: Bitly
description: Consume Bitly API
category: output
icon: file:bitly.svg
code_hash: a012d39ba8285831be8baa99132776572dc3645db429a731b51ee41fdceea1ed
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Bitly
documentation_title: Bitly node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"bitly","description":"Templates for bitly"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"accessToken","resource":"link","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:19
updated_at: 2025-06-12 08:58:19
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Bitly = void 0;
  const LinkDescription_1 = require("./LinkDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Bitly {
      constructor() {
          this.description = {
              displayName: 'Bitly',
              name: 'bitly',
              icon: 'file:bitly.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Bitly API',
              defaults: {
                  name: 'Bitly',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'bitlyApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'bitlyOAuth2Api',
                      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: 'Link',
                              value: 'link',
                          },
                      ],
                      default: 'link',
                  },
                  ...LinkDescription_1.linkOperations,
                  ...LinkDescription_1.linkFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getGroups() {
                      const returnData = [];
                      const groups = await GenericFunctions_1.bitlyApiRequestAllItems.call(this, 'groups', 'GET', '/groups');
                      for (const group of groups) {
                          const groupName = group.name;
                          const groupId = group.guid;
                          returnData.push({
                              name: groupName,
                              value: groupId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const groupId = this.getCurrentNodeParameter('group');
                      const returnData = [];
                      const tags = await GenericFunctions_1.bitlyApiRequestAllItems.call(this, 'tags', 'GET', `groups/${groupId}/tags`);
                      for (const tag of tags) {
                          const tagName = tag;
                          const tagId = tag;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'link') {
                      if (operation === 'create') {
                          const longUrl = this.getNodeParameter('longUrl', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              long_url: longUrl,
                          };
                          if (additionalFields.title) {
                              body.title = additionalFields.title;
                          }
                          if (additionalFields.domain) {
                              body.domain = additionalFields.domain;
                          }
                          if (additionalFields.group) {
                              body.group = additionalFields.group;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          const deeplinks = this.getNodeParameter('deeplink', i)
                              .deeplinkUi;
                          if (deeplinks) {
                              for (const deeplink of deeplinks) {
                                  body.deeplinks.push({
                                      app_uri_path: deeplink.appUriPath,
                                      install_type: deeplink.installType,
                                      install_url: deeplink.installUrl,
                                      app_id: deeplink.appId,
                                  });
                              }
                          }
                          responseData = await GenericFunctions_1.bitlyApiRequest.call(this, 'POST', '/bitlinks', body);
                      }
                      if (operation === 'update') {
                          const linkId = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.longUrl) {
                              body.long_url = updateFields.longUrl;
                          }
                          if (updateFields.title) {
                              body.title = updateFields.title;
                          }
                          if (updateFields.archived !== undefined) {
                              body.archived = updateFields.archived;
                          }
                          if (updateFields.group) {
                              body.group = updateFields.group;
                          }
                          if (updateFields.tags) {
                              body.tags = updateFields.tags;
                          }
                          const deeplinks = this.getNodeParameter('deeplink', i)
                              .deeplinkUi;
                          if (deeplinks) {
                              for (const deeplink of deeplinks) {
                                  body.deeplinks.push({
                                      app_uri_path: deeplink.appUriPath,
                                      install_type: deeplink.installType,
                                      install_url: deeplink.installUrl,
                                      app_id: deeplink.appId,
                                  });
                              }
                          }
                          responseData = await GenericFunctions_1.bitlyApiRequest.call(this, 'PATCH', `/bitlinks/${linkId}`, body);
                      }
                      if (operation === 'get') {
                          const linkId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.bitlyApiRequest.call(this, 'GET', `/bitlinks/${linkId}`);
                      }
                  }
                  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: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Bitly = Bitly;
  //# sourceMappingURL=Bitly.node.js.map

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BitlyOAuth2Api = void 0;
  class BitlyOAuth2Api {
      constructor() {
          this.name = 'bitlyOAuth2Api';
          this.displayName = 'Bitly OAuth2 API';
          this.documentationUrl = 'bitly';
          this.extends = ['oAuth2Api'];
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://bitly.com/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api-ssl.bitly.com/oauth/access_token',
                  required: true,
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
                  description: 'For some services additional query parameters have to be set which can be defined here',
                  placeholder: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.BitlyOAuth2Api = BitlyOAuth2Api;
  //# sourceMappingURL=BitlyOAuth2Api.credentials.js.map

  // --- Next Credential File ---

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BitlyOAuth2Api = void 0;
  class BitlyOAuth2Api {
      constructor() {
          this.name = 'bitlyOAuth2Api';
          this.displayName = 'Bitly OAuth2 API';
          this.documentationUrl = 'bitly';
          this.extends = ['oAuth2Api'];
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://bitly.com/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api-ssl.bitly.com/oauth/access_token',
                  required: true,
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
                  description: 'For some services additional query parameters have to be set which can be defined here',
                  placeholder: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.BitlyOAuth2Api = BitlyOAuth2Api;
  //# sourceMappingURL=BitlyOAuth2Api.credentials.js.map

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

  # Bitly node

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

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

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

  ## Operations

  * Link
      * Create a link
      * Get a link
      * Update a link

  ## Templates and examples

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

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

example_workflow:
  {"name":"Bitly Example Workflow","nodes":[{"parameters":{"authentication":"accessToken","resource":"link","dynamic_property":null},"id":"0y4wn0nesopjfhmjzjskdcf","name":"Bitly","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"link","options":[{"name":"Link","value":"link"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...LinkDescription_1.linkOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...LinkDescription_1.linkFields"}]


node_type: n8n-nodes-base.Beeminder
name: Beeminder
display_name: Beeminder
description: Consume Beeminder API
category: output
icon: file:beeminder.png
code_hash: e13877e1492b155a2b03300e00a395f0ab8a115420e15e3d0c26be5570a6df23
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Beeminder
documentation_title: Beeminder node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"beeminder","description":"Templates for beeminder"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:19
updated_at: 2025-06-12 08:58:19
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.Beeminder = void 0;
  const Beeminder_node_functions_1 = require("./Beeminder.node.functions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class Beeminder {
      constructor() {
          this.description = {
              displayName: 'Beeminder',
              name: 'beeminder',
              group: ['output'],
              version: 1,
              description: 'Consume Beeminder API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Beeminder',
              },
              icon: 'file:beeminder.png',
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'beeminderApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      options: [
                          {
                              name: 'Datapoint',
                              value: 'datapoint',
                          },
                      ],
                      default: 'datapoint',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create datapoint for goal',
                              action: 'Create datapoint for goal',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a datapoint',
                              action: 'Delete a datapoint',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many datapoints for a goal',
                              action: 'Get many datapoints for a goal',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a datapoint',
                              action: 'Update a datapoint',
                          },
                      ],
                      default: 'create',
                      required: true,
                  },
                  {
                      displayName: 'Goal Name or ID',
                      name: 'goalName',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getGoals',
                      },
                      displayOptions: {
                          show: {
                              resource: ['datapoint'],
                          },
                      },
                      default: '',
                      description: 'The name of the goal. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                      required: true,
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['datapoint'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['datapoint'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 300,
                      },
                      default: 30,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Value',
                      name: 'value',
                      type: 'number',
                      default: 1,
                      placeholder: '',
                      description: 'Datapoint value to send',
                      displayOptions: {
                          show: {
                              resource: ['datapoint'],
                              operation: ['create'],
                          },
                      },
                      required: true,
                  },
                  {
                      displayName: 'Datapoint ID',
                      name: 'datapointId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['update', 'delete'],
                          },
                      },
                      required: true,
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['datapoint'],
                              operation: ['create'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Comment',
                              name: 'comment',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Timestamp',
                              name: 'timestamp',
                              type: 'dateTime',
                              default: '',
                              placeholder: '',
                              description: 'Defaults to "now" if none is passed in, or the existing timestamp if the datapoint is being updated rather than created',
                          },
                          {
                              displayName: 'Request ID',
                              name: 'requestid',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'String to uniquely identify a datapoint',
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['datapoint'],
                              operation: ['getAll'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Sort',
                              name: 'sort',
                              type: 'string',
                              default: 'id',
                              placeholder: '',
                              description: 'Attribute to sort on',
                          },
                      ],
                  },
                  {
                      displayName: 'Update Fields',
                      name: 'updateFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['datapoint'],
                              operation: ['update'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Value',
                              name: 'value',
                              type: 'number',
                              default: 1,
                              placeholder: '',
                              description: 'Datapoint value to send',
                          },
                          {
                              displayName: 'Comment',
                              name: 'comment',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Timestamp',
                              name: 'timestamp',
                              type: 'dateTime',
                              default: '',
                              placeholder: '',
                              description: 'Defaults to "now" if none is passed in, or the existing timestamp if the datapoint is being updated rather than created',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getGoals() {
                      const credentials = await this.getCredentials('beeminderApi');
                      const endpoint = `/users/${credentials.user}/goals.json`;
                      const returnData = [];
                      const goals = await GenericFunctions_1.beeminderApiRequest.call(this, 'GET', endpoint);
                      for (const goal of goals) {
                          returnData.push({
                              name: goal.slug,
                              value: goal.slug,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const timezone = this.getTimezone();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let results;
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'datapoint') {
                      const goalName = this.getNodeParameter('goalName', i);
                      if (operation === 'create') {
                          const value = this.getNodeParameter('value', i);
                          const options = this.getNodeParameter('additionalFields', i);
                          const data = {
                              value,
                              goalName,
                          };
                          Object.assign(data, options);
                          if (data.timestamp) {
                              data.timestamp = moment_timezone_1.default.tz(data.timestamp, timezone).unix();
                          }
                          results = await Beeminder_node_functions_1.createDatapoint.call(this, data);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(results), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          const data = {
                              goalName,
                          };
                          Object.assign(data, options);
                          if (!returnAll) {
                              data.count = this.getNodeParameter('limit', 0);
                          }
                          results = await Beeminder_node_functions_1.getAllDatapoints.call(this, data);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(results), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      else if (operation === 'update') {
                          const datapointId = this.getNodeParameter('datapointId', i);
                          const options = this.getNodeParameter('updateFields', i);
                          const data = {
                              goalName,
                              datapointId,
                          };
                          Object.assign(data, options);
                          if (data.timestamp) {
                              data.timestamp = moment_timezone_1.default.tz(data.timestamp, timezone).unix();
                          }
                          results = await Beeminder_node_functions_1.updateDatapoint.call(this, data);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(results), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      else if (operation === 'delete') {
                          const datapointId = this.getNodeParameter('datapointId', i);
                          const data = {
                              goalName,
                              datapointId,
                          };
                          results = await Beeminder_node_functions_1.deleteDatapoint.call(this, data);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(results), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Beeminder = Beeminder;
  //# sourceMappingURL=Beeminder.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BeeminderApi = void 0;
  class BeeminderApi {
      constructor() {
          this.name = 'beeminderApi';
          this.displayName = 'Beeminder API';
          this.documentationUrl = 'beeminder';
          this.properties = [
              {
                  displayName: 'User',
                  name: 'user',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  body: {
                      auth_token: '={{$credentials.authToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://www.beeminder.com/api/v1',
                  url: '=/users/{{$credentials.user}}.json',
              },
          };
      }
  }
  exports.BeeminderApi = BeeminderApi;
  //# sourceMappingURL=BeeminderApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BeeminderApi = void 0;
  class BeeminderApi {
      constructor() {
          this.name = 'beeminderApi';
          this.displayName = 'Beeminder API';
          this.documentationUrl = 'beeminder';
          this.properties = [
              {
                  displayName: 'User',
                  name: 'user',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  body: {
                      auth_token: '={{$credentials.authToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://www.beeminder.com/api/v1',
                  url: '=/users/{{$credentials.user}}.json',
              },
          };
      }
  }
  exports.BeeminderApi = BeeminderApi;
  //# sourceMappingURL=BeeminderApi.credentials.js.map

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

  # Beeminder node

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

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

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

  ## Operations

  **data point**
  - Create data point for a goal
  - Delete a data point
  - Get all data points for a goal
  - Update a data point

  ## Templates and examples

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

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

example_workflow:
  {"name":"Beeminder Example Workflow","nodes":[{"parameters":{"resource":"datapoint","operation":"create","goalName":"","returnAll":false,"limit":30,"value":1,"datapointId":"example-value","additionalFields":{},"options":{},"updateFields":{}},"id":"hak9tz10t6okqzezr3x47q","name":"Beeminder","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"datapoint","operation":"create","goalName":"","returnAll":false,"limit":30,"value":1,"datapointId":"example-value","additionalFields":{},"options":{},"updateFields":{}}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"datapoint","required":true,"options":[{"name":"Datapoint","value":"datapoint"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","required":true,"description":"Create datapoint for goal","options":[{"name":"Create","value":"create","description":"Create datapoint for goal"},{"name":"Delete","value":"delete","description":"Delete a datapoint"},{"name":"Get Many","value":"getAll","description":"Get many datapoints for a goal"},{"name":"Update","value":"update","description":"Update a datapoint"}]},{"displayName":"Goal Name or ID","name":"goalName","type":"options","default":"","required":true,"description":"The name of the goal. Choose from the list, or specify an ID using an <a href="},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":30,"description":"Max number of results to return"},{"displayName":"Value","name":"value","type":"number","default":1,"required":true,"description":"Datapoint value to send"},{"displayName":"Datapoint ID","name":"datapointId","type":"string","default":"","required":true},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Defaults to ","placeholder":"Add Field"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Attribute to sort on","placeholder":"Add field"},{"displayName":"Update Fields","name":"updateFields","type":"collection","default":"{","description":"Datapoint value to send","placeholder":"Add Field"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"file","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:21
updated_at: 2025-06-12 08:58:21
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":{"resource":"file","dynamic_property":null},"id":"z4gppsg6pya76w83r3gsck","name":"Box","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"file","options":[{"name":"File","value":"file"},{"name":"Folder","value":"folder"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FileDescription_1.fileOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FileDescription_1.fileFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FolderDescription_1.folderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FolderDescription_1.folderFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"object","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:21
updated_at: 2025-06-12 08:58:21
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":{"resource":"object","dynamic_property":null},"id":"qv8oxpm52emj1tkajz8eha","name":"Bubble","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"object","options":[{"name":"Object","value":"object"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ObjectDescription_1.objectOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ObjectDescription_1.objectFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"contact","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:21
updated_at: 2025-06-12 08:58:21
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":{"resource":"contact","dynamic_property":null},"id":"q7kn5dzq06hl2o162c7e5","name":"Brevo","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"email","options":[{"name":"Contact","value":"contact"},{"name":"Contact Attribute","value":"attribute"},{"name":"Email","value":"email"},{"name":"Sender","value":"sender"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AttributeDescription_1.attributeOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AttributeDescription_1.attributeFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SenderDescrition_1.senderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SenderDescrition_1.senderFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EmailDescription_1.emailOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EmailDescription_1.emailFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:21
updated_at: 2025-06-12 08:58:21
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":{"operation":"color","domain":"example-value","download":false,"imageTypes":"['logo'","imageFormats":"['png']"},"id":"ipbu9xkamwf0cg2l7ccxp4s","name":"Brandfetch","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"operation":"color","domain":"example-value","download":false,"imageTypes":"['logo'","imageFormats":"['png']"}

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"logo","description":"Return a company","options":[{"name":"Color","value":"color","description":"Return a company"},{"name":"Company","value":"company","description":"Return a company"},{"name":"Font","value":"font","description":"Return a company"},{"name":"Industry","value":"industry","description":"Return a company"},{"name":"Logo","value":"logo","description":"Return a company"}]},{"displayName":"Domain","name":"domain","type":"string","default":"","required":true,"description":"The domain name of the company"},{"displayName":"Download","name":"download","type":"boolean","default":false,"required":true,"description":"Name of the binary property to which to write the data of the read file"},{"displayName":"Image Type","name":"imageTypes","type":"multiOptions","default":"['logo'","required":true,"options":[{"name":"Icon","value":"icon"},{"name":"Logo","value":"logo"}]},{"displayName":"Image Format","name":"imageFormats","type":"multiOptions","default":"['png']","required":true,"description":"The image format in which the logo should be returned as","options":[{"name":"PNG","value":"png"},{"name":"SVG","value":"svg"}]}]


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: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:21
updated_at: 2025-06-12 08:58:21
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":{"resource":"customer","operation":"cancel","properties":{},"maxResults":10,"filters":{},"invoiceId":"example-value","subscriptionId":"example-value","endOfTerm":false},"id":"66lvxdn6d3w34spq97w6oe","name":"Chargebee","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"customer","operation":"cancel","properties":{},"maxResults":10,"filters":{},"invoiceId":"example-value","subscriptionId":"example-value","endOfTerm":false}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"invoice","options":[{"name":"Customer","value":"customer"},{"name":"Invoice","value":"invoice"},{"name":"Subscription","value":"subscription"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","description":"Create a customer","options":[{"name":"Create","value":"create","description":"Create a customer"}]},{"displayName":"Properties","name":"properties","type":"collection","default":"{","description":"Properties to set on the new user","placeholder":"Add Property"},{"displayName":"Operation","name":"operation","type":"options","default":"list","description":"Return the invoices","options":[{"name":"List","value":"list","description":"Return the invoices"},{"name":"PDF Invoice URL","value":"pdfUrl","description":"Get URL for the invoice PDF"}]},{"displayName":"Max Results","name":"maxResults","type":"number","default":10,"description":"Max. amount of results to return(< 100)."},{"displayName":"Filters","name":"filters","type":"fixedCollection","default":"{","description":"Filter for invoices","placeholder":"Add Filter"},{"displayName":"Invoice ID","name":"invoiceId","type":"string","default":"","required":true,"description":"The ID of the invoice to get"},{"displayName":"Operation","name":"operation","type":"options","default":"delete","description":"Cancel a subscription","options":[{"name":"Cancel","value":"cancel","description":"Cancel a subscription"},{"name":"Delete","value":"delete","description":"Delete a subscription"}]},{"displayName":"Subscription ID","name":"subscriptionId","type":"string","default":"","required":true,"description":"The ID of the subscription to cancel"},{"displayName":"Schedule End of Term","name":"endOfTerm","type":"boolean","default":false,"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","type":"string","default":"","required":true,"description":"The ID of the subscription to delete"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"pipeline","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:23
updated_at: 2025-06-12 08:58:23
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":{"resource":"pipeline","dynamic_property":null},"id":"km6peteytkrc0k0nur299","name":"CircleCI","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"pipeline","options":[{"name":"Pipeline","value":"pipeline"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PipelineDescription_1.pipelineOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PipelineDescription_1.pipelineFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"client","dynamic_property":null,"workspaceId":"[]"}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:23
updated_at: 2025-06-12 08:58:23
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":{"resource":"client","dynamic_property":null,"workspaceId":"[]"},"id":"l4pji7h0p5ayag7d10agr","name":"Clockify","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"project","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"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ClientDescription_1.clientOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProjectDescription_1.projectOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TagDescription_1.tagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryDescription_1.timeEntryOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...WorkspaceDescription_1.workspaceOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...WorkspaceDescription_1.workspaceFields"},{"displayName":"Workspace Name or ID","name":"workspaceId","type":"options","default":"[]","required":true,"description":"Choose from the list, or specify an ID using an <a href="},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ClientDescription_1.clientFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProjectDescription_1.projectFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TagDescription_1.tagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryDescription_1.timeEntryFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"accessToken","resource":"checklist","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:23
updated_at: 2025-06-12 08:58:23
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":{"authentication":"accessToken","resource":"checklist","dynamic_property":null},"id":"4brjze2d4zbfj4klef4a16","name":"ClickUp","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"task","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"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistDescription_1.checklistOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistDescription_1.checklistFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistItemDescription_1.checklistItemOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistItemDescription_1.checklistItemFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CommentDescription_1.commentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CommentDescription_1.commentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FolderDescription_1.folderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FolderDescription_1.folderFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...GoalDescription_1.goalOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...GoalDescription_1.goalFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...GoalKeyResultDescription_1.goalKeyResultOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...GoalKeyResultDescription_1.goalKeyResultFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskTagDescription_1.taskTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskTagDescription_1.taskTagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskListDescription_1.taskListOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskListDescription_1.taskListFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SpaceTagDescription_1.spaceTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SpaceTagDescription_1.spaceTagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDependencyDescription_1.taskDependencyOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDependencyDescription_1.taskDependencyFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryDescription_1.timeEntryOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryDescription_1.timeEntryFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDependencyDescription_1.taskDependencyFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryTagDescription_1.timeEntryTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TimeEntryTagDescription_1.timeEntryTagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"zoneCertificate","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:23
updated_at: 2025-06-12 08:58:23
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":{"resource":"zoneCertificate","dynamic_property":null},"id":"wqslzvwjkhao7n9jk45do","name":"Cloudflare","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"zoneCertificate","options":[{"name":"Zone Certificate","value":"zoneCertificate"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ZoneCertificateDescription_1.zoneCertificateOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ZoneCertificateDescription_1.zoneCertificateFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"company","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:23
updated_at: 2025-06-12 08:58:23
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":{"resource":"company","dynamic_property":null},"id":"mzl0a74linnh9b2h3gta5p","name":"Clearbit","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"company","description":"The Company API allows you to look up a company by their domain","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"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CompanyDescription_1.companyOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CompanyDescription_1.companyFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PersonDescription_1.personOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PersonDescription_1.personFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"coin","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:24
updated_at: 2025-06-12 08:58:24
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":{"resource":"coin","dynamic_property":null},"id":"56gzkheb4hs2im03zzctwm","name":"CoinGecko","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"coin","options":[{"name":"Coin","value":"coin"},{"name":"Event","value":"event"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CoinDescription_1.coinOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CoinDescription_1.coinFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescription_1.eventOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescription_1.eventFields"}]


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: []
parameter_schemas: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:24
updated_at: 2025-06-12 08:58:24
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') ]]

troubleshooting_info:
  [{"issue":"Node parameters","solution":"--8<-- \"_snippets/integrations/builtin/app-nodes/ai-tools.md\""},{"issue":"Compress","solution":"- **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.\n- **Output Format**: Choose whether to format the compressed output as **Zip** or **Gzip**.\n- **File Name**: Enter the name of the zip file the node creates.\n- **Put Output File in Field**: Enter the name of the field in the output data to contain the file."},{"issue":"Decompress","solution":"- **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.\n- **Output Prefix**: Enter a prefix to add to the output file name."}]

example_workflow:
  {"name":"Compression Example Workflow","nodes":[{"parameters":{"operation":"compress","binaryPropertyName":"Example Name","outputFormat":"gzip","fileName":"Example Name","binaryPropertyOutput":"data","outputPrefix":"file_"},"id":"u6k9fr2092c45awt751hmm","name":"Compression","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"operation":"compress","binaryPropertyName":"Example Name","outputFormat":"gzip","fileName":"Example Name","binaryPropertyOutput":"data","outputPrefix":"file_"}

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"decompress","options":[{"name":"Compress","value":"compress"},{"name":"Decompress","value":"decompress"}]},{"displayName":"Binary Property","name":"binaryPropertyName","type":"string","default":"data","required":true,"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":"","description":"Format of the output file","options":[{"name":"Gzip","value":"gzip"},{"name":"Zip","value":"zip"}]},{"displayName":"File Name","name":"fileName","type":"string","default":"","required":true,"description":"Name of the file to be compressed","placeholder":"data.zip"},{"displayName":"Binary Property Output","name":"binaryPropertyOutput","type":"string","default":"data","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,"description":"Prefix use for all gzip compressed files"},{"displayName":"Output Prefix","name":"outputPrefix","type":"string","default":"file_","required":true,"description":"Prefix use for all decompressed files"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"control","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:24
updated_at: 2025-06-12 08:58:24
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":{"resource":"control","dynamic_property":null},"id":"yfig2vc3cniup3pln0j15c","name":"Coda","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"table","description":"Controls provide a user-friendly way to input a value that can affect other parts of the doc","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"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TableDescription_1.tableOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TableDescription_1.tableFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FormulaDescription_1.formulaOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FormulaDescription_1.formulaFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ControlDescription_1.controlOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ControlDescription_1.controlFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ViewDescription_1.viewOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ViewDescription_1.viewFields"}]


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: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"collection","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:24
updated_at: 2025-06-12 08:58:24
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":{"resource":"collection","dynamic_property":null},"id":"2l2kw5jljxc7x975ji2cfx","name":"Cockpit","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"collection","options":[{"name":"Collection","value":"collection"},{"name":"Form","value":"form"},{"name":"Singleton","value":"singleton"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CollectionDescription_1.collectionOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CollectionDescription_1.collectionFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FormDescription_1.formOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...FormDescription_1.formFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SingletonDescription_1.singletonOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SingletonDescription_1.singletonFields"}]


