# nodes

node_type: n8n-nodes-base.Jenkins
name: Jenkins
display_name: Jenkins
description: Consume Jenkins API
category: output
icon: file:jenkins.svg
code_hash: f2cc66998d1891568379ae5503e6ad1467a505ba3e06e5df8209d990381c015e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Jenkins
documentation_title: Jenkins node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"jenkins","description":"Templates for jenkins"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:12
updated_at: 2025-06-09 15:18:12
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Jenkins = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Jenkins {
      constructor() {
          this.description = {
              displayName: 'Jenkins',
              name: 'jenkins',
              icon: 'file:jenkins.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Jenkins API',
              defaults: {
                  name: 'Jenkins',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'jenkinsApi',
                      required: true,
                      testedBy: 'jenkinApiCredentialTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      options: [
                          {
                              name: 'Build',
                              value: 'build',
                          },
                          {
                              name: 'Instance',
                              value: 'instance',
                          },
                          {
                              name: 'Job',
                              value: 'job',
                          },
                      ],
                      default: 'job',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                          },
                      },
                      options: [
                          {
                              name: 'Copy',
                              value: 'copy',
                              description: 'Copy a specific job',
                              action: 'Copy a job',
                          },
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a new job',
                              action: 'Create a job',
                          },
                          {
                              name: 'Trigger',
                              value: 'trigger',
                              description: 'Trigger a specific job',
                              action: 'Trigger a job',
                          },
                          {
                              name: 'Trigger with Parameters',
                              value: 'triggerParams',
                              description: 'Trigger a specific job',
                              action: 'Trigger a job with parameters',
                          },
                      ],
                      default: 'trigger',
                      description: 'Possible operations',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Make sure the job is setup to support triggering with parameters. <a href="https://wiki.jenkins.io/display/JENKINS/Parameterized+Build" target="_blank">More info</a>',
                      name: 'triggerParamsNotice',
                      type: 'notice',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['triggerParams'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'Job Name or ID',
                      name: 'job',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getJobs',
                      },
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['trigger', 'triggerParams', 'copy'],
                          },
                      },
                      required: true,
                      default: '',
                      description: 'Name of the job. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Parameters',
                      name: 'param',
                      type: 'fixedCollection',
                      placeholder: 'Add Parameter',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['triggerParams'],
                          },
                      },
                      required: true,
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      options: [
                          {
                              name: 'params',
                              displayName: 'Parameters',
                              values: [
                                  {
                                      displayName: 'Name or ID',
                                      name: 'name',
                                      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: 'getJobParameters',
                                          loadOptionsDependsOn: ['job'],
                                      },
                                      default: '',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'string',
                                      default: '',
                                  },
                              ],
                          },
                      ],
                      description: 'Parameters for Jenkins job',
                  },
                  {
                      displayName: 'New Job Name',
                      name: 'newJob',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['copy', 'create'],
                          },
                      },
                      required: true,
                      default: '',
                      description: 'Name of the new Jenkins job',
                  },
                  {
                      displayName: 'XML',
                      name: 'xml',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['create'],
                          },
                      },
                      required: true,
                      default: '',
                      description: 'XML of Jenkins config',
                  },
                  {
                      displayName: 'To get the XML of an existing job, add ‘config.xml’ to the end of the job URL',
                      name: 'createNotice',
                      type: 'notice',
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['job'],
                              operation: ['create'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['instance'],
                          },
                      },
                      options: [
                          {
                              name: 'Cancel Quiet Down',
                              value: 'cancelQuietDown',
                              description: 'Cancel quiet down state',
                              action: 'Cancel Quiet Down an instance',
                          },
                          {
                              name: 'Quiet Down',
                              value: 'quietDown',
                              description: 'Put Jenkins in quiet mode, no builds can be started, Jenkins is ready for shutdown',
                              action: 'Quiet Down an instance',
                          },
                          {
                              name: 'Restart',
                              value: 'restart',
                              description: 'Restart Jenkins immediately on environments where it is possible',
                              action: 'Restart an instance',
                          },
                          {
                              name: 'Safely Restart',
                              value: 'safeRestart',
                              description: 'Restart Jenkins once no jobs are running on environments where it is possible',
                              action: 'Safely Restart an instance',
                          },
                          {
                              name: 'Safely Shutdown',
                              value: 'safeExit',
                              description: 'Shutdown once no jobs are running',
                              action: 'Safely Shutdown an instance',
                          },
                          {
                              name: 'Shutdown',
                              value: 'exit',
                              description: 'Shutdown Jenkins immediately',
                              action: 'Shutdown an instance',
                          },
                      ],
                      default: 'safeRestart',
                      description: 'Jenkins instance operations',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Reason',
                      name: 'reason',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['instance'],
                              operation: ['quietDown'],
                          },
                      },
                      default: '',
                      description: 'Freeform reason for quiet down mode',
                  },
                  {
                      displayName: 'Instance operation can shutdown Jenkins instance and make it unresponsive. Some commands may not be available depending on instance implementation.',
                      name: 'instanceNotice',
                      type: 'notice',
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['instance'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['build'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'List Builds',
                              action: 'Get many builds',
                          },
                      ],
                      default: 'getAll',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Job Name or ID',
                      name: 'job',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getJobs',
                      },
                      displayOptions: {
                          show: {
                              resource: ['build'],
                              operation: ['getAll'],
                          },
                      },
                      required: true,
                      default: '',
                      description: 'Name of the job. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              resource: ['build'],
                              operation: ['getAll'],
                          },
                      },
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      default: 50,
                      typeOptions: {
                          minValue: 1,
                      },
                      displayOptions: {
                          show: {
                              resource: ['build'],
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                      description: 'Max number of results to return',
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async jenkinApiCredentialTest(credential) {
                      const { baseUrl, username, apiKey } = credential.data;
                      const url = (0, GenericFunctions_1.tolerateTrailingSlash)(baseUrl);
                      const endpoint = '/api/json';
                      const options = {
                          auth: {
                              username,
                              password: apiKey,
                          },
                          method: 'GET',
                          body: {},
                          qs: {},
                          uri: `${url}${endpoint}`,
                          json: true,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                  },
              },
              loadOptions: {
                  async getJobs() {
                      const returnData = [];
                      const endpoint = '/api/json';
                      const { jobs } = await GenericFunctions_1.jenkinsApiRequest.call(this, 'GET', endpoint);
                      for (const job of jobs) {
                          returnData.push({
                              name: job.name,
                              value: job.name,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getJobParameters() {
                      const job = this.getCurrentNodeParameter('job');
                      const returnData = [];
                      const endpoint = `/job/${job}/api/json?tree=actions[parameterDefinitions[*]]`;
                      const { actions } = await GenericFunctions_1.jenkinsApiRequest.call(this, 'GET', endpoint);
                      for (const { _class, parameterDefinitions } of actions) {
                          if (_class === null || _class === void 0 ? void 0 : _class.includes('ParametersDefinitionProperty')) {
                              for (const { name, type } of parameterDefinitions) {
                                  returnData.push({
                                      name: `${name} - (${type})`,
                                      value: name,
                                  });
                              }
                          }
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const 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 === 'job') {
                      if (operation === 'trigger') {
                          const job = this.getNodeParameter('job', i);
                          const endpoint = `/job/${job}/build`;
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          responseData = { success: true };
                      }
                      if (operation === 'triggerParams') {
                          const job = this.getNodeParameter('job', i);
                          const params = this.getNodeParameter('param.params', i, []);
                          let form = {};
                          if (params.length) {
                              form = params.reduce((body, param) => {
                                  body[param.name] = param.value;
                                  return body;
                              }, {});
                          }
                          const endpoint = `/job/${job}/buildWithParameters`;
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint, {}, {}, {
                              form,
                              headers: {
                                  'content-type': 'application/x-www-form-urlencoded',
                              },
                          });
                          responseData = { success: true };
                      }
                      if (operation === 'copy') {
                          const job = this.getNodeParameter('job', i);
                          const name = this.getNodeParameter('newJob', i);
                          const queryParams = {
                              name,
                              mode: 'copy',
                              from: job,
                          };
                          const endpoint = '/createItem';
                          try {
                              await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint, queryParams);
                              responseData = { success: true };
                          }
                          catch (error) {
                              if (error.httpCode === '302') {
                                  responseData = { success: true };
                              }
                              else {
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                              }
                          }
                      }
                      if (operation === 'create') {
                          const name = this.getNodeParameter('newJob', i);
                          const queryParams = {
                              name,
                          };
                          const headers = {
                              'content-type': 'application/xml',
                          };
                          const body = this.getNodeParameter('xml', i);
                          const endpoint = '/createItem';
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint, queryParams, body, {
                              headers,
                              json: false,
                          });
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'instance') {
                      if (operation === 'quietDown') {
                          const reason = this.getNodeParameter('reason', i);
                          let queryParams;
                          if (reason) {
                              queryParams = {
                                  reason,
                              };
                          }
                          const endpoint = '/quietDown';
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint, queryParams);
                          responseData = { success: true };
                      }
                      if (operation === 'cancelQuietDown') {
                          const endpoint = '/cancelQuietDown';
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          responseData = { success: true };
                      }
                      if (operation === 'restart') {
                          const endpoint = '/restart';
                          try {
                              await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          }
                          catch (error) {
                              if (error.httpCode === '503') {
                                  responseData = { success: true };
                              }
                              else {
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                              }
                          }
                      }
                      if (operation === 'safeRestart') {
                          const endpoint = '/safeRestart';
                          try {
                              await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          }
                          catch (error) {
                              if (error.httpCode === '503') {
                                  responseData = { success: true };
                              }
                              else {
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                              }
                          }
                      }
                      if (operation === 'exit') {
                          const endpoint = '/exit';
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          responseData = { success: true };
                      }
                      if (operation === 'safeExit') {
                          const endpoint = '/safeExit';
                          await GenericFunctions_1.jenkinsApiRequest.call(this, 'POST', endpoint);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'build') {
                      if (operation === 'getAll') {
                          const job = this.getNodeParameter('job', i);
                          let endpoint = `/job/${job}/api/json?tree=builds[*]`;
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              endpoint += `{0,${limit}}`;
                          }
                          responseData = await GenericFunctions_1.jenkinsApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.builds;
                      }
                  }
                  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.Jenkins = Jenkins;
  //# sourceMappingURL=Jenkins.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.JenkinsApi = void 0;
  class JenkinsApi {
      constructor() {
          this.name = 'jenkinsApi';
          this.displayName = 'Jenkins API';
          this.documentationUrl = 'jenkins';
          this.properties = [
              {
                  displayName: 'Jenking Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Personal API Token',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Jenkins Instance URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
          ];
      }
  }
  exports.JenkinsApi = JenkinsApi;
  //# sourceMappingURL=JenkinsApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.JenkinsApi = void 0;
  class JenkinsApi {
      constructor() {
          this.name = 'jenkinsApi';
          this.displayName = 'Jenkins API';
          this.documentationUrl = 'jenkins';
          this.properties = [
              {
                  displayName: 'Jenking Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Personal API Token',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Jenkins Instance URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
          ];
      }
  }
  exports.JenkinsApi = JenkinsApi;
  //# sourceMappingURL=JenkinsApi.credentials.js.map

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

  # Jenkins node

  Use the Jenkins node to automate work in Jenkins, and integrate Jenkins with other applications. n8n has built-in support for a wide range of Jenkins features, including listing builds, managing instances, and creating and copying jobs. 

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

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

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

  ## Operations

  * Build
      * List Builds
  * Instance
      * Cancel quiet down state
      * Put Jenkins in quiet mode, no builds can be started, Jenkins is ready for shutdown
      * Restart Jenkins immediately on environments where it's possible
      * Restart Jenkins once no jobs are running on environments where it's possible
      * Shutdown once no jobs are running
      * Shutdown Jenkins immediately
  * Job
      * Copy a specific job
      * Create a new job
      * Trigger a specific job
      * Trigger a specific job

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Iterable
name: Iterable
display_name: Iterable
description: Consume Iterable API
category: input
icon: file:iterable.png
code_hash: a25bf56399e021962735e8a204bbfbeb4be8a9760a2650eb2534acd7ffed11d6
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Iterable
documentation_title: Iterable node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"iterable","description":"Templates for iterable"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:12
updated_at: 2025-06-09 15:18:12
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.Iterable = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const EventDescription_1 = require("./EventDescription");
  const UserDescription_1 = require("./UserDescription");
  const UserListDescription_1 = require("./UserListDescription");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class Iterable {
      constructor() {
          this.description = {
              displayName: 'Iterable',
              name: 'iterable',
              icon: 'file:iterable.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Iterable API',
              defaults: {
                  name: 'Iterable',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'iterableApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'User List',
                              value: 'userList',
                          },
                      ],
                      default: 'user',
                  },
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
                  ...UserListDescription_1.userListOperations,
                  ...UserListDescription_1.userListFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLists() {
                      const { lists } = await GenericFunctions_1.iterableApiRequest.call(this, 'GET', '/lists');
                      const returnData = [];
                      for (const list of lists) {
                          returnData.push({
                              name: list.name,
                              value: list.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const timezone = this.getTimezone();
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          if (resource === 'event') {
              if (operation === 'track') {
                  const events = [];
                  for (let i = 0; i < length; i++) {
                      const name = this.getNodeParameter('name', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (!additionalFields.email && !additionalFields.id) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Either email or userId must be passed in to identify the user. Please add one of both via "Additional Fields". If both are passed in, email takes precedence.', { itemIndex: i });
                      }
                      const body = {
                          eventName: name,
                      };
                      Object.assign(body, additionalFields);
                      if (body.dataFieldsUi) {
                          const dataFields = body.dataFieldsUi.dataFieldValues;
                          const data = {};
                          for (const dataField of dataFields) {
                              data[dataField.key] = dataField.value;
                          }
                          body.dataFields = data;
                          delete body.dataFieldsUi;
                      }
                      if (body.createdAt) {
                          body.createdAt = moment_timezone_1.default.tz(body.createdAt, timezone).unix();
                      }
                      events.push(body);
                  }
                  responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'POST', '/events/trackBulk', { events });
                  returnData.push(responseData);
              }
          }
          if (resource === 'user') {
              if (operation === 'upsert') {
                  for (let i = 0; i < length; i++) {
                      const identifier = this.getNodeParameter('identifier', i);
                      const value = this.getNodeParameter('value', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {};
                      if (identifier === 'email') {
                          body.email = value;
                      }
                      else {
                          body.preferUserId = this.getNodeParameter('preferUserId', i);
                          body.userId = value;
                      }
                      Object.assign(body, additionalFields);
                      if (body.dataFieldsUi) {
                          const dataFields = body.dataFieldsUi.dataFieldValues;
                          const data = {};
                          for (const dataField of dataFields) {
                              data[dataField.key] = dataField.value;
                          }
                          body.dataFields = data;
                          delete body.dataFieldsUi;
                      }
                      responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'POST', '/users/update', body);
                      if (!this.continueOnFail()) {
                          if (responseData.code !== 'Success') {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Iterable error response [400]: ${responseData.msg}`, { itemIndex: i });
                          }
                      }
                      returnData.push(responseData);
                  }
              }
              if (operation === 'delete') {
                  for (let i = 0; i < length; i++) {
                      const by = this.getNodeParameter('by', i);
                      let endpoint;
                      if (by === 'email') {
                          const email = this.getNodeParameter('email', i);
                          endpoint = `/users/${email}`;
                      }
                      else {
                          const userId = this.getNodeParameter('userId', i);
                          endpoint = `/users/byUserId/${userId}`;
                      }
                      responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'DELETE', endpoint);
                      if (!this.continueOnFail()) {
                          if (responseData.code !== 'Success') {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData);
                          }
                      }
                      returnData.push(responseData);
                  }
              }
              if (operation === 'get') {
                  for (let i = 0; i < length; i++) {
                      const by = this.getNodeParameter('by', i);
                      let endpoint;
                      if (by === 'email') {
                          const email = this.getNodeParameter('email', i);
                          endpoint = '/users/getByEmail';
                          qs.email = email;
                      }
                      else {
                          const userId = this.getNodeParameter('userId', i);
                          endpoint = `/users/byUserId/${userId}`;
                      }
                      responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'GET', endpoint, {}, qs);
                      if (!this.continueOnFail()) {
                          if (Object.keys(responseData).length === 0) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
                                  message: 'User not found',
                                  httpCode: '404',
                              });
                          }
                      }
                      responseData = responseData.user || {};
                      returnData.push(responseData);
                  }
              }
          }
          if (resource === 'userList') {
              if (operation === 'add') {
                  const listId = this.getNodeParameter('listId', 0);
                  const identifier = this.getNodeParameter('identifier', 0);
                  const body = {
                      listId: parseInt(listId, 10),
                      subscribers: [],
                  };
                  const subscribers = [];
                  for (let i = 0; i < length; i++) {
                      const value = this.getNodeParameter('value', i);
                      if (identifier === 'email') {
                          subscribers.push({ email: value });
                      }
                      else {
                          subscribers.push({ userId: value });
                      }
                  }
                  body.subscribers = subscribers;
                  responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'POST', '/lists/subscribe', body);
                  returnData.push(responseData);
              }
              if (operation === 'remove') {
                  const listId = this.getNodeParameter('listId', 0);
                  const identifier = this.getNodeParameter('identifier', 0);
                  const additionalFields = this.getNodeParameter('additionalFields', 0);
                  const body = {
                      listId: parseInt(listId, 10),
                      subscribers: [],
                      campaignId: additionalFields.campaignId,
                      channelUnsubscribe: additionalFields.channelUnsubscribe,
                  };
                  const subscribers = [];
                  for (let i = 0; i < length; i++) {
                      const value = this.getNodeParameter('value', i);
                      if (identifier === 'email') {
                          subscribers.push({ email: value });
                      }
                      else {
                          subscribers.push({ userId: value });
                      }
                  }
                  body.subscribers = subscribers;
                  responseData = await GenericFunctions_1.iterableApiRequest.call(this, 'POST', '/lists/unsubscribe', body);
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Iterable = Iterable;
  //# sourceMappingURL=Iterable.node.js.map

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

  // --- Next Credential File ---

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

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

  # Iterable node

  Use the Iterable node to automate work in Iterable, and integrate Iterable with other applications. n8n has built-in support for a wide range of Iterable features, including creating users, recording the actions performed by the users, and adding and removing users from the list. 

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

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

  ## Operations

  * Event
      * Record the actions a user perform
  * User
      * Create/Update a user
      * Delete a user
      * Get a user
  * User List
      * Add user to list
      * Remove a user from a list

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Keap
name: Keap
display_name: Keap
description: Consume Keap API
category: input
icon: file:keap.png
code_hash: 6edbc9075b37a91bd9f057729c08aa0d1296fdd8316a1790b34ba81da790c32e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Keap
documentation_title: Keap node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"keap","description":"Templates for keap"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:12
updated_at: 2025-06-09 15:18:12
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.Keap = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  const ContactNoteDescription_1 = require("./ContactNoteDescription");
  const ContactTagDescription_1 = require("./ContactTagDescription");
  const EcommerceOrderDescripion_1 = require("./EcommerceOrderDescripion");
  const EcommerceProductDescription_1 = require("./EcommerceProductDescription");
  const EmailDescription_1 = require("./EmailDescription");
  const FileDescription_1 = require("./FileDescription");
  const CompanyDescription_1 = require("./CompanyDescription");
  const change_case_1 = require("change-case");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  class Keap {
      constructor() {
          this.description = {
              displayName: 'Keap',
              name: 'keap',
              icon: 'file:keap.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Keap API',
              defaults: {
                  name: 'Keap',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'keapOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                          },
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Contact Note',
                              value: 'contactNote',
                          },
                          {
                              name: 'Contact Tag',
                              value: 'contactTag',
                          },
                          {
                              name: 'Ecommerce Order',
                              value: 'ecommerceOrder',
                          },
                          {
                              name: 'Ecommerce Product',
                              value: 'ecommerceProduct',
                          },
                          {
                              name: 'Email',
                              value: 'email',
                          },
                          {
                              name: 'File',
                              value: 'file',
                          },
                      ],
                      default: 'company',
                  },
                  ...CompanyDescription_1.companyOperations,
                  ...CompanyDescription_1.companyFields,
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...ContactNoteDescription_1.contactNoteOperations,
                  ...ContactNoteDescription_1.contactNoteFields,
                  ...ContactTagDescription_1.contactTagOperations,
                  ...ContactTagDescription_1.contactTagFields,
                  ...EcommerceOrderDescripion_1.ecommerceOrderOperations,
                  ...EcommerceOrderDescripion_1.ecommerceOrderFields,
                  ...EcommerceProductDescription_1.ecommerceProductOperations,
                  ...EcommerceProductDescription_1.ecommerceProductFields,
                  ...EmailDescription_1.emailOperations,
                  ...EmailDescription_1.emailFields,
                  ...FileDescription_1.fileOperations,
                  ...FileDescription_1.fileFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'tags', 'GET', '/tags');
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.id;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getUsers() {
                      const returnData = [];
                      const users = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'users', 'GET', '/users');
                      for (const user of users) {
                          const userName = user.given_name;
                          const userId = user.id;
                          returnData.push({
                              name: userName,
                              value: userId,
                          });
                      }
                      return returnData;
                  },
                  async getCountries() {
                      const returnData = [];
                      const { countries } = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/locales/countries');
                      for (const key of Object.keys(countries)) {
                          const countryName = countries[key];
                          const countryId = key;
                          returnData.push({
                              name: countryName,
                              value: countryId,
                          });
                      }
                      return returnData;
                  },
                  async getProvinces() {
                      const countryCode = this.getCurrentNodeParameter('countryCode');
                      const returnData = [];
                      const { provinces } = await GenericFunctions_1.keapApiRequest.call(this, 'GET', `/locales/countries/${countryCode}/provinces`);
                      for (const key of Object.keys(provinces)) {
                          const provinceName = provinces[key];
                          const provinceId = key;
                          returnData.push({
                              name: provinceName,
                              value: provinceId,
                          });
                      }
                      return returnData;
                  },
                  async getContactTypes() {
                      const returnData = [];
                      const types = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/setting/contact/optionTypes');
                      for (const type of types.value.split(',')) {
                          const typeName = type;
                          const typeId = type;
                          returnData.push({
                              name: typeName,
                              value: typeId,
                          });
                      }
                      return returnData;
                  },
                  async getTimezones() {
                      const returnData = [];
                      for (const timezone of moment_timezone_1.default.tz.names()) {
                          const timezoneName = timezone;
                          const timezoneId = timezone;
                          returnData.push({
                              name: timezoneName,
                              value: timezoneId,
                          });
                      }
                      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++) {
              if (resource === 'company') {
                  if (operation === 'create') {
                      const addresses = this.getNodeParameter('addressesUi', i)
                          .addressesValues;
                      const faxes = this.getNodeParameter('faxesUi', i)
                          .faxesValues;
                      const phones = this.getNodeParameter('phonesUi', i)
                          .phonesValues;
                      const companyName = this.getNodeParameter('companyName', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          company_name: companyName,
                      };
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      Object.assign(body, additionalFields);
                      if (addresses) {
                          body.address = (0, GenericFunctions_1.keysToSnakeCase)(addresses)[0];
                      }
                      if (faxes) {
                          body.fax_number = faxes[0];
                      }
                      if (phones) {
                          body.phone_number = phones[0];
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/companies', body);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(options);
                      Object.assign(qs, options);
                      if (qs.fields) {
                          qs.optional_properties = qs.fields;
                          delete qs.fields;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'companies', 'GET', '/companies', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/companies', {}, qs);
                          responseData = responseData.companies;
                      }
                  }
              }
              if (resource === 'contact') {
                  if (operation === 'upsert') {
                      const duplicateOption = this.getNodeParameter('duplicateOption', i);
                      const addresses = this.getNodeParameter('addressesUi', i)
                          .addressesValues;
                      const emails = this.getNodeParameter('emailsUi', i)
                          .emailsValues;
                      const faxes = this.getNodeParameter('faxesUi', i)
                          .faxesValues;
                      const socialAccounts = this.getNodeParameter('socialAccountsUi', i)
                          .socialAccountsValues;
                      const phones = this.getNodeParameter('phonesUi', i)
                          .phonesValues;
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          duplicate_option: (0, change_case_1.pascalCase)(duplicateOption),
                      };
                      if (additionalFields.anniversary) {
                          body.anniversary = additionalFields.anniversary;
                      }
                      if (additionalFields.contactType) {
                          body.contact_type = additionalFields.contactType;
                      }
                      if (additionalFields.familyName) {
                          body.family_name = additionalFields.familyName;
                      }
                      if (additionalFields.givenName) {
                          body.given_name = additionalFields.givenName;
                      }
                      if (additionalFields.jobTitle) {
                          body.job_title = additionalFields.jobTitle;
                      }
                      if (additionalFields.leadSourceId) {
                          body.lead_source_id = additionalFields.leadSourceId;
                      }
                      if (additionalFields.middleName) {
                          body.middle_name = additionalFields.middleName;
                      }
                      if (additionalFields.middleName) {
                          body.middle_name = additionalFields.middleName;
                      }
                      if (additionalFields.OptInReason) {
                          body.opt_in_reason = additionalFields.OptInReason;
                      }
                      if (additionalFields.ownerId) {
                          body.owner_id = additionalFields.ownerId;
                      }
                      if (additionalFields.preferredLocale) {
                          body.preferred_locale = additionalFields.preferredLocale;
                      }
                      if (additionalFields.preferredName) {
                          body.preferred_name = additionalFields.preferredName;
                      }
                      if (additionalFields.sourceType) {
                          body.source_type = additionalFields.sourceType;
                      }
                      if (additionalFields.spouseName) {
                          body.spouse_name = additionalFields.spouseName;
                      }
                      if (additionalFields.timezone) {
                          body.time_zone = additionalFields.timezone;
                      }
                      if (additionalFields.website) {
                          body.website = additionalFields.website;
                      }
                      if (additionalFields.ipAddress) {
                          body.origin = { ip_address: additionalFields.ipAddress };
                      }
                      if (additionalFields.companyId) {
                          body.company = { id: additionalFields.companyId };
                      }
                      if (additionalFields.optInReason) {
                          body.opt_in_reason = additionalFields.optInReason;
                      }
                      if (addresses) {
                          body.addresses = (0, GenericFunctions_1.keysToSnakeCase)(addresses);
                      }
                      if (emails) {
                          body.email_addresses = emails;
                      }
                      if (faxes) {
                          body.fax_numbers = faxes;
                      }
                      if (socialAccounts) {
                          body.social_accounts = socialAccounts;
                      }
                      if (phones) {
                          body.phone_numbers = phones;
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'PUT', '/contacts', body);
                  }
                  if (operation === 'delete') {
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/contacts/${contactId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'get') {
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      const options = this.getNodeParameter('options', i);
                      if (options.fields) {
                          qs.optional_properties = options.fields;
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', `/contacts/${contactId}`, {}, qs);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      if (options.email) {
                          qs.email = options.email;
                      }
                      if (options.givenName) {
                          qs.given_name = options.givenName;
                      }
                      if (options.familyName) {
                          qs.family_name = options.familyName;
                      }
                      if (options.order) {
                          qs.order = options.order;
                      }
                      if (options.orderDirection) {
                          qs.order_direction = options.orderDirection;
                      }
                      if (options.since) {
                          qs.since = options.since;
                      }
                      if (options.until) {
                          qs.until = options.until;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'contacts', 'GET', '/contacts', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/contacts', {}, qs);
                          responseData = responseData.contacts;
                      }
                  }
              }
              if (resource === 'contactNote') {
                  if (operation === 'create') {
                      const userId = this.getNodeParameter('userId', i);
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          user_id: userId,
                          contact_id: contactId,
                      };
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      if (additionalFields.type) {
                          additionalFields.type = (0, change_case_1.pascalCase)(additionalFields.type);
                      }
                      Object.assign(body, additionalFields);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/notes', body);
                  }
                  if (operation === 'delete') {
                      const noteId = this.getNodeParameter('noteId', i);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/notes/${noteId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'get') {
                      const noteId = this.getNodeParameter('noteId', i);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', `/notes/${noteId}`);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(filters);
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'notes', 'GET', '/notes', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/notes', {}, qs);
                          responseData = responseData.notes;
                      }
                  }
                  if (operation === 'update') {
                      const noteId = this.getNodeParameter('noteId', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {};
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      if (additionalFields.type) {
                          additionalFields.type = (0, change_case_1.pascalCase)(additionalFields.type);
                      }
                      Object.assign(body, additionalFields);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'PATCH', `/notes/${noteId}`, body);
                  }
              }
              if (resource === 'contactTag') {
                  if (operation === 'create') {
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      const tagIds = this.getNodeParameter('tagIds', i);
                      const body = {
                          tagIds,
                      };
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', `/contacts/${contactId}/tags`, body);
                  }
                  if (operation === 'delete') {
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      const tagIds = this.getNodeParameter('tagIds', i);
                      qs.ids = tagIds;
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/contacts/${contactId}/tags`, {}, qs);
                      responseData = { success: true };
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'tags', 'GET', `/contacts/${contactId}/tags`, {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', `/contacts/${contactId}/tags`, {}, qs);
                          responseData = responseData.tags;
                      }
                  }
              }
              if (resource === 'ecommerceOrder') {
                  if (operation === 'create') {
                      const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                      const orderDate = this.getNodeParameter('orderDate', i);
                      const orderTitle = this.getNodeParameter('orderTitle', i);
                      const orderType = this.getNodeParameter('orderType', i);
                      const orderItems = this.getNodeParameter('orderItemsUi', i)
                          .orderItemsValues;
                      const shippingAddress = this.getNodeParameter('addressUi', i)
                          .addressValues;
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          contact_id: contactId,
                          order_date: orderDate,
                          order_title: orderTitle,
                          order_type: (0, change_case_1.pascalCase)(orderType),
                      };
                      if (additionalFields.promoCodes) {
                          additionalFields.promoCodes = additionalFields.promoCodes.split(',');
                      }
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      Object.assign(body, additionalFields);
                      body.order_items = (0, GenericFunctions_1.keysToSnakeCase)(orderItems);
                      if (shippingAddress) {
                          body.shipping_address = (0, GenericFunctions_1.keysToSnakeCase)(shippingAddress)[0];
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/orders', body);
                  }
                  if (operation === 'delete') {
                      const orderId = parseInt(this.getNodeParameter('orderId', i), 10);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/orders/${orderId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'get') {
                      const orderId = parseInt(this.getNodeParameter('orderId', i), 10);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'get', `/orders/${orderId}`);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(options);
                      Object.assign(qs, options);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'orders', 'GET', '/orders', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/orders', {}, qs);
                          responseData = responseData.orders;
                      }
                  }
              }
              if (resource === 'ecommerceProduct') {
                  if (operation === 'create') {
                      const productName = this.getNodeParameter('productName', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          product_name: productName,
                      };
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      Object.assign(body, additionalFields);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/products', body);
                  }
                  if (operation === 'delete') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/products/${productId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'get') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'get', `/products/${productId}`);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(filters);
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'products', 'GET', '/products', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/products', {}, qs);
                          responseData = responseData.products;
                      }
                  }
              }
              if (resource === 'email') {
                  if (operation === 'createRecord') {
                      const sentFromAddress = this.getNodeParameter('sentFromAddress', i);
                      const sendToAddress = this.getNodeParameter('sentToAddress', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          sent_to_address: sendToAddress,
                          sent_from_address: sentFromAddress,
                      };
                      Object.assign(body, additionalFields);
                      (0, GenericFunctions_1.keysToSnakeCase)(body);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/emails', body);
                  }
                  if (operation === 'deleteRecord') {
                      const emailRecordId = parseInt(this.getNodeParameter('emailRecordId', i), 10);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/emails/${emailRecordId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(filters);
                      Object.assign(qs, filters);
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'emails', 'GET', '/emails', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/emails', {}, qs);
                          responseData = responseData.emails;
                      }
                  }
                  if (operation === 'send') {
                      const userId = this.getNodeParameter('userId', i);
                      const contactIds = this.getNodeParameter('contactIds', i)
                          .split(',')
                          .map((e) => parseInt(e, 10));
                      const subject = this.getNodeParameter('subject', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          user_id: userId,
                          contacts: contactIds,
                          subject,
                      };
                      (0, GenericFunctions_1.keysToSnakeCase)(additionalFields);
                      Object.assign(body, additionalFields);
                      const attachmentsUi = this.getNodeParameter('attachmentsUi', i);
                      let attachments = [];
                      if (attachmentsUi) {
                          if (attachmentsUi.attachmentsValues) {
                              (0, GenericFunctions_1.keysToSnakeCase)(attachmentsUi.attachmentsValues);
                              attachments = attachmentsUi.attachmentsValues;
                          }
                          const attachmentsBinary = attachmentsUi.attachmentsBinary;
                          if (attachmentsBinary === null || attachmentsBinary === void 0 ? void 0 : attachmentsBinary.length) {
                              for (const { property } of attachmentsBinary) {
                                  const binaryData = this.helpers.assertBinaryData(i, property);
                                  attachments.push({
                                      file_data: binaryData.data,
                                      file_name: binaryData.fileName,
                                  });
                              }
                          }
                          body.attachments = attachments;
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/emails/queue', body);
                      responseData = { success: true };
                  }
              }
              if (resource === 'file') {
                  if (operation === 'delete') {
                      const fileId = parseInt(this.getNodeParameter('fileId', i), 10);
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'DELETE', `/files/${fileId}`);
                      responseData = { success: true };
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const filters = this.getNodeParameter('filters', i);
                      (0, GenericFunctions_1.keysToSnakeCase)(filters);
                      Object.assign(qs, filters);
                      if (qs.permission) {
                          qs.permission = qs.permission.toUpperCase();
                      }
                      if (qs.type) {
                          qs.type = (0, change_case_1.capitalCase)(qs.type);
                      }
                      if (qs.viewable) {
                          qs.viewable = qs.viewable.toUpperCase();
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.keapApiRequestAllItems.call(this, 'files', 'GET', '/files', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.keapApiRequest.call(this, 'GET', '/files', {}, qs);
                          responseData = responseData.files;
                      }
                  }
                  if (operation === 'upload') {
                      const fileAssociation = this.getNodeParameter('fileAssociation', i);
                      const isPublic = this.getNodeParameter('isPublic', i);
                      const body = {
                          is_public: isPublic,
                          file_association: fileAssociation.toUpperCase(),
                      };
                      if (fileAssociation === 'contact') {
                          const contactId = parseInt(this.getNodeParameter('contactId', i), 10);
                          body.contact_id = contactId;
                      }
                      if (this.getNodeParameter('binaryData', i)) {
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          body.file_data = binaryData.data;
                          body.file_name = binaryData.fileName;
                      }
                      else {
                          const fileName = this.getNodeParameter('fileName', i);
                          const fileData = this.getNodeParameter('fileData', i);
                          body.file_name = fileName;
                          body.file_data = fileData;
                      }
                      responseData = await GenericFunctions_1.keapApiRequest.call(this, 'POST', '/files', body);
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Keap = Keap;
  //# sourceMappingURL=Keap.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KeapOAuth2Api = void 0;
  const scopes = ['full'];
  class KeapOAuth2Api {
      constructor() {
          this.name = 'keapOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Keap OAuth2 API';
          this.documentationUrl = 'keap';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://signin.infusionsoft.com/app/oauth/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.infusionsoft.com/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.KeapOAuth2Api = KeapOAuth2Api;
  //# sourceMappingURL=KeapOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KeapOAuth2Api = void 0;
  const scopes = ['full'];
  class KeapOAuth2Api {
      constructor() {
          this.name = 'keapOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Keap OAuth2 API';
          this.documentationUrl = 'keap';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://signin.infusionsoft.com/app/oauth/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.infusionsoft.com/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.KeapOAuth2Api = KeapOAuth2Api;
  //# sourceMappingURL=KeapOAuth2Api.credentials.js.map

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

  # Keap node

  Use the Keap node to automate work in Keap, and integrate Keap with other applications. n8n has built-in support for a wide range of Keap features, including creating, updating, deleting, and getting companies, products, ecommerce orders, emails, and files. 

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

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

  ## Operations

  * Company
      * Create a company
      * Retrieve all companies
  * Contact
      * Create/update a contact
      * Delete an contact
      * Retrieve an contact
      * Retrieve all contacts
  * Contact Note
      * Create a note
      * Delete a note
      * Get a notes
      * Retrieve all notes
      * Update a note
  * Contact Tag
      * Add a list of tags to a contact
      * Delete a contact's tag
      * Retrieve all contact's tags
  * Ecommerce Order
      * Create an ecommerce order
      * Get an ecommerce order
      * Delete an ecommerce order
      * Retrieve all ecommerce orders
  * Ecommerce Product
      * Create an ecommerce product
      * Delete an ecommerce product
      * Get an ecommerce product
      * Retrieve all ecommerce product
  * Email
      * Create a record of an email sent to a contact
      * Retrieve all sent emails
      * Send Email
  * File
      * Delete a file
      * Retrieve all files
      * Upload a file

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Lemlist
name: Lemlist
display_name: Lemlist
description: Consume the Lemlist API
category: transform
icon: file:lemlist.svg
code_hash: 874dd1c1de4d3bc41d4acb8e78a610448f7e2fbf0025090f94cbed80261b1fa8
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Lemlist
documentation_title: Lemlist node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"lemlist","description":"Templates for lemlist"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
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.Lemlist = void 0;
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  const omit_1 = __importDefault(require("lodash/omit"));
  class Lemlist {
      constructor() {
          this.description = {
              displayName: 'Lemlist',
              name: 'lemlist',
              icon: 'file:lemlist.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Lemlist API',
              defaults: {
                  name: 'Lemlist',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'lemlistApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Activity',
                              value: 'activity',
                          },
                          {
                              name: 'Campaign',
                              value: 'campaign',
                          },
                          {
                              name: 'Lead',
                              value: 'lead',
                          },
                          {
                              name: 'Team',
                              value: 'team',
                          },
                          {
                              name: 'Unsubscribe',
                              value: 'unsubscribe',
                          },
                      ],
                      default: 'activity',
                  },
                  ...descriptions_1.activityOperations,
                  ...descriptions_1.activityFields,
                  ...descriptions_1.campaignOperations,
                  ...descriptions_1.campaignFields,
                  ...descriptions_1.leadOperations,
                  ...descriptions_1.leadFields,
                  ...descriptions_1.teamOperations,
                  ...descriptions_1.teamFields,
                  ...descriptions_1.unsubscribeOperations,
                  ...descriptions_1.unsubscribeFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCampaigns() {
                      const campaigns = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', '/campaigns');
                      return campaigns.map(({ _id, name }) => ({
                          name,
                          value: _id,
                      }));
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'activity') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (!(0, isEmpty_1.default)(filters)) {
                              Object.assign(qs, filters);
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.lemlistApiRequestAllItems.call(this, 'GET', '/activities', qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', '/activities', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'campaign') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.lemlistApiRequestAllItems.call(this, 'GET', '/campaigns', {});
                          }
                          else {
                              const qs = {
                                  limit: this.getNodeParameter('limit', i),
                              };
                              responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', '/campaigns', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'lead') {
                      if (operation === 'create') {
                          const qs = {};
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.deduplicate !== undefined) {
                              qs.deduplicate = additionalFields.deduplicate;
                          }
                          const body = {};
                          const remainingAdditionalFields = (0, omit_1.default)(additionalFields, 'deduplicate');
                          if (!(0, isEmpty_1.default)(remainingAdditionalFields)) {
                              Object.assign(body, remainingAdditionalFields);
                          }
                          const campaignId = this.getNodeParameter('campaignId', i);
                          const email = this.getNodeParameter('email', i);
                          const endpoint = `/campaigns/${campaignId}/leads/${email}`;
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'POST', endpoint, body, qs);
                      }
                      else if (operation === 'delete') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          const email = this.getNodeParameter('email', i);
                          const endpoint = `/campaigns/${campaignId}/leads/${email}`;
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'DELETE', endpoint, {}, { action: 'remove' });
                      }
                      else if (operation === 'get') {
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', `/leads/${email}`);
                      }
                      else if (operation === 'unsubscribe') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          const email = this.getNodeParameter('email', i);
                          const endpoint = `/campaigns/${campaignId}/leads/${email}`;
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'DELETE', endpoint);
                      }
                  }
                  else if (resource === 'team') {
                      if (operation === 'get') {
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', '/team');
                      }
                  }
                  else if (resource === 'unsubscribe') {
                      if (operation === 'add') {
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'POST', `/unsubscribes/${email}`);
                      }
                      else if (operation === 'delete') {
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'DELETE', `/unsubscribes/${email}`);
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.lemlistApiRequestAllItems.call(this, 'GET', '/unsubscribes', {});
                          }
                          else {
                              const qs = {
                                  limit: this.getNodeParameter('limit', i),
                              };
                              responseData = await GenericFunctions_1.lemlistApiRequest.call(this, 'GET', '/unsubscribes', {}, qs);
                          }
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Lemlist = Lemlist;
  //# sourceMappingURL=Lemlist.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LemlistApi = void 0;
  class LemlistApi {
      constructor() {
          this.name = 'lemlistApi';
          this.displayName = 'Lemlist API';
          this.documentationUrl = 'lemlist';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://api.lemlist.com/api',
                  url: '/campaigns',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          const encodedApiKey = Buffer.from(':' + credentials.apiKey).toString('base64');
          requestOptions.headers.Authorization = `Basic ${encodedApiKey}`;
          requestOptions.headers['user-agent'] = 'n8n';
          return requestOptions;
      }
  }
  exports.LemlistApi = LemlistApi;
  //# sourceMappingURL=LemlistApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LemlistApi = void 0;
  class LemlistApi {
      constructor() {
          this.name = 'lemlistApi';
          this.displayName = 'Lemlist API';
          this.documentationUrl = 'lemlist';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://api.lemlist.com/api',
                  url: '/campaigns',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          const encodedApiKey = Buffer.from(':' + credentials.apiKey).toString('base64');
          requestOptions.headers.Authorization = `Basic ${encodedApiKey}`;
          requestOptions.headers['user-agent'] = 'n8n';
          return requestOptions;
      }
  }
  exports.LemlistApi = LemlistApi;
  //# sourceMappingURL=LemlistApi.credentials.js.map

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

  # Lemlist node

  Use the Lemlist node to automate work in Lemlist, and integrate Lemlist with other applications. n8n has built-in support for a wide range of Lemlist features, including getting activities, teams and campaigns, as well as creating, updating, and deleting leads. 

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

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

  ## Operations

  <!-- vale from-write-good.Weasel = NO -->
  <!-- vale from-write-good.TooWordy = NO -->
  * Activity
      * Get Many: Get many activities
  * Campaign
      * Get Many: Get many campaigns
      * Get Stats: Get campaign stats
  * Enrichment
  	* Get: Fetches a previously completed enrichment
  	* Enrich Lead: Enrich a lead using an email or LinkedIn URL
  	* Enrich Person: Enrich a person using an email or LinkedIn URL
  * Lead
      * Create: Create a new lead
      * Delete: Delete an existing lead
      * Get: Get an existing lead
      * Unsubscribe: Unsubscribe an existing lead
  * Team
      * Get: Get an existing team
  	* Get Credits: Get an existing team's credits
  * Unsubscribe
      * Add: Add an email to an unsubscribe list
      * Delete: Delete an email from an unsubscribe list
      * Get Many: Get many unsubscribed emails
  <!-- vale from-write-good.TooWordy = YES -->
  <!-- vale from-write-good.Weasel = YES -->

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.KoBoToolbox
name: KoBoToolbox
display_name: KoBoToolbox
description: Work with KoBoToolbox forms and submissions
category: transform
icon: file:koBoToolbox.svg
code_hash: c9c4bb6871c6b52d5ab1470bb539737a94680fae02acf480bc6fb2b8b8c57a7f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.KoBoToolbox
documentation_title: KoboToolbox node documentation
operations: []
api_methods: []
templates: [{"name":"kobotoolbox","description":"Templates for kobotoolbox"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KoBoToolbox = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const FormDescription_1 = require("./FormDescription");
  const SubmissionDescription_1 = require("./SubmissionDescription");
  const HookDescription_1 = require("./HookDescription");
  const FileDescription_1 = require("./FileDescription");
  class KoBoToolbox {
      constructor() {
          this.description = {
              displayName: 'KoBoToolbox',
              name: 'koBoToolbox',
              icon: 'file:koBoToolbox.svg',
              group: ['transform'],
              version: 1,
              description: 'Work with KoBoToolbox forms and submissions',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'KoBoToolbox',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'koBoToolboxApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Form',
                              value: 'form',
                          },
                          {
                              name: 'Hook',
                              value: 'hook',
                          },
                          {
                              name: 'Submission',
                              value: 'submission',
                          },
                      ],
                      default: 'submission',
                      required: true,
                  },
                  ...FormDescription_1.formOperations,
                  ...FormDescription_1.formFields,
                  ...HookDescription_1.hookOperations,
                  ...HookDescription_1.hookFields,
                  ...SubmissionDescription_1.submissionOperations,
                  ...SubmissionDescription_1.submissionFields,
                  ...FileDescription_1.fileOperations,
                  ...FileDescription_1.fileFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  loadForms: GenericFunctions_1.loadForms,
              },
          };
      }
      async execute() {
          var _a, _b, _c, _d, _e, _f;
          let responseData;
          let returnData = [];
          const binaryItems = [];
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              if (resource === 'form') {
                  if (operation === 'get') {
                      const formId = this.getNodeParameter('formId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}`,
                          }),
                      ];
                  }
                  if (operation === 'getAll') {
                      const formQueryOptions = this.getNodeParameter('options', i);
                      const formFilterOptions = this.getNodeParameter('filters', i);
                      responseData = await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                          url: '/api/v2/assets/',
                          qs: {
                              limit: this.getNodeParameter('limit', i, 1000),
                              ...(formFilterOptions.filter && { q: formFilterOptions.filter }),
                              ...(((_b = (_a = formQueryOptions === null || formQueryOptions === void 0 ? void 0 : formQueryOptions.sort) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.ordering) && {
                                  ordering: (((_d = (_c = formQueryOptions === null || formQueryOptions === void 0 ? void 0 : formQueryOptions.sort) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.descending) ? '-' : '') +
                                      ((_f = (_e = formQueryOptions === null || formQueryOptions === void 0 ? void 0 : formQueryOptions.sort) === null || _e === void 0 ? void 0 : _e.value) === null || _f === void 0 ? void 0 : _f.ordering),
                              }),
                          },
                          scroll: this.getNodeParameter('returnAll', i),
                      });
                  }
                  if (operation === 'redeploy') {
                      const formId = this.getNodeParameter('formId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'PATCH',
                              url: `/api/v2/assets/${formId}/deployment/`,
                          }),
                      ];
                  }
              }
              if (resource === 'submission') {
                  const formId = this.getNodeParameter('formId', i);
                  if (operation === 'getAll') {
                      const submissionQueryOptions = this.getNodeParameter('options', i);
                      const filterJson = this.getNodeParameter('filterJson', i, null);
                      responseData = await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                          url: `/api/v2/assets/${formId}/data/`,
                          qs: {
                              limit: this.getNodeParameter('limit', i, 1000),
                              ...(filterJson && { query: filterJson }),
                              ...(submissionQueryOptions.sort && { sort: submissionQueryOptions.sort }),
                              ...(submissionQueryOptions.fields && {
                                  fields: JSON.stringify((0, GenericFunctions_1.parseStringList)(submissionQueryOptions.fields)),
                              }),
                          },
                          scroll: this.getNodeParameter('returnAll', i),
                      });
                      if (submissionQueryOptions.reformat) {
                          responseData = responseData.map((submission) => {
                              return (0, GenericFunctions_1.formatSubmission)(submission, (0, GenericFunctions_1.parseStringList)(submissionQueryOptions.selectMask), (0, GenericFunctions_1.parseStringList)(submissionQueryOptions.numberMask));
                          });
                      }
                      if (submissionQueryOptions.download) {
                          for (const submission of responseData) {
                              binaryItems.push(await GenericFunctions_1.downloadAttachments.call(this, submission, submissionQueryOptions));
                          }
                      }
                  }
                  if (operation === 'get') {
                      const submissionId = this.getNodeParameter('submissionId', i);
                      const options = this.getNodeParameter('options', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}/data/${submissionId}`,
                              qs: {
                                  ...(options.fields && {
                                      fields: JSON.stringify((0, GenericFunctions_1.parseStringList)(options.fields)),
                                  }),
                              },
                          }),
                      ];
                      if (options.reformat) {
                          responseData = responseData.map((submission) => {
                              return (0, GenericFunctions_1.formatSubmission)(submission, (0, GenericFunctions_1.parseStringList)(options.selectMask), (0, GenericFunctions_1.parseStringList)(options.numberMask));
                          });
                      }
                      if (options.download) {
                          for (const submission of responseData) {
                              binaryItems.push(await GenericFunctions_1.downloadAttachments.call(this, submission, options));
                          }
                      }
                  }
                  if (operation === 'delete') {
                      const id = this.getNodeParameter('submissionId', i);
                      await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                          method: 'DELETE',
                          url: `/api/v2/assets/${formId}/data/${id}`,
                      });
                      responseData = [
                          {
                              success: true,
                          },
                      ];
                  }
                  if (operation === 'getValidation') {
                      const submissionId = this.getNodeParameter('submissionId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}/data/${submissionId}/validation_status/`,
                          }),
                      ];
                  }
                  if (operation === 'setValidation') {
                      const submissionId = this.getNodeParameter('submissionId', i);
                      const status = this.getNodeParameter('validationStatus', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'PATCH',
                              url: `/api/v2/assets/${formId}/data/${submissionId}/validation_status/`,
                              body: {
                                  'validation_status.uid': status,
                              },
                          }),
                      ];
                  }
              }
              if (resource === 'hook') {
                  const formId = this.getNodeParameter('formId', i);
                  if (operation === 'getAll') {
                      responseData = await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                          url: `/api/v2/assets/${formId}/hooks/`,
                          qs: {
                              limit: this.getNodeParameter('limit', i, 1000),
                          },
                          scroll: this.getNodeParameter('returnAll', i),
                      });
                  }
                  if (operation === 'get') {
                      const hookId = this.getNodeParameter('hookId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}/hooks/${hookId}`,
                          }),
                      ];
                  }
                  if (operation === 'retryAll') {
                      const hookId = this.getNodeParameter('hookId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'PATCH',
                              url: `/api/v2/assets/${formId}/hooks/${hookId}/retry/`,
                          }),
                      ];
                  }
                  if (operation === 'getLogs') {
                      const hookId = this.getNodeParameter('hookId', i);
                      const startDate = this.getNodeParameter('startDate', i, null);
                      const endDate = this.getNodeParameter('endDate', i, null);
                      const status = this.getNodeParameter('status', i, null);
                      responseData = await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                          url: `/api/v2/assets/${formId}/hooks/${hookId}/logs/`,
                          qs: {
                              ...(startDate && { start: startDate }),
                              ...(endDate && { end: endDate }),
                              ...(status && { status }),
                          },
                      });
                  }
                  if (operation === 'retryOne') {
                      const hookId = this.getNodeParameter('hookId', i);
                      const logId = this.getNodeParameter('logId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'PATCH',
                              url: `/api/v2/assets/${formId}/hooks/${hookId}/logs/${logId}/retry/`,
                          }),
                      ];
                  }
              }
              if (resource === 'file') {
                  const formId = this.getNodeParameter('formId', i);
                  if (operation === 'getAll') {
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}/files`,
                              qs: {
                                  file_type: 'form_media',
                              },
                              scroll: true,
                          }),
                      ];
                  }
                  if (operation === 'get') {
                      const fileId = this.getNodeParameter('fileId', i);
                      const download = this.getNodeParameter('download', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              url: `/api/v2/assets/${formId}/files/${fileId}`,
                          }),
                      ];
                      if ((responseData === null || responseData === void 0 ? void 0 : responseData[0]) && download) {
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const binaryItem = {
                              json: responseData[0],
                              binary: {},
                          };
                          const response = await GenericFunctions_1.koBoToolboxRawRequest.call(this, {
                              url: `/api/v2/assets/${formId}/files/${fileId}/content`,
                              encoding: 'arraybuffer',
                          });
                          console.dir(response);
                          binaryItem.binary[binaryPropertyName] = await this.helpers.prepareBinaryData(response, responseData[0].metadata.filename);
                          binaryItems.push(binaryItem);
                      }
                  }
                  if (operation === 'delete') {
                      const fileId = this.getNodeParameter('fileId', i);
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'DELETE',
                              url: `/api/v2/assets/${formId}/files/${fileId}`,
                          }),
                      ];
                  }
                  if (operation === 'create') {
                      const fileMode = this.getNodeParameter('fileMode', i);
                      const body = {
                          description: 'Uploaded file',
                          file_type: 'form_media',
                      };
                      if ('binary' === fileMode) {
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const item = items[i].binary;
                          const binaryData = item[binaryPropertyName];
                          body.base64Encoded = 'data:' + binaryData.mimeType + ';base64,' + binaryData.data;
                          body.metadata = {
                              filename: binaryData.fileName,
                          };
                      }
                      else {
                          const fileUrl = this.getNodeParameter('fileUrl', i);
                          body.metadata = {
                              redirect_url: fileUrl,
                          };
                      }
                      responseData = [
                          await GenericFunctions_1.koBoToolboxApiRequest.call(this, {
                              method: 'POST',
                              url: `/api/v2/assets/${formId}/files/`,
                              body,
                          }),
                      ];
                  }
              }
              returnData = returnData.concat(responseData);
          }
          return binaryItems.length > 0 ? [binaryItems] : [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.KoBoToolbox = KoBoToolbox;
  //# sourceMappingURL=KoBoToolbox.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KoBoToolboxApi = void 0;
  class KoBoToolboxApi {
      constructor() {
          this.name = 'koBoToolboxApi';
          this.displayName = 'KoBoToolbox API Token';
          this.documentationUrl = 'koBoToolbox';
          this.properties = [
              {
                  displayName: 'API Root URL',
                  name: 'URL',
                  type: 'string',
                  default: 'https://kf.kobotoolbox.org/',
              },
              {
                  displayName: 'API Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  hint: 'You can get your API token at https://[api-root]/token/?format=json (for a logged in user)',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Token {{$credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.URL}}',
                  url: '/api/v2/assets/',
                  method: 'GET',
              },
          };
      }
  }
  exports.KoBoToolboxApi = KoBoToolboxApi;
  //# sourceMappingURL=KoBoToolboxApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.KoBoToolboxApi = void 0;
  class KoBoToolboxApi {
      constructor() {
          this.name = 'koBoToolboxApi';
          this.displayName = 'KoBoToolbox API Token';
          this.documentationUrl = 'koBoToolbox';
          this.properties = [
              {
                  displayName: 'API Root URL',
                  name: 'URL',
                  type: 'string',
                  default: 'https://kf.kobotoolbox.org/',
              },
              {
                  displayName: 'API Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  hint: 'You can get your API token at https://[api-root]/token/?format=json (for a logged in user)',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Token {{$credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.URL}}',
                  url: '/api/v2/assets/',
                  method: 'GET',
              },
          };
      }
  }
  exports.KoBoToolboxApi = KoBoToolboxApi;
  //# sourceMappingURL=KoBoToolboxApi.credentials.js.map

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

  # KoboToolbox node

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

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

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

  ## Operations

  * File
  	* Create
  	* Delete
  	* Get
  	* Get Many
  * Form
      * Get
      * Get Many
  		* Redeploy
  * Hook
      * Get
      * Get Many
      * Logs
      * Retry All
      * Retry One
  * Submission
      * Delete
      * Get
      * Get Many
      * Get Validation Status
      * Update Validation Status

  ## Templates and examples

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

  ## Options

  ### Query Options

  The Query Submission operation supports query options:

  * In the main section of the **Parameters** panel:
      * **Start** controls the index offset to start the query from (to use the API pagination logic).
      * **Limit** sets the maximum number of records to return. Note that the API always has a limit of 30,000 returned records, whatever value you provide.
  * In the **Query Options** section, you can activate the following parameters:
      * **Query** lets you specify filter predicates in MongoDB's JSON query format. For example: `{"status": "success", "_submission_time": {"$lt": "2021-11-01T01:02:03"}}` queries for all submissions with the value `success` for the field `status`, and submitted before November 1st, 2021, 01:02:03.
      * **Fields** lets you specify the list of fields you want to fetch, to make the response lighter.
      * **Sort** lets you provide a list of sorting criteria in MongoDB JSON format. For example, `{"status": 1, "_submission_time": -1}` specifies a sort order by ascending status, and then descending submission time.

  More details about these options can be found in the [Formhub API docs](https://github.com/SEL-Columbia/formhub/wiki/Formhub-Access-Points-(API)#api-parameters)

  ### Submission options

  All operations that return form submission data offer options to tweak the response. These include:

  - Download options lets you download any attachment linked to each particular form submissions, such as pictures and videos. It also lets you select the naming pattern, and the file size to download (if available - typically for images). 
  - Formatting options perform some reformatting as described in [About reformatting](#about-reformatting).

  #### About reformatting

  The default JSON format for KoboToolbox submission data is sometimes hard to deal with, because it's not schema-aware, and all fields are therefore returned as strings.

  This node provides a lightweight opinionated reformatting logic, enabled with the **Reformat?** parameter, available on all operations that return form submissions: the submission query, get, and the attachment download operations.

  When enabled, the reformatting:

  - Reorganizes the JSON into a multi-level hierarchy following the form's groups. By default, question grouping hierarchy is materialized by a `/` character in the field names, for example `Group1/Question1`. With reformatting enabled, n8n reorganizes these into `Group1.Question1`, as nested JSON objects.
  - Renames fields to trim `_` (not supported by many downstream systems).
  - Parses all geospatial fields (Point, Line, and Area question types) into their standard GeoJSON equivalent.
  - Splits all fields matching any of the **Multiselect Mask** wildcard masks into an array. Since the multi-select fields appear as space-separated strings, they can't be guessed algorithmically, so you must provide a field naming mask. Format the masks as a comma-separated list. Lists support the `*` wildcard.
  - Converts all fields matching any of the **Number Mask** wildcard masks into a JSON float.

  Here's a detailed example in JSON:

  ```json
  {
    "_id": 471987,
    "formhub/uuid": "189436bb09a54957bfcc798e338b54d6",
    "start": "2021-12-05T16:13:38.527+02:00",
    "end": "2021-12-05T16:15:33.407+02:00",
    "Field_Details/Field_Name": "Test Fields",
    "Field_Details/Field_Location": "-1.932914 30.078211 1421 165",
    "Field_Details/Field_Shape": "-1.932914 30.078211 1421 165;-1.933011 30.078085 0 0;-1.933257 30.078004 0 0;-1.933338 30.078197 0 0;-1.933107 30.078299 0 0;-1.932914 30.078211 1421 165",
    "Field_Details/Crops_Grown": "maize beans avocado",
    "Field_Details/Field_Size_sqm": "2300",
    "__version__": "veGcULpqP6JNFKRJbbMvMs",
    "meta/instanceID": "uuid:2356cbbe-c1fd-414d-85c8-84f33e92618a",
    "_xform_id_string": "ajXVJpBkTD5tB4Nu9QXpgm",
    "_uuid": "2356cbbe-c1fd-414d-85c8-84f33e92618a",
    "_attachments": [],
    "_status": "submitted_via_web",
    "_geolocation": [
      -1.932914,
      30.078211
    ],
    "_submission_time": "2021-12-05T14:15:44",
    "_tags": [],
    "_notes": [],
    "_validation_status": {},
    "_submitted_by": null
  }
  ```

  With reformatting enabled, and the appropriate masks for multi-select and number formatting (for example, `Crops_*` and `*_sqm` respectively), n8n parses it into:

  ```json
  {
    "id": 471987,
    "formhub": {
      "uuid": "189436bb09a54957bfcc798e338b54d6"
    },
    "start": "2021-12-05T16:13:38.527+02:00",
    "end": "2021-12-05T16:15:33.407+02:00",
    "Field_Details": {
      "Field_Name": "Test Fields",
      "Field_Location": {
        "lat": -1.932914,
        "lon": 30.078211
      },
      "Field_Shape": {
        "type": "polygon",
        "coordinates": [
          {
            "lat": -1.932914,
            "lon": 30.078211
          },
          {
            "lat": -1.933011,
            "lon": 30.078085
          },
          {
            "lat": -1.933257,
            "lon": 30.078004
          },
          {
            "lat": -1.933338,
            "lon": 30.078197
          },
          {
            "lat": -1.933107,
            "lon": 30.078299
          },
          {
            "lat": -1.932914,
            "lon": 30.078211
          }
        ]
      },
      "Crops_Grown": [
        "maize",
        "beans",
        "avocado"
      ],
      "Field_Size_sqm": 2300
    },
    "version": "veGcULpqP6JNFKRJbbMvMs",
    "meta": {
      "instanceID": "uuid:2356cbbe-c1fd-414d-85c8-84f33e92618a"
    },
    "xform_id_string": "ajXVJpBkTD5tB4Nu9QXpgm",
    "uuid": "2356cbbe-c1fd-414d-85c8-84f33e92618a",
    "attachments": [],
    "status": "submitted_via_web",
    "geolocation": {
      "lat": -1.932914,
      "lon": 30.078211
    },
    "submission_time": "2021-12-05T14:15:44",
    "tags": [],
    "notes": [],
    "validation_status": {},
    "submitted_by": null
  }
  ```


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

documentation_examples:
  [{"type":"json","language":"json","code":"{\n  \"_id\": 471987,\n  \"formhub/uuid\": \"189436bb09a54957bfcc798e338b54d6\",\n  \"start\": \"2021-12-05T16:13:38.527+02:00\",\n  \"end\": \"2021-12-05T16:15:33.407+02:00\",\n  \"Field_Details/Field_Name\": \"Test Fields\",\n  \"Field_Details/Field_Location\": \"-1.932914 30.078211 1421 165\",\n  \"Field_Details/Field_Shape\": \"-1.932914 30.078211 1421 165;-1.933011 30.078085 0 0;-1.933257 30.078004 0 0;-1.933338 30.078197 0 0;-1.933107 30.078299 0 0;-1.932914 30.078211 1421 165\",\n  \"Field_Details/Crops_Grown\": \"maize beans avocado\",\n  \"Field_Details/Field_Size_sqm\": \"2300\",\n  \"__version__\": \"veGcULpqP6JNFKRJbbMvMs\",\n  \"meta/instanceID\": \"uuid:2356cbbe-c1fd-414d-85c8-84f33e92618a\",\n  \"_xform_id_string\": \"ajXVJpBkTD5tB4Nu9QXpgm\",\n  \"_uuid\": \"2356cbbe-c1fd-414d-85c8-84f33e92618a\",\n  \"_attachments\": [],\n  \"_status\": \"submitted_via_web\",\n  \"_geolocation\": [\n    -1.932914,\n    30.078211\n  ],\n  \"_submission_time\": \"2021-12-05T14:15:44\",\n  \"_tags\": [],\n  \"_notes\": [],\n  \"_validation_status\": {},\n  \"_submitted_by\": null\n}"},{"type":"json","language":"json","code":"{\n  \"id\": 471987,\n  \"formhub\": {\n    \"uuid\": \"189436bb09a54957bfcc798e338b54d6\"\n  },\n  \"start\": \"2021-12-05T16:13:38.527+02:00\",\n  \"end\": \"2021-12-05T16:15:33.407+02:00\",\n  \"Field_Details\": {\n    \"Field_Name\": \"Test Fields\",\n    \"Field_Location\": {\n      \"lat\": -1.932914,\n      \"lon\": 30.078211\n    },\n    \"Field_Shape\": {\n      \"type\": \"polygon\",\n      \"coordinates\": [\n        {\n          \"lat\": -1.932914,\n          \"lon\": 30.078211\n        },\n        {\n          \"lat\": -1.933011,\n          \"lon\": 30.078085\n        },\n        {\n          \"lat\": -1.933257,\n          \"lon\": 30.078004\n        },\n        {\n          \"lat\": -1.933338,\n          \"lon\": 30.078197\n        },\n        {\n          \"lat\": -1.933107,\n          \"lon\": 30.078299\n        },\n        {\n          \"lat\": -1.932914,\n          \"lon\": 30.078211\n        }\n      ]\n    },\n    \"Crops_Grown\": [\n      \"maize\",\n      \"beans\",\n      \"avocado\"\n    ],\n    \"Field_Size_sqm\": 2300\n  },\n  \"version\": \"veGcULpqP6JNFKRJbbMvMs\",\n  \"meta\": {\n    \"instanceID\": \"uuid:2356cbbe-c1fd-414d-85c8-84f33e92618a\"\n  },\n  \"xform_id_string\": \"ajXVJpBkTD5tB4Nu9QXpgm\",\n  \"uuid\": \"2356cbbe-c1fd-414d-85c8-84f33e92618a\",\n  \"attachments\": [],\n  \"status\": \"submitted_via_web\",\n  \"geolocation\": {\n    \"lat\": -1.932914,\n    \"lon\": 30.078211\n  },\n  \"submission_time\": \"2021-12-05T14:15:44\",\n  \"tags\": [],\n  \"notes\": [],\n  \"validation_status\": {},\n  \"submitted_by\": null\n}"}]

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


node_type: n8n-nodes-base.Kitemaker
name: Kitemaker
display_name: Kitemaker
description: Consume the Kitemaker GraphQL API
category: input
icon: file:kitemaker.svg
code_hash: d77a6740a8ec5ce77b62d5069a0e2bd6349891c973f38cf5d4fc6242c854c0ba
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Kitemaker
documentation_title: Kitemaker node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"kitemaker","description":"Templates for kitemaker"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Kitemaker = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const queries_1 = require("./queries");
  const mutations_1 = require("./mutations");
  class Kitemaker {
      constructor() {
          this.description = {
              displayName: 'Kitemaker',
              name: 'kitemaker',
              icon: 'file:kitemaker.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
              description: 'Consume the Kitemaker GraphQL API',
              defaults: {
                  name: 'Kitemaker',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'kitemakerApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Organization',
                              value: 'organization',
                          },
                          {
                              name: 'Space',
                              value: 'space',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'Work Item',
                              value: 'workItem',
                          },
                      ],
                      default: 'workItem',
                      required: true,
                  },
                  ...descriptions_1.organizationOperations,
                  ...descriptions_1.spaceOperations,
                  ...descriptions_1.spaceFields,
                  ...descriptions_1.userOperations,
                  ...descriptions_1.userFields,
                  ...descriptions_1.workItemOperations,
                  ...descriptions_1.workItemFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLabels() {
                      const responseData = await GenericFunctions_1.kitemakerRequest.call(this, { query: queries_1.getLabels });
                      const { data: { organization: { spaces }, }, } = responseData;
                      return (0, GenericFunctions_1.createLoadOptions)(spaces[0].labels);
                  },
                  async getSpaces() {
                      const responseData = await GenericFunctions_1.kitemakerRequest.call(this, { query: queries_1.getSpaces });
                      const { data: { organization: { spaces }, }, } = responseData;
                      return (0, GenericFunctions_1.createLoadOptions)(spaces);
                  },
                  async getStatuses() {
                      const spaceId = this.getNodeParameter('spaceId', 0);
                      if (!spaceId.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please choose a space to set for the work item to create.');
                      }
                      const responseData = await GenericFunctions_1.kitemakerRequest.call(this, { query: queries_1.getStatuses });
                      const { data: { organization: { spaces }, }, } = responseData;
                      const space = spaces.find((e) => e.id === spaceId);
                      return (0, GenericFunctions_1.createLoadOptions)(space.statuses);
                  },
                  async getUsers() {
                      const responseData = await GenericFunctions_1.kitemakerRequest.call(this, { query: queries_1.getUsers });
                      const { data: { organization: { users }, }, } = responseData;
                      return (0, GenericFunctions_1.createLoadOptions)(users);
                  },
                  async getWorkItems() {
                      const spaceId = this.getNodeParameter('spaceId', 0);
                      const responseData = await GenericFunctions_1.kitemakerRequest.call(this, {
                          query: queries_1.getWorkItems,
                          variables: { spaceId },
                      });
                      const { data: { workItems: { workItems }, }, } = responseData;
                      return (0, GenericFunctions_1.createLoadOptions)(workItems);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          for (let i = 0; i < items.length; i++) {
              if (resource === 'organization') {
                  if (operation === 'get') {
                      responseData = await GenericFunctions_1.kitemakerRequest.call(this, {
                          query: queries_1.getOrganization,
                      });
                      responseData = responseData.data.organization;
                  }
              }
              else if (resource === 'space') {
                  if (operation === 'getAll') {
                      const allItems = await GenericFunctions_1.kitemakerRequestAllItems.call(this, {
                          query: queries_1.getAllSpaces,
                          variables: {},
                      });
                      responseData = allItems;
                  }
              }
              else if (resource === 'user') {
                  if (operation === 'getAll') {
                      const allItems = await GenericFunctions_1.kitemakerRequestAllItems.call(this, {
                          query: queries_1.getAllUsers,
                          variables: {},
                      });
                      responseData = allItems;
                  }
              }
              else if (resource === 'workItem') {
                  if (operation === 'create') {
                      const input = {
                          title: this.getNodeParameter('title', i),
                          statusId: this.getNodeParameter('statusId', i),
                      };
                      if (!input.statusId.length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter a status to set for the work item to create.', { itemIndex: i });
                      }
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (Object.keys(additionalFields).length) {
                          Object.assign(input, additionalFields);
                      }
                      responseData = await GenericFunctions_1.kitemakerRequest.call(this, {
                          query: mutations_1.createWorkItem,
                          variables: { input },
                      });
                      responseData = responseData.data.createWorkItem.workItem;
                  }
                  else if (operation === 'get') {
                      const workItemId = this.getNodeParameter('workItemId', i);
                      responseData = await GenericFunctions_1.kitemakerRequest.call(this, {
                          query: queries_1.getWorkItem,
                          variables: { workItemId },
                      });
                      responseData = responseData.data.workItem;
                  }
                  else if (operation === 'getAll') {
                      const allItems = await GenericFunctions_1.kitemakerRequestAllItems.call(this, {
                          query: queries_1.getAllWorkItems,
                          variables: {
                              spaceId: this.getNodeParameter('spaceId', i),
                          },
                      });
                      responseData = allItems;
                  }
                  else if (operation === 'update') {
                      const input = {
                          id: this.getNodeParameter('workItemId', i),
                      };
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if (!Object.keys(updateFields).length) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter at least one field to update for the work item.', { itemIndex: i });
                      }
                      Object.assign(input, updateFields);
                      responseData = await GenericFunctions_1.kitemakerRequest.call(this, {
                          query: mutations_1.editWorkItem,
                          variables: { input },
                      });
                      responseData = responseData.data.editWorkItem.workItem;
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.Kitemaker = Kitemaker;
  //# sourceMappingURL=Kitemaker.node.js.map

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

  // --- Next Credential File ---

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

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

  # Kitemaker node

  Use the Kitemaker node to automate work in Kitemaker, and integrate Kitemaker with other applications. n8n has built-in support for a wide range of Kitemaker features, including retrieving data on organizations, spaces and users, as well as creating, getting, and updating work items. 

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

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

  ## Operations

  * Organization
      * Retrieve data on the logged-in user's organization.
  * Space
      * Retrieve data on all the spaces in the logged-in user's organization.
  * User
      * Retrieve data on all the users in the logged-in user's organization.
  * Work Item
      * Create
      * Get
      * Get All
      * Update

  ## Templates and examples

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

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


node_type: n8n-nodes-base.LingvaNex
name: LingvaNex
display_name: LingvaNex
description: Consume LingvaNex API
category: output
icon: file:lingvanex.png
code_hash: 29d29315fd6ef3b4f9454e49bfcd822bf94f31464bab1c11b494288d33fce502
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.LingvaNex
documentation_title: LingvaNex node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"lingvanex","description":"Templates for lingvanex"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LingvaNex = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class LingvaNex {
      constructor() {
          this.description = {
              displayName: 'LingvaNex',
              name: 'lingvaNex',
              icon: 'file:lingvanex.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume LingvaNex API',
              defaults: {
                  name: 'LingvaNex',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'lingvaNexApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Translate',
                              value: 'translate',
                              description: 'Translate data',
                              action: 'Translate data',
                          },
                      ],
                      default: 'translate',
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      default: '',
                      description: 'The input text to translate',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['translate'],
                          },
                      },
                  },
                  {
                      displayName: 'Translate To',
                      name: 'translateTo',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLanguages',
                      },
                      default: '',
                      description: 'The language to use for translation of the input text, set to one of the language codes listed in <a href="https://cloud.google.com/translate/docs/languages">Language Support</a>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['translate'],
                          },
                      },
                  },
                  {
                      displayName: 'Additional Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['translate'],
                          },
                      },
                      options: [
                          {
                              displayName: 'From',
                              name: 'from',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getLanguages',
                              },
                              default: '',
                              description: 'The language code in the format “language code_code of the country”. If this parameter is not present, the auto-detect language mode is enabled. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Platform',
                              name: 'platform',
                              type: 'string',
                              default: 'api',
                          },
                          {
                              displayName: 'Translate Mode',
                              name: 'translateMode',
                              type: 'string',
                              default: '',
                              description: 'Describe the input text format. Possible value is "html" for translating and preserving html structure. If value is not specified or is other than "html" than plain text is translating.',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLanguages() {
                      const returnData = [];
                      const data = await GenericFunctions_1.lingvaNexApiRequest.call(this, 'GET', '/getLanguages', {}, { platform: 'api' });
                      for (const language of data.result) {
                          returnData.push({
                              name: language.englishName,
                              value: language.full_code,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      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++) {
              if (operation === 'translate') {
                  const text = this.getNodeParameter('text', i);
                  const translateTo = this.getNodeParameter('translateTo', i);
                  const options = this.getNodeParameter('options', i);
                  const body = {
                      data: text,
                      to: translateTo,
                      platform: 'api',
                  };
                  Object.assign(body, options);
                  const response = await GenericFunctions_1.lingvaNexApiRequest.call(this, 'POST', '/translate', body);
                  responseData.push(response);
              }
          }
          return [this.helpers.returnJsonArray(responseData)];
      }
  }
  exports.LingvaNex = LingvaNex;
  //# sourceMappingURL=LingvaNex.node.js.map

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

  // --- Next Credential File ---

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

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

  # LingvaNex node

  Use the LingvaNex node to automate work in LingvaNex, and integrate LingvaNex with other applications. n8n has built-in support for translating data with LingvaNex.

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

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

  ## Operations

  - Translate data

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Linear
name: Linear
display_name: Linear
description: Consume Linear API
category: output
icon: file:linear.svg
code_hash: 03a0ceb98ba3b2007d39314f83e4819bde871064bef40846749d33477a352ed5
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Linear
documentation_title: Linear node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"linear","description":"Templates for linear"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Linear = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const IssueDescription_1 = require("./IssueDescription");
  const Queries_1 = require("./Queries");
  class Linear {
      constructor() {
          this.description = {
              displayName: 'Linear',
              name: 'linear',
              icon: 'file:linear.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Linear API',
              defaults: {
                  name: 'Linear',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'linearApi',
                      required: true,
                      testedBy: 'linearApiTest',
                      displayOptions: {
                          show: {
                              authentication: ['apiToken'],
                          },
                      },
                  },
                  {
                      name: 'linearOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'API Token',
                              value: 'apiToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'apiToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Issue',
                              value: 'issue',
                          },
                      ],
                      default: 'issue',
                  },
                  ...IssueDescription_1.issueOperations,
                  ...IssueDescription_1.issueFields,
              ],
          };
          this.methods = {
              credentialTest: {
                  async linearApiTest(credential) {
                      try {
                          await GenericFunctions_1.validateCredentials.call(this, credential.data);
                      }
                      catch (error) {
                          const { error: err } = error;
                          const errors = err.errors;
                          const authenticationError = Boolean(errors.filter((e) => e.extensions.code === 'AUTHENTICATION_ERROR').length);
                          if (authenticationError) {
                              return {
                                  status: 'Error',
                                  message: 'The security token included in the request is invalid',
                              };
                          }
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
              loadOptions: {
                  async getTeams() {
                      const returnData = [];
                      const body = {
                          query: Queries_1.query.getTeams(),
                          variables: {
                              $first: 10,
                          },
                      };
                      const teams = await GenericFunctions_1.linearApiRequestAllItems.call(this, 'data.teams', body);
                      for (const team of teams) {
                          returnData.push({
                              name: team.name,
                              value: team.id,
                          });
                      }
                      return returnData;
                  },
                  async getUsers() {
                      const returnData = [];
                      const body = {
                          query: Queries_1.query.getUsers(),
                          variables: {
                              $first: 10,
                          },
                      };
                      const users = await GenericFunctions_1.linearApiRequestAllItems.call(this, 'data.users', body);
                      for (const user of users) {
                          returnData.push({
                              name: user.name,
                              value: user.id,
                          });
                      }
                      return returnData;
                  },
                  async getStates() {
                      var _a, _b, _c;
                      let teamId = this.getNodeParameter('teamId', null);
                      if (!teamId) {
                          const updateFields = this.getNodeParameter('updateFields', null);
                          if (!updateFields.teamId) {
                              const issueId = this.getNodeParameter('issueId');
                              const body = {
                                  query: Queries_1.query.getIssueTeam(),
                                  variables: {
                                      issueId,
                                  },
                              };
                              const responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                              teamId = (_c = (_b = (_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.issue) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id;
                          }
                          else {
                              teamId = updateFields.teamId;
                          }
                      }
                      const returnData = [];
                      const body = {
                          query: Queries_1.query.getStates(),
                          variables: {
                              $first: 10,
                              filter: {
                                  team: {
                                      id: {
                                          eq: teamId,
                                      },
                                  },
                              },
                          },
                      };
                      const states = await GenericFunctions_1.linearApiRequestAllItems.call(this, 'data.workflowStates', body);
                      for (const state of states) {
                          returnData.push({
                              name: state.name,
                              value: state.id,
                          });
                      }
                      return returnData.sort(GenericFunctions_1.sort);
                  },
              },
          };
      }
      async execute() {
          var _a, _b, _c, _d;
          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 === 'issue') {
                      if (operation === 'create') {
                          const teamId = this.getNodeParameter('teamId', i);
                          const title = this.getNodeParameter('title', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              query: Queries_1.query.createIssue(),
                              variables: {
                                  teamId,
                                  title,
                                  ...additionalFields,
                              },
                          };
                          responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                          responseData = (_a = responseData.data.issueCreate) === null || _a === void 0 ? void 0 : _a.issue;
                      }
                      if (operation === 'delete') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const body = {
                              query: Queries_1.query.deleteIssue(),
                              variables: {
                                  issueId,
                              },
                          };
                          responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                          responseData = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _b === void 0 ? void 0 : _b.issueDelete;
                      }
                      if (operation === 'get') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const body = {
                              query: Queries_1.query.getIssue(),
                              variables: {
                                  issueId,
                              },
                          };
                          responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                          responseData = responseData.data.issue;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const body = {
                              query: Queries_1.query.getIssues(),
                              variables: {
                                  first: 50,
                              },
                          };
                          if (returnAll) {
                              responseData = await GenericFunctions_1.linearApiRequestAllItems.call(this, 'data.issues', body);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', 0);
                              body.variables.first = limit;
                              responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                              responseData = responseData.data.issues.nodes;
                          }
                      }
                      if (operation === 'update') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              query: Queries_1.query.updateIssue(),
                              variables: {
                                  issueId,
                                  ...updateFields,
                              },
                          };
                          responseData = await GenericFunctions_1.linearApiRequest.call(this, body);
                          responseData = (_d = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _c === void 0 ? void 0 : _c.issueUpdate) === null || _d === void 0 ? void 0 : _d.issue;
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Linear = Linear;
  //# sourceMappingURL=Linear.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinearApi = void 0;
  class LinearApi {
      constructor() {
          this.name = 'linearApi';
          this.displayName = 'Linear API';
          this.documentationUrl = 'linear';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.LinearApi = LinearApi;
  //# sourceMappingURL=LinearApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinearOAuth2Api = void 0;
  const scopes = ['read', 'write', 'issues:create', 'comments:create'];
  class LinearOAuth2Api {
      constructor() {
          this.name = 'linearOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Linear OAuth2 API';
          this.documentationUrl = 'linear';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://linear.app/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.linear.app/oauth/token',
                  required: true,
              },
              {
                  displayName: 'Actor',
                  name: 'actor',
                  type: 'options',
                  options: [
                      {
                          name: 'User',
                          value: 'user',
                          description: 'Resources are created as the user who authorized the application',
                      },
                      {
                          name: 'Application',
                          value: 'application',
                          description: 'Resources are created as the application',
                      },
                  ],
                  default: 'user',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '={{"actor="+$self["actor"]}}',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.LinearOAuth2Api = LinearOAuth2Api;
  //# sourceMappingURL=LinearOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinearApi = void 0;
  class LinearApi {
      constructor() {
          this.name = 'linearApi';
          this.displayName = 'Linear API';
          this.documentationUrl = 'linear';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.LinearApi = LinearApi;
  //# sourceMappingURL=LinearApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinearOAuth2Api = void 0;
  const scopes = ['read', 'write', 'issues:create', 'comments:create'];
  class LinearOAuth2Api {
      constructor() {
          this.name = 'linearOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Linear OAuth2 API';
          this.documentationUrl = 'linear';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://linear.app/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://api.linear.app/oauth/token',
                  required: true,
              },
              {
                  displayName: 'Actor',
                  name: 'actor',
                  type: 'options',
                  options: [
                      {
                          name: 'User',
                          value: 'user',
                          description: 'Resources are created as the user who authorized the application',
                      },
                      {
                          name: 'Application',
                          value: 'application',
                          description: 'Resources are created as the application',
                      },
                  ],
                  default: 'user',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '={{"actor="+$self["actor"]}}',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.LinearOAuth2Api = LinearOAuth2Api;
  //# sourceMappingURL=LinearOAuth2Api.credentials.js.map

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

  # Linear node

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

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

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

  ## Operations

  * Issue
      * 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, 'linear') ]]

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

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


node_type: n8n-nodes-base.Ldap
name: Ldap
display_name: Ldap
description: Interact with LDAP servers
category: transform
icon: file:ldap.svg
code_hash: d672264081d30d100685786ddec6cc77a4750dd916eb833f83d2f27dd6ef18b2
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Ldap
documentation_title: LDAP
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"ldap","description":"Templates for ldap"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Ldap = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const ldapts_1 = require("ldapts");
  const LdapDescription_1 = require("./LdapDescription");
  const Helpers_1 = require("./Helpers");
  class Ldap {
      constructor() {
          this.description = {
              displayName: 'Ldap',
              name: 'ldap',
              icon: 'file:ldap.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Interact with LDAP servers',
              defaults: {
                  name: 'LDAP',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'ldap',
                      required: true,
                      testedBy: 'ldapConnectionTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Compare',
                              value: 'compare',
                              description: 'Compare an attribute',
                              action: 'Compare an attribute',
                          },
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a new entry',
                              action: 'Create a new entry',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete an entry',
                              action: 'Delete an entry',
                          },
                          {
                              name: 'Rename',
                              value: 'rename',
                              description: 'Rename the DN of an existing entry',
                              action: 'Rename the DN of an existing entry',
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search LDAP',
                              action: 'Search LDAP',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update attributes',
                              action: 'Update attributes',
                          },
                      ],
                      default: 'search',
                  },
                  {
                      displayName: 'Debug',
                      name: 'nodeDebug',
                      type: 'boolean',
                      isNodeSetting: true,
                      default: false,
                      noDataExpression: true,
                  },
                  ...LdapDescription_1.ldapFields,
              ],
          };
          this.methods = {
              credentialTest: {
                  async ldapConnectionTest(credential) {
                      const credentials = credential.data;
                      const client = await (0, Helpers_1.createLdapClient)(credentials);
                      try {
                          await client.bind(credentials.bindDN, credentials.bindPassword);
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                      finally {
                          await client.unbind();
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
              loadOptions: {
                  async getAttributes() {
                      const credentials = await this.getCredentials('ldap');
                      const client = await (0, Helpers_1.createLdapClient)(credentials);
                      try {
                          await client.bind(credentials.bindDN, credentials.bindPassword);
                      }
                      catch (error) {
                          await client.unbind();
                          console.log(error);
                          return [];
                      }
                      let results;
                      const baseDN = this.getNodeParameter('baseDN', 0);
                      try {
                          results = await client.search(baseDN, { sizeLimit: 200, paged: false });
                      }
                      catch (error) {
                          console.log(error);
                          return [];
                      }
                      finally {
                          await client.unbind();
                      }
                      const unique = Object.keys(Object.assign({}, ...results.searchEntries));
                      return unique.map((x) => ({
                          name: x,
                          value: x,
                      }));
                  },
                  async getObjectClasses() {
                      const credentials = await this.getCredentials('ldap');
                      const client = await (0, Helpers_1.createLdapClient)(credentials);
                      try {
                          await client.bind(credentials.bindDN, credentials.bindPassword);
                      }
                      catch (error) {
                          await client.unbind();
                          console.log(error);
                          return [];
                      }
                      const baseDN = this.getNodeParameter('baseDN', 0);
                      let results;
                      try {
                          results = await client.search(baseDN, { sizeLimit: 10, paged: false });
                      }
                      catch (error) {
                          console.log(error);
                          return [];
                      }
                      finally {
                          await client.unbind();
                      }
                      const objects = [];
                      for (const entry of results.searchEntries) {
                          if (typeof entry.objectClass === 'string') {
                              objects.push(entry.objectClass);
                          }
                          else {
                              objects.push(...entry.objectClass);
                          }
                      }
                      const unique = [...new Set(objects)];
                      unique.push('custom');
                      const result = [];
                      for (const value of unique) {
                          if (value === 'custom') {
                              result.push({ name: 'custom', value: 'custom' });
                          }
                          else
                              result.push({ name: value, value: `(objectclass=${value})` });
                      }
                      return result;
                  },
                  async getAttributesForDn() {
                      const credentials = await this.getCredentials('ldap');
                      const client = await (0, Helpers_1.createLdapClient)(credentials);
                      try {
                          await client.bind(credentials.bindDN, credentials.bindPassword);
                      }
                      catch (error) {
                          await client.unbind();
                          console.log(error);
                          return [];
                      }
                      let results;
                      const baseDN = this.getNodeParameter('dn', 0);
                      try {
                          results = await client.search(baseDN, { sizeLimit: 1, paged: false });
                      }
                      catch (error) {
                          console.log(error);
                          return [];
                      }
                      finally {
                          await client.unbind();
                      }
                      const unique = Object.keys(Object.assign({}, ...results.searchEntries));
                      return unique.map((x) => ({
                          name: x,
                          value: x,
                      }));
                  },
              },
          };
      }
      async execute() {
          const nodeDebug = this.getNodeParameter('nodeDebug', 0);
          const items = this.getInputData();
          const returnItems = [];
          if (nodeDebug) {
              n8n_workflow_1.LoggerProxy.info(`[${this.getNode().type} | ${this.getNode().name}] - Starting with ${items.length} input items`);
          }
          const credentials = await this.getCredentials('ldap');
          const client = await (0, Helpers_1.createLdapClient)(credentials, nodeDebug, this.getNode().type, this.getNode().name);
          try {
              await client.bind(credentials.bindDN, credentials.bindPassword);
          }
          catch (error) {
              delete error.cert;
              await client.unbind();
              if (this.continueOnFail()) {
                  return [
                      items.map((x) => {
                          x.json.error = error.reason || 'LDAP connection error occurred';
                          return x;
                      }),
                  ];
              }
              else {
                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {});
              }
          }
          const operation = this.getNodeParameter('operation', 0);
          for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
              try {
                  if (operation === 'compare') {
                      const dn = this.getNodeParameter('dn', itemIndex);
                      const attributeId = this.getNodeParameter('id', itemIndex);
                      const value = this.getNodeParameter('value', itemIndex, '');
                      const res = await client.compare(dn, attributeId, value);
                      returnItems.push({
                          json: { dn, attribute: attributeId, result: res },
                          pairedItem: { item: itemIndex },
                      });
                  }
                  else if (operation === 'create') {
                      const dn = this.getNodeParameter('dn', itemIndex);
                      const attributeFields = this.getNodeParameter('attributes', itemIndex);
                      const attributes = {};
                      if (Object.keys(attributeFields).length) {
                          attributeFields.attribute.map((attr) => {
                              attributes[attr.id] = attr.value;
                          });
                      }
                      await client.add(dn, attributes);
                      returnItems.push({
                          json: { dn, result: 'success' },
                          pairedItem: { item: itemIndex },
                      });
                  }
                  else if (operation === 'delete') {
                      const dn = this.getNodeParameter('dn', itemIndex);
                      await client.del(dn);
                      returnItems.push({
                          json: { dn, result: 'success' },
                          pairedItem: { item: itemIndex },
                      });
                  }
                  else if (operation === 'rename') {
                      const dn = this.getNodeParameter('dn', itemIndex);
                      const targetDn = this.getNodeParameter('targetDn', itemIndex);
                      await client.modifyDN(dn, targetDn);
                      returnItems.push({
                          json: { dn: targetDn, result: 'success' },
                          pairedItem: { item: itemIndex },
                      });
                  }
                  else if (operation === 'update') {
                      const dn = this.getNodeParameter('dn', itemIndex);
                      const attributes = this.getNodeParameter('attributes', itemIndex, {});
                      const changes = [];
                      for (const [action, attrs] of Object.entries(attributes)) {
                          attrs.map((attr) => changes.push(new ldapts_1.Change({
                              operation: action,
                              modification: new ldapts_1.Attribute({
                                  type: attr.id,
                                  values: [attr.value],
                              }),
                          })));
                      }
                      await client.modify(dn, changes);
                      returnItems.push({
                          json: { dn, result: 'success', changes },
                          pairedItem: { item: itemIndex },
                      });
                  }
                  else if (operation === 'search') {
                      const baseDN = this.getNodeParameter('baseDN', itemIndex);
                      let searchFor = this.getNodeParameter('searchFor', itemIndex);
                      const returnAll = this.getNodeParameter('returnAll', itemIndex);
                      const limit = this.getNodeParameter('limit', itemIndex, 0);
                      const options = this.getNodeParameter('options', itemIndex);
                      const pageSize = this.getNodeParameter('options.pageSize', itemIndex, 1000);
                      delete options.pageSize;
                      options.sizeLimit = returnAll ? 0 : limit;
                      if (pageSize) {
                          options.paged = { pageSize };
                      }
                      if (typeof options.attributes === 'string') {
                          options.attributes = options.attributes.split(',').map((attribute) => attribute.trim());
                      }
                      options.explicitBufferAttributes = Helpers_1.BINARY_AD_ATTRIBUTES;
                      if (searchFor === 'custom') {
                          searchFor = this.getNodeParameter('customFilter', itemIndex);
                      }
                      else {
                          const searchText = this.getNodeParameter('searchText', itemIndex);
                          const attribute = this.getNodeParameter('attribute', itemIndex);
                          searchFor = `(&${searchFor}(${attribute}=${searchText}))`;
                      }
                      searchFor = searchFor.replace(/\\\\/g, '\\5c');
                      searchFor = searchFor.replace(/\\\*/g, '\\2a');
                      searchFor = searchFor.replace(/\\\(/g, '\\28');
                      searchFor = searchFor.replace(/\\\)/g, '\\29');
                      options.filter = searchFor;
                      if (nodeDebug) {
                          n8n_workflow_1.LoggerProxy.info(`[${this.getNode().type} | ${this.getNode().name}] - Search Options ${JSON.stringify(options, null, 2)}`);
                      }
                      const results = await client.search(baseDN, options);
                      if (!returnAll) {
                          results.searchEntries = results.searchEntries.slice(0, limit);
                      }
                      (0, Helpers_1.resolveBinaryAttributes)(results.searchEntries);
                      returnItems.push.apply(returnItems, results.searchEntries.map((result) => ({
                          json: result,
                          pairedItem: { item: itemIndex },
                      })));
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnItems.push({ json: items[itemIndex].json, error, pairedItem: itemIndex });
                  }
                  else {
                      await client.unbind();
                      if (error.context) {
                          error.context.itemIndex = itemIndex;
                          throw error;
                      }
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
                          itemIndex,
                      });
                  }
              }
          }
          if (nodeDebug) {
              n8n_workflow_1.LoggerProxy.info(`[${this.getNode().type} | ${this.getNode().name}] - Finished`);
          }
          await client.unbind();
          return [returnItems];
      }
  }
  exports.Ldap = Ldap;
  //# sourceMappingURL=Ldap.node.js.map

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

  # LDAP

  This node allows you to interact with your LDAP servers to create, find, and update objects.

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

  ## Operations

  * [**Compare**](#compare) an attribute
  * [**Create**](#create) a new entry
  * [**Delete**](#delete) an entry
  * [**Rename**](#rename) the DN of an existing entry
  * [**Search**](#search) LDAP
  * [**Update**](#update) attributes

  Refer to the sections below for details on configuring the node for each operation.

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

  ## Compare

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **DN**: Enter the Distinguished Name (DN) of the entry to compare.
  * **Attribute ID**: Enter the ID of the attribute to compare.
  * **Value**: Enter the value to compare.

  ## Create

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **DN**: Enter the Distinguished Name (DN) of the entry to create.
  * **Attributes**: Add the **Attribute ID**/**Value** pairs you'd like to create.

  ## Delete

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **DN**: Enter the Distinguished Name (DN) of the entry to be deleted.

  ## Rename

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **DN**: Enter the current Distinguished Name (DN) of the entry to rename.
  * **New DN**: Enter the new Distinguished Name (DN) for the entry in this field.

  ## Search

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **Base DN**: Enter the Distinguished Name (DN) of the subtree to search in.
  * **Search For**: Select the directory object class to search for.
  * **Attribute**: Select the attribute to search for.
  * **Search Text**: Enter the text to search for. Use `*` for a wildcard.
  * **Return All**: When turned on, the node will return all results. When turned off, the node will return results up to the set **Limit**.
  * **Limit**: Only available when you turn off **Return All**. Enter the maximum number of results to return.

  ### Search options

  You can also configure this operation using these options:

  * **Attribute Names or IDs**: Enter a comma-separated list of attributes to return. Choose from the list or specify IDs using an expression.
  * **Page Size**: Enter the maximum number of results to request at one time. Set to 0 to disable paging.
  * **Scopes**: The set of entries at or below the **Base DN** to search for potential matches. Select from:
      * **Base Tree**: Often referred to as subordinateSubtree or just "subordinates," selecting this option will search the subordinates of the **Base DN** entry but not the **Base DN** entry itself.
      * **Single Level**: Often referred to as "one," selecting this option will search only the immediate children of the **Base DN** entry.
      * **Whole Subtree**: Often referred to as "sub," selecting this option will search the **Base DN** entry and all its subordinates to any depth.

  Refer to [The LDAP Search Operation](https://ldap.com/the-ldap-search-operation/){:target="_blank" .external-link} for more information on search scopes.

  ## Update

  Configure this operation using these parameters:

  * **Credential to connect with**: Select or create an [LDAP credential](/integrations/builtin/credentials/ldap.md) to connect with.
  * **DN**: Enter the Distinguished Name (DN) of the entry to update.
  * ***Update Attributes**: Select whether to **Add** new, **Remove** existing, or **Replace** existing attribute.
  * Then enter the **Attribute ID**/**Value** pair you'd like to update.

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Line
name: Line
display_name: Line
description: Consume Line API
category: input
icon: file:line.png
code_hash: c8d8b4834af3201e0b176fa5da6263bbb5882a92e7a82b42f8d86470310e9fda
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Line
documentation_title: Line node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"line","description":"Templates for line"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:14
updated_at: 2025-06-09 15:18:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Line = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const NotificationDescription_1 = require("./NotificationDescription");
  class Line {
      constructor() {
          this.description = {
              displayName: 'Line',
              name: 'line',
              icon: 'file:line.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Line API',
              defaults: {
                  name: 'Line',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'lineNotifyOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['notification'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Notification',
                              value: 'notification',
                          },
                      ],
                      default: 'notification',
                  },
                  ...NotificationDescription_1.notificationOperations,
                  ...NotificationDescription_1.notificationFields,
              ],
          };
      }
      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 === 'notification') {
                      if (operation === 'send') {
                          const message = this.getNodeParameter('message', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              message,
                          };
                          Object.assign(body, additionalFields);
                          if (body.hasOwnProperty('notificationDisabled')) {
                              body.notificationDisabled = body.notificationDisabled ? 'true' : 'false';
                          }
                          if (body.stickerUi) {
                              const sticker = body.stickerUi.stickerValue;
                              if (sticker) {
                                  body.stickerId = sticker.stickerId;
                                  body.stickerPackageId = sticker.stickerPackageId;
                              }
                              delete body.stickerUi;
                          }
                          if (body.imageUi) {
                              const image = body.imageUi.imageValue;
                              if (image && image.binaryData === true) {
                                  const binaryProperty = image.binaryProperty;
                                  const binaryData = this.helpers.assertBinaryData(i, binaryProperty);
                                  const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryProperty);
                                  body.imageFile = {
                                      value: binaryDataBuffer,
                                      options: {
                                          filename: binaryData.fileName,
                                      },
                                  };
                              }
                              else {
                                  body.imageFullsize = image.imageFullsize;
                                  body.imageThumbnail = image.imageThumbnail;
                              }
                              delete body.imageUi;
                          }
                          responseData = await GenericFunctions_1.lineApiRequest.call(this, 'POST', '', {}, {}, 'https://notify-api.line.me/api/notify', { formData: body });
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Line = Line;
  //# sourceMappingURL=Line.node.js.map

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

  # Line node

  <!-- vale off -->
  /// warning | Deprecated: End of service
  LINE Notify is discontinuing service as of April 1st 2025 and this node will no longer work after that date. View LINE Notify's [end of service announement](https://notify-bot.line.me/closing-announce){:target=_blank .external-link} for more information.
  ///
  <!-- vale on -->

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

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

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

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

  ## Operations

  * Notification
      * Sends notifications to users or groups

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.LocalFileTrigger
name: LocalFileTrigger
display_name: Local File Trigger
description: Triggers a workflow on file system changes
category: trigger
icon: fa:folder-open
code_hash: 0b091f165d93567d21a8b943d4cab4e6fd20ccf85e00e1d733456047688a0737
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.LocalFileTrigger
documentation_title: Local File Trigger node documentation
operations: []
api_methods: []
templates: [{"name":"local-file-trigger","description":"Templates for local-file-trigger"}]
related_resources: []
required_scopes: []
example_parameters: {"pollTimes":{"item":[{"mode":"everyMinute"}]}}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LocalFileTrigger = void 0;
  const chokidar_1 = require("chokidar");
  class LocalFileTrigger {
      constructor() {
          this.description = {
              displayName: 'Local File Trigger',
              name: 'localFileTrigger',
              icon: 'fa:folder-open',
              group: ['trigger'],
              version: 1,
              subtitle: '=Path: {{$parameter["path"]}}',
              description: 'Triggers a workflow on file system changes',
              eventTriggerDescription: '',
              defaults: {
                  name: 'Local File Trigger',
                  color: '#404040',
              },
              triggerPanel: {
                  header: '',
                  executionsHelp: {
                      inactive: "<b>While building your workflow</b>, click the 'listen' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a change is detected, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                      active: "<b>While building your workflow</b>, click the 'listen' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a change is detected, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                  },
                  activationHint: "Once you’ve finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously (you just won’t see those executions here).",
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Trigger On',
                      name: 'triggerOn',
                      type: 'options',
                      options: [
                          {
                              name: 'Changes to a Specific File',
                              value: 'file',
                          },
                          {
                              name: 'Changes Involving a Specific Folder',
                              value: 'folder',
                          },
                      ],
                      required: true,
                      default: '',
                  },
                  {
                      displayName: 'File to Watch',
                      name: 'path',
                      type: 'string',
                      displayOptions: {
                          show: {
                              triggerOn: ['file'],
                          },
                      },
                      default: '',
                      placeholder: '/data/invoices/1.pdf',
                  },
                  {
                      displayName: 'Folder to Watch',
                      name: 'path',
                      type: 'string',
                      displayOptions: {
                          show: {
                              triggerOn: ['folder'],
                          },
                      },
                      default: '',
                      placeholder: '/data/invoices',
                  },
                  {
                      displayName: 'Watch for',
                      name: 'events',
                      type: 'multiOptions',
                      displayOptions: {
                          show: {
                              triggerOn: ['folder'],
                          },
                      },
                      options: [
                          {
                              name: 'File Added',
                              value: 'add',
                              description: 'Triggers whenever a new file was added',
                          },
                          {
                              name: 'File Changed',
                              value: 'change',
                              description: 'Triggers whenever a file was changed',
                          },
                          {
                              name: 'File Deleted',
                              value: 'unlink',
                              description: 'Triggers whenever a file was deleted',
                          },
                          {
                              name: 'Folder Added',
                              value: 'addDir',
                              description: 'Triggers whenever a new folder was added',
                          },
                          {
                              name: 'Folder Deleted',
                              value: 'unlinkDir',
                              description: 'Triggers whenever a folder was deleted',
                          },
                      ],
                      required: true,
                      default: [],
                      description: 'The events to listen to',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Include Linked Files/Folders',
                              name: 'followSymlinks',
                              type: 'boolean',
                              default: true,
                              description: 'Whether linked files/folders will also be watched (this includes symlinks, aliases on MacOS and shortcuts on Windows). Otherwise only the links themselves will be monitored).',
                          },
                          {
                              displayName: 'Ignore',
                              name: 'ignored',
                              type: 'string',
                              default: '',
                              placeholder: '**/*.txt',
                              description: 'Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href="https://github.com/micromatch/anymatch">Anymatch</a>- syntax.',
                          },
                          {
                              displayName: 'Max Folder Depth',
                              name: 'depth',
                              type: 'options',
                              options: [
                                  {
                                      name: '1 Levels Down',
                                      value: 1,
                                  },
                                  {
                                      name: '2 Levels Down',
                                      value: 2,
                                  },
                                  {
                                      name: '3 Levels Down',
                                      value: 3,
                                  },
                                  {
                                      name: '4 Levels Down',
                                      value: 4,
                                  },
                                  {
                                      name: '5 Levels Down',
                                      value: 5,
                                  },
                                  {
                                      name: 'Top Folder Only',
                                      value: 0,
                                  },
                                  {
                                      name: 'Unlimited',
                                      value: -1,
                                  },
                              ],
                              default: -1,
                              description: 'How deep into the folder structure to watch for changes',
                          },
                      ],
                  },
              ],
          };
      }
      async trigger() {
          const triggerOn = this.getNodeParameter('triggerOn');
          const path = this.getNodeParameter('path');
          const options = this.getNodeParameter('options', {});
          let events;
          if (triggerOn === 'file') {
              events = ['change'];
          }
          else {
              events = this.getNodeParameter('events', []);
          }
          const watcher = (0, chokidar_1.watch)(path, {
              ignored: options.ignored === '' ? undefined : options.ignored,
              persistent: true,
              ignoreInitial: true,
              followSymlinks: options.followSymlinks === undefined ? true : options.followSymlinks,
              depth: [-1, undefined].includes(options.depth)
                  ? undefined
                  : options.depth,
          });
          const executeTrigger = (event, pathString) => {
              this.emit([this.helpers.returnJsonArray([{ event, path: pathString }])]);
          };
          for (const eventName of events) {
              watcher.on(eventName, (pathString) => executeTrigger(eventName, pathString));
          }
          async function closeFunction() {
              return watcher.close();
          }
          return {
              closeFunction,
          };
      }
  }
  exports.LocalFileTrigger = LocalFileTrigger;
  //# sourceMappingURL=LocalFileTrigger.node.js.map

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

  # Local File Trigger node

  The Local File Trigger node starts a workflow when it detects changes on the file system. These changes involve a file or folder getting added, changed, or deleted.

  /// note | Self-hosted n8n only
  This node isn't available on n8n Cloud.
  ///

  ## Node parameters

  You can choose what event to watch for using the **Trigger On** parameter.

  ## Changes to a Specific File

  The node triggers when the specified file changes.

  Enter the path for the file to watch in **File to Watch**.

  ## Changes Involving a Specific Folder

  The node triggers when a change occurs in the selected folder.

  Configure these parameters:

  - **Folder to Watch**: Enter the path of the folder to watch.
  - **Watch for**: Select the type of change to watch for.


  ## Node options

  Use the node **Options** to include or exclude files and folders.

  - **Include Linked Files/Folders**: also watch for changes to linked files or folders.
  - **Ignore**: files or paths to ignore. n8n tests the whole path, not just the filename. Supports the [Anymatch](https://github.com/micromatch/anymatch){:target=_blank .external-link} syntax.
  - **Max Folder Depth**: how deep into the folder structure to watch for changes.

  ### Examples for Ignore

  Ignore a single file:

  ```sh
  **/<fileName>.<suffix>
  # For example, **/myfile.txt
  ```

  Ignore a sub-directory of a directory you're watching:

  ```sh
  **/<directoryName>/**
  # For example, **/myDirectory/**
  ```

  ## Templates and examples

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

documentation_examples:
  [{"type":"text","language":"sh","code":"**/<fileName>.<suffix>\n# For example, **/myfile.txt","title":"Examples for Ignore"},{"type":"text","language":"sh","code":"**/<directoryName>/**\n# For example, **/myDirectory/**","title":"Examples for Ignore"}]

example_workflow:
  {"name":"Local File Trigger Example Workflow","nodes":[{"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]}},"id":"0zplew0zgc3hcp797rtosje","name":"Local File Trigger","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Mqtt
name: Mqtt
display_name: MQTT
description: Push messages to MQTT
category: input
icon: file:mqtt.svg
code_hash: c7e9512bc7eb28a8164578ac33ccffc5611b5e868085382db1767c98ad72f553
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mqtt
documentation_title: MQTT node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mqtt","description":"Templates for mqtt"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
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.Mqtt = void 0;
  const mqtt = __importStar(require("mqtt"));
  const utilities_1 = require("../../utils/utilities");
  class Mqtt {
      constructor() {
          this.description = {
              displayName: 'MQTT',
              name: 'mqtt',
              icon: 'file:mqtt.svg',
              group: ['input'],
              version: 1,
              description: 'Push messages to MQTT',
              defaults: {
                  name: 'MQTT',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mqtt',
                      required: true,
                      testedBy: 'mqttConnectionTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Topic',
                      name: 'topic',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'The topic to publish to',
                  },
                  {
                      displayName: 'Send Input Data',
                      name: 'sendInputData',
                      type: 'boolean',
                      default: true,
                      description: 'Whether to send the the data the node receives as JSON',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              sendInputData: [false],
                          },
                      },
                      default: '',
                      description: 'The message to publish',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'QoS',
                              name: 'qos',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Received at Most Once',
                                      value: 0,
                                  },
                                  {
                                      name: 'Received at Least Once',
                                      value: 1,
                                  },
                                  {
                                      name: 'Exactly Once',
                                      value: 2,
                                  },
                              ],
                              default: 0,
                              description: 'QoS subscription level',
                          },
                          {
                              displayName: 'Retain',
                              name: 'retain',
                              type: 'boolean',
                              default: false,
                              description: 'Normally if a publisher publishes a message to a topic, and no one is subscribed to that topic the message is simply discarded by the broker. However the publisher can tell the broker to keep the last message on that topic by setting the retain flag to true.',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async mqttConnectionTest(credential) {
                      const credentials = credential.data;
                      try {
                          const protocol = credentials.protocol || 'mqtt';
                          const host = credentials.host;
                          const brokerUrl = `${protocol}://${host}`;
                          const port = credentials.port || 1883;
                          const clientId = credentials.clientId || `mqttjs_${Math.random().toString(16).substr(2, 8)}`;
                          const clean = credentials.clean;
                          const ssl = credentials.ssl;
                          const ca = (0, utilities_1.formatPrivateKey)(credentials.ca);
                          const cert = (0, utilities_1.formatPrivateKey)(credentials.cert);
                          const key = (0, utilities_1.formatPrivateKey)(credentials.key);
                          const rejectUnauthorized = credentials.rejectUnauthorized;
                          let client;
                          if (!ssl) {
                              const clientOptions = {
                                  port,
                                  clean,
                                  clientId,
                              };
                              if (credentials.username && credentials.password) {
                                  clientOptions.username = credentials.username;
                                  clientOptions.password = credentials.password;
                              }
                              client = mqtt.connect(brokerUrl, clientOptions);
                          }
                          else {
                              const clientOptions = {
                                  port,
                                  clean,
                                  clientId,
                                  ca,
                                  cert,
                                  key,
                                  rejectUnauthorized,
                              };
                              if (credentials.username && credentials.password) {
                                  clientOptions.username = credentials.username;
                                  clientOptions.password = credentials.password;
                              }
                              client = mqtt.connect(brokerUrl, clientOptions);
                          }
                          await new Promise((resolve, reject) => {
                              client.on('connect', (test) => {
                                  resolve(test);
                                  client.end();
                              });
                              client.on('error', (error) => {
                                  client.end();
                                  reject(error);
                              });
                          });
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const length = items.length;
          const credentials = await this.getCredentials('mqtt');
          const protocol = credentials.protocol || 'mqtt';
          const host = credentials.host;
          const brokerUrl = `${protocol}://${host}`;
          const port = credentials.port || 1883;
          const clientId = credentials.clientId || `mqttjs_${Math.random().toString(16).substr(2, 8)}`;
          const clean = credentials.clean;
          const ssl = credentials.ssl;
          const ca = credentials.ca;
          const cert = credentials.cert;
          const key = credentials.key;
          const rejectUnauthorized = credentials.rejectUnauthorized;
          let client;
          if (!ssl) {
              const clientOptions = {
                  port,
                  clean,
                  clientId,
              };
              if (credentials.username && credentials.password) {
                  clientOptions.username = credentials.username;
                  clientOptions.password = credentials.password;
              }
              client = mqtt.connect(brokerUrl, clientOptions);
          }
          else {
              const clientOptions = {
                  port,
                  clean,
                  clientId,
                  ca,
                  cert,
                  key,
                  rejectUnauthorized,
              };
              if (credentials.username && credentials.password) {
                  clientOptions.username = credentials.username;
                  clientOptions.password = credentials.password;
              }
              client = mqtt.connect(brokerUrl, clientOptions);
          }
          const sendInputData = this.getNodeParameter('sendInputData', 0);
          const data = await new Promise((resolve, reject) => {
              client.on('connect', () => {
                  for (let i = 0; i < length; i++) {
                      let message;
                      const topic = this.getNodeParameter('topic', i);
                      const options = this.getNodeParameter('options', i);
                      try {
                          if (sendInputData) {
                              message = JSON.stringify(items[i].json);
                          }
                          else {
                              message = this.getNodeParameter('message', i);
                          }
                          client.publish(topic, message, options);
                      }
                      catch (e) {
                          reject(e);
                      }
                  }
                  client.end(false, {}, () => {
                      resolve([items]);
                  });
                  client.on('error', (e) => {
                      reject(e);
                  });
              });
          });
          return data;
      }
  }
  exports.Mqtt = Mqtt;
  //# sourceMappingURL=Mqtt.node.js.map

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

  # MQTT node

  Use the MQTT node to automate work in MQTT, and integrate MQTT with other applications. n8n supports transporting messages with MQTT.

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

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

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

  ## Operations

  Use the MQTT node to send a message. You can set the message topic, and choose whether to send the node input data as part of the message.

  ## Templates and examples

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

  ## Related resources

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

  Refer to [MQTT's documentation](https://mqtt.org/getting-started/){:target=_blank .external-link} for more information about the service.

related_resources:
  [{"title":"here","url":"/integrations/builtin/trigger-nodes/n8n-nodes-base.mqtttrigger.md","type":"documentation"},{"title":"MQTT's documentation","url":"https://mqtt.org/getting-started/","type":"external"}]

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


node_type: n8n-nodes-base.LinkedIn
name: LinkedIn
display_name: LinkedIn
description: Consume LinkedIn API
category: input
icon: file:linkedin.svg
code_hash: 1148fe37efdd5c3bbaee912c4f44399c3e83f8a16501e9aaa0ad2ba84214b8ef
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.LinkedIn
documentation_title: LinkedIn node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"linkedin","description":"Templates for linkedin"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinkedIn = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const PostDescription_1 = require("./PostDescription");
  class LinkedIn {
      constructor() {
          this.description = {
              displayName: 'LinkedIn',
              name: 'linkedIn',
              icon: 'file:linkedin.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume LinkedIn API',
              defaults: {
                  name: 'LinkedIn',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'linkedInOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Post',
                              value: 'post',
                          },
                      ],
                      default: 'post',
                  },
                  ...PostDescription_1.postOperations,
                  ...PostDescription_1.postFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getPersonUrn() {
                      const returnData = [];
                      const person = await GenericFunctions_1.linkedInApiRequest.call(this, 'GET', '/me', {});
                      returnData.push({
                          name: `${person.localizedFirstName} ${person.localizedLastName}`,
                          value: person.id,
                      });
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let body = {};
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'post') {
                      if (operation === 'create') {
                          const text = this.getNodeParameter('text', i);
                          const shareMediaCategory = this.getNodeParameter('shareMediaCategory', i);
                          const postAs = this.getNodeParameter('postAs', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          let authorUrn = '';
                          let visibility = 'PUBLIC';
                          if (postAs === 'person') {
                              const personUrn = this.getNodeParameter('person', i);
                              visibility = additionalFields.visibility || 'PUBLIC';
                              authorUrn = `urn:li:person:${personUrn}`;
                          }
                          else {
                              const organizationUrn = this.getNodeParameter('organization', i);
                              authorUrn = `urn:li:organization:${organizationUrn}`;
                          }
                          let description = '';
                          let title = '';
                          let originalUrl = '';
                          body = {
                              author: authorUrn,
                              lifecycleState: 'PUBLISHED',
                              distribution: {
                                  feedDistribution: 'MAIN_FEED',
                                  thirdPartyDistributionChannels: [],
                              },
                              visibility,
                          };
                          if (shareMediaCategory === 'IMAGE') {
                              if (additionalFields.title) {
                                  title = additionalFields.title;
                              }
                              const registerRequest = {
                                  initializeUploadRequest: {
                                      owner: authorUrn,
                                  },
                              };
                              const registerObject = await GenericFunctions_1.linkedInApiRequest.call(this, 'POST', '/images?action=initializeUpload', registerRequest);
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              this.helpers.assertBinaryData(i, binaryPropertyName);
                              const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                              const { uploadUrl, image } = registerObject.value;
                              await GenericFunctions_1.linkedInApiRequest.call(this, 'POST', uploadUrl, buffer, true);
                              const imageBody = {
                                  content: {
                                      media: {
                                          title,
                                          id: image,
                                      },
                                  },
                                  commentary: text,
                              };
                              Object.assign(body, imageBody);
                          }
                          else if (shareMediaCategory === 'ARTICLE') {
                              if (additionalFields.description) {
                                  description = additionalFields.description;
                              }
                              if (additionalFields.title) {
                                  title = additionalFields.title;
                              }
                              if (additionalFields.originalUrl) {
                                  originalUrl = additionalFields.originalUrl;
                              }
                              const articleBody = {
                                  content: {
                                      article: {
                                          title,
                                          description,
                                          source: originalUrl,
                                      },
                                  },
                                  commentary: text,
                              };
                              Object.assign(body, articleBody);
                              if (description === '') {
                                  delete body.description;
                              }
                              if (title === '') {
                                  delete body.title;
                              }
                          }
                          else {
                              Object.assign(body, { commentary: text });
                          }
                          const endpoint = '/posts';
                          responseData = await GenericFunctions_1.linkedInApiRequest.call(this, 'POST', endpoint, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.LinkedIn = LinkedIn;
  //# sourceMappingURL=LinkedIn.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinkedInOAuth2Api = void 0;
  class LinkedInOAuth2Api {
      constructor() {
          this.name = 'linkedInOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'LinkedIn OAuth2 API';
          this.documentationUrl = 'linkedIn';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Organization Support',
                  name: 'organizationSupport',
                  type: 'boolean',
                  default: true,
                  description: 'Whether to request permissions to post as an organization',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://www.linkedin.com/oauth/v2/authorization',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://www.linkedin.com/oauth/v2/accessToken',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":",r_liteprofile,r_emailaddress"}}',
                  description: 'Standard scopes for posting on behalf of a user or organization. See <a href="https://docs.microsoft.com/en-us/linkedin/marketing/getting-started#available-permissions"> this resource </a>.',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.LinkedInOAuth2Api = LinkedInOAuth2Api;
  //# sourceMappingURL=LinkedInOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LinkedInOAuth2Api = void 0;
  class LinkedInOAuth2Api {
      constructor() {
          this.name = 'linkedInOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'LinkedIn OAuth2 API';
          this.documentationUrl = 'linkedIn';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Organization Support',
                  name: 'organizationSupport',
                  type: 'boolean',
                  default: true,
                  description: 'Whether to request permissions to post as an organization',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://www.linkedin.com/oauth/v2/authorization',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://www.linkedin.com/oauth/v2/accessToken',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":",r_liteprofile,r_emailaddress"}}',
                  description: 'Standard scopes for posting on behalf of a user or organization. See <a href="https://docs.microsoft.com/en-us/linkedin/marketing/getting-started#available-permissions"> this resource </a>.',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.LinkedInOAuth2Api = LinkedInOAuth2Api;
  //# sourceMappingURL=LinkedInOAuth2Api.credentials.js.map

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

  # LinkedIn node

  Use the LinkedIn node to automate work in LinkedIn, and integrate LinkedIn with other applications. n8n supports creating posts.

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

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

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

  ## Operations

  * Post
      * Create

  ## Parameters

  * **Post As**: choose whether to post as a **Person** or **Organization**.
  * **Person Name or ID** and **Organization URN**: enter an identifier for the person or organization.

  	/// note | Posting as organization
  	If posting as an Organization enter the organization number in the URN field. For example, `03262013` not `urn:li:company:03262013`.
  	///
  	
  * **Text**: the post contents.
  * **Media Category**: use this when including images or article URLs in your post.

  ## Templates and examples

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

  ## Related resources

  Refer to [LinkedIn's API documentation](https://learn.microsoft.com/en-us/linkedin/){:target=_blank .external-link} for more information about the service.

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

related_resources:
  [{"title":"LinkedIn's API documentation","url":"https://learn.microsoft.com/en-us/linkedin/","type":"external"}]

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


node_type: n8n-nodes-base.LoneScale
name: LoneScale
display_name: LoneScale
description: Create List, add / delete items
category: transform
icon: file:lonescale-logo.svg
code_hash: 87192faf002fbba84590b3c3dd0d367a26378865321adb7fd5cf70349fec00e3
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.LoneScale
documentation_title: LoneScale node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"lonescale","description":"Templates for lonescale"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.LoneScale = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class LoneScale {
      constructor() {
          this.description = {
              displayName: 'LoneScale',
              name: 'loneScale',
              group: ['transform'],
              icon: 'file:lonescale-logo.svg',
              version: 1,
              description: 'Create List, add / delete items',
              subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
              defaults: {
                  name: 'LoneScale',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'loneScaleApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      options: [
                          {
                              name: 'List',
                              value: 'list',
                              description: 'Manipulate list',
                          },
                          {
                              name: 'Item',
                              value: 'item',
                              description: 'Manipulate item',
                          },
                      ],
                      default: 'list',
                      noDataExpression: true,
                      required: true,
                      description: 'Create a new list',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['list'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a list',
                              action: 'Create a list',
                          },
                      ],
                      default: 'create',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['item'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'add',
                              description: 'Create an item',
                              action: 'Create a item',
                          },
                      ],
                      default: 'add',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'Type',
                      name: 'type',
                      type: 'options',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['item'],
                          },
                      },
                      options: [
                          {
                              name: 'Company',
                              value: 'COMPANY',
                              description: 'List of company',
                          },
                          {
                              name: 'Contact',
                              value: 'PEOPLE',
                              description: 'List of contact',
                          },
                      ],
                      default: 'PEOPLE',
                      description: 'Type of your list',
                      noDataExpression: true,
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['item'],
                          },
                      },
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                          loadOptionsDependsOn: ['type'],
                      },
                      default: '',
                      description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
                      required: true,
                  },
                  {
                      displayName: 'First Name',
                      name: 'first_name',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['item'],
                              type: ['PEOPLE'],
                          },
                      },
                      default: '',
                      description: 'Contact first name',
                      required: true,
                  },
                  {
                      displayName: 'Last Name',
                      name: 'last_name',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['item'],
                              type: ['PEOPLE'],
                          },
                      },
                      default: '',
                      description: 'Contact last name',
                      required: true,
                  },
                  {
                      displayName: 'Company Name',
                      name: 'company_name',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['item'],
                              type: ['COMPANY'],
                          },
                      },
                      default: '',
                      description: 'Contact company name',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'peopleAdditionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['item'],
                              type: ['PEOPLE'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Full Name',
                              name: 'full_name',
                              type: 'string',
                              default: '',
                              description: 'Contact full name',
                          },
                          {
                              displayName: 'Contact Email',
                              name: 'email',
                              type: 'string',
                              placeholder: 'name@email.com',
                              default: '',
                          },
                          {
                              displayName: 'Company Name',
                              name: 'company_name',
                              type: 'string',
                              default: '',
                              description: 'Contact company name',
                          },
                          {
                              displayName: 'Current Position',
                              name: 'current_position',
                              type: 'string',
                              default: '',
                              description: 'Contact current position',
                          },
                          {
                              displayName: 'Company Domain',
                              name: 'domain',
                              type: 'string',
                              default: '',
                              description: 'Contact company domain',
                          },
                          {
                              displayName: 'Linkedin Url',
                              name: 'linkedin_url',
                              type: 'string',
                              default: '',
                              description: 'Contact Linkedin URL',
                          },
                          {
                              displayName: 'Contact Location',
                              name: 'location',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Contact ID',
                              name: 'contact_id',
                              type: 'string',
                              default: '',
                              description: 'Contact ID from your source',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'companyAdditionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['item'],
                              type: ['COMPANY'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Linkedin Url',
                              name: 'linkedin_url',
                              type: 'string',
                              default: '',
                              description: 'Company Linkedin URL',
                          },
                          {
                              displayName: 'Company Domain',
                              name: 'domain',
                              type: 'string',
                              default: '',
                              description: 'Company company domain',
                          },
                          {
                              displayName: 'Contact Location',
                              name: 'location',
                              type: 'string',
                              default: '',
                          },
                          {
                              displayName: 'Contact ID',
                              name: 'contact_id',
                              type: 'string',
                              default: '',
                              description: 'Contact ID from your source',
                          },
                      ],
                  },
                  {
                      displayName: 'Name',
                      name: 'name',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['list'],
                          },
                      },
                      default: '',
                      placeholder: 'list name',
                      description: 'Name of your list',
                  },
                  {
                      displayName: 'Type',
                      name: 'type',
                      type: 'options',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['list'],
                          },
                      },
                      options: [
                          {
                              name: 'Company',
                              value: 'COMPANY',
                              description: 'Create a list of companies',
                              action: 'Create a list of companies',
                          },
                          {
                              name: 'Contact',
                              value: 'PEOPLE',
                              description: 'Create a list of contacts',
                              action: 'Create a list of contacts',
                          },
                      ],
                      default: 'COMPANY',
                      description: 'Type of your list',
                      noDataExpression: true,
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLists() {
                      var _a;
                      const type = this.getNodeParameter('type');
                      const data = await GenericFunctions_1.lonescaleApiRequest.call(this, 'GET', '/lists', {}, { entity: type });
                      return (_a = data === null || data === void 0 ? void 0 : data.list) === null || _a === void 0 ? void 0 : _a.filter((l) => l.entity === type).map((d) => ({
                          name: d.name,
                          value: d.id,
                      }));
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          let responseData;
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'list') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const entity = this.getNodeParameter('type', i);
                          const body = {
                              name,
                              entity,
                          };
                          responseData = await GenericFunctions_1.lonescaleApiRequest.call(this, 'POST', '/lists', body);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
                  if (resource === 'item') {
                      if (operation === 'add') {
                          let firstName = '';
                          let lastName = '';
                          let currentPosition = '';
                          let fullName = '';
                          let email = '';
                          let linkedinUrl = '';
                          let companyName = '';
                          let domain = '';
                          let location = '';
                          let contactId = '';
                          const entity = this.getNodeParameter('type', i);
                          const listId = this.getNodeParameter('list', i);
                          if (entity === 'PEOPLE') {
                              const peopleAdditionalFields = this.getNodeParameter('peopleAdditionalFields', i);
                              firstName = this.getNodeParameter('first_name', i);
                              lastName = this.getNodeParameter('last_name', i);
                              fullName = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.full_name;
                              currentPosition = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.current_position;
                              email = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.email;
                              linkedinUrl = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.linkedin_url;
                              companyName = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.company_name;
                              domain = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.domain;
                              location = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.location;
                              contactId = peopleAdditionalFields === null || peopleAdditionalFields === void 0 ? void 0 : peopleAdditionalFields.contact_id;
                          }
                          if (entity === 'COMPANY') {
                              const companyAdditionalFields = this.getNodeParameter('companyAdditionalFields', i);
                              companyName = this.getNodeParameter('company_name', i);
                              linkedinUrl = companyAdditionalFields === null || companyAdditionalFields === void 0 ? void 0 : companyAdditionalFields.linkedin_url;
                              domain = companyAdditionalFields === null || companyAdditionalFields === void 0 ? void 0 : companyAdditionalFields.domain;
                              location = companyAdditionalFields === null || companyAdditionalFields === void 0 ? void 0 : companyAdditionalFields.location;
                              contactId = companyAdditionalFields === null || companyAdditionalFields === void 0 ? void 0 : companyAdditionalFields.contact_id;
                          }
                          const body = {
                              ...(firstName && { first_name: firstName }),
                              ...(lastName && { last_name: lastName }),
                              ...(fullName && { full_name: fullName }),
                              ...(linkedinUrl && { linkedin_url: linkedinUrl }),
                              ...(companyName && { company_name: companyName }),
                              ...(currentPosition && { current_position: currentPosition }),
                              ...(domain && { domain }),
                              ...(location && { location }),
                              ...(email && { email }),
                              ...(contactId && { contact_id: contactId }),
                          };
                          responseData = await GenericFunctions_1.lonescaleApiRequest.call(this, 'POST', `/lists/${listId}/item`, body);
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.LoneScale = LoneScale;
  //# sourceMappingURL=LoneScale.node.js.map

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

  // --- Next Credential File ---

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

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

  # LoneScale node

  Use the LoneScale node to automate work in LoneScale and integrate LoneScale with other applications. n8n has built-in support for managing Lists and Items in LoneScale. 

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

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

  ## Operations

  * List
  	* Create
  * Item
  	* Create

  ## Templates and examples

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

  ## Related resources

  Refer to [LoneScales documentation](https://help-center.lonescale.com/en/articles/6454360-lonescale-public-api){:target=_blank .external-link} for more information about the service.

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

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

related_resources:
  [{"title":"LoneScales documentation","url":"https://help-center.lonescale.com/en/articles/6454360-lonescale-public-api","type":"external"},{"title":"here","url":"/integrations/builtin/trigger-nodes/n8n-nodes-base.lonescaletrigger.md","type":"documentation"}]

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


node_type: n8n-nodes-base.Mailcheck
name: Mailcheck
display_name: Mailcheck
description: Consume Mailcheck API
category: transform
icon: file:mailcheck.svg
code_hash: fafaa5f9e5c5d8581945d83f9a43dc10f497291843cc011649f4f65d84a2fcdc
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mailcheck
documentation_title: Mailcheck node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mailcheck","description":"Templates for mailcheck"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mailcheck = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Mailcheck {
      constructor() {
          this.description = {
              displayName: 'Mailcheck',
              name: 'mailcheck',
              icon: 'file:mailcheck.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mailcheck API',
              defaults: {
                  name: 'Mailcheck',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mailcheckApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Email',
                              value: 'email',
                          },
                      ],
                      default: 'email',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['email'],
                          },
                      },
                      options: [
                          {
                              name: 'Check',
                              value: 'check',
                              action: 'Check an email',
                          },
                      ],
                      default: 'check',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      displayOptions: {
                          show: {
                              resource: ['email'],
                              operation: ['check'],
                          },
                      },
                      default: '',
                      description: 'Email address to check',
                  },
              ],
          };
      }
      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 === 'email') {
                      if (operation === 'check') {
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.mailCheckApiRequest.call(this, 'POST', '/singleEmail:check', {
                              email,
                          });
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
              if (Array.isArray(responseData)) {
                  returnData.push.apply(returnData, responseData);
              }
              else {
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Mailcheck = Mailcheck;
  //# sourceMappingURL=Mailcheck.node.js.map

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

  // --- Next Credential File ---

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

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

  # Mailcheck node

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

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

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

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

  ## Operations

  * Email
      * Check

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Mailchimp
name: Mailchimp
display_name: Mailchimp
description: Consume Mailchimp API
category: output
icon: file:mailchimp.svg
code_hash: f2caad087950dacb0627fb1424523c92a542b7bedb79535d47eb21809f69f722
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mailchimp
documentation_title: Mailchimp node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mailchimp","description":"Templates for mailchimp"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:15
updated_at: 2025-06-09 15:18:15
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.Mailchimp = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_1 = __importDefault(require("moment"));
  var Status;
  (function (Status) {
      Status["subscribe"] = "subscribe";
      Status["unsubscribed"] = "unsubscribe";
      Status["cleaned"] = "cleaned";
      Status["pending"] = "pending";
      Status["transactional"] = "transactional";
  })(Status || (Status = {}));
  class Mailchimp {
      constructor() {
          this.description = {
              displayName: 'Mailchimp',
              name: 'mailchimp',
              icon: 'file:mailchimp.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mailchimp API',
              defaults: {
                  name: 'Mailchimp',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mailchimpApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['apiKey'],
                          },
                      },
                  },
                  {
                      name: 'mailchimpOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'API Key',
                              value: 'apiKey',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'apiKey',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Campaign',
                              value: 'campaign',
                          },
                          {
                              name: 'List Group',
                              value: 'listGroup',
                          },
                          {
                              name: 'Member',
                              value: 'member',
                          },
                          {
                              name: 'Member Tag',
                              value: 'memberTag',
                          },
                      ],
                      default: 'member',
                      required: true,
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a new member on list',
                              action: 'Create a member',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a member on list',
                              action: 'Delete a member',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a member on list',
                              action: 'Get a member',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many members on a list',
                              action: 'Get many members',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a new member on list',
                              action: 'Update a member',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['memberTag'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Add tags from a list member',
                              action: 'Create a member tag',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Remove tags from a list member',
                              action: 'Delete a member tag',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['listGroup'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many groups',
                              action: 'Get many list groups',
                          },
                      ],
                      default: 'getAll',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['campaign'],
                          },
                      },
                      options: [
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a campaign',
                              action: 'Delete a campaign',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a campaign',
                              action: 'Get a campaign',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many campaigns',
                              action: 'Get many campaigns',
                          },
                          {
                              name: 'Replicate',
                              value: 'replicate',
                              description: 'Replicate a campaign',
                              action: 'Replicate a campaign',
                          },
                          {
                              name: 'Resend',
                              value: 'resend',
                              description: 'Creates a Resend to Non-Openers version of this campaign',
                              action: 'Resend a campaign',
                          },
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send a campaign',
                              action: 'Send a campaign',
                          },
                      ],
                      default: 'getAll',
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                          },
                      },
                      default: '',
                      description: 'Email address for a subscriber',
                  },
                  {
                      displayName: 'Status',
                      name: 'status',
                      type: 'options',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                          },
                      },
                      options: [
                          {
                              name: 'Cleaned',
                              value: 'cleaned',
                          },
                          {
                              name: 'Pending',
                              value: 'pending',
                          },
                          {
                              name: 'Subscribed',
                              value: 'subscribed',
                          },
                          {
                              name: 'Transactional',
                              value: 'transactional',
                          },
                          {
                              name: 'Unsubscribed',
                              value: 'unsubscribed',
                          },
                      ],
                      default: '',
                      description: "Subscriber's current status",
                  },
                  {
                      displayName: 'JSON Parameters',
                      name: 'jsonParameters',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                          },
                      },
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Email Type',
                              name: 'emailType',
                              type: 'options',
                              options: [
                                  {
                                      name: 'HTML',
                                      value: 'html',
                                  },
                                  {
                                      name: 'Text',
                                      value: 'text',
                                  },
                              ],
                              default: '',
                              description: 'Type of email this member asked to get',
                          },
                          {
                              displayName: 'Language',
                              name: 'language',
                              type: 'string',
                              default: '',
                              description: "If set/detected, the subscriber's language",
                          },
                          {
                              displayName: 'Opt-in IP',
                              name: 'ipOptIn',
                              type: 'string',
                              default: '',
                              description: 'The IP address the subscriber used to confirm their opt-in status',
                          },
                          {
                              displayName: 'Signup IP',
                              name: 'ipSignup',
                              type: 'string',
                              default: '',
                              description: 'IP address the subscriber signed up from',
                          },
                          {
                              displayName: 'Signup Timestamp',
                              name: 'timestampSignup',
                              type: 'dateTime',
                              default: '',
                              description: 'The date and time the subscriber signed up for the list in ISO 8601 format',
                          },
                          {
                              displayName: 'Tags',
                              name: 'tags',
                              type: 'string',
                              default: '',
                              description: 'The tags that are associated with a member separeted by ,',
                          },
                          {
                              displayName: 'Vip',
                              name: 'vip',
                              type: 'boolean',
                              default: false,
                              description: 'Vip status for subscribers',
                          },
                          {
                              displayName: 'Opt-in Timestamp',
                              name: 'timestampOpt',
                              type: 'dateTime',
                              default: '',
                              description: 'The date and time the subscribe confirmed their opt-in status in ISO 8601 format',
                          },
                      ],
                  },
                  {
                      displayName: 'Location',
                      name: 'locationFieldsUi',
                      type: 'fixedCollection',
                      placeholder: 'Add Location',
                      default: {},
                      description: 'Subscriber location information.n',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [false],
                          },
                      },
                      options: [
                          {
                              name: 'locationFieldsValues',
                              displayName: 'Location',
                              values: [
                                  {
                                      displayName: 'Latitude',
                                      name: 'latitude',
                                      type: 'string',
                                      required: true,
                                      description: 'The location latitude',
                                      default: '',
                                  },
                                  {
                                      displayName: 'Longitude',
                                      name: 'longitude',
                                      type: 'string',
                                      required: true,
                                      description: 'The location longitude',
                                      default: '',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Merge Fields',
                      name: 'mergeFieldsUi',
                      placeholder: 'Add Merge Fields',
                      type: 'fixedCollection',
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [false],
                          },
                      },
                      description: 'An individual merge var and value for a member',
                      options: [
                          {
                              name: 'mergeFieldsValues',
                              displayName: 'Field',
                              typeOptions: {
                                  multipleValueButtonText: 'Add Field',
                              },
                              values: [
                                  {
                                      displayName: 'Field Name or ID',
                                      name: 'name',
                                      type: 'options',
                                      typeOptions: {
                                          loadOptionsMethod: 'getMergeFields',
                                          loadOptionsDependsOn: ['list'],
                                      },
                                      required: true,
                                      description: 'Merge Field name. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                                      default: '',
                                  },
                                  {
                                      displayName: 'Field Value',
                                      name: 'value',
                                      required: true,
                                      type: 'string',
                                      default: '',
                                      description: 'Merge field value',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Merge Fields',
                      name: 'mergeFieldsJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'Location',
                      name: 'locationJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'Interest Groups',
                      name: 'groupsUi',
                      placeholder: 'Add Interest Group',
                      type: 'fixedCollection',
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [false],
                          },
                      },
                      options: [
                          {
                              name: 'groupsValues',
                              displayName: 'Group',
                              typeOptions: {
                                  multipleValueButtonText: 'Add Interest Group',
                              },
                              values: [
                                  {
                                      displayName: 'Category Name or ID',
                                      name: 'categoryId',
                                      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: 'getGroupCategories',
                                          loadOptionsDependsOn: ['list'],
                                      },
                                      default: '',
                                  },
                                  {
                                      displayName: 'Category Field ID',
                                      name: 'categoryFieldId',
                                      type: 'string',
                                      default: '',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'boolean',
                                      default: false,
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Interest Groups',
                      name: 'groupJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['create'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['delete'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['delete'],
                          },
                      },
                      default: '',
                      required: true,
                      description: "Member's email",
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['get'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['get'],
                          },
                      },
                      default: '',
                      required: true,
                      description: "Member's email",
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Fields',
                              name: 'fields',
                              type: 'string',
                              default: '',
                              description: 'A comma-separated list of fields to return',
                          },
                          {
                              displayName: 'Exclude Fields',
                              name: 'excludeFields',
                              type: 'string',
                              default: '',
                              description: 'A comma-separated list of fields to exclude',
                          },
                      ],
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['getAll'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['getAll'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 1000,
                      },
                      default: 500,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['getAll'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Before Last Changed',
                              name: 'beforeLastChanged',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict results to subscribers whose information changed before the set timeframe',
                          },
                          {
                              displayName: 'Before Timestamp Opt',
                              name: 'beforeTimestampOpt',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict results to subscribers who opted-in before the set timeframe',
                          },
                          {
                              displayName: 'Email Type',
                              name: 'emailType',
                              type: 'options',
                              options: [
                                  {
                                      name: 'HTML',
                                      value: 'html',
                                  },
                                  {
                                      name: 'Text',
                                      value: 'text',
                                  },
                              ],
                              default: '',
                              description: 'Type of email this member asked to get',
                          },
                          {
                              displayName: 'Status',
                              name: 'status',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Cleaned',
                                      value: 'cleaned',
                                  },
                                  {
                                      name: 'Pending',
                                      value: 'pending',
                                  },
                                  {
                                      name: 'Subscribed',
                                      value: 'subscribed',
                                  },
                                  {
                                      name: 'Transactional',
                                      value: 'transactional',
                                  },
                                  {
                                      name: 'Unsubscribed',
                                      value: 'unsubscribed',
                                  },
                              ],
                              default: '',
                              description: "Subscriber's current status",
                          },
                          {
                              displayName: 'Since Last Changed',
                              name: 'sinceLastChanged',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict results to subscribers whose information changed after the set timeframe',
                          },
                      ],
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                          },
                      },
                      default: '',
                      description: 'Email address of the subscriber',
                  },
                  {
                      displayName: 'JSON Parameters',
                      name: 'jsonParameters',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                          },
                      },
                  },
                  {
                      displayName: 'Update Fields',
                      name: 'updateFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Email Type',
                              name: 'emailType',
                              type: 'options',
                              options: [
                                  {
                                      name: 'HTML',
                                      value: 'html',
                                  },
                                  {
                                      name: 'Text',
                                      value: 'text',
                                  },
                              ],
                              default: '',
                              description: 'Type of email this member asked to get',
                          },
                          {
                              displayName: 'Interest Groups',
                              name: 'groupsUi',
                              placeholder: 'Add Interest Group',
                              type: 'fixedCollection',
                              default: {},
                              typeOptions: {
                                  multipleValues: true,
                              },
                              displayOptions: {
                                  show: {
                                      '/resource': ['member'],
                                      '/operation': ['update'],
                                      '/jsonParameters': [false],
                                  },
                              },
                              options: [
                                  {
                                      name: 'groupsValues',
                                      displayName: 'Group',
                                      typeOptions: {
                                          multipleValueButtonText: 'Add Interest Group',
                                      },
                                      values: [
                                          {
                                              displayName: 'Category Name or ID',
                                              name: 'categoryId',
                                              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: 'getGroupCategories',
                                                  loadOptionsDependsOn: ['list'],
                                              },
                                              default: '',
                                          },
                                          {
                                              displayName: 'Category Field ID',
                                              name: 'categoryFieldId',
                                              type: 'string',
                                              default: '',
                                          },
                                          {
                                              displayName: 'Value',
                                              name: 'value',
                                              type: 'boolean',
                                              default: false,
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Language',
                              name: 'language',
                              type: 'string',
                              default: '',
                              description: "If set/detected, the subscriber's language",
                          },
                          {
                              displayName: 'Merge Fields',
                              name: 'mergeFieldsUi',
                              placeholder: 'Add Merge Fields',
                              type: 'fixedCollection',
                              default: {},
                              typeOptions: {
                                  multipleValues: true,
                              },
                              displayOptions: {
                                  show: {
                                      '/resource': ['member'],
                                      '/operation': ['update'],
                                      '/jsonParameters': [false],
                                  },
                              },
                              description: 'An individual merge var and value for a member',
                              options: [
                                  {
                                      name: 'mergeFieldsValues',
                                      displayName: 'Field',
                                      typeOptions: {
                                          multipleValueButtonText: 'Add Field',
                                      },
                                      values: [
                                          {
                                              displayName: 'Field Name or ID',
                                              name: 'name',
                                              type: 'options',
                                              typeOptions: {
                                                  loadOptionsMethod: 'getMergeFields',
                                                  loadOptionsDependsOn: ['list'],
                                              },
                                              required: true,
                                              description: 'Merge Field name. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                                              default: '',
                                          },
                                          {
                                              displayName: 'Field Value',
                                              name: 'value',
                                              required: true,
                                              type: 'string',
                                              default: '',
                                              description: 'Merge field value',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Opt-in IP',
                              name: 'ipOptIn',
                              type: 'string',
                              default: '',
                              description: 'The IP address the subscriber used to confirm their opt-in status',
                          },
                          {
                              displayName: 'Signup IP',
                              name: 'ipSignup',
                              type: 'string',
                              default: '',
                              description: 'IP address the subscriber signed up from',
                          },
                          {
                              displayName: 'Signup Timestamp',
                              name: 'timestampSignup',
                              type: 'dateTime',
                              default: '',
                              description: 'The date and time the subscriber signed up for the list in ISO 8601 format',
                          },
                          {
                              displayName: 'Skip Merge Validation',
                              name: 'skipMergeValidation',
                              type: 'boolean',
                              default: false,
                              description: 'Whether member data will be accepted without merge field values, even if the merge field is usually required',
                          },
                          {
                              displayName: 'Status',
                              name: 'status',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Cleaned',
                                      value: 'cleaned',
                                  },
                                  {
                                      name: 'Pending',
                                      value: 'pending',
                                  },
                                  {
                                      name: 'Subscribed',
                                      value: 'subscribed',
                                  },
                                  {
                                      name: 'Transactional',
                                      value: 'transactional',
                                  },
                                  {
                                      name: 'Unsubscribed',
                                      value: 'unsubscribed',
                                  },
                              ],
                              default: '',
                              description: "Subscriber's current status",
                          },
                          {
                              displayName: 'Vip',
                              name: 'vip',
                              type: 'boolean',
                              default: false,
                              description: 'Vip status for subscribers',
                          },
                          {
                              displayName: 'Location',
                              name: 'locationFieldsUi',
                              type: 'fixedCollection',
                              placeholder: 'Add Location',
                              default: {},
                              description: 'Subscriber location information.n',
                              displayOptions: {
                                  show: {
                                      '/resource': ['member'],
                                      '/operation': ['update'],
                                      '/jsonParameters': [false],
                                  },
                              },
                              options: [
                                  {
                                      name: 'locationFieldsValues',
                                      displayName: 'Location',
                                      values: [
                                          {
                                              displayName: 'Latitude',
                                              name: 'latitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location latitude',
                                              default: '',
                                          },
                                          {
                                              displayName: 'Longitude',
                                              name: 'longitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location longitude',
                                              default: '',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Opt-in Timestamp',
                              name: 'timestampOpt',
                              type: 'dateTime',
                              default: '',
                              description: 'The date and time the subscribe confirmed their opt-in status in ISO 8601 format',
                          },
                      ],
                  },
                  {
                      displayName: 'Merge Fields',
                      name: 'mergeFieldsJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'Location',
                      name: 'locationJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'Interest Groups',
                      name: 'groupJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['member'],
                              operation: ['update'],
                              jsonParameters: [true],
                          },
                      },
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['memberTag'],
                              operation: ['create', 'delete'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['memberTag'],
                              operation: ['create', 'delete'],
                          },
                      },
                      default: '',
                      description: 'Email address of the subscriber',
                  },
                  {
                      displayName: 'Tags',
                      name: 'tags',
                      type: 'string',
                      typeOptions: {
                          multipleValues: true,
                          multipleValueButtonText: 'Add Tag',
                      },
                      displayOptions: {
                          show: {
                              resource: ['memberTag'],
                              operation: ['create', 'delete'],
                          },
                      },
                      default: [],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['memberTag'],
                              operation: ['create', 'delete'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Is Syncing',
                              name: 'isSyncing',
                              type: 'boolean',
                              default: false,
                              description: 'Whether automations based on the tags in the request will not fire',
                          },
                      ],
                  },
                  {
                      displayName: 'List Name or ID',
                      name: 'list',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getLists',
                      },
                      displayOptions: {
                          show: {
                              resource: ['listGroup'],
                              operation: ['getAll'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Group Category Name or ID',
                      name: 'groupCategory',
                      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: 'getGroupCategories',
                          loadOptionsDependsOn: ['list'],
                      },
                      displayOptions: {
                          show: {
                              resource: ['listGroup'],
                              operation: ['getAll'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['listGroup'],
                              operation: ['getAll'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['listGroup'],
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 1000,
                      },
                      default: 500,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['campaign'],
                              operation: ['getAll'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['campaign'],
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 1000,
                      },
                      default: 10,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['campaign'],
                              operation: ['getAll'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Before Create Time',
                              name: 'beforeCreateTime',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict the response to campaigns created before the set time',
                          },
                          {
                              displayName: 'Before Send Time',
                              name: 'beforeSendTime',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict the response to campaigns sent before the set time',
                          },
                          {
                              displayName: 'Exclude Field Names or IDs',
                              name: 'excludeFields',
                              type: 'multiOptions',
                              typeOptions: {
                                  loadOptionsMethod: 'getCampaignsFields',
                              },
                              default: [],
                              description: 'A comma-separated list of fields to exclude. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Field Names or IDs',
                              name: 'fields',
                              type: 'multiOptions',
                              typeOptions: {
                                  loadOptionsMethod: 'getCampaignsFields',
                              },
                              default: [
                                  'campaigns.id',
                                  'campaigns.status',
                                  'campaigns.tracking',
                                  'campaigns.settings.from_name',
                                  'campaigns.settings.reply_to',
                                  'campaigns.settings.title',
                              ],
                              description: 'A comma-separated list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'List Name or ID',
                              name: 'listId',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getLists',
                              },
                              default: '',
                              description: 'List of lists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Since Create Time',
                              name: 'sinceCreateTime',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict the response to campaigns created after the set time',
                          },
                          {
                              displayName: 'Since Send Time',
                              name: 'sinceSendTime',
                              type: 'dateTime',
                              default: '',
                              description: 'Restrict the response to campaigns sent after the set time',
                          },
                          {
                              displayName: 'Sort Direction',
                              name: 'sortDirection',
                              type: 'options',
                              options: [
                                  {
                                      name: 'ASC',
                                      value: 'ASC',
                                  },
                                  {
                                      name: 'DESC',
                                      value: 'DESC',
                                  },
                              ],
                              default: '',
                              description: 'Determines the order direction for sorted results',
                          },
                          {
                              displayName: 'Sort Field',
                              name: 'sortField',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Create Time',
                                      value: 'create_time',
                                  },
                                  {
                                      name: 'Send Time',
                                      value: 'send_time',
                                  },
                              ],
                              default: '',
                              description: 'Returns files sorted by the specified field',
                          },
                          {
                              displayName: 'Status',
                              name: 'status',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Save',
                                      value: 'save',
                                  },
                                  {
                                      name: 'Sending',
                                      value: 'sending',
                                  },
                                  {
                                      name: 'Sent',
                                      value: 'sent',
                                  },
                                  {
                                      name: 'Schedule',
                                      value: 'schedule',
                                  },
                              ],
                              default: '',
                              description: 'The status of the campaign',
                          },
                      ],
                  },
                  {
                      displayName: 'Campaign ID',
                      name: 'campaignId',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['campaign'],
                              operation: ['send', 'get', 'delete', 'replicate', 'resend'],
                          },
                      },
                      required: true,
                      default: '',
                      description: 'List of Campaigns',
                      options: [],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLists() {
                      const returnData = [];
                      const lists = await GenericFunctions_1.mailchimpApiRequestAllItems.call(this, '/lists', 'GET', 'lists');
                      for (const list of lists) {
                          const listName = list.name;
                          const listId = list.id;
                          returnData.push({
                              name: listName,
                              value: listId,
                          });
                      }
                      return returnData;
                  },
                  async getMergeFields() {
                      const returnData = [];
                      const listId = this.getCurrentNodeParameter('list');
                      const { merge_fields } = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/merge-fields`, 'GET');
                      for (const mergeField of merge_fields) {
                          const mergeFieldName = mergeField.name;
                          const mergeFieldId = mergeField.tag;
                          returnData.push({
                              name: mergeFieldName,
                              value: mergeFieldId,
                          });
                      }
                      return returnData;
                  },
                  async getGroupCategories() {
                      const returnData = [];
                      const listId = this.getCurrentNodeParameter('list');
                      const { categories } = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/interest-categories`, 'GET');
                      for (const category of categories) {
                          const categoryName = category.title;
                          const categoryId = category.id;
                          returnData.push({
                              name: categoryName,
                              value: categoryId,
                          });
                      }
                      return returnData;
                  },
                  async getCampaigns() {
                      const returnData = [];
                      const campaigns = await GenericFunctions_1.mailchimpApiRequestAllItems.call(this, '/campaigns', 'GET', 'campaigns');
                      for (const campaign of campaigns) {
                          const campaignName = campaign.settings.title;
                          const campaignId = campaign.id;
                          returnData.push({
                              name: campaignName,
                              value: campaignId,
                          });
                      }
                      return returnData;
                  },
                  async getCampaignsFields() {
                      const returnData = [];
                      for (const campaignFields of GenericFunctions_1.campaignFieldsMetadata) {
                          returnData.push({
                              name: campaignFields,
                              value: campaignFields,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'listGroup') {
                      if (operation === 'getAll') {
                          const listId = this.getNodeParameter('list', i);
                          const categoryId = this.getNodeParameter('groupCategory', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mailchimpApiRequestAllItems.call(this, `/lists/${listId}/interest-categories/${categoryId}/interests`, 'GET', 'interests', {}, qs);
                          }
                          else {
                              qs.count = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/interest-categories/${categoryId}/interests`, 'GET', {}, qs);
                              responseData = responseData.interests;
                          }
                      }
                  }
                  if (resource === 'member') {
                      if (operation === 'create') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          const status = this.getNodeParameter('status', i);
                          const options = this.getNodeParameter('options', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              listId,
                              email_address: email,
                              status,
                          };
                          if (options.emailType) {
                              body.email_type = options.emailType;
                          }
                          if (options.language) {
                              body.language = options.language;
                          }
                          if (options.vip) {
                              body.vip = options.vip;
                          }
                          if (options.ipSignup) {
                              body.ip_signup = options.ipSignup;
                          }
                          if (options.ipOptIn) {
                              body.ip_opt = options.ipOptIn;
                          }
                          if (options.timestampOpt) {
                              body.timestamp_opt = (0, moment_1.default)(options.timestampOpt).format('YYYY-MM-DD HH:MM:SS');
                          }
                          if (options.timestampSignup) {
                              body.timestamp_signup = (0, moment_1.default)(options.timestampSignup).format('YYYY-MM-DD HH:MM:SS');
                          }
                          if (options.tags) {
                              body.tags = options.tags.split(',');
                          }
                          if (!jsonActive) {
                              const locationValues = this.getNodeParameter('locationFieldsUi', i)
                                  .locationFieldsValues;
                              if (locationValues) {
                                  const location = {};
                                  for (const key of Object.keys(locationValues)) {
                                      if (key === 'latitude') {
                                          location.latitude = parseFloat(locationValues[key]);
                                      }
                                      else if (key === 'longitude') {
                                          location.longitude = parseFloat(locationValues[key]);
                                      }
                                  }
                                  body.location = location;
                              }
                              const mergeFieldsValues = this.getNodeParameter('mergeFieldsUi', i)
                                  .mergeFieldsValues;
                              if (mergeFieldsValues) {
                                  const mergeFields = {};
                                  for (let index = 0; index < mergeFieldsValues.length; index++) {
                                      mergeFields[mergeFieldsValues[index].name] = mergeFieldsValues[index].value;
                                  }
                                  body.merge_fields = mergeFields;
                              }
                              const groupsValues = this.getNodeParameter('groupsUi', i)
                                  .groupsValues;
                              if (groupsValues) {
                                  const groups = {};
                                  for (let index = 0; index < groupsValues.length; index++) {
                                      groups[groupsValues[index].categoryFieldId] = groupsValues[index].value;
                                  }
                                  body.interests = groups;
                              }
                          }
                          else {
                              const locationJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('locationJson', i));
                              const mergeFieldsJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('mergeFieldsJson', i));
                              const groupJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('groupJson', i));
                              if (locationJson) {
                                  body.location = locationJson;
                              }
                              if (mergeFieldsJson) {
                                  body.merge_fields = mergeFieldsJson;
                              }
                              if (groupJson) {
                                  body.interests = groupJson;
                              }
                          }
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members`, 'POST', body);
                      }
                      if (operation === 'delete') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members/${email}/actions/delete-permanent`, 'POST');
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.fields) {
                              qs.fields = options.fields;
                          }
                          if (options.excludeFields) {
                              qs.exclude_fields = options.excludeFields;
                          }
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members/${email}`, 'GET', {}, qs);
                      }
                      if (operation === 'getAll') {
                          const listId = this.getNodeParameter('list', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.beforeLastChanged) {
                              qs.before_last_changed = options.beforeLastChanged;
                          }
                          if (options.beforeTimestampOpt) {
                              qs.before_timestamp_opt = options.beforeTimestampOpt;
                          }
                          if (options.emailType) {
                              qs.email_type = options.emailType;
                          }
                          if (options.status) {
                              qs.status = options.status;
                          }
                          if (options.sinceLastChanged) {
                              qs.since_last_changed = options.sinceLastChanged;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mailchimpApiRequestAllItems.call(this, `/lists/${listId}/members`, 'GET', 'members', {}, qs);
                          }
                          else {
                              qs.count = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members`, 'GET', {}, qs);
                              responseData = responseData.members;
                          }
                      }
                      if (operation === 'update') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              listId,
                              email_address: email,
                          };
                          if (updateFields.skipMergeValidation) {
                              qs.skip_merge_validation = updateFields.skipMergeValidation;
                          }
                          if (updateFields.status) {
                              body.status = updateFields.status;
                          }
                          if (updateFields.emailType) {
                              body.email_type = updateFields.emailType;
                          }
                          if (updateFields.language) {
                              body.language = updateFields.language;
                          }
                          if (updateFields.vip) {
                              body.vip = updateFields.vip;
                          }
                          if (updateFields.ipSignup) {
                              body.ip_signup = updateFields.ipSignup;
                          }
                          if (updateFields.ipOptIn) {
                              body.ip_opt = updateFields.ipOptIn;
                          }
                          if (updateFields.timestampOpt) {
                              body.timestamp_opt = (0, moment_1.default)(updateFields.timestampOpt).format('YYYY-MM-DD HH:MM:SS');
                          }
                          if (updateFields.timestampSignup) {
                              body.timestamp_signup = (0, moment_1.default)(updateFields.timestampSignup).format('YYYY-MM-DD HH:MM:SS');
                          }
                          if (!jsonActive) {
                              if (updateFields.locationFieldsUi) {
                                  const locationValues = updateFields.locationFieldsUi
                                      .locationFieldsValues;
                                  if (locationValues) {
                                      const location = {};
                                      for (const key of Object.keys(locationValues)) {
                                          if (key === 'latitude') {
                                              location.latitude = parseFloat(locationValues[key]);
                                          }
                                          else if (key === 'longitude') {
                                              location.longitude = parseFloat(locationValues[key]);
                                          }
                                      }
                                      body.location = location;
                                  }
                              }
                              if (updateFields.mergeFieldsUi) {
                                  const mergeFieldsValues = updateFields.mergeFieldsUi
                                      .mergeFieldsValues;
                                  if (mergeFieldsValues) {
                                      const mergeFields = {};
                                      for (let index = 0; index < mergeFieldsValues.length; index++) {
                                          mergeFields[mergeFieldsValues[index].name] = mergeFieldsValues[index].value;
                                      }
                                      body.merge_fields = mergeFields;
                                  }
                              }
                              if (updateFields.groupsUi) {
                                  const groupsValues = updateFields.groupsUi
                                      .groupsValues;
                                  if (groupsValues) {
                                      const groups = {};
                                      for (let index = 0; index < groupsValues.length; index++) {
                                          groups[groupsValues[index].categoryFieldId] = groupsValues[index].value;
                                      }
                                      body.interests = groups;
                                  }
                              }
                          }
                          else {
                              const locationJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('locationJson', i));
                              const mergeFieldsJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('mergeFieldsJson', i));
                              const groupJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('groupJson', i));
                              if (locationJson) {
                                  body.location = locationJson;
                              }
                              if (mergeFieldsJson) {
                                  body.merge_fields = mergeFieldsJson;
                              }
                              if (groupJson) {
                                  body.interests = groupJson;
                              }
                          }
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members/${email}`, 'PUT', body);
                      }
                  }
                  if (resource === 'memberTag') {
                      if (operation === 'create') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          const tags = this.getNodeParameter('tags', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              tags: [],
                          };
                          if (options.isSyncing) {
                              body.is_syncing = options.isSyncing;
                          }
                          for (const tag of tags) {
                              body.tags.push({
                                  name: tag,
                                  status: 'active',
                              });
                          }
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members/${email}/tags`, 'POST', body);
                          responseData = { success: true };
                      }
                      if (operation === 'delete') {
                          const listId = this.getNodeParameter('list', i);
                          const email = this.getNodeParameter('email', i);
                          const tags = this.getNodeParameter('tags', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              tags: [],
                          };
                          if (options.isSyncing) {
                              body.is_syncing = options.isSyncing;
                          }
                          for (const tag of tags) {
                              body.tags.push({
                                  name: tag,
                                  status: 'inactive',
                              });
                          }
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/lists/${listId}/members/${email}/tags`, 'POST', body);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'campaign') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.status) {
                              qs.status = options.status;
                          }
                          if (options.beforeCreateTime) {
                              qs.before_create_time = options.beforeCreateTime;
                          }
                          if (options.beforeSendTime) {
                              qs.before_send_time = options.beforeSendTime;
                          }
                          if (options.excludeFields) {
                              qs.exclude_fields = options.exclude_fields.join(',');
                          }
                          if (options.fields) {
                              qs.fields = options.fields.join(',');
                              if (options.fields.includes('*')) {
                                  qs.fields = GenericFunctions_1.campaignFieldsMetadata.join(',');
                              }
                          }
                          else {
                              qs.fields = [
                                  'campaigns.id',
                                  'campaigns.status',
                                  'campaigns.tracking',
                                  'campaigns.settings.from_name',
                                  'campaigns.settings.title',
                                  'campaigns.settings.reply_to',
                              ].join(',');
                          }
                          if (options.listId) {
                              qs.list_id = options.listId;
                          }
                          if (options.sinceCreateTime) {
                              qs.since_create_time = options.sinceCreateTime;
                          }
                          if (options.sinceSendTime) {
                              qs.since_send_time = options.sinceSendTime;
                          }
                          if (options.sortDirection) {
                              qs.sort_dir = options.sortDirection;
                          }
                          if (options.sortField) {
                              qs.sort_field = options.sortField;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mailchimpApiRequestAllItems.call(this, '/campaigns', 'GET', 'campaigns', {}, qs);
                          }
                          else {
                              qs.count = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, '/campaigns', 'GET', {}, qs);
                              responseData = responseData.campaigns;
                          }
                      }
                      if (operation === 'send') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/campaigns/${campaignId}/actions/send`, 'POST', {});
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/campaigns/${campaignId}`, 'GET', {});
                      }
                      if (operation === 'delete') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/campaigns/${campaignId}`, 'DELETE', {});
                          responseData = { success: true };
                      }
                      if (operation === 'replicate') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/campaigns/${campaignId}/actions/replicate`, 'POST', {});
                      }
                      if (operation === 'resend') {
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mailchimpApiRequest.call(this, `/campaigns/${campaignId}/actions/create-resend`, 'POST', {});
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: { error: error.message } });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Mailchimp = Mailchimp;
  //# sourceMappingURL=Mailchimp.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailchimpApi = void 0;
  class MailchimpApi {
      constructor() {
          this.name = 'mailchimpApi';
          this.displayName = 'Mailchimp API';
          this.documentationUrl = 'mailchimp';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=apikey {{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.apiKey.split("-").pop()}}.api.mailchimp.com/3.0',
                  url: '/lists',
              },
          };
      }
  }
  exports.MailchimpApi = MailchimpApi;
  //# sourceMappingURL=MailchimpApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailchimpOAuth2Api = void 0;
  class MailchimpOAuth2Api {
      constructor() {
          this.name = 'mailchimpOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Mailchimp OAuth2 API';
          this.documentationUrl = 'mailchimp';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Metadata',
                  name: 'metadataUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/metadata',
                  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.MailchimpOAuth2Api = MailchimpOAuth2Api;
  //# sourceMappingURL=MailchimpOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailchimpApi = void 0;
  class MailchimpApi {
      constructor() {
          this.name = 'mailchimpApi';
          this.displayName = 'Mailchimp API';
          this.documentationUrl = 'mailchimp';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=apikey {{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.apiKey.split("-").pop()}}.api.mailchimp.com/3.0',
                  url: '/lists',
              },
          };
      }
  }
  exports.MailchimpApi = MailchimpApi;
  //# sourceMappingURL=MailchimpApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailchimpOAuth2Api = void 0;
  class MailchimpOAuth2Api {
      constructor() {
          this.name = 'mailchimpOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Mailchimp OAuth2 API';
          this.documentationUrl = 'mailchimp';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/token',
                  required: true,
              },
              {
                  displayName: 'Metadata',
                  name: 'metadataUrl',
                  type: 'hidden',
                  default: 'https://login.mailchimp.com/oauth2/metadata',
                  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.MailchimpOAuth2Api = MailchimpOAuth2Api;
  //# sourceMappingURL=MailchimpOAuth2Api.credentials.js.map

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

  # Mailchimp node

  Use the Mailchimp node to automate work in Mailchimp, and integrate Mailchimp with other applications. n8n has built-in support for a wide range of Mailchimp features, including creating, updating, and deleting campaigns, as well as getting list groups. 

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

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

  ## Operations

  * Campaign
      * Delete a campaign
      * Get a campaign
      * Get all the campaigns
      * Replicate a campaign
      * Creates a Resend to Non-Openers version of this campaign
      * Send a campaign
  * List Group
      * Get all groups
  * Member
      * Create a new member on list
      * Delete a member on list
      * Get a member on list
      * Get all members on list
      * Update a new member on list
  * Member Tag
      * Add tags from a list member
      * Remove tags from a list member

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Markdown
name: Markdown
display_name: Markdown
description: Convert data between Markdown and HTML
category: output
icon: file:markdown.svg
code_hash: 32b117c3ea879ef7772b83158e47c9db429370a9fd5b3a30dcb41fba78d4fd06
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Markdown
documentation_title: Markdown
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"markdown","description":"Templates for markdown"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:17
updated_at: 2025-06-09 15:18:17
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.Markdown = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const showdown_1 = require("showdown");
  const node_html_markdown_1 = require("node-html-markdown");
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  const set_1 = __importDefault(require("lodash/set"));
  class Markdown {
      constructor() {
          this.description = {
              displayName: 'Markdown',
              name: 'markdown',
              icon: 'file:markdown.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["mode"]==="markdownToHtml" ? "Markdown to HTML" : "HTML to Markdown"}}',
              description: 'Convert data between Markdown and HTML',
              defaults: {
                  name: 'Markdown',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [],
              properties: [
                  {
                      displayName: 'Mode',
                      name: 'mode',
                      type: 'options',
                      options: [
                          {
                              name: 'Markdown to HTML',
                              value: 'markdownToHtml',
                              description: 'Convert data from Markdown to HTML',
                          },
                          {
                              name: 'HTML to Markdown',
                              value: 'htmlToMarkdown',
                              description: 'Convert data from HTML to Markdown',
                          },
                      ],
                      default: 'htmlToMarkdown',
                  },
                  {
                      displayName: 'HTML',
                      name: 'html',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['htmlToMarkdown'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'The HTML to be converted to markdown',
                  },
                  {
                      displayName: 'Markdown',
                      name: 'markdown',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['markdownToHtml'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'The Markdown to be converted to html',
                  },
                  {
                      displayName: 'Destination Key',
                      name: 'destinationKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['markdownToHtml', 'htmlToMarkdown'],
                          },
                      },
                      default: 'data',
                      required: true,
                      placeholder: '',
                      description: 'The field to put the output in. Specify nested fields using dots, e.g."level1.level2.newKey".',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              mode: ['htmlToMarkdown'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Bullet Marker',
                              name: 'bulletMarker',
                              type: 'string',
                              default: '*',
                              description: 'Specify bullet marker, default *',
                          },
                          {
                              displayName: 'Code Block Fence',
                              name: 'codeFence',
                              type: 'string',
                              default: '```',
                              description: 'Specify code block fence, default ```',
                          },
                          {
                              displayName: 'Emphasis Delimiter',
                              name: 'emDelimiter',
                              type: 'string',
                              default: '_',
                              description: 'Specify emphasis delimiter, default _',
                          },
                          {
                              displayName: 'Global Escape Pattern',
                              name: 'globalEscape',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: false,
                              },
                              default: {},
                              description: 'Setting this will override the default escape settings, you might want to use textReplace option instead',
                              options: [
                                  {
                                      name: 'value',
                                      displayName: 'Value',
                                      values: [
                                          {
                                              displayName: 'Pattern',
                                              name: 'pattern',
                                              type: 'string',
                                              default: '',
                                              description: 'RegEx for pattern',
                                          },
                                          {
                                              displayName: 'Replacement',
                                              name: 'replacement',
                                              type: 'string',
                                              default: '',
                                              description: 'String replacement',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Ignored Elements',
                              name: 'ignore',
                              type: 'string',
                              default: '',
                              description: 'Supplied elements will be ignored (ignores inner text does not parse children)',
                              placeholder: 'e.g. h1, p ...',
                              hint: 'Comma separated elements',
                          },
                          {
                              displayName: 'Keep Images With Data',
                              name: 'keepDataImages',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to keep images with data: URI (Note: These can be up to 1MB each), e.g. &lt;img src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSK......0o/"&gt;',
                          },
                          {
                              displayName: 'Line Start Escape Pattern',
                              name: 'lineStartEscape',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: false,
                              },
                              default: {},
                              description: 'Setting this will override the default escape settings, you might want to use textReplace option instead',
                              options: [
                                  {
                                      name: 'value',
                                      displayName: 'Value',
                                      values: [
                                          {
                                              displayName: 'Pattern',
                                              name: 'pattern',
                                              type: 'string',
                                              default: '',
                                              description: 'RegEx for pattern',
                                          },
                                          {
                                              displayName: 'Replacement',
                                              name: 'replacement',
                                              type: 'string',
                                              default: '',
                                              description: 'String replacement',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Max Consecutive New Lines',
                              name: 'maxConsecutiveNewlines',
                              type: 'number',
                              default: 3,
                              description: 'Specify max consecutive new lines allowed',
                          },
                          {
                              displayName: 'Place URLs At The Bottom',
                              name: 'useLinkReferenceDefinitions',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to Place URLS at the bottom and format links using link reference definitions',
                          },
                          {
                              displayName: 'Strong Delimiter',
                              name: 'strongDelimiter',
                              type: 'string',
                              default: '**',
                              description: 'Specify strong delimiter, default **',
                          },
                          {
                              displayName: 'Style For Code Block',
                              name: 'codeBlockStyle',
                              type: 'options',
                              default: 'fence',
                              description: 'Specify style for code block, default "fence"',
                              options: [
                                  {
                                      name: 'Fence',
                                      value: 'fence',
                                  },
                                  {
                                      name: 'Indented',
                                      value: 'indented',
                                  },
                              ],
                          },
                          {
                              displayName: 'Text Replacement Pattern',
                              name: 'textReplace',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: true,
                              },
                              default: [],
                              description: 'User-defined text replacement pattern (Replaces matching text retrieved from nodes)',
                              options: [
                                  {
                                      name: 'values',
                                      displayName: 'Values',
                                      values: [
                                          {
                                              displayName: 'Pattern',
                                              name: 'pattern',
                                              type: 'string',
                                              default: '',
                                              description: 'RegEx for pattern',
                                          },
                                          {
                                              displayName: 'Replacement',
                                              name: 'replacement',
                                              type: 'string',
                                              default: '',
                                              description: 'String replacement',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Treat As Blocks',
                              name: 'blockElements',
                              type: 'string',
                              default: '',
                              description: 'Supplied elements will be treated as blocks (surrounded with blank lines)',
                              placeholder: 'e.g. p, div, ...',
                              hint: 'Comma separated elements',
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              mode: ['markdownToHtml'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Add Blank To Links',
                              name: 'openLinksInNewWindow',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to open all links in new windows (by adding the attribute target="_blank" to <a> tags)',
                          },
                          {
                              displayName: 'Automatic Linking to URLs',
                              name: 'simplifiedAutoLink',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable automatic linking to URLs',
                          },
                          {
                              displayName: 'Backslash Escapes HTML Tags',
                              name: 'backslashEscapesHTMLTags',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to support for HTML Tag escaping ex: &lt;div&gt;foo&lt;/div&gt;',
                          },
                          {
                              displayName: 'Complete HTML Document',
                              name: 'completeHTMLDocument',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to output a complete html document, including &lt;html&gt;, &lt;head&gt; and &lt;body&gt; tags instead of an HTML fragment',
                          },
                          {
                              displayName: 'Customized Header ID',
                              name: 'customizedHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to use text in curly braces as header ID',
                          },
                          {
                              displayName: 'Emoji Support',
                              name: 'emoji',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable emoji support. Ex: this is a :smile: emoji For more info on available emojis, see https://github.com/showdownjs/showdown/wiki/Emojis.',
                          },
                          {
                              displayName: 'Encode Emails',
                              name: 'encodeEmails',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to enable e-mail addresses encoding through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',
                          },
                          {
                              displayName: 'Exclude Trailing Punctuation From URLs',
                              name: 'excludeTrailingPunctuationFromURLs',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to exclude trailing punctuation from autolinking URLs. Punctuation excluded: . ! ? ( ). Only applies if simplifiedAutoLink option is set to true.',
                          },
                          {
                              displayName: 'GitHub Code Blocks',
                              name: 'ghCodeBlocks',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to enable support for GFM code block style',
                          },
                          {
                              displayName: 'GitHub Compatible Header IDs',
                              name: 'ghCompatibleHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to generate header IDs compatible with github style (spaces are replaced with dashes and a bunch of non alphanumeric chars are removed)',
                          },
                          {
                              displayName: 'GitHub Mention Link',
                              name: 'ghMentionsLink',
                              type: 'string',
                              default: 'https://github.com/{u}',
                              description: 'Whether to change the link generated by @mentions. Showdown will replace {u} with the username. Only applies if ghMentions option is enabled.',
                          },
                          {
                              displayName: 'GitHub Mentions',
                              name: 'ghMentions',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable github @mentions, which link to the username mentioned',
                          },
                          {
                              displayName: 'GitHub Task Lists',
                              name: 'tasklists',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable support for GFM tasklists',
                          },
                          {
                              displayName: 'Header Level Start',
                              name: 'headerLevelStart',
                              type: 'number',
                              default: 1,
                              description: 'Whether to set the header starting level',
                          },
                          {
                              displayName: 'Mandatory Space Before Header',
                              name: 'requireSpaceBeforeHeadingText',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to make adding a space between # and the header text mandatory',
                          },
                          {
                              displayName: 'Middle Word Asterisks',
                              name: 'literalMidWordAsterisks',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to stop showdown from interpreting asterisks in the middle of words as <em> and <strong> and instead treat them as literal asterisks',
                          },
                          {
                              displayName: 'Middle Word Underscores',
                              name: 'literalMidWordUnderscores',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to stop showdown from interpreting underscores in the middle of words as <em> and <strong> and instead treat them as literal underscores',
                          },
                          {
                              displayName: 'No Header ID',
                              name: 'noHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to disable the automatic generation of header IDs',
                          },
                          {
                              displayName: 'Parse Image Dimensions',
                              name: 'parseImgDimensions',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable support for setting image dimensions from within markdown syntax',
                          },
                          {
                              displayName: 'Prefix Header ID',
                              name: 'prefixHeaderId',
                              type: 'string',
                              default: 'section',
                              description: 'Add a prefix to the generated header IDs',
                          },
                          {
                              displayName: 'Raw Header ID',
                              name: 'rawHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to remove only spaces, \' and " from generated header IDs (including prefixes), replacing them with dashes (-)',
                          },
                          {
                              displayName: 'Raw Prefix Header ID',
                              name: 'rawPrefixHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to prevent showdown from modifying the prefix',
                          },
                          {
                              displayName: 'Simple Line Breaks',
                              name: 'simpleLineBreaks',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to parse line breaks as &lt;br&gt;, like GitHub does, without needing 2 spaces at the end of the line',
                          },
                          {
                              displayName: 'Smart Indentation Fix',
                              name: 'smartIndentationFix',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to try to smartly fix indentation problems related to es6 template strings in the midst of indented code',
                          },
                          {
                              displayName: 'Spaces Indented Sublists',
                              name: 'disableForced4SpacesIndentedSublists',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to disable the requirement of indenting sublists by 4 spaces for them to be nested, effectively reverting to the old behavior where 2 or 3 spaces were enough',
                          },
                          {
                              displayName: 'Split Adjacent Blockquotes',
                              name: 'splitAdjacentBlockquotes',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to split adjacent blockquote blocks',
                          },
                          {
                              displayName: 'Strikethrough',
                              name: 'strikethrough',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable support for strikethrough syntax',
                          },
                          {
                              displayName: 'Tables Header ID',
                              name: 'tablesHeaderId',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to add an ID property to table headers tags',
                          },
                          {
                              displayName: 'Tables Support',
                              name: 'tables',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable support for tables syntax',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const mode = this.getNodeParameter('mode', 0);
          const { length } = items;
          for (let i = 0; i < length; i++) {
              try {
                  if (mode === 'htmlToMarkdown') {
                      const options = this.getNodeParameter('options', i);
                      const destinationKey = this.getNodeParameter('destinationKey', i);
                      const textReplaceOption = this.getNodeParameter('options.textReplace.values', i, []);
                      options.textReplace = !(0, isEmpty_1.default)(textReplaceOption)
                          ? textReplaceOption.map((entry) => [entry.pattern, entry.replacement])
                          : undefined;
                      const lineStartEscapeOption = this.getNodeParameter('options.lineStartEscape.value', i, {});
                      options.lineStartEscape = !(0, isEmpty_1.default)(lineStartEscapeOption)
                          ? [lineStartEscapeOption.pattern, lineStartEscapeOption.replacement]
                          : undefined;
                      const globalEscapeOption = this.getNodeParameter('options.globalEscape.value', i, {});
                      options.globalEscape = !(0, isEmpty_1.default)(globalEscapeOption)
                          ? [globalEscapeOption.pattern, globalEscapeOption.replacement]
                          : undefined;
                      options.ignore = options.ignore
                          ? options.ignore.split(',').map((element) => element.trim())
                          : undefined;
                      options.blockElements = options.blockElements
                          ? options.blockElements.split(',').map((element) => element.trim())
                          : undefined;
                      const markdownOptions = {};
                      Object.keys(options).forEach((option) => {
                          if (options[option]) {
                              markdownOptions[option] = options[option];
                          }
                      });
                      const html = this.getNodeParameter('html', i);
                      const markdownFromHTML = node_html_markdown_1.NodeHtmlMarkdown.translate(html, markdownOptions);
                      const newItem = (0, n8n_workflow_1.deepCopy)(items[i].json);
                      (0, set_1.default)(newItem, destinationKey, markdownFromHTML);
                      returnData.push(newItem);
                  }
                  if (mode === 'markdownToHtml') {
                      const markdown = this.getNodeParameter('markdown', i);
                      const destinationKey = this.getNodeParameter('destinationKey', i);
                      const options = this.getNodeParameter('options', i);
                      const converter = new showdown_1.Converter();
                      Object.keys(options).forEach((key) => converter.setOption(key, options[key]));
                      const htmlFromMarkdown = converter.makeHtml(markdown);
                      const newItem = (0, n8n_workflow_1.deepCopy)(items[i].json);
                      (0, set_1.default)(newItem, destinationKey, htmlFromMarkdown);
                      returnData.push(newItem);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Markdown = Markdown;
  //# sourceMappingURL=Markdown.node.js.map

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

  # Markdown

  The Markdown node converts between Markdown and HTML formats.

  ## Operations

  This node's operations are **Modes**:

  * **Markdown to HTML**: Use this mode to convert from Markdown to HTML.
  * **HTML to Markdown**: Use this mode to convert from HTML to Markdown.

  ## Node parameters

  * **HTML** or **Markdown**: Enter the data you want to convert. The field name changes based on which **Mode** you select.
  * **Destination Key**: Enter the field you want to put the output in. Specify nested fields using dots, for example `level1.level2.newKey`.

  ## Node options

  The node's **Options** depend on the **Mode** selected.

  /// note | Test out the options
  Some of the options depend on each other or can interact. We recommend testing out options to confirm the effects are what you want.
  ///

  ### Markdown to HTML options

  | Option | Description | Default |
  | ------ | ----------- | ------- |
  | **Add Blank To Links** | Whether to open links a new window (enabled) or not (disabled). | Disabled |
  | **Automatic Linking To URLs** | Whether to automatically link to URLs (enabled) or not (disabled). If enabled, n8n converts any string that it identifies as a URL to a link. | Disabled |
  | **Backslash Escapes HTML Tags** | Whether to allow backslash escaping of HTML tags (enabled) or not (disabled). When enabled, n8n escapes any `<` or `>` prefaced with `\`. For example, `\<div\>` renders as `&lt;div&gt;`.  | Disabled |
  | **Complete HTML Document** | Whether to output a complete HTML document (enabled) or an HTML fragment (disabled). A complete HTML document includes the `<DOCTYPE HTML>` declaration, `<html>` and `<body>` tags, and the `<head>` element.  | Disabled |
  | **Customized Header ID** | Whether to support custom heading IDs (enabled) or not (disabled). When enabled, you can add custom heading IDs using `{header ID here}` after the heading text. | Disabled |
  | **Emoji Support** | Whether to support emojis (enabled) or not (disabled). | Disabled. |
  | **Encode Emails** | Whether to transform ASCII character emails into their equivalent decimal entities (enabled) or not (disabled). | Enabled | 
  | **Exclude Trailing Punctuation From URLs** | Whether to exclude trailing punctuation from automatically linked URLs (enabled) or not (disabled). For use with **Automatic Linking To URLs**. | Disabled |
  | **GitHub Code Blocks** | Whether to enable GitHub Flavored Markdown code blocks (enabled) or not (disabled). | Enabled |
  | **GitHub Compatible Header IDs** | Whether to generate GitHub Flavored Markdown heading IDs (enabled) or not (disabled). GitHub Flavored Markdown generates heading IDs with `-` in place of spaces and removes non-alphanumeric characters. | Disabled |
  | **GitHub Mention Link** | Change the link used with **GitHub Mentions**.  | Disabled |
  | **GitHub Mentions** | Whether to support tagging GitHub users with `@` (enabled) or not (disabled). When enabled, n8n replaces `@name` with `https://github.com/name`. | Disabled |
  | **GitHub Task Lists** | Whether to support GitHub Flavored Markdown task lists (enabled) or not (disabled). | Disabled |
  | **Header Level Start** | Number. Set the start level for headers. For example, changing this field to `2` causes n8n to treat `#` as `<h2>`, `##` as `<h3>`, and so on. | 1 |
  | **Mandatory Space Before Header** | Whether to make a space between `#` and heading text required (enabled) or not (disabled). When enabled, n8n renders a heading written as `##Some header text` literally (it doesn't turn it into a heading element) | Disabled |
  | **Middle Word Asterisks** | Whether n8n should treat asterisks in words as Markdown (disabled) or render them as literal asterisks (enabled). | Disabled |
  | **Middle Word Underscores** | Whether n8n should treat underscores in words as Markdown (disabled) or render them as literal underscores (enabled). | Disabled |
  | **No Header ID** | Disable automatic generation of header IDs (enabled). | Disabled |
  | **Parse Image Dimensions** | Support setting maximum image dimensions in Markdown syntax (enabled). | Disabled |
  | **Prefix Header ID** | Define a prefix to add to header IDs. | None |
  | **Raw Header ID** | Whether to remove spaces, `'`, and `"` from header IDs, including prefixes, replacing them with `-` (enabled) or not (disabled). | Disabled |
  | **Raw Prefix Header ID** | Whether to prevent n8n from modifying header prefixes (enabled) or not (disabled) | Disabled |
  | **Simple Line Breaks** | Whether to create line breaks without a double space at the end of a line (enabled) or not (disabled). | Disabled |
  | **Smart Indentation Fix** | Whether to try to smartly fix indentation problems related to ES6 template strings in indented code blocks (enabled) or not (disabled). | Disabled |
  | **Spaces Indented Sublists** | Whether to remove the requirement to indent sublists four spaces (enabled) or not (disabled). | Disabled |
  | **Split Adjacent Blockquotes** | Whether to split adjacent blockquote blocks (enabled) or not (disabled). If you don't enable this, n8n treats quotes (indicated by `>` at the start of the line) on separate lines as a single blockquote, even when separated by an empty line.  | Disabled |
  | **Strikethrough** | Whether to support strikethrough syntax (enabled) or not (disabled). When enabled, you can add a ~~strikethrough~~ effect using `~~` around the word or phrase. | Disabled |
  | **Tables Header ID** | Whether to add an ID to table header tags (enabled) or not (disabled). | Disabled |
  | **Tables Support** | Whether to support tables (enabled) or not (disabled). | Disabled |

  ### HTML to Markdown options

  | Option | Description | Default |
  | ------ | ----------- | ------- |
  | **Bullet Marker** | Specify the character to use for unordered lists. | * |
  | **Code Block Fence** | Specify the characters to use for code blocks. | ``` |
  | **Emphasis Delimiter** | Specify the character `<em>`. | _ |
  | **Global Escape Pattern** | Overrides the default character escape settings. You may want to use Text Replacement Pattern instead. | None |
  | **Ignored Elements** | Ignore given HTML elements, and their children. | None |
  | **Keep Images With Data** | Whether to keep images with data (enabled) or not (disabled). Support files up to 1MB. | Disabled |
  | **Line Start Escape Pattern** | Overrides the default character escape settings. You may want to use Text Replacement Pattern instead. | None |
  | **Max Consecutive New Lines** | Number. Specify the maximum number of consecutive new lines allowed. | 3 |
  | **Place URLs At The Bottom** | Whether to place URLs at the bottom of the page and format using link reference definitions (enabled) or not (disabled). | Disabled |
  | **Strong Delimiter** | Specify the characters for `<strong>`. | ** |
  | **Style For Code Block** | Specify the styling for code blocks. Options are **Fence** and **Indented**. | Fence |
  | **Text Replacement Pattern** | Define a text replacement pattern using regex. | None |
  | **Treat As Blocks** | Specify HTML elements to treat as blocks (surround with blank lines) | None |

  ## Templates and examples

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

  ## Parsers

  n8n uses the following parsers:

  * To convert from HTML to Markdown: [node-html-markdown](https://www.npmjs.com/package/node-html-markdown){:target=_blank .external-link}.
  * To convert from Markdown to HTML: [Showdown](https://www.npmjs.com/package/showdown){:target=_blank .external-link}. Some options allow you to extend your Markdown with [GitHub Flavored Markdown](https://github.github.com/gfm/){:target=_blank .external-link}.

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


