# nodes

node_type: n8n-nodes-base.MailerLite
name: MailerLite
display_name: MailerLite
description: Consume Mailer Lite API
category: input
icon: file:mailerLite.png
code_hash: 0af5a52cc8e0d27ceca5f43ceaaa2ad33788a2b44bba34875a96dc54014452fb
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.MailerLite
documentation_title: MailerLite node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mailerlite","description":"Templates for mailerlite"}]
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailerLite = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const SubscriberDescription_1 = require("./SubscriberDescription");
  class MailerLite {
      constructor() {
          this.description = {
              displayName: 'MailerLite',
              name: 'mailerLite',
              icon: 'file:mailerLite.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mailer Lite API',
              defaults: {
                  name: 'MailerLite',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mailerLiteApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Subscriber',
                              value: 'subscriber',
                          },
                      ],
                      default: 'subscriber',
                  },
                  ...SubscriberDescription_1.subscriberOperations,
                  ...SubscriberDescription_1.subscriberFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCustomFields() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.mailerliteApiRequest.call(this, 'GET', '/fields');
                      for (const field of fields) {
                          returnData.push({
                              name: field.key,
                              value: field.key,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'subscriber') {
                      if (operation === 'create') {
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              email,
                              fields: [],
                          };
                          Object.assign(body, additionalFields);
                          if (additionalFields.customFieldsUi) {
                              const customFieldsValues = additionalFields.customFieldsUi
                                  .customFieldsValues;
                              if (customFieldsValues) {
                                  const fields = {};
                                  for (const customFieldValue of customFieldsValues) {
                                      fields[customFieldValue.fieldId] = customFieldValue.value;
                                  }
                                  body.fields = fields;
                                  delete body.customFieldsUi;
                              }
                          }
                          responseData = await GenericFunctions_1.mailerliteApiRequest.call(this, 'POST', '/subscribers', body);
                      }
                      if (operation === 'get') {
                          const subscriberId = this.getNodeParameter('subscriberId', i);
                          responseData = await GenericFunctions_1.mailerliteApiRequest.call(this, 'GET', `/subscribers/${subscriberId}`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mailerliteApiRequestAllItems.call(this, 'GET', '/subscribers', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mailerliteApiRequest.call(this, 'GET', '/subscribers', {}, qs);
                          }
                      }
                      if (operation === 'update') {
                          const subscriberId = this.getNodeParameter('subscriberId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          if (updateFields.customFieldsUi) {
                              const customFieldsValues = updateFields.customFieldsUi
                                  .customFieldsValues;
                              if (customFieldsValues) {
                                  const fields = {};
                                  for (const customFieldValue of customFieldsValues) {
                                      fields[customFieldValue.fieldId] = customFieldValue.value;
                                  }
                                  body.fields = fields;
                                  delete body.customFieldsUi;
                              }
                          }
                          responseData = await GenericFunctions_1.mailerliteApiRequest.call(this, 'PUT', `/subscribers/${subscriberId}`, body);
                      }
                  }
              }
              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.MailerLite = MailerLite;
  //# sourceMappingURL=MailerLite.node.js.map

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

  // --- Next Credential File ---

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

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

  # MailerLite node

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

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

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

  ## Operations

  * Subscriber
      * Create a new subscriber
      * Get an subscriber
      * Get all subscribers
      * Update an subscriber

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Mandrill
name: Mandrill
display_name: Mandrill
description: Consume Mandrill API
category: output
icon: file:mandrill.svg
code_hash: 657483f4909d3e32f7e699bcb912c62b28ebb22b51a309fd9b7b73c498f6680b
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mandrill
documentation_title: Mandrill node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mandrill","description":"Templates for mandrill"}]
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.Mandrill = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_1 = __importDefault(require("moment"));
  const map_1 = __importDefault(require("lodash/map"));
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  class Mandrill {
      constructor() {
          this.description = {
              displayName: 'Mandrill',
              name: 'mandrill',
              icon: 'file:mandrill.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mandrill API',
              defaults: {
                  name: 'Mandrill',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mandrillApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                              description: 'Send a message',
                          },
                      ],
                      default: 'message',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['message'],
                          },
                      },
                      options: [
                          {
                              name: 'Send Template',
                              value: 'sendTemplate',
                              description: 'Send message based on template',
                              action: 'Send a message based on a template',
                          },
                          {
                              name: 'Send HTML',
                              value: 'sendHtml',
                              description: 'Send message based on HTML',
                              action: 'Send a message based on HTML',
                          },
                      ],
                      default: 'sendTemplate',
                  },
                  {
                      displayName: 'Template Name or ID',
                      name: 'template',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getTemplates',
                      },
                      displayOptions: {
                          show: {
                              operation: ['sendTemplate'],
                          },
                      },
                      default: '',
                      options: [],
                      required: true,
                      description: 'The template you want to send. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'From Email',
                      name: 'fromEmail',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: 'Admin <example@yourdomain.com>',
                      description: 'Email address of the sender optional with name',
                      displayOptions: {
                          show: {
                              operation: ['sendHtml', 'sendTemplate'],
                          },
                      },
                  },
                  {
                      displayName: 'To Email',
                      name: 'toEmail',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: 'info@example.com',
                      description: 'Email address of the recipient. Multiple ones can be separated by comma.',
                      displayOptions: {
                          show: {
                              operation: ['sendHtml', 'sendTemplate'],
                          },
                      },
                  },
                  {
                      displayName: 'JSON Parameters',
                      name: 'jsonParameters',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              operation: ['sendHtml', 'sendTemplate'],
                          },
                      },
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['sendHtml', 'sendTemplate'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Async',
                              name: 'async',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the \'reject\' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.',
                          },
                          {
                              displayName: 'Auto Text',
                              name: 'autoText',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to automatically generate a text part for messages that are not given text',
                          },
                          {
                              displayName: 'Auto HTML',
                              name: 'autoHtml',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to automatically generate an HTML part for messages that are not given HTML',
                          },
                          {
                              displayName: 'BCC Address',
                              name: 'bccAddress',
                              type: 'string',
                              default: '',
                              placeholder: 'message.bcc_address@example.com',
                              description: "An optional address to receive an exact copy of each recipient's email",
                          },
                          {
                              displayName: 'From Name',
                              name: 'fromName',
                              type: 'string',
                              default: '',
                              placeholder: 'John Doe',
                              description: 'Optional from name to be used',
                          },
                          {
                              displayName: 'Google Analytics Campaign',
                              name: 'googleAnalyticsCampaign',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: "Optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.",
                          },
                          {
                              displayName: 'Google Analytics Domains',
                              name: 'googleAnalyticsDomains',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'An array of strings separated by a comma (,) indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically',
                          },
                          {
                              displayName: 'HTML',
                              name: 'html',
                              type: 'string',
                              default: '',
                              typeOptions: {
                                  rows: 5,
                              },
                              options: [],
                              description: 'The html you want to send',
                          },
                          {
                              displayName: 'Important',
                              name: 'important',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not this message is important, and should be delivered ahead of non-important messages',
                          },
                          {
                              displayName: 'Inline CSS',
                              name: 'inlineCss',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size',
                          },
                          {
                              displayName: 'Ip Pool',
                              name: 'ipPool',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'The name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.',
                          },
                          {
                              displayName: 'Preserve Recipients',
                              name: 'preserveRecipients',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to expose all recipients in to "To" header for each email',
                          },
                          {
                              displayName: 'Return Path Domain',
                              name: 'returnPathDomain',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: "A custom domain to use for the messages's return-path",
                          },
                          {
                              displayName: 'Sent At',
                              name: 'sendAt',
                              type: 'dateTime',
                              default: '',
                              placeholder: '',
                              description: 'When this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.',
                          },
                          {
                              displayName: 'Signing Domain',
                              name: 'signingDomain',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'A custom domain to use for SPF/DKIM signing instead of mandrill(for "via" or "on behalf of" in email clients)',
                          },
                          {
                              displayName: 'Subaccount',
                              name: 'subAccount',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'The unique ID of a subaccount for this message - must already exist or will fail with an error',
                          },
                          {
                              displayName: 'Subject',
                              name: 'subject',
                              type: 'string',
                              default: '',
                              placeholder: 'My subject line',
                              description: 'Subject line of the email',
                          },
                          {
                              displayName: 'Tags',
                              name: 'tags',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'An array of string separated by a comma (,) to tag the message with. Stats are accumulated using tags, though we only store the first 100 we see, so this should not be unique or change frequently. Tags should be 50 characters or less. Any tags starting with an underscore are reserved for internal use and will cause errors.',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              default: '',
                              typeOptions: {
                                  rows: 5,
                              },
                              options: [],
                              description: 'Example text content',
                          },
                          {
                              displayName: 'Track Clicks',
                              name: 'trackClicks',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to turn on click tracking for the message',
                          },
                          {
                              displayName: 'Track Opens',
                              name: 'trackOpens',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to turn on open tracking for the message',
                          },
                          {
                              displayName: 'Tracking Domain',
                              name: 'trackingDomain',
                              type: 'string',
                              default: '',
                              placeholder: '',
                              description: 'A custom domain to use for tracking opens and clicks instead of mandrillapp.com',
                          },
                          {
                              displayName: 'Url Strip Qs',
                              name: 'urlStripQs',
                              type: 'boolean',
                              default: false,
                              description: 'Whether or not to strip the query string from URLs when aggregating tracked URL data',
                          },
                          {
                              displayName: 'View Content Link',
                              name: 'viewContentLink',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to remove content logging for sensitive emails',
                          },
                      ],
                  },
                  {
                      displayName: 'Merge Vars',
                      name: 'mergeVarsJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      default: '',
                      placeholder: `[
  	{
  		{ "name": "name", "content": "content" }
  	}
  ]`,
                      displayOptions: {
                          show: {
                              jsonParameters: [true],
                          },
                      },
                      description: 'Global merge variables',
                  },
                  {
                      displayName: 'Merge Vars',
                      name: 'mergeVarsUi',
                      placeholder: 'Add Merge Vars',
                      type: 'fixedCollection',
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [false],
                          },
                      },
                      description: 'Per-recipient merge variables',
                      options: [
                          {
                              name: 'mergeVarsValues',
                              displayName: 'Vars',
                              values: [
                                  {
                                      displayName: 'Name',
                                      name: 'name',
                                      type: 'string',
                                      default: '',
                                  },
                                  {
                                      displayName: 'Content',
                                      name: 'content',
                                      type: 'string',
                                      default: '',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Metadata',
                      name: 'metadataUi',
                      placeholder: 'Add Metadata',
                      type: 'fixedCollection',
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [false],
                          },
                      },
                      description: 'Metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.',
                      options: [
                          {
                              name: 'metadataValues',
                              displayName: 'Metadata',
                              values: [
                                  {
                                      displayName: 'Name',
                                      name: 'name',
                                      type: 'string',
                                      default: 'Name of the metadata key to add.',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'string',
                                      default: '',
                                      description: 'Value to set for the metadata key',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Metadata',
                      name: 'metadataJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [true],
                          },
                      },
                      default: '',
                      placeholder: `{
  	"website": "www.example.com"
  }`,
                      description: 'Metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.',
                  },
                  {
                      displayName: 'Attachments',
                      name: 'attachmentsJson',
                      type: 'json',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [true],
                          },
                      },
                      default: '',
                      placeholder: `[
  	{
  		"type": "text/plain" (the MIME type of the attachment),
  		"name": "myfile.txt" (the file name of the attachment),
  		"content": "ZXhhbXBsZSBmaWxl" (the content of the attachment as a base64-encoded string)
  	}
  ]`,
                      description: 'An array of supported attachments to add to the message',
                  },
                  {
                      displayName: 'Attachments',
                      name: 'attachmentsUi',
                      placeholder: 'Add Attachments',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [false],
                          },
                      },
                      options: [
                          {
                              name: 'attachmentsValues',
                              displayName: 'Attachments Values',
                              values: [
                                  {
                                      displayName: 'Type',
                                      name: 'type',
                                      type: 'string',
                                      default: '',
                                      placeholder: 'text/plain',
                                      description: 'The MIME type of the attachment',
                                  },
                                  {
                                      displayName: 'Name',
                                      name: 'name',
                                      type: 'string',
                                      default: '',
                                      placeholder: 'myfile.txt',
                                      description: 'The file name of the attachment',
                                  },
                                  {
                                      displayName: 'Content',
                                      name: 'content',
                                      type: 'string',
                                      default: '',
                                      placeholder: 'ZXhhbXBsZSBmaWxl',
                                      description: 'The content of the attachment as a base64-encoded string',
                                  },
                              ],
                          },
                          {
                              name: 'attachmentsBinary',
                              displayName: 'Attachments Binary',
                              values: [
                                  {
                                      displayName: 'Property',
                                      name: 'property',
                                      type: 'string',
                                      default: '',
                                      description: 'Name of the binary properties which contain data which should be added to email as attachment',
                                  },
                              ],
                          },
                      ],
                      default: {},
                      description: 'Array of supported attachments to add to the message',
                  },
                  {
                      displayName: 'Headers',
                      name: 'headersJson',
                      type: 'json',
                      default: '',
                      placeholder: `{
  	"Reply-To": "replies@example.com"
  }`,
                      displayOptions: {
                          show: {
                              jsonParameters: [true],
                          },
                      },
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      description: 'Optional extra headers to add to the message (most headers are allowed)',
                  },
                  {
                      displayName: 'Headers',
                      name: 'headersUi',
                      placeholder: 'Add Headers',
                      type: 'fixedCollection',
                      default: {},
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              jsonParameters: [false],
                          },
                      },
                      options: [
                          {
                              name: 'headersValues',
                              displayName: 'Values',
                              values: [
                                  {
                                      displayName: 'Name',
                                      name: 'name',
                                      type: 'string',
                                      default: '',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'string',
                                      default: '',
                                  },
                              ],
                          },
                      ],
                      description: 'Optional extra headers to add to the message (most headers are allowed)',
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTemplates() {
                      const returnData = [];
                      let templates;
                      try {
                          templates = await GenericFunctions_1.mandrillApiRequest.call(this, '/templates', 'POST', '/list');
                      }
                      catch (error) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                      }
                      for (const template of templates) {
                          const templateName = template.name;
                          const templateSlug = template.slug;
                          returnData.push({
                              name: templateName,
                              value: templateSlug,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const returnData = [];
          const items = this.getInputData();
          let responseData;
          let emailSentResponse;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'message') {
                      const options = this.getNodeParameter('options', i);
                      const fromEmail = this.getNodeParameter('fromEmail', i);
                      const toEmail = this.getNodeParameter('toEmail', i);
                      const jsonActive = this.getNodeParameter('jsonParameters', i);
                      const toEmailArray = (0, GenericFunctions_1.getToEmailArray)(toEmail);
                      const message = {
                          html: options.html ? options.html : '',
                          text: options.text ? options.text : '',
                          subject: options.subject ? options.subject : '',
                          from_email: fromEmail,
                          to: toEmailArray,
                          important: options.important ? options.important : false,
                          track_opens: options.trackOpens ? options.trackOpens : false,
                          track_clicks: options.trackClicks ? options.trackClicks : false,
                          auto_text: options.autoText ? options.autoText : false,
                          auto_html: options.autoHtml ? options.autoHtml : false,
                          inline_css: options.inlineCss ? options.inlineCss : false,
                          url_strip_qs: options.urlStripQs ? options.urlStripQs : false,
                          preserve_recipients: options.preserveRecipients ? options.preserveRecipients : false,
                          view_content_link: options.viewContentLink ? options.viewContentLink : false,
                          async: options.async ? options.async : false,
                          google_analytics_campaign: options.googleAnalyticsCampaign
                              ? options.googleAnalyticsCampaign
                              : '',
                          ip_pool: options.ipPool ? options.ipPool : '',
                          bcc_address: options.bccAddress ? options.bccAddress : '',
                          tracking_domain: options.trackingDomain ? options.trackingDomain : '',
                          signing_domain: options.signingDomain ? options.signingDomain : '',
                          return_path_domain: options.returnPathDomain ? options.returnPathDomain : '',
                      };
                      if (options.googleAnalyticsDomains) {
                          message.google_analytics_domains = (0, GenericFunctions_1.getGoogleAnalyticsDomainsArray)(options.googleAnalyticsDomains);
                      }
                      if (options.tags) {
                          message.tags = (0, GenericFunctions_1.getTags)(options.tags);
                      }
                      if (options.fromName) {
                          message.from_name = options.fromName;
                      }
                      if (options.subaccount) {
                          message.subaccount = options.subaccount;
                      }
                      const body = {
                          template_content: [],
                          message,
                      };
                      if (options.sendAt) {
                          body.send_at = (0, moment_1.default)(options.sendAt).utc().format('YYYY-MM-DD HH:mm:ss');
                      }
                      if (jsonActive) {
                          body.message.headers = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('headersJson', i));
                          body.message.metadata = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('metadataJson', i));
                          body.message.global_merge_vars = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('mergeVarsJson', i));
                          body.message.attachments = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('attachmentsJson', i));
                      }
                      else {
                          const headersUi = this.getNodeParameter('headersUi', i);
                          if (!(0, isEmpty_1.default)(headersUi)) {
                              body.message.headers = (0, map_1.default)(headersUi.headersValues, (o) => {
                                  const aux = {};
                                  aux[o.name] = o.value;
                                  return aux;
                              });
                          }
                          const metadataUi = this.getNodeParameter('metadataUi', i);
                          if (!(0, isEmpty_1.default)(metadataUi)) {
                              body.message.metadata = (0, map_1.default)(metadataUi.metadataValues, (o) => {
                                  const aux = {};
                                  aux[o.name] = o.value;
                                  return aux;
                              });
                          }
                          const mergeVarsUi = this.getNodeParameter('mergeVarsUi', i);
                          if (!(0, isEmpty_1.default)(mergeVarsUi)) {
                              body.message.global_merge_vars = (0, map_1.default)(mergeVarsUi.mergeVarsValues, (o) => {
                                  const aux = {};
                                  aux.name = o.name;
                                  aux.content = o.content;
                                  return aux;
                              });
                          }
                          const attachmentsUi = this.getNodeParameter('attachmentsUi', i);
                          let attachmentsBinary = [], attachmentsValues = [];
                          if (!(0, isEmpty_1.default)(attachmentsUi)) {
                              if (attachmentsUi.hasOwnProperty('attachmentsValues') &&
                                  !(0, isEmpty_1.default)(attachmentsUi.attachmentsValues)) {
                                  attachmentsValues = (0, map_1.default)(attachmentsUi.attachmentsValues, (o) => {
                                      const aux = {};
                                      aux.name = o.name;
                                      aux.content = o.content;
                                      aux.type = o.type;
                                      return aux;
                                  });
                              }
                              if (attachmentsUi.hasOwnProperty('attachmentsBinary') &&
                                  !(0, isEmpty_1.default)(attachmentsUi.attachmentsBinary) &&
                                  items[i].binary) {
                                  attachmentsBinary = (0, map_1.default)(attachmentsUi.attachmentsBinary, (o) => {
                                      if (items[i].binary.hasOwnProperty(o.property)) {
                                          const aux = {};
                                          aux.name = items[i].binary[o.property].fileName || 'unknown';
                                          aux.content = items[i].binary[o.property].data;
                                          aux.type = items[i].binary[o.property].mimeType;
                                          return aux;
                                      }
                                  });
                              }
                          }
                          body.message.attachments = attachmentsBinary.concat(attachmentsValues);
                      }
                      if (operation === 'sendTemplate') {
                          const template = this.getNodeParameter('template', i);
                          body.template_name = template;
                          emailSentResponse = GenericFunctions_1.mandrillApiRequest.call(this, '/messages', 'POST', '/send-template', body);
                      }
                      else if (operation === 'sendHtml') {
                          emailSentResponse = GenericFunctions_1.mandrillApiRequest.call(this, '/messages', 'POST', '/send', body);
                      }
                      responseData = await emailSentResponse;
                  }
                  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.Mandrill = Mandrill;
  //# sourceMappingURL=Mandrill.node.js.map

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

  // --- Next Credential File ---

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

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

  # Mandrill node

  Use the Mandrill node to automate work in Mandrill, and integrate Mandrill with other applications. n8n supports sending messages based on templates or HTML with Mandrill.

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

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

  ## Operations

  * Message
      * Send message based on template.
      * Send message based on HTML.

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Mailgun
name: Mailgun
display_name: Mailgun
description: Sends an email via Mailgun
category: output
icon: file:mailgun.svg
code_hash: c3138d05def2613a2fc1ee670a81307bc48fc7a70ed95b0077f03a6ebd69f044
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mailgun
documentation_title: Mailgun node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mailgun","description":"Templates for mailgun"}]
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mailgun = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class Mailgun {
      constructor() {
          this.description = {
              displayName: 'Mailgun',
              name: 'mailgun',
              icon: 'file:mailgun.svg',
              group: ['output'],
              version: 1,
              description: 'Sends an email via Mailgun',
              defaults: {
                  name: 'Mailgun',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mailgunApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'From Email',
                      name: 'fromEmail',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: 'Admin <admin@example.com>',
                      description: 'Email address of the sender optional with name',
                  },
                  {
                      displayName: 'To Email',
                      name: 'toEmail',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: 'info@example.com',
                      description: 'Email address of the recipient. Multiple ones can be separated by comma.',
                  },
                  {
                      displayName: 'Cc Email',
                      name: 'ccEmail',
                      type: 'string',
                      default: '',
                      placeholder: '',
                      description: 'Cc Email address of the recipient. Multiple ones can be separated by comma.',
                  },
                  {
                      displayName: 'Bcc Email',
                      name: 'bccEmail',
                      type: 'string',
                      default: '',
                      placeholder: '',
                      description: 'Bcc Email address of the recipient. Multiple ones can be separated by comma.',
                  },
                  {
                      displayName: 'Subject',
                      name: 'subject',
                      type: 'string',
                      default: '',
                      placeholder: 'My subject line',
                      description: 'Subject line of the email',
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      typeOptions: {
                          rows: 5,
                      },
                      default: '',
                      description: 'Plain text message of email',
                  },
                  {
                      displayName: 'HTML',
                      name: 'html',
                      type: 'string',
                      typeOptions: {
                          rows: 5,
                          editor: 'htmlEditor',
                      },
                      default: '',
                      description: 'HTML text message of email',
                  },
                  {
                      displayName: 'Attachments',
                      name: 'attachments',
                      type: 'string',
                      default: '',
                      description: 'Name of the binary properties which contain data which should be added to email as attachment. Multiple ones can be comma-separated.',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let item;
          for (let itemIndex = 0; itemIndex < length; itemIndex++) {
              try {
                  item = items[itemIndex];
                  const fromEmail = this.getNodeParameter('fromEmail', itemIndex);
                  const toEmail = this.getNodeParameter('toEmail', itemIndex);
                  const ccEmail = this.getNodeParameter('ccEmail', itemIndex);
                  const bccEmail = this.getNodeParameter('bccEmail', itemIndex);
                  const subject = this.getNodeParameter('subject', itemIndex);
                  const text = this.getNodeParameter('text', itemIndex);
                  const html = this.getNodeParameter('html', itemIndex);
                  const attachmentPropertyString = this.getNodeParameter('attachments', itemIndex);
                  const credentials = await this.getCredentials('mailgunApi');
                  const formData = {
                      from: fromEmail,
                      to: toEmail,
                      subject,
                      text,
                      html,
                  };
                  if (ccEmail.length !== 0) {
                      formData.cc = ccEmail;
                  }
                  if (bccEmail.length !== 0) {
                      formData.bcc = bccEmail;
                  }
                  if (attachmentPropertyString && item.binary) {
                      const attachments = [];
                      const attachmentProperties = attachmentPropertyString
                          .split(',')
                          .map((propertyName) => {
                          return propertyName.trim();
                      });
                      for (const propertyName of attachmentProperties) {
                          const binaryData = this.helpers.assertBinaryData(itemIndex, propertyName);
                          const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(itemIndex, propertyName);
                          attachments.push({
                              value: binaryDataBuffer,
                              options: {
                                  filename: binaryData.fileName || 'unknown',
                              },
                          });
                      }
                      if (attachments.length) {
                          formData.attachment = attachments;
                      }
                  }
                  const options = {
                      method: 'POST',
                      formData,
                      uri: `https://${credentials.apiDomain}/v3/${credentials.emailDomain}/messages`,
                      json: true,
                  };
                  let responseData;
                  try {
                      responseData = await this.helpers.requestWithAuthentication.call(this, 'mailgunApi', options);
                  }
                  catch (error) {
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: itemIndex } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: itemIndex } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Mailgun = Mailgun;
  //# sourceMappingURL=Mailgun.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailgunApi = void 0;
  class MailgunApi {
      constructor() {
          this.name = 'mailgunApi';
          this.displayName = 'Mailgun API';
          this.documentationUrl = 'mailgun';
          this.properties = [
              {
                  displayName: 'API Domain',
                  name: 'apiDomain',
                  type: 'options',
                  options: [
                      {
                          name: 'api.eu.mailgun.net',
                          value: 'api.eu.mailgun.net',
                      },
                      {
                          name: 'api.mailgun.net',
                          value: 'api.mailgun.net',
                      },
                  ],
                  default: 'api.mailgun.net',
                  description: 'The configured mailgun API domain',
              },
              {
                  displayName: 'Email Domain',
                  name: 'emailDomain',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: 'api',
                      password: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.apiDomain}}/v3',
                  url: '/domains',
              },
          };
      }
  }
  exports.MailgunApi = MailgunApi;
  //# sourceMappingURL=MailgunApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MailgunApi = void 0;
  class MailgunApi {
      constructor() {
          this.name = 'mailgunApi';
          this.displayName = 'Mailgun API';
          this.documentationUrl = 'mailgun';
          this.properties = [
              {
                  displayName: 'API Domain',
                  name: 'apiDomain',
                  type: 'options',
                  options: [
                      {
                          name: 'api.eu.mailgun.net',
                          value: 'api.eu.mailgun.net',
                      },
                      {
                          name: 'api.mailgun.net',
                          value: 'api.mailgun.net',
                      },
                  ],
                  default: 'api.mailgun.net',
                  description: 'The configured mailgun API domain',
              },
              {
                  displayName: 'Email Domain',
                  name: 'emailDomain',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: 'api',
                      password: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.apiDomain}}/v3',
                  url: '/domains',
              },
          };
      }
  }
  exports.MailgunApi = MailgunApi;
  //# sourceMappingURL=MailgunApi.credentials.js.map

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

  # Mailgun node

  Use the Mailgun node to automate work in Mailgun, and integrate Mailgun with other applications. n8n has built-in support for sending emails with Mailgun. 

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

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

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

  ## Operations

  - Send an email

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Marketstack
name: Marketstack
display_name: Marketstack
description: Consume Marketstack API
category: transform
icon: file:marketstack.svg
code_hash: 098ff7375610f64c4f10cdaa78dbfa45ab7c388f1349b0dec97e88a16ec18538
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Marketstack
documentation_title: marketstack node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"marketstack","description":"Templates for marketstack"}]
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Marketstack = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Marketstack {
      constructor() {
          this.description = {
              displayName: 'Marketstack',
              name: 'marketstack',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              icon: 'file:marketstack.svg',
              group: ['transform'],
              version: 1,
              description: 'Consume Marketstack API',
              defaults: {
                  name: 'Marketstack',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'marketstackApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'End-of-Day Data',
                              value: 'endOfDayData',
                              description: 'Stock market closing data',
                          },
                          {
                              name: 'Exchange',
                              value: 'exchange',
                              description: 'Stock market exchange',
                          },
                          {
                              name: 'Ticker',
                              value: 'ticker',
                              description: 'Stock market symbol',
                          },
                      ],
                      default: 'endOfDayData',
                      required: true,
                  },
                  ...descriptions_1.endOfDayDataOperations,
                  ...descriptions_1.endOfDayDataFields,
                  ...descriptions_1.exchangeOperations,
                  ...descriptions_1.exchangeFields,
                  ...descriptions_1.tickerOperations,
                  ...descriptions_1.tickerFields,
              ],
          };
      }
      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 === 'endOfDayData') {
                      if (operation === 'getAll') {
                          const qs = {
                              symbols: this.getNodeParameter('symbols', i),
                          };
                          const { latest, specificDate, dateFrom, dateTo, ...rest } = this.getNodeParameter('filters', i);
                          GenericFunctions_1.validateTimeOptions.call(this, [
                              latest !== undefined && latest,
                              specificDate !== undefined,
                              dateFrom !== undefined && dateTo !== undefined,
                          ]);
                          if (Object.keys(rest).length) {
                              Object.assign(qs, rest);
                          }
                          let endpoint;
                          if (latest) {
                              endpoint = '/eod/latest';
                          }
                          else if (specificDate) {
                              endpoint = `/eod/${(0, GenericFunctions_1.format)(specificDate)}`;
                          }
                          else {
                              if (!dateFrom || !dateTo) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please enter a start and end date to filter by timeframe.', { itemIndex: i });
                              }
                              endpoint = '/eod';
                              qs.date_from = (0, GenericFunctions_1.format)(dateFrom);
                              qs.date_to = (0, GenericFunctions_1.format)(dateTo);
                          }
                          responseData = await GenericFunctions_1.marketstackApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                      }
                  }
                  else if (resource === 'exchange') {
                      if (operation === 'get') {
                          const exchange = this.getNodeParameter('exchange', i);
                          const endpoint = `/exchanges/${exchange}`;
                          responseData = await GenericFunctions_1.marketstackApiRequest.call(this, 'GET', endpoint);
                      }
                  }
                  else if (resource === 'ticker') {
                      if (operation === 'get') {
                          const symbol = this.getNodeParameter('symbol', i);
                          const endpoint = `/tickers/${symbol}`;
                          responseData = await GenericFunctions_1.marketstackApiRequest.call(this, 'GET', endpoint);
                      }
                  }
              }
              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.Marketstack = Marketstack;
  //# sourceMappingURL=Marketstack.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MarketstackApi = void 0;
  class MarketstackApi {
      constructor() {
          this.name = 'marketstackApi';
          this.displayName = 'Marketstack API';
          this.documentationUrl = 'marketstack';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Use HTTPS',
                  name: 'useHttps',
                  type: 'boolean',
                  default: false,
                  description: 'Whether to use HTTPS (paid plans only)',
              },
          ];
      }
  }
  exports.MarketstackApi = MarketstackApi;
  //# sourceMappingURL=MarketstackApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MarketstackApi = void 0;
  class MarketstackApi {
      constructor() {
          this.name = 'marketstackApi';
          this.displayName = 'Marketstack API';
          this.documentationUrl = 'marketstack';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Use HTTPS',
                  name: 'useHttps',
                  type: 'boolean',
                  default: false,
                  description: 'Whether to use HTTPS (paid plans only)',
              },
          ];
      }
  }
  exports.MarketstackApi = MarketstackApi;
  //# sourceMappingURL=MarketstackApi.credentials.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: marketstack node documentation
  description: Learn how to use the marketstack node in n8n. Follow technical documentation to integrate marketstack node into your workflows.
  contentType: [integration, reference]
  ---
  <!-- marketstack is not a typo. The brand name is all lowercase, so we match it -->
  # marketstack node

  Use the marketstack node to automate work in marketstack, and integrate marketstack with other applications. n8n has built-in support for a wide range of marketstack features, including getting exchanges, end-of-day data, and tickers. 

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

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

  ## Operations

  * End-of-Day Data
      * Get All
  * Exchange
      * Get
  * Ticker
      * Get

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Matrix
name: Matrix
display_name: Matrix
description: Consume Matrix API
category: output
icon: file:matrix.png
code_hash: 91e527aaf38b57561fef448ed86f0079de7a086d1320bda1df4c98a5c3c6a43c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Matrix
documentation_title: Matrix node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"matrix","description":"Templates for matrix"}]
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Matrix = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const AccountDescription_1 = require("./AccountDescription");
  const EventDescription_1 = require("./EventDescription");
  const MediaDescription_1 = require("./MediaDescription");
  const MessageDescription_1 = require("./MessageDescription");
  const RoomDescription_1 = require("./RoomDescription");
  const RoomMemberDescription_1 = require("./RoomMemberDescription");
  class Matrix {
      constructor() {
          this.description = {
              displayName: 'Matrix',
              name: 'matrix',
              icon: 'file:matrix.png',
              group: ['output'],
              version: 1,
              description: 'Consume Matrix API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Matrix',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'matrixApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Media',
                              value: 'media',
                          },
                          {
                              name: 'Message',
                              value: 'message',
                          },
                          {
                              name: 'Room',
                              value: 'room',
                          },
                          {
                              name: 'Room Member',
                              value: 'roomMember',
                          },
                      ],
                      default: 'message',
                  },
                  ...AccountDescription_1.accountOperations,
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...MediaDescription_1.mediaOperations,
                  ...MediaDescription_1.mediaFields,
                  ...MessageDescription_1.messageOperations,
                  ...MessageDescription_1.messageFields,
                  ...RoomDescription_1.roomOperations,
                  ...RoomDescription_1.roomFields,
                  ...RoomMemberDescription_1.roomMemberOperations,
                  ...RoomMemberDescription_1.roomMemberFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getChannels() {
                      const returnData = [];
                      const joinedRoomsResponse = await GenericFunctions_1.matrixApiRequest.call(this, 'GET', '/joined_rooms');
                      await Promise.all(joinedRoomsResponse.joined_rooms.map(async (roomId) => {
                          try {
                              const roomNameResponse = await GenericFunctions_1.matrixApiRequest.call(this, 'GET', `/rooms/${roomId}/state/m.room.name`);
                              returnData.push({
                                  name: roomNameResponse.name,
                                  value: roomId,
                              });
                          }
                          catch (error) {
                              returnData.push({
                                  name: `Unknown: ${roomId}`,
                                  value: roomId,
                              });
                          }
                      }));
                      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 resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  const responseData = await GenericFunctions_1.handleMatrixCall.call(this, items[i], i, resource, operation);
                  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.Matrix = Matrix;
  //# sourceMappingURL=Matrix.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MatrixApi = void 0;
  class MatrixApi {
      constructor() {
          this.name = 'matrixApi';
          this.displayName = 'Matrix API';
          this.documentationUrl = 'matrix';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Homeserver URL',
                  name: 'homeserverUrl',
                  type: 'string',
                  default: 'https://matrix-client.matrix.org',
              },
          ];
      }
  }
  exports.MatrixApi = MatrixApi;
  //# sourceMappingURL=MatrixApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MatrixApi = void 0;
  class MatrixApi {
      constructor() {
          this.name = 'matrixApi';
          this.displayName = 'Matrix API';
          this.documentationUrl = 'matrix';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Homeserver URL',
                  name: 'homeserverUrl',
                  type: 'string',
                  default: 'https://matrix-client.matrix.org',
              },
          ];
      }
  }
  exports.MatrixApi = MatrixApi;
  //# sourceMappingURL=MatrixApi.credentials.js.map

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

  # Matrix node

  Use the Matrix node to automate work in Matrix, and integrate Matrix with other applications. n8n has built-in support for a wide range of Matrix features, including getting current user's account information, sending media and messages to a room, and getting room members and messages.

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

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

  ## Operations

  * Account
      * Get current user's account information
  * Event
      * Get single event by ID
  * Media
      * Send media to a chat room
  * Message
      * Send a message to a room
      * Gets all messages from a room
  * Room
      * New chat room with defined settings
      * Invite a user to a room
      * Join a new room
      * Kick a user from a room
      * Leave a room
  * Room Member
      * Get all members

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Mailjet
name: Mailjet
display_name: Mailjet
description: Consume Mailjet API
category: output
icon: file:mailjet.svg
code_hash: 9a100847b669fd304f2adac69dade7b637bd6b0910312a076e1061b42b66f35c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mailjet
documentation_title: Mailjet node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mailjet","description":"Templates for mailjet"}]
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mailjet = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const EmailDescription_1 = require("./EmailDescription");
  const SmsDescription_1 = require("./SmsDescription");
  class Mailjet {
      constructor() {
          this.description = {
              displayName: 'Mailjet',
              name: 'mailjet',
              icon: 'file:mailjet.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mailjet API',
              defaults: {
                  name: 'Mailjet',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mailjetEmailApi',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['email'],
                          },
                      },
                  },
                  {
                      name: 'mailjetSmsApi',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Email',
                              value: 'email',
                          },
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                      ],
                      default: 'email',
                  },
                  ...EmailDescription_1.emailOperations,
                  ...EmailDescription_1.emailFields,
                  ...SmsDescription_1.smsOperations,
                  ...SmsDescription_1.smsFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTemplates() {
                      const returnData = [];
                      const { Data: templates } = await GenericFunctions_1.mailjetApiRequest.call(this, 'GET', '/v3/REST/template');
                      for (const template of templates) {
                          returnData.push({
                              name: template.Name,
                              value: template.ID,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          var _a;
          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 === 'send') {
                          const fromEmail = this.getNodeParameter('fromEmail', i);
                          const htmlBody = this.getNodeParameter('html', i);
                          const textBody = this.getNodeParameter('text', i);
                          const subject = this.getNodeParameter('subject', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const toEmail = this.getNodeParameter('toEmail', i).split(',');
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              From: {
                                  Email: fromEmail,
                              },
                              Subject: subject,
                              To: [],
                              Cc: [],
                              Bcc: [],
                              Variables: {},
                          };
                          for (const email of toEmail) {
                              (_a = body.To) === null || _a === void 0 ? void 0 : _a.push({
                                  Email: email,
                              });
                          }
                          if (jsonParameters) {
                              const variablesJson = this.getNodeParameter('variablesJson', i);
                              const parsedJson = (0, GenericFunctions_1.validateJSON)(variablesJson);
                              if (parsedJson === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Parameter 'Variables (JSON)' has a invalid JSON", { itemIndex: i });
                              }
                              body.Variables = parsedJson;
                          }
                          else {
                              const variables = this.getNodeParameter('variablesUi', i)
                                  .variablesValues || [];
                              for (const variable of variables) {
                                  body.Variables[variable.name] = variable.value;
                              }
                          }
                          if (htmlBody) {
                              body.HTMLPart = htmlBody;
                          }
                          if (textBody) {
                              body.TextPart = textBody;
                          }
                          if (additionalFields.bccEmail) {
                              const bccEmail = additionalFields.bccEmail.split(',');
                              for (const email of bccEmail) {
                                  body.Bcc.push({
                                      Email: email,
                                  });
                              }
                          }
                          if (additionalFields.ccAddresses) {
                              const ccEmail = additionalFields.ccAddresses.split(',');
                              for (const email of ccEmail) {
                                  body.Cc.push({
                                      Email: email,
                                  });
                              }
                          }
                          if (additionalFields.trackOpens) {
                              body.TrackOpens = additionalFields.trackOpens;
                          }
                          if (additionalFields.replyTo) {
                              const replyTo = additionalFields.replyTo;
                              body.ReplyTo = {
                                  Email: replyTo,
                              };
                          }
                          if (additionalFields.trackClicks) {
                              body.TrackClicks = additionalFields.trackClicks;
                          }
                          if (additionalFields.fromName) {
                              body.From.Name = additionalFields.fromName;
                          }
                          if (additionalFields.templateLanguage) {
                              body.TemplateLanguage = additionalFields.templateLanguage;
                          }
                          if (additionalFields.priority) {
                              body.Priority = additionalFields.priority;
                          }
                          responseData = await GenericFunctions_1.mailjetApiRequest.call(this, 'POST', '/v3.1/send', {
                              Messages: [body],
                          });
                          responseData = responseData.Messages;
                      }
                      if (operation === 'sendTemplate') {
                          const fromEmail = this.getNodeParameter('fromEmail', i);
                          const templateId = parseInt(this.getNodeParameter('templateId', i), 10);
                          const subject = this.getNodeParameter('subject', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const toEmail = this.getNodeParameter('toEmail', i).split(',');
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              From: {
                                  Email: fromEmail,
                              },
                              Subject: subject,
                              To: [],
                              Cc: [],
                              Bcc: [],
                              Variables: {},
                              TemplateID: templateId,
                          };
                          for (const email of toEmail) {
                              body.To.push({
                                  Email: email,
                              });
                          }
                          if (jsonParameters) {
                              const variablesJson = this.getNodeParameter('variablesJson', i);
                              const parsedJson = (0, GenericFunctions_1.validateJSON)(variablesJson);
                              if (parsedJson === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Parameter 'Variables (JSON)' has a invalid JSON", { itemIndex: i });
                              }
                              body.Variables = parsedJson;
                          }
                          else {
                              const variables = this.getNodeParameter('variablesUi', i)
                                  .variablesValues || [];
                              for (const variable of variables) {
                                  body.Variables[variable.name] = variable.value;
                              }
                          }
                          if (additionalFields.bccEmail) {
                              const bccEmail = additionalFields.bccEmail.split(',');
                              for (const email of bccEmail) {
                                  body.Bcc.push({
                                      Email: email,
                                  });
                              }
                          }
                          if (additionalFields.ccEmail) {
                              const ccEmail = additionalFields.ccEmail.split(',');
                              for (const email of ccEmail) {
                                  body.Cc.push({
                                      Email: email,
                                  });
                              }
                          }
                          if (additionalFields.replyTo) {
                              const replyTo = additionalFields.replyTo;
                              body.ReplyTo = {
                                  Email: replyTo,
                              };
                          }
                          if (additionalFields.trackOpens) {
                              body.TrackOpens = additionalFields.trackOpens;
                          }
                          if (additionalFields.trackClicks) {
                              body.TrackClicks = additionalFields.trackClicks;
                          }
                          if (additionalFields.fromName) {
                              body.From.Name = additionalFields.fromName;
                          }
                          if (additionalFields.templateLanguage) {
                              body.TemplateLanguage = additionalFields.templateLanguage;
                          }
                          if (additionalFields.priority) {
                              body.Priority = additionalFields.priority;
                          }
                          responseData = await GenericFunctions_1.mailjetApiRequest.call(this, 'POST', '/v3.1/send', {
                              Messages: [body],
                          });
                          responseData = responseData.Messages;
                      }
                  }
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          const from = this.getNodeParameter('from', i);
                          const to = this.getNodeParameter('to', i);
                          const text = this.getNodeParameter('text', i);
                          const body = {
                              From: from,
                              To: to,
                              Text: text,
                          };
                          responseData = await GenericFunctions_1.mailjetApiRequest.call(this, 'POST', '/v4/sms-send', 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.Mailjet = Mailjet;
  //# sourceMappingURL=Mailjet.node.js.map

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

  # Mailjet node

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

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

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

  ## Operations

  * Email
      * Send an email
      * Send an email template
  * SMS
      * Send an SMS

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.ManualTrigger
name: ManualTrigger
display_name: Manual Trigger
description: Runs the flow on clicking a button in n8n
category: trigger
icon: fa:mouse-pointer
code_hash: 3f35cd3f09861e28f965057221a8ecbf622153067834b57309d254a96f85c787
example_parameters: {"pollTimes":{"item":[{"mode":"everyMinute"}]}}
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";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ManualTrigger = void 0;
  class ManualTrigger {
      constructor() {
          this.description = {
              displayName: 'Manual Trigger',
              name: 'manualTrigger',
              icon: 'fa:mouse-pointer',
              group: ['trigger'],
              version: 1,
              description: 'Runs the flow on clicking a button in n8n',
              eventTriggerDescription: '',
              maxNodes: 1,
              defaults: {
                  name: 'When clicking "Execute Workflow"',
                  color: '#909298',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'This node is where a manual workflow execution starts. To make one, go back to the canvas and click ‘execute workflow’',
                      name: 'notice',
                      type: 'notice',
                      default: '',
                  },
              ],
          };
      }
      async trigger() {
          const manualTriggerFunction = async () => {
              this.emit([this.helpers.returnJsonArray([{}])]);
          };
          return {
              manualTriggerFunction,
          };
      }
  }
  exports.ManualTrigger = ManualTrigger;
  //# sourceMappingURL=ManualTrigger.node.js.map

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


node_type: n8n-nodes-base.Merge
name: Merge
display_name: Merge
description: Merges data of multiple streams once data from both is available
category: transform
icon: fa:code-branch
code_hash: 7ea8c21ecbdf79a2e935cdf1aa4e4c4c9f9c1139d9ffaaea0a767c41878b1ce8
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Merge
documentation_title: Merge
operations: []
api_methods: []
templates: [{"name":"merge","description":"Templates for merge"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Merge = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const MergeV1_node_1 = require("./v1/MergeV1.node");
  const MergeV2_node_1 = require("./v2/MergeV2.node");
  class Merge extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Merge',
              name: 'merge',
              icon: 'fa:code-branch',
              group: ['transform'],
              subtitle: '={{$parameter["mode"]}}',
              description: 'Merges data of multiple streams once data from both is available',
              defaultVersion: 2.1,
          };
          const nodeVersions = {
              1: new MergeV1_node_1.MergeV1(baseDescription),
              2: new MergeV2_node_1.MergeV2(baseDescription),
              2.1: new MergeV2_node_1.MergeV2(baseDescription),
              2.2: new MergeV2_node_1.MergeV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Merge = Merge;
  //# sourceMappingURL=Merge.node.js.map

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

  # Merge

  Use the Merge node to combine data from multiple streams, once data of all streams is available.

  /// note | Major changes in 0.194.0
  The n8n team overhauled this node in n8n 0.194.0. This document reflects the latest version of the node. If you're using an older version of n8n, you can find the previous version of this document [here](https://github.com/n8n-io/n8n-docs/blob/4ff688642cc9ee7ca7d00987847bf4e4515da59d/docs/integrations/builtin/core-nodes/n8n-nodes-base.merge.md){:target=_blank .external-link}.
  ///

  /// note | Minor changes in 1.49.0
  n8n version 1.49.0 introduced the option to add more than two inputs. Older versions only support up to two inputs. If you're running an older version and want to combine multiple inputs in these versions, use the [Code node](https://deploy-preview-2225--n8n-docs.netlify.app/code/code-node/).

  The **Mode > SQL Query** feature was also added in n8n version 1.49.0 and isn't available in older versions.
  ///

  ## Node parameters

  You can specify how the Merge node should combine data from different data streams by choosing a **Mode**: 

  ### Append

  Keep data from all inputs. Choose a **Number of Inputs** to output items of each input, one after another. The node waits for the execution of all connected inputs. 

  <figure markdown="span">
  ![Sample Append mode inputs and output. Two separate data sources are on the left, one with items A, B, C and one with items D, E, F. The final data source combines both and lists A, B, C, D, E, F.](/_images/integrations/builtin/core-nodes/merge/append-diagram.png)
  <figcaption>Append mode inputs and output</figcaption>
  </figure>

  ### Combine

  Combine data from two inputs. Select an option in **Combine By** to determine how you want to merge the input data.

  #### Matching Fields

  Compare items by field values. Enter the fields you want to compare in **Fields to Match**. 

  n8n's default behavior is to keep matching items. You can change this using the **Output Type** setting:

  * **Keep Matches**: Merge items that match. This is like an inner join.
  * **Keep Non-Matches**: Merge items that don't match.
  * **Keep Everything**: Merge items together that do match and include items that don't match. This is like an outer join.
  * **Enrich Input 1**: Keep all data from Input 1, and add matching data from Input 2. This is like a left join.
  * **Enrich Input 2**: Keep all data from Input 2, and add matching data from Input 1. This is like a right join.

  <figure markdown="span">
  ![Sample Combine mode inputs and output. Two separate data sources are on the left. The final data source combines these data sources by matching fields.](/_images/integrations/builtin/core-nodes/merge/merge-by-field-diagram.png)
  <figcaption>Combine by Matching Fields mode inputs and output</figcaption>
  </figure>


  #### Position

  Combine items based on their order. The item at index 0 in Input 1 merges with the item at index 0 in Input 2, and so on.

  <figure markdown="span">
  ![Sample Combine mode inputs and output. Two separate data sources are on the left. The final data source combines these data sources by index position.](/_images/integrations/builtin/core-nodes/merge/merge-by-position-diagram.png)
  <figcaption>Combine by Position mode inputs and output</figcaption>
  </figure>


  #### All Possible Combinations

  Output all possible item combinations, while merging fields with the same name.

  <figure markdown="span">
  ![Sample Combine mode inputs and output. Two separate data sources are on the left. The final data source combines these data sources by all possible combinations.](/_images/integrations/builtin/core-nodes/merge/multiplex-diagram.png)
  <figcaption>Combine by All Possible Combinations mode inputs and output</figcaption>
  </figure>

  #### Combine mode options

  When merging data by **Mode > Combine**, you can set these **Options**:

  * **Clash Handling**: Choose how to merge when data streams clash, or when there are sub-fields. Refer to [Clash handling](#clash-handling) for details.
  * **Fuzzy Compare**: Whether to tolerate type differences when comparing fields (enabled), or not (disabled, default). For example, when you enable this, n8n treats `"3"` and `3` as the same.
  * **Disable Dot Notation**: This prevents accessing child fields using `parent.child` in the field name.
  * **Multiple Matches**: Choose how n8n handles multiple matches when comparing data streams.
      * **Include All Matches**: Output multiple items if there are multiple matches, one for each match.
      * **Include First Match Only**: Keep the first item per match and discard the remaining multiple matches.
  * **Include Any Unpaired Items**: Choose whether to keep or discard unpaired items when merging by position. The default behavior is to leave out the items without a match. 

  ##### Clash Handling

  --8<-- "_snippets/integrations/builtin/core-nodes/merge/field-value-clash.md"

  ### SQL Query

  Write a custom SQL Query to merge the data. 

  Example: 
  ```sql
  SELECT * FROM input1 LEFT JOIN input2 ON input1.name = input2.id
  ```

  Data from previous nodes are available as tables and you can use them in the SQL query as input1, input2, input3, and so on, based on their order. Refer to [AlaSQL GitHub page](https://github.com/alasql/alasql/wiki/Supported-SQL-statements){:target=_blank .external-link} for a full list of supported SQL statements. 

  ### Choose Branch

  Choose which input to keep. This option always waits until the data from both inputs is available. You can choose to **Output**:

  * The **Input 1 Data**
  * The **Input 2 Data**
  * **A Single, Empty Item**

  The node outputs the data from the chosen input, without changing it.

  ## Templates and examples

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

  ## Merging data streams with uneven numbers of items

  The items passed into Input 1 of the Merge node will take precedence. For example, if the Merge node receives five items in Input 1 and 10 items in Input 2, it only processes five items. The remaining five items from Input 2 aren't processed.

  ## Branch execution with If and Merge nodes

  --8<-- "_snippets/integrations/builtin/core-nodes/merge/if-merge-branch-execution.md"


  ## Try it out: A step by step example

  Create a workflow with some example input data to try out the Merge node.

  ### Set up sample data using the Code nodes

  1. Add a Code node to the canvas and connect it to the Start node.
  2. Paste the following JavaScript code snippet in the **JavaScript Code** field:
  ```js
  return [
    {
      json: {
        name: 'Stefan',
        language: 'de',
      }
    },
    {
      json: {
        name: 'Jim',
        language: 'en',
      }
    },
    {
      json: {
        name: 'Hans',
        language: 'de',
      }
    }
  ];
  ```
  3. Add a second Code node, and connect it to the Start node.
  4. Paste the following JavaScript code snippet in the **JavaScript Code** field:
  ```js
  return [
  	  {
      json: {
        greeting: 'Hello',
        language: 'en',
      }
    },
    {
      json: {
        greeting: 'Hallo',
        language: 'de',
      }
    }
  ];
  ```

  ### Try out different merge modes

  Add the Merge node. Connect the first Code node to **Input 1**, and the second Code node to **Input 2**. Run the workflow to load data into the Merge node.

  The final workflow should look like this:

  [[ workflowDemo("https://api.n8n.io/workflows/templates/655") ]]

  Now try different options in **Mode** to see how it affects the output data.

  #### Append

  Select **Mode** > **Append**, then select **Execute step**.

  Your output in table view should look like this:
  <!-- vale off -->
  | **name** | **language** | **greeting** |
  | --- | --- | --- |
  | Stefan | de |  |
  | Jim | en |  |
  | Hans | de |  |
  |   | en | Hello |
  |   | de | Hallo |
  <!-- vale on -->

  #### Combine by Matching Fields

  You can merge these two data inputs so that each person gets the correct greeting for their language.

  1. Select **Mode** > **Combine**.
  2. Select **Combine by** > **Matching Fields**.
  3. In both **Input 1 Field** and **Input 2 Field**, enter `language`. This tells n8n to combine the data by matching the values in the `language` field in each data set.
  4. Select **Execute step**.

  Your output in table view should look like this:
  <!-- vale off -->

  | **name** | **language** | **greeting** |
  | --- | --- | --- |
  | Stefan | de | Hallo |
  | Jim | en | Hello  |
  | Hans | de | Hallo |
  <!-- vale on -->

  #### Combine by Position

  Select **Mode** > **Combine**, **Combine by** > **Position**, then select **Execute step**.

  Your output in table view should look like this:
  <!-- vale off -->
  | **name** | **language** | **greeting** |
  | --- | --- | --- |
  | Stefan | en | Hello |
  | Jim | de | Hallo  |
  <!-- vale on -->

  ##### Keep unpaired items

  If you want to keep all items, select **Add Option** > **Include Any Unpaired Items**, then turn on **Include Any Unpaired Items**.

  Your output in table view should look like this:
  <!-- vale off -->
  | **name** | **language** | **greeting** |
  | --- | --- | --- |
  | Stefan | en | Hello |
  | Jim | de | Hallo  |
  | Hans | de |  |
  <!-- vale on -->

  #### Combine by All Possible Combinations 

  Select **Mode** > **Combine**, **Combine by** > **All Possible Combinations**, then select **Execute step**.

  Your output in table view should look like this:
  <!-- vale off -->
  | **name** | **language** | **greeting** |
  | --- | --- | --- |
  | Stefan | en | Hello |
  | Stefan | de | Hallo |
  | Jim | en | Hello  |
  | Jim | de | Hallo |
  | Hans | en | Hello |
  | Hans | de | Hallo |
  <!-- vale on -->

documentation_examples:
  [{"type":"text","language":"sql","code":"SELECT * FROM input1 LEFT JOIN input2 ON input1.name = input2.id","title":"Clash Handling"},{"type":"javascript","language":"js","code":"return [\n  {\n    json: {\n      name: 'Stefan',\n      language: 'de',\n    }\n  },\n  {\n    json: {\n      name: 'Jim',\n      language: 'en',\n    }\n  },\n  {\n    json: {\n      name: 'Hans',\n      language: 'de',\n    }\n  }\n];","title":"Set up sample data using the Code nodes"},{"type":"javascript","language":"js","code":"return [\n\t  {\n    json: {\n      greeting: 'Hello',\n      language: 'en',\n    }\n  },\n  {\n    json: {\n      greeting: 'Hallo',\n      language: 'de',\n    }\n  }\n];"}]

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


node_type: n8n-nodes-base.Mattermost
name: Mattermost
display_name: Mattermost
description: Sends data to Mattermost
category: output
icon: file:mattermost.svg
code_hash: 9a4b0669740615e90e6eefc2f30d8de6a43dac3305dd908b29e49c48787130fb
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mattermost
documentation_title: Mattermost node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mattermost","description":"Templates for mattermost"}]
related_resources: [{"title":"Mattermost's documentation","url":"https://api.mattermost.com/","type":"api"}]
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mattermost = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const MattermostV1_node_1 = require("./v1/MattermostV1.node");
  class Mattermost extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Mattermost',
              name: 'mattermost',
              icon: 'file:mattermost.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Sends data to Mattermost',
              defaultVersion: 1,
          };
          const nodeVersions = {
              1: new MattermostV1_node_1.MattermostV1(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Mattermost = Mattermost;
  //# sourceMappingURL=Mattermost.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MattermostApi = void 0;
  class MattermostApi {
      constructor() {
          this.name = 'mattermostApi';
          this.displayName = 'Mattermost API';
          this.documentationUrl = 'mattermost';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.baseUrl.replace(/\\/$/, "")}}/api/v4',
                  url: '/users',
                  skipSslCertificateValidation: '={{$credentials?.allowUnauthorizedCerts}}',
              },
          };
      }
  }
  exports.MattermostApi = MattermostApi;
  //# sourceMappingURL=MattermostApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MattermostApi = void 0;
  class MattermostApi {
      constructor() {
          this.name = 'mattermostApi';
          this.displayName = 'Mattermost API';
          this.documentationUrl = 'mattermost';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Ignore SSL Issues',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.baseUrl.replace(/\\/$/, "")}}/api/v4',
                  url: '/users',
                  skipSslCertificateValidation: '={{$credentials?.allowUnauthorizedCerts}}',
              },
          };
      }
  }
  exports.MattermostApi = MattermostApi;
  //# sourceMappingURL=MattermostApi.credentials.js.map

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

  # Mattermost node

  Use the Mattermost node to automate work in Mattermost, and integrate Mattermost with other applications. n8n has built-in support for a wide range of Mattermost features, including creating, deleting, and getting channels, and users, as well as posting messages, and adding reactions.

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

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

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

  ## Operations

  * Channel
      * Add a user to a channel
      * Create a new channel
      * Soft delete a channel
      * Get a page of members for a channel
      * Restores a soft deleted channel
      * Search for a channel
      * Get statistics for a channel
  * Message
      * Soft delete a post, by marking the post as deleted in the database
      * Post a message into a channel
      * Post an ephemeral message into a channel
  * Reaction
      * Add a reaction to a post.
      * Remove a reaction from a post
      * Get all the reactions to one or more posts
  * User
      * Create a new user
      * Deactivates the user and revokes all its sessions by archiving its user object.
      * Retrieve all users
      * Get a user by email
      * Get a user by ID
      * Invite user to team


  ## Templates and examples

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

  ## Related resources

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

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

  ## Channel ID field error

  If you're not the System Administrator, you might get an error: **there was a problem loading the parameter options from server: "Mattermost error response: You do not have the appropriate permissions.** next to the **Channel ID** field.

  Ask your system administrator to grant you the `post:channel` permission.

  ## Find the channel ID

  To find the channel ID in Mattermost:

  1. Select the channel from the left sidebar.
  2. Select the channel name at the top.
  3. Select **View Info**.

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


node_type: n8n-nodes-base.MessageBird
name: MessageBird
display_name: MessageBird
description: Sends SMS via MessageBird
category: output
icon: file:messagebird.svg
code_hash: faf1b5016a688104f7c30fde0b8b2b93731a2df58937aad8efc85e0be6ece42c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.MessageBird
documentation_title: MessageBird node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"messagebird","description":"Templates for messagebird"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MessageBird = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class MessageBird {
      constructor() {
          this.description = {
              displayName: 'MessageBird',
              name: 'messageBird',
              icon: 'file:messagebird.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Sends SMS via MessageBird',
              defaults: {
                  name: 'MessageBird',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'messageBirdApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                          {
                              name: 'Balance',
                              value: 'balance',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send text messages (SMS)',
                              action: 'Send an SMS',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['balance'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get the balance',
                              action: 'Get the current balance',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'From',
                      name: 'originator',
                      type: 'string',
                      default: '',
                      placeholder: '14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The number from which to send the message',
                  },
                  {
                      displayName: 'To',
                      name: 'recipients',
                      type: 'string',
                      default: '',
                      placeholder: '14155238886/+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'All recipients separated by commas',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The message to be send',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      placeholder: 'Add Fields',
                      default: {},
                      options: [
                          {
                              displayName: 'Created Date-Time',
                              name: 'createdDatetime',
                              type: 'dateTime',
                              default: '',
                              description: 'The date and time of the creation of the message in RFC3339 format (Y-m-dTH:i:sP)',
                          },
                          {
                              displayName: 'Datacoding',
                              name: 'datacoding',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Auto',
                                      value: 'auto',
                                  },
                                  {
                                      name: 'Plain',
                                      value: 'plain',
                                  },
                                  {
                                      name: 'Unicode',
                                      value: 'unicode',
                                  },
                              ],
                              default: '',
                              description: 'Using unicode will limit the maximum number of characters to 70 instead of 160',
                          },
                          {
                              displayName: 'Gateway',
                              name: 'gateway',
                              type: 'number',
                              default: '',
                              description: 'The SMS route that is used to send the message',
                          },
                          {
                              displayName: 'Group IDs',
                              name: 'groupIds',
                              placeholder: '1,2',
                              type: 'string',
                              default: '',
                              description: 'Group IDs separated by commas, If provided recipients can be omitted',
                          },
                          {
                              displayName: 'Message Type',
                              name: 'mclass',
                              type: 'options',
                              placeholder: 'Permissible values from 0-3',
                              options: [
                                  {
                                      name: 'Flash',
                                      value: 1,
                                  },
                                  {
                                      name: 'Normal',
                                      value: 0,
                                  },
                              ],
                              default: 1,
                              description: 'Indicated the message type. 1 is a normal message, 0 is a flash message.',
                          },
                          {
                              displayName: 'Reference',
                              name: 'reference',
                              type: 'string',
                              default: '',
                              description: 'A client reference',
                          },
                          {
                              displayName: 'Report Url',
                              name: 'reportUrl',
                              type: 'string',
                              default: '',
                              description: 'The status report URL to be used on a per-message basis. Reference is required for a status report webhook to be sent.',
                          },
                          {
                              displayName: 'Scheduled Date-Time',
                              name: 'scheduledDatetime',
                              type: 'dateTime',
                              default: '',
                              description: 'The scheduled date and time of the message in RFC3339 format (Y-m-dTH:i:sP)',
                          },
                          {
                              displayName: 'Type',
                              name: 'type',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Binary',
                                      value: 'binary',
                                  },
                                  {
                                      name: 'Flash',
                                      value: 'flash',
                                  },
                                  {
                                      name: 'SMS',
                                      value: 'sms',
                                  },
                              ],
                              default: '',
                              description: 'The type of message. Values can be: sms, binary, or flash.',
                          },
                          {
                              displayName: 'Type Details',
                              name: 'typeDetails',
                              type: 'string',
                              default: '',
                              description: 'A hash with extra information. Is only used when a binary message is sent.',
                          },
                          {
                              displayName: 'Validity',
                              name: 'validity',
                              type: 'number',
                              default: 1,
                              typeOptions: {
                                  minValue: 1,
                              },
                              description: 'The amount of seconds that the message is valid',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let operation;
          let resource;
          let bodyRequest = {};
          let qs;
          let requestMethod;
          let requestPath;
          for (let i = 0; i < items.length; i++) {
              qs = {};
              try {
                  resource = this.getNodeParameter('resource', i);
                  operation = this.getNodeParameter('operation', i);
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          requestMethod = 'POST';
                          requestPath = '/messages';
                          const originator = this.getNodeParameter('originator', i);
                          const body = this.getNodeParameter('message', i);
                          bodyRequest = {
                              recipients: [],
                              originator,
                              body,
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.groupIds) {
                              bodyRequest.groupIds = additionalFields.groupIds;
                          }
                          if (additionalFields.type) {
                              bodyRequest.type = additionalFields.type;
                          }
                          if (additionalFields.reference) {
                              bodyRequest.reference = additionalFields.reference;
                          }
                          if (additionalFields.reportUrl) {
                              bodyRequest.reportUrl = additionalFields.reportUrl;
                          }
                          if (additionalFields.validity) {
                              bodyRequest.validity = additionalFields.reportUrl;
                          }
                          if (additionalFields.gateway) {
                              bodyRequest.gateway = additionalFields.gateway;
                          }
                          if (additionalFields.typeDetails) {
                              bodyRequest.typeDetails = additionalFields.typeDetails;
                          }
                          if (additionalFields.datacoding) {
                              bodyRequest.datacoding = additionalFields.datacoding;
                          }
                          if (additionalFields.mclass) {
                              bodyRequest.mclass = additionalFields.mclass;
                          }
                          if (additionalFields.scheduledDatetime) {
                              bodyRequest.scheduledDatetime = additionalFields.scheduledDatetime;
                          }
                          if (additionalFields.createdDatetime) {
                              bodyRequest.createdDatetime = additionalFields.createdDatetime;
                          }
                          const receivers = this.getNodeParameter('recipients', i);
                          bodyRequest.recipients = receivers.split(',').map((item) => {
                              return parseInt(item, 10);
                          });
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'balance') {
                      requestMethod = 'GET';
                      requestPath = '/balance';
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  const responseData = await GenericFunctions_1.messageBirdApiRequest.call(this, requestMethod, requestPath, bodyRequest, qs);
                  returnData.push(responseData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.MessageBird = MessageBird;
  //# sourceMappingURL=MessageBird.node.js.map

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

  // --- Next Credential File ---

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

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

  # MessageBird node

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

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

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

  ## Operations

  * SMS
      * Send text messages (SMS)
  * Balance
      * Get the balance

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Metabase
name: Metabase
display_name: Metabase
description: Use the Metabase API
category: transform
icon: file:metabase.svg
code_hash: 629de446f4ba15b8957d92fa93685d006e99cb0fee1e36c14a0e40ceeaf99abd
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Metabase
documentation_title: Metabase node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"metabase","description":"Templates for metabase"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Metabase = void 0;
  const QuestionsDescription_1 = require("./QuestionsDescription");
  const MetricsDescription_1 = require("./MetricsDescription");
  const DatabasesDescription_1 = require("./DatabasesDescription");
  const AlertsDescription_1 = require("./AlertsDescription");
  class Metabase {
      constructor() {
          this.description = {
              displayName: 'Metabase',
              name: 'metabase',
              icon: 'file:metabase.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Use the Metabase API',
              defaults: {
                  name: 'Metabase',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'metabaseApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  returnFullResponse: true,
                  baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
                  headers: {},
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Alert',
                              value: 'alerts',
                          },
                          {
                              name: 'Database',
                              value: 'databases',
                          },
                          {
                              name: 'Metric',
                              value: 'metrics',
                          },
                          {
                              name: 'Question',
                              value: 'questions',
                          },
                      ],
                      default: 'questions',
                  },
                  ...QuestionsDescription_1.questionsOperations,
                  ...QuestionsDescription_1.questionsFields,
                  ...MetricsDescription_1.metricsOperations,
                  ...MetricsDescription_1.metricsFields,
                  ...DatabasesDescription_1.databasesOperations,
                  ...DatabasesDescription_1.databasesFields,
                  ...AlertsDescription_1.alertsOperations,
                  ...AlertsDescription_1.alertsFields,
              ],
          };
      }
  }
  exports.Metabase = Metabase;
  //# sourceMappingURL=Metabase.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MetabaseApi = void 0;
  class MetabaseApi {
      constructor() {
          this.name = 'metabaseApi';
          this.displayName = 'Metabase API';
          this.documentationUrl = 'metabase';
          this.properties = [
              {
                  displayName: 'Session Token',
                  name: 'sessionToken',
                  type: 'hidden',
                  typeOptions: {
                      expirable: true,
                  },
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Metabase-Session': '={{$credentials.sessionToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials?.url}}',
                  url: '/api/user/current',
              },
          };
      }
      async preAuthentication(credentials) {
          const url = credentials.url;
          const { id } = (await this.helpers.httpRequest({
              method: 'POST',
              url: `${url.endsWith('/') ? url.slice(0, -1) : url}/api/session`,
              body: {
                  username: credentials.username,
                  password: credentials.password,
              },
          }));
          return { sessionToken: id };
      }
  }
  exports.MetabaseApi = MetabaseApi;
  //# sourceMappingURL=MetabaseApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MetabaseApi = void 0;
  class MetabaseApi {
      constructor() {
          this.name = 'metabaseApi';
          this.displayName = 'Metabase API';
          this.documentationUrl = 'metabase';
          this.properties = [
              {
                  displayName: 'Session Token',
                  name: 'sessionToken',
                  type: 'hidden',
                  typeOptions: {
                      expirable: true,
                  },
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Metabase-Session': '={{$credentials.sessionToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials?.url}}',
                  url: '/api/user/current',
              },
          };
      }
      async preAuthentication(credentials) {
          const url = credentials.url;
          const { id } = (await this.helpers.httpRequest({
              method: 'POST',
              url: `${url.endsWith('/') ? url.slice(0, -1) : url}/api/session`,
              body: {
                  username: credentials.username,
                  password: credentials.password,
              },
          }));
          return { sessionToken: id };
      }
  }
  exports.MetabaseApi = MetabaseApi;
  //# sourceMappingURL=MetabaseApi.credentials.js.map

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

  # Metabase node

  Use the Metabase node to automate work in Metabase, and integrate Metabase with other applications. n8n has built-in support for a wide range of Metabase features, including adding, and getting alerts, databases, metrics, and questions. 

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

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

  ## Operations

  * Alert
      * Get
      * Get All
  * Database
      * Add
      * Get All
      * Get Fields
  * Metric
      * Get
      * Get All
  * Question
      * Get
      * Get All
      * Result Data

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Medium
name: Medium
display_name: Medium
description: Consume Medium API
category: output
icon: file:medium.png
code_hash: bdfe9b89bafe735fe0197d624433da4cc151dac20cf5436856ca2885380539f9
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Medium
documentation_title: Medium node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"medium","description":"Templates for medium"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Medium = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Medium {
      constructor() {
          this.description = {
              displayName: 'Medium',
              name: 'medium',
              group: ['output'],
              icon: 'file:medium.png',
              version: 1,
              description: 'Consume Medium API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Medium',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mediumApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'mediumOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Post',
                              value: 'post',
                          },
                          {
                              name: 'Publication',
                              value: 'publication',
                          },
                      ],
                      default: 'post',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['post'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a post',
                              action: 'Create a post',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Publication',
                      name: 'publication',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['post'],
                              operation: ['create'],
                          },
                      },
                      default: false,
                      description: 'Whether you are posting for a publication',
                  },
                  {
                      displayName: 'Publication Name or ID',
                      name: 'publicationId',
                      type: 'options',
                      displayOptions: {
                          show: {
                              resource: ['post'],
                              operation: ['create'],
                              publication: [true],
                          },
                      },
                      typeOptions: {
                          loadOptionsMethod: 'getPublications',
                      },
                      default: '',
                      description: 'Publication IDs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Title',
                      name: 'title',
                      type: 'string',
                      default: '',
                      placeholder: 'My Open Source Contribution',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['post'],
                          },
                      },
                      description: 'Title of the post. Max Length : 100 characters.',
                  },
                  {
                      displayName: 'Content Format',
                      name: 'contentFormat',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['post'],
                          },
                      },
                      type: 'options',
                      options: [
                          {
                              name: 'HTML',
                              value: 'html',
                          },
                          {
                              name: 'Markdown',
                              value: 'markdown',
                          },
                      ],
                      description: 'The format of the content to be posted',
                  },
                  {
                      displayName: 'Content',
                      name: 'content',
                      type: 'string',
                      default: '',
                      placeholder: 'My open source contribution',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['post'],
                          },
                      },
                      description: 'The body of the post, in a valid semantic HTML fragment, or Markdown',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['post'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Canonical Url',
                              name: 'canonicalUrl',
                              type: 'string',
                              default: '',
                              description: 'The original home of this content, if it was originally published elsewhere',
                          },
                          {
                              displayName: 'License',
                              name: 'license',
                              type: 'options',
                              default: 'all-rights-reserved',
                              options: [
                                  {
                                      name: 'all-rights-reserved',
                                      value: 'all-rights-reserved',
                                  },
                                  {
                                      name: 'cc-40-by',
                                      value: 'cc-40-by',
                                  },
                                  {
                                      name: 'cc-40-by-nc',
                                      value: 'cc-40-by-nc',
                                  },
                                  {
                                      name: 'cc-40-by-nc-nd',
                                      value: 'cc-40-by-nc-nd',
                                  },
                                  {
                                      name: 'cc-40-by-nc-sa',
                                      value: 'cc-40-by-nc-sa',
                                  },
                                  {
                                      name: 'cc-40-by-nd',
                                      value: 'cc-40-by-nd',
                                  },
                                  {
                                      name: 'cc-40-by-sa',
                                      value: 'cc-40-by-sa',
                                  },
                                  {
                                      name: 'cc-40-zero',
                                      value: 'cc-40-zero',
                                  },
                                  {
                                      name: 'public-domain',
                                      value: 'public-domain',
                                  },
                              ],
                              description: 'License of the post',
                          },
                          {
                              displayName: 'Notify Followers',
                              name: 'notifyFollowers',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to notify followers that the user has published',
                          },
                          {
                              displayName: 'Publish Status',
                              name: 'publishStatus',
                              default: 'public',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Public',
                                      value: 'public',
                                  },
                                  {
                                      name: 'Draft',
                                      value: 'draft',
                                  },
                                  {
                                      name: 'Unlisted',
                                      value: 'unlisted',
                                  },
                              ],
                              description: 'The status of the post',
                          },
                          {
                              displayName: 'Tags',
                              name: 'tags',
                              type: 'string',
                              default: '',
                              placeholder: 'open-source,mlh,fellowship',
                              description: 'Comma-separated strings to be used as tags for post classification. Max allowed tags: 5. Max tag length: 25 characters.',
                          },
                      ],
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['publication'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many publications',
                              action: 'Get many publications',
                          },
                      ],
                      default: 'publication',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['publication'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['publication'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 200,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getPublications() {
                      const returnData = [];
                      const user = await GenericFunctions_1.mediumApiRequest.call(this, 'GET', '/me');
                      const userId = user.data.id;
                      const publications = await GenericFunctions_1.mediumApiRequest.call(this, 'GET', `/users/${userId}/publications`);
                      const publicationsList = publications.data;
                      for (const publication of publicationsList) {
                          const publicationName = publication.name;
                          const publicationId = publication.id;
                          returnData.push({
                              name: publicationName,
                              value: publicationId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let operation;
          let resource;
          let bodyRequest;
          let qs;
          let responseData;
          for (let i = 0; i < items.length; i++) {
              qs = {};
              try {
                  resource = this.getNodeParameter('resource', i);
                  operation = this.getNodeParameter('operation', i);
                  if (resource === 'post') {
                      if (operation === 'create') {
                          const title = this.getNodeParameter('title', i);
                          const contentFormat = this.getNodeParameter('contentFormat', i);
                          const content = this.getNodeParameter('content', i);
                          bodyRequest = {
                              tags: [],
                              title,
                              contentFormat,
                              content,
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.tags) {
                              const tags = additionalFields.tags;
                              bodyRequest.tags = tags.split(',').map((name) => {
                                  const returnValue = name.trim();
                                  if (returnValue.length > 25) {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The tag "${returnValue}" is to long. Maximum lenght of a tag is 25 characters.`, { itemIndex: i });
                                  }
                                  return returnValue;
                              });
                              if (bodyRequest.tags.length > 5) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'To many tags got used. Maximum 5 can be set.', { itemIndex: i });
                              }
                          }
                          if (additionalFields.canonicalUrl) {
                              bodyRequest.canonicalUrl = additionalFields.canonicalUrl;
                          }
                          if (additionalFields.publishStatus) {
                              bodyRequest.publishStatus = additionalFields.publishStatus;
                          }
                          if (additionalFields.license) {
                              bodyRequest.license = additionalFields.license;
                          }
                          if (additionalFields.notifyFollowers) {
                              bodyRequest.notifyFollowers = additionalFields.notifyFollowers;
                          }
                          const underPublication = this.getNodeParameter('publication', i);
                          if (underPublication) {
                              const publicationId = this.getNodeParameter('publicationId', i);
                              responseData = await GenericFunctions_1.mediumApiRequest.call(this, 'POST', `/publications/${publicationId}/posts`, bodyRequest, qs);
                          }
                          else {
                              const responseAuthorId = await GenericFunctions_1.mediumApiRequest.call(this, 'GET', '/me', {}, qs);
                              const authorId = responseAuthorId.data.id;
                              responseData = await GenericFunctions_1.mediumApiRequest.call(this, 'POST', `/users/${authorId}/posts`, bodyRequest, qs);
                              responseData = responseData.data;
                          }
                      }
                  }
                  if (resource === 'publication') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const user = await GenericFunctions_1.mediumApiRequest.call(this, 'GET', '/me');
                          const userId = user.data.id;
                          responseData = await GenericFunctions_1.mediumApiRequest.call(this, 'GET', `/users/${userId}/publications`);
                          responseData = responseData.data;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  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.Medium = Medium;
  //# sourceMappingURL=Medium.node.js.map

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MediumOAuth2Api = void 0;
  class MediumOAuth2Api {
      constructor() {
          this.name = 'mediumOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Medium OAuth2 API';
          this.documentationUrl = 'medium';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://medium.com/m/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://medium.com/v1/tokens',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'basicProfile,publishPost,listPublications',
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.MediumOAuth2Api = MediumOAuth2Api;
  //# sourceMappingURL=MediumOAuth2Api.credentials.js.map

  // --- Next Credential File ---

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MediumOAuth2Api = void 0;
  class MediumOAuth2Api {
      constructor() {
          this.name = 'mediumOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Medium OAuth2 API';
          this.documentationUrl = 'medium';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://medium.com/m/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://medium.com/v1/tokens',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'basicProfile,publishPost,listPublications',
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.MediumOAuth2Api = MediumOAuth2Api;
  //# sourceMappingURL=MediumOAuth2Api.credentials.js.map

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

  # Medium node

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

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

  /// warning | Medium API no longer supported
  Medium has stopped supporting the Medium API. The Medium node still appears within n8n, but you won't be able to configure new API keys to authenticate with.

  Refer to [Medium credentials](/integrations/builtin/credentials/medium.md) for guidance on setting up existing API keys.
  ///

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


  ## Operations

  * Post
      * Create a post
  * Publication
      * Get all publications

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Mautic
name: Mautic
display_name: Mautic
description: Consume Mautic API
category: output
icon: file:mautic.svg
code_hash: 9fd6ac004d6538dd3a615d81114369f98b52d90f5404a73e452c9f6321c81771
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mautic
documentation_title: Mautic node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mautic","description":"Templates for mautic"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:18
updated_at: 2025-06-09 15:18:18
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mautic = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  const SegmentEmailDescription_1 = require("./SegmentEmailDescription");
  const CompanyDescription_1 = require("./CompanyDescription");
  const CompanyContactDescription_1 = require("./CompanyContactDescription");
  const ContactSegmentDescription_1 = require("./ContactSegmentDescription");
  const CampaignContactDescription_1 = require("./CampaignContactDescription");
  const change_case_1 = require("change-case");
  class Mautic {
      constructor() {
          this.description = {
              displayName: 'Mautic',
              name: 'mautic',
              icon: 'file:mautic.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mautic API',
              defaults: {
                  name: 'Mautic',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mauticApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['credentials'],
                          },
                      },
                  },
                  {
                      name: 'mauticOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Credentials',
                              value: 'credentials',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'credentials',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Campaign Contact',
                              value: 'campaignContact',
                              description: 'Add/remove contacts to/from a campaign',
                          },
                          {
                              name: 'Company',
                              value: 'company',
                              description: 'Create or modify a company',
                          },
                          {
                              name: 'Company Contact',
                              value: 'companyContact',
                              description: 'Add/remove contacts to/from a company',
                          },
                          {
                              name: 'Contact',
                              value: 'contact',
                              description: 'Create & modify contacts',
                          },
                          {
                              name: 'Contact Segment',
                              value: 'contactSegment',
                              description: 'Add/remove contacts to/from a segment',
                          },
                          {
                              name: 'Segment Email',
                              value: 'segmentEmail',
                              description: 'Send an email',
                          },
                      ],
                      default: 'contact',
                  },
                  ...CompanyDescription_1.companyOperations,
                  ...CompanyDescription_1.companyFields,
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...ContactSegmentDescription_1.contactSegmentOperations,
                  ...ContactSegmentDescription_1.contactSegmentFields,
                  ...CampaignContactDescription_1.campaignContactOperations,
                  ...CampaignContactDescription_1.campaignContactFields,
                  ...CompanyContactDescription_1.companyContactOperations,
                  ...CompanyContactDescription_1.companyContactFields,
                  ...SegmentEmailDescription_1.segmentEmailOperations,
                  ...SegmentEmailDescription_1.segmentEmailFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCompanies() {
                      const returnData = [];
                      const companies = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'companies', 'GET', '/companies');
                      for (const company of companies) {
                          returnData.push({
                              name: company.fields.all.companyname,
                              value: company.fields.all.companyname,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'tags', 'GET', '/tags');
                      for (const tag of tags) {
                          returnData.push({
                              name: tag.tag,
                              value: tag.tag,
                          });
                      }
                      return returnData;
                  },
                  async getStages() {
                      const returnData = [];
                      const stages = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'stages', 'GET', '/stages');
                      for (const stage of stages) {
                          returnData.push({
                              name: stage.name,
                              value: stage.id,
                          });
                      }
                      return returnData;
                  },
                  async getCompanyFields() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'fields', 'GET', '/fields/company');
                      for (const field of fields) {
                          returnData.push({
                              name: field.label,
                              value: field.alias,
                          });
                      }
                      return returnData;
                  },
                  async getIndustries() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'fields', 'GET', '/fields/company');
                      for (const field of fields) {
                          if (field.alias === 'companyindustry') {
                              for (const { label, value } of field.properties.list) {
                                  returnData.push({
                                      name: label,
                                      value,
                                  });
                              }
                          }
                      }
                      return returnData;
                  },
                  async getContactFields() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'fields', 'GET', '/fields/contact');
                      for (const field of fields) {
                          returnData.push({
                              name: field.label,
                              value: field.alias,
                          });
                      }
                      return returnData;
                  },
                  async getSegments() {
                      const returnData = [];
                      const segments = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'lists', 'GET', '/segments');
                      for (const segment of segments) {
                          returnData.push({
                              name: segment.name,
                              value: segment.id,
                          });
                      }
                      return returnData;
                  },
                  async getCampaigns() {
                      const returnData = [];
                      const campaings = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'campaigns', 'GET', '/campaigns');
                      for (const campaign of campaings) {
                          returnData.push({
                              name: campaign.name,
                              value: campaign.id,
                          });
                      }
                      return returnData;
                  },
                  async getEmails() {
                      const returnData = [];
                      const emails = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'emails', 'GET', '/emails');
                      for (const email of emails) {
                          returnData.push({
                              name: email.name,
                              value: email.id,
                          });
                      }
                      return returnData;
                  },
                  async getSegmentEmails() {
                      const returnData = [];
                      const emails = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'emails', 'GET', '/emails');
                      for (const email of emails) {
                          if (email.emailType === 'list') {
                              returnData.push({
                                  name: email.name,
                                  value: email.id,
                              });
                          }
                      }
                      return returnData;
                  },
                  async getCampaignEmails() {
                      const returnData = [];
                      const emails = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'emails', 'GET', '/emails');
                      for (const email of emails) {
                          if (email.emailType === 'template') {
                              returnData.push({
                                  name: email.name,
                                  value: email.id,
                              });
                          }
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let qs;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              qs = {};
              try {
                  if (resource === 'company') {
                      if (operation === 'create') {
                          const simple = this.getNodeParameter('simple', i);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              companyname: name,
                          };
                          const { addressUi, customFieldsUi, companyEmail, fax, industry, numberOfEmpoyees, phone, website, annualRevenue, description, ...rest } = this.getNodeParameter('additionalFields', i);
                          if (addressUi === null || addressUi === void 0 ? void 0 : addressUi.addressValues) {
                              const { addressValues } = addressUi;
                              body.companyaddress1 = addressValues.address1;
                              body.companyaddress2 = addressValues.address2;
                              body.companycity = addressValues.city;
                              body.companystate = addressValues.state;
                              body.companycountry = addressValues.country;
                              body.companyzipcode = addressValues.zipCode;
                          }
                          if (companyEmail) {
                              body.companyemail = companyEmail;
                          }
                          if (fax) {
                              body.companyfax = fax;
                          }
                          if (industry) {
                              body.companyindustry = industry;
                          }
                          if (industry) {
                              body.companyindustry = industry;
                          }
                          if (numberOfEmpoyees) {
                              body.companynumber_of_employees = numberOfEmpoyees;
                          }
                          if (phone) {
                              body.companyphone = phone;
                          }
                          if (website) {
                              body.companywebsite = website;
                          }
                          if (annualRevenue) {
                              body.companyannual_revenue = annualRevenue;
                          }
                          if (description) {
                              body.companydescription = description;
                          }
                          if (customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldValues) {
                              const { customFieldValues } = customFieldsUi;
                              const data = customFieldValues.reduce((obj, value) => Object.assign(obj, { [`${value.fieldId}`]: value.fieldValue }), {});
                              Object.assign(body, data);
                          }
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', '/companies/new', body);
                          responseData = responseData.company;
                          if (simple) {
                              responseData = responseData.fields.all;
                          }
                      }
                      if (operation === 'update') {
                          const companyId = this.getNodeParameter('companyId', i);
                          const simple = this.getNodeParameter('simple', i);
                          const body = {};
                          const { addressUi, customFieldsUi, companyEmail, name, fax, industry, numberOfEmpoyees, phone, website, annualRevenue, description, ...rest } = this.getNodeParameter('updateFields', i);
                          if (addressUi === null || addressUi === void 0 ? void 0 : addressUi.addressValues) {
                              const { addressValues } = addressUi;
                              body.companyaddress1 = addressValues.address1;
                              body.companyaddress2 = addressValues.address2;
                              body.companycity = addressValues.city;
                              body.companystate = addressValues.state;
                              body.companycountry = addressValues.country;
                              body.companyzipcode = addressValues.zipCode;
                          }
                          if (companyEmail) {
                              body.companyemail = companyEmail;
                          }
                          if (name) {
                              body.companyname = name;
                          }
                          if (fax) {
                              body.companyfax = fax;
                          }
                          if (industry) {
                              body.companyindustry = industry;
                          }
                          if (industry) {
                              body.companyindustry = industry;
                          }
                          if (numberOfEmpoyees) {
                              body.companynumber_of_employees = numberOfEmpoyees;
                          }
                          if (phone) {
                              body.companyphone = phone;
                          }
                          if (website) {
                              body.companywebsite = website;
                          }
                          if (annualRevenue) {
                              body.companyannual_revenue = annualRevenue;
                          }
                          if (description) {
                              body.companydescription = description;
                          }
                          if (customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldValues) {
                              const { customFieldValues } = customFieldsUi;
                              const data = customFieldValues.reduce((obj, value) => Object.assign(obj, { [`${value.fieldId}`]: value.fieldValue }), {});
                              Object.assign(body, data);
                          }
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'PATCH', `/companies/${companyId}/edit`, body);
                          responseData = responseData.company;
                          if (simple) {
                              responseData = responseData.fields.all;
                          }
                      }
                      if (operation === 'get') {
                          const companyId = this.getNodeParameter('companyId', i);
                          const simple = this.getNodeParameter('simple', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'GET', `/companies/${companyId}`);
                          responseData = responseData.company;
                          if (simple) {
                              responseData = responseData.fields.all;
                          }
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const simple = this.getNodeParameter('simple', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs = Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'companies', 'GET', '/companies', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              qs.start = 0;
                              responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'GET', '/companies', {}, qs);
                              if (responseData.errors) {
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData);
                              }
                              responseData = responseData.companies;
                              responseData = Object.values(responseData);
                          }
                          if (simple) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'delete') {
                          const simple = this.getNodeParameter('simple', i);
                          const companyId = this.getNodeParameter('companyId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'DELETE', `/companies/${companyId}/delete`);
                          responseData = responseData.company;
                          if (simple) {
                              responseData = responseData.fields.all;
                          }
                      }
                  }
                  if (resource === 'contact') {
                      if (operation === 'create') {
                          const options = this.getNodeParameter('options', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          let body = {};
                          if (!jsonActive) {
                              body.email = this.getNodeParameter('email', i);
                              body.firstname = this.getNodeParameter('firstName', i);
                              body.lastname = this.getNodeParameter('lastName', i);
                              body.company = this.getNodeParameter('company', i);
                              body.position = this.getNodeParameter('position', i);
                              body.title = this.getNodeParameter('title', i);
                          }
                          else {
                              const json = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('bodyJson', i));
                              if (json !== undefined) {
                                  body = { ...json };
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid JSON', { itemIndex: i });
                              }
                          }
                          if (additionalFields.ipAddress) {
                              body.ipAddress = additionalFields.ipAddress;
                          }
                          if (additionalFields.lastActive) {
                              body.lastActive = additionalFields.lastActive;
                          }
                          if (additionalFields.ownerId) {
                              body.owner = additionalFields.ownerId;
                          }
                          if (additionalFields.addressUi) {
                              const addressValues = additionalFields.addressUi
                                  .addressValues;
                              if (addressValues) {
                                  body.address1 = addressValues.address1;
                                  body.address2 = addressValues.address2;
                                  body.city = addressValues.city;
                                  body.state = addressValues.state;
                                  body.country = addressValues.country;
                                  body.zipcode = addressValues.zipCode;
                              }
                          }
                          if (additionalFields.socialMediaUi) {
                              const socialMediaValues = additionalFields.socialMediaUi
                                  .socialMediaValues;
                              if (socialMediaValues) {
                                  body.facebook = socialMediaValues.facebook;
                                  body.foursquare = socialMediaValues.foursquare;
                                  body.instagram = socialMediaValues.instagram;
                                  body.linkedin = socialMediaValues.linkedIn;
                                  body.skype = socialMediaValues.skype;
                                  body.twitter = socialMediaValues.twitter;
                              }
                          }
                          if (additionalFields.customFieldsUi) {
                              const customFields = additionalFields.customFieldsUi
                                  .customFieldValues;
                              if (customFields) {
                                  const data = customFields.reduce((obj, value) => Object.assign(obj, { [`${value.fieldId}`]: value.fieldValue }), {});
                                  Object.assign(body, data);
                              }
                          }
                          if (additionalFields.b2bOrb2c) {
                              body.b2b_or_b2c = additionalFields.b2bOrb2c;
                          }
                          if (additionalFields.crmId) {
                              body.crm_id = additionalFields.crmId;
                          }
                          if (additionalFields.fax) {
                              body.fax = additionalFields.fax;
                          }
                          if (additionalFields.hasPurchased) {
                              body.haspurchased = additionalFields.hasPurchased;
                          }
                          if (additionalFields.mobile) {
                              body.mobile = additionalFields.mobile;
                          }
                          if (additionalFields.phone) {
                              body.phone = additionalFields.phone;
                          }
                          if (additionalFields.prospectOrCustomer) {
                              body.prospect_or_customer = additionalFields.prospectOrCustomer;
                          }
                          if (additionalFields.sandbox) {
                              body.sandbox = additionalFields.sandbox;
                          }
                          if (additionalFields.stage) {
                              body.stage = additionalFields.stage;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.website) {
                              body.website = additionalFields.website;
                          }
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', '/contacts/new', body);
                          responseData = [responseData.contact];
                          if (options.rawData === false) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'update') {
                          const options = this.getNodeParameter('options', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          let body = {};
                          if (updateFields.email) {
                              body.email = updateFields.email;
                          }
                          if (updateFields.firstName) {
                              body.firstname = updateFields.firstName;
                          }
                          if (updateFields.lastName) {
                              body.lastname = updateFields.lastName;
                          }
                          if (updateFields.company) {
                              body.company = updateFields.company;
                          }
                          if (updateFields.position) {
                              body.position = updateFields.position;
                          }
                          if (updateFields.title) {
                              body.title = updateFields.title;
                          }
                          if (updateFields.bodyJson) {
                              const json = (0, GenericFunctions_1.validateJSON)(updateFields.bodyJson);
                              if (json !== undefined) {
                                  body = { ...json };
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid JSON', { itemIndex: i });
                              }
                          }
                          if (updateFields.ipAddress) {
                              body.ipAddress = updateFields.ipAddress;
                          }
                          if (updateFields.lastActive) {
                              body.lastActive = updateFields.lastActive;
                          }
                          if (updateFields.ownerId) {
                              body.owner = updateFields.ownerId;
                          }
                          if (updateFields.addressUi) {
                              const addressValues = updateFields.addressUi
                                  .addressValues;
                              if (addressValues) {
                                  body.address1 = addressValues.address1;
                                  body.address2 = addressValues.address2;
                                  body.city = addressValues.city;
                                  body.state = addressValues.state;
                                  body.country = addressValues.country;
                                  body.zipcode = addressValues.zipCode;
                              }
                          }
                          if (updateFields.socialMediaUi) {
                              const socialMediaValues = updateFields.socialMediaUi
                                  .socialMediaValues;
                              if (socialMediaValues) {
                                  body.facebook = socialMediaValues.facebook;
                                  body.foursquare = socialMediaValues.foursquare;
                                  body.instagram = socialMediaValues.instagram;
                                  body.linkedin = socialMediaValues.linkedIn;
                                  body.skype = socialMediaValues.skype;
                                  body.twitter = socialMediaValues.twitter;
                              }
                          }
                          if (updateFields.customFieldsUi) {
                              const customFields = updateFields.customFieldsUi
                                  .customFieldValues;
                              if (customFields) {
                                  const data = customFields.reduce((obj, value) => Object.assign(obj, { [`${value.fieldId}`]: value.fieldValue }), {});
                                  Object.assign(body, data);
                              }
                          }
                          if (updateFields.b2bOrb2c) {
                              body.b2b_or_b2c = updateFields.b2bOrb2c;
                          }
                          if (updateFields.crmId) {
                              body.crm_id = updateFields.crmId;
                          }
                          if (updateFields.fax) {
                              body.fax = updateFields.fax;
                          }
                          if (updateFields.hasPurchased) {
                              body.haspurchased = updateFields.hasPurchased;
                          }
                          if (updateFields.mobile) {
                              body.mobile = updateFields.mobile;
                          }
                          if (updateFields.phone) {
                              body.phone = updateFields.phone;
                          }
                          if (updateFields.prospectOrCustomer) {
                              body.prospect_or_customer = updateFields.prospectOrCustomer;
                          }
                          if (updateFields.sandbox) {
                              body.sandbox = updateFields.sandbox;
                          }
                          if (updateFields.stage) {
                              body.stage = updateFields.stage;
                          }
                          if (updateFields.tags) {
                              body.tags = updateFields.tags;
                          }
                          if (updateFields.website) {
                              body.website = updateFields.website;
                          }
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'PATCH', `/contacts/${contactId}/edit`, body);
                          responseData = [responseData.contact];
                          if (options.rawData === false) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'get') {
                          const options = this.getNodeParameter('options', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'GET', `/contacts/${contactId}`);
                          responseData = [responseData.contact];
                          if (options.rawData === false) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          qs = Object.assign(qs, options);
                          if (qs.orderBy) {
                              qs.orderBy = (0, change_case_1.snakeCase)(qs.orderBy);
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mauticApiRequestAllItems.call(this, 'contacts', 'GET', '/contacts', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              qs.start = 0;
                              responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'GET', '/contacts', {}, qs);
                              if (responseData.errors) {
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData);
                              }
                              responseData = responseData.contacts;
                              responseData = Object.values(responseData);
                          }
                          if (options.rawData === false) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'delete') {
                          const options = this.getNodeParameter('options', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'DELETE', `/contacts/${contactId}/delete`);
                          responseData = [responseData.contact];
                          if (options.rawData === false) {
                              responseData = responseData.map((item) => item.fields.all);
                          }
                      }
                      if (operation === 'sendEmail') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const campaignEmailId = this.getNodeParameter('campaignEmailId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/emails/${campaignEmailId}/contact/${contactId}/send`);
                      }
                      if (operation === 'editDoNotContactList') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const action = this.getNodeParameter('action', i);
                          const channel = this.getNodeParameter('channel', i);
                          const body = {};
                          if (action === 'add') {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/contacts/${contactId}/dnc/${channel}/${action}`, body);
                          responseData = responseData.contact;
                      }
                      if (operation === 'editContactPoint') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const action = this.getNodeParameter('action', i);
                          const points = this.getNodeParameter('points', i);
                          const path = action === 'add' ? 'plus' : 'minus';
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/contacts/${contactId}/points/${path}/${points}`);
                      }
                  }
                  if (resource === 'contactSegment') {
                      if (operation === 'add') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const segmentId = this.getNodeParameter('segmentId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/segments/${segmentId}/contact/${contactId}/add`);
                      }
                      if (operation === 'remove') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const segmentId = this.getNodeParameter('segmentId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/segments/${segmentId}/contact/${contactId}/remove`);
                      }
                  }
                  if (resource === 'campaignContact') {
                      if (operation === 'add') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/campaigns/${campaignId}/contact/${contactId}/add`);
                      }
                      if (operation === 'remove') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const campaignId = this.getNodeParameter('campaignId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/campaigns/${campaignId}/contact/${contactId}/remove`);
                      }
                  }
                  if (resource === 'segmentEmail') {
                      if (operation === 'send') {
                          const segmentEmailId = this.getNodeParameter('segmentEmailId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/emails/${segmentEmailId}/send`);
                      }
                  }
                  if (resource === 'companyContact') {
                      if (operation === 'add') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const companyId = this.getNodeParameter('companyId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/companies/${companyId}/contact/${contactId}/add`, {});
                      }
                      if (operation === 'remove') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const companyId = this.getNodeParameter('companyId', i);
                          responseData = await GenericFunctions_1.mauticApiRequest.call(this, 'POST', `/companies/${companyId}/contact/${contactId}/remove`, {});
                      }
                  }
                  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.Mautic = Mautic;
  //# sourceMappingURL=Mautic.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MauticApi = void 0;
  class MauticApi {
      constructor() {
          this.name = 'mauticApi';
          this.displayName = 'Mautic API';
          this.documentationUrl = 'mautic';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://name.mautic.net',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: '={{$credentials.username}}',
                      password: '={{$credentials.password}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
                  url: '/api/users/self',
              },
          };
      }
  }
  exports.MauticApi = MauticApi;
  //# sourceMappingURL=MauticApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MauticOAuth2Api = void 0;
  class MauticOAuth2Api {
      constructor() {
          this.name = 'mauticOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Mautic OAuth2 API';
          this.documentationUrl = 'mautic';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://name.mautic.net',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '={{$self["url"].endsWith("/") ? $self["url"].slice(0, -1) : $self["url"]}}/oauth/v2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '={{$self["url"].endsWith("/") ? $self["url"].slice(0, -1) : $self["url"]}}/oauth/v2/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.MauticOAuth2Api = MauticOAuth2Api;
  //# sourceMappingURL=MauticOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MauticApi = void 0;
  class MauticApi {
      constructor() {
          this.name = 'mauticApi';
          this.displayName = 'Mautic API';
          this.documentationUrl = 'mautic';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://name.mautic.net',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: '={{$credentials.username}}',
                      password: '={{$credentials.password}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
                  url: '/api/users/self',
              },
          };
      }
  }
  exports.MauticApi = MauticApi;
  //# sourceMappingURL=MauticApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MauticOAuth2Api = void 0;
  class MauticOAuth2Api {
      constructor() {
          this.name = 'mauticOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Mautic OAuth2 API';
          this.documentationUrl = 'mautic';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://name.mautic.net',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '={{$self["url"].endsWith("/") ? $self["url"].slice(0, -1) : $self["url"]}}/oauth/v2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '={{$self["url"].endsWith("/") ? $self["url"].slice(0, -1) : $self["url"]}}/oauth/v2/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.MauticOAuth2Api = MauticOAuth2Api;
  //# sourceMappingURL=MauticOAuth2Api.credentials.js.map

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

  # Mautic node

  Use the Mautic node to automate work in Mautic, and integrate Mautic with other applications. n8n has built-in support for a wide range of Mautic features, including creating, updating, deleting, and getting companies, and contacts, as well as adding and removing campaign contacts. 

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

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

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

  ## Operations

  * Campaign Contact
      * Add contact to a campaign
      * Remove contact from a campaign
  * Company
      * Create a new company
      * Delete a company
      * Get data of a company
      * Get data of all companies
      * Update a company
  * Company Contact
      * Add contact to a company
      * Remove a contact from a company
  * Contact
      * Create a new contact
      * Delete a contact
      * Edit contact's points
      * Add/remove contacts from/to the don't contact list
      * Get data of a contact
      * Get data of all contacts
      * Send email to contact
      * Update a contact
  * Contact Segment
      * Add contact to a segment
      * Remove contact from a segment
  * Segment Email
      * Send

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.Mindee
name: Mindee
display_name: Mindee
description: Consume Mindee API
category: input
icon: file:mindee.svg
code_hash: e1b1546baf295f10ce7fdfc174b3cd8ef000536f32d745f5b0220db885ec1fa2
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mindee
documentation_title: Mindee node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mindee","description":"Templates for mindee"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-09 15:18:20
updated_at: 2025-06-09 15:18:20
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mindee = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Mindee {
      constructor() {
          this.description = {
              displayName: 'Mindee',
              name: 'mindee',
              icon: 'file:mindee.svg',
              group: ['input'],
              version: [1, 2, 3],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Mindee API',
              defaults: {
                  name: 'Mindee',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mindeeReceiptApi',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['receipt'],
                          },
                      },
                  },
                  {
                      name: 'mindeeInvoiceApi',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['invoice'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'API Version',
                      name: 'apiVersion',
                      type: 'options',
                      isNodeSetting: true,
                      displayOptions: {
                          show: {
                              '@version': [1],
                          },
                      },
                      options: [
                          {
                              name: '1',
                              value: 1,
                          },
                          {
                              name: '3',
                              value: 3,
                          },
                          {
                              name: '4',
                              value: 4,
                          },
                      ],
                      default: 1,
                      description: 'Which Mindee API Version to use',
                  },
                  {
                      displayName: 'API Version',
                      name: 'apiVersion',
                      type: 'options',
                      isNodeSetting: true,
                      displayOptions: {
                          show: {
                              '@version': [2],
                          },
                      },
                      options: [
                          {
                              name: '1',
                              value: 1,
                          },
                          {
                              name: '3',
                              value: 3,
                          },
                          {
                              name: '4',
                              value: 4,
                          },
                      ],
                      default: 3,
                      description: 'Which Mindee API Version to use',
                  },
                  {
                      displayName: 'API Version',
                      name: 'apiVersion',
                      type: 'options',
                      isNodeSetting: true,
                      displayOptions: {
                          show: {
                              '@version': [3],
                          },
                      },
                      options: [
                          {
                              name: '1',
                              value: 1,
                          },
                          {
                              name: '3',
                              value: 3,
                          },
                          {
                              name: '4',
                              value: 4,
                          },
                      ],
                      default: 4,
                      description: 'Which Mindee API Version to use',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Invoice',
                              value: 'invoice',
                          },
                          {
                              name: 'Receipt',
                              value: 'receipt',
                          },
                      ],
                      default: 'receipt',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Predict',
                              value: 'predict',
                          },
                      ],
                      default: 'predict',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      required: true,
                      default: 'data',
                      displayOptions: {
                          show: {
                              operation: ['predict'],
                              resource: ['receipt', 'invoice'],
                          },
                      },
                      description: 'Name of the binary property which containsthe data for the file to be uploaded',
                  },
                  {
                      displayName: 'RAW Data',
                      name: 'rawData',
                      type: 'boolean',
                      default: false,
                      description: 'Whether to return the data exactly in the way it got received from the API',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const version = this.getNodeParameter('apiVersion', 0);
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let endpoint;
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'receipt') {
                      if (operation === 'predict') {
                          const rawData = this.getNodeParameter('rawData', i);
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          if (version === 1) {
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', '/expense_receipts/v2/predict', {}, {}, {
                                  formData: {
                                      file: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          else if (version === 3) {
                              endpoint = '/expense_receipts/v3/predict';
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', endpoint, {}, {}, {
                                  formData: {
                                      document: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          else if (version === 4) {
                              endpoint = '/expense_receipts/v4/predict';
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', endpoint, {}, {}, {
                                  formData: {
                                      document: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          if (!rawData) {
                              if (version === 1) {
                                  responseData = (0, GenericFunctions_1.cleanDataPreviousApiVersions)(responseData.predictions);
                              }
                              else if (version === 3 || version === 4) {
                                  responseData = (0, GenericFunctions_1.cleanData)(responseData.document);
                              }
                          }
                      }
                  }
                  if (resource === 'invoice') {
                      if (operation === 'predict') {
                          const rawData = this.getNodeParameter('rawData', i);
                          const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                          const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                          const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          if (version === 1) {
                              endpoint = '/invoices/v1/predict';
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', endpoint, {}, {}, {
                                  formData: {
                                      file: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          else if (version === 3) {
                              endpoint = '/invoices/v3/predict';
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', endpoint, {}, {}, {
                                  formData: {
                                      document: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          else if (version === 4) {
                              endpoint = '/invoices/v4/predict';
                              responseData = await GenericFunctions_1.mindeeApiRequest.call(this, 'POST', endpoint, {}, {}, {
                                  formData: {
                                      document: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                          },
                                      },
                                  },
                              });
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid API version');
                          }
                          if (!rawData) {
                              if (version === 1) {
                                  responseData = (0, GenericFunctions_1.cleanDataPreviousApiVersions)(responseData.predictions);
                              }
                              else if (version === 3 || version === 4) {
                                  responseData = (0, GenericFunctions_1.cleanData)(responseData.document);
                              }
                          }
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Mindee = Mindee;
  //# sourceMappingURL=Mindee.node.js.map

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

  # Mindee node

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

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

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

  ## Operations

  - **Invoice**
      - Predict
  - **Receipt**
      - Predict

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.MySql
name: MySql
display_name: MySQL
description: Get, add and update data in MySQL
category: input
icon: file:mysql.svg
code_hash: c632d9b472738f3cd1ce6ce0231920d56e6b160054dbd6ff4f5b38505f8003bb
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MySql = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const MySqlV1_node_1 = require("./v1/MySqlV1.node");
  const MySqlV2_node_1 = require("./v2/MySqlV2.node");
  class MySql extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'MySQL',
              name: 'mySql',
              icon: 'file:mysql.svg',
              group: ['input'],
              defaultVersion: 2.2,
              description: 'Get, add and update data in MySQL',
          };
          const nodeVersions = {
              1: new MySqlV1_node_1.MySqlV1(baseDescription),
              2: new MySqlV2_node_1.MySqlV2(baseDescription),
              2.1: new MySqlV2_node_1.MySqlV2(baseDescription),
              2.2: new MySqlV2_node_1.MySqlV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.MySql = MySql;
  //# sourceMappingURL=MySql.node.js.map

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


node_type: n8n-nodes-base.MoveBinaryData
name: MoveBinaryData
display_name: Convert to/from binary data
description: Move data between binary and JSON properties
category: transform
icon: fa:exchange-alt
code_hash: ab3fdb9328e05205e42d286ec989c12c8f2379707d331ec8ad0731004bdbbd48
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
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.MoveBinaryData = void 0;
  const get_1 = __importDefault(require("lodash/get"));
  const set_1 = __importDefault(require("lodash/set"));
  const unset_1 = __importDefault(require("lodash/unset"));
  const pretty_bytes_1 = __importDefault(require("pretty-bytes"));
  const n8n_workflow_1 = require("n8n-workflow");
  const iconv_lite_1 = __importDefault(require("iconv-lite"));
  iconv_lite_1.default.encodingExists('utf8');
  const bomAware = [];
  const encodeDecodeOptions = [];
  const encodings = iconv_lite_1.default.encodings;
  Object.keys(encodings).forEach((encoding) => {
      if (!(encoding.startsWith('_') || typeof encodings[encoding] === 'string')) {
          if (encodings[encoding].bomAware) {
              bomAware.push(encoding);
          }
          encodeDecodeOptions.push({ name: encoding, value: encoding });
      }
  });
  encodeDecodeOptions.sort((a, b) => {
      if (a.name < b.name) {
          return -1;
      }
      if (a.name > b.name) {
          return 1;
      }
      return 0;
  });
  class MoveBinaryData {
      constructor() {
          this.description = {
              displayName: 'Convert to/from binary data',
              name: 'moveBinaryData',
              icon: 'fa:exchange-alt',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["mode"]==="binaryToJson" ? "Binary to JSON" : "JSON to Binary"}}',
              description: 'Move data between binary and JSON properties',
              defaults: {
                  name: 'Convert to/from binary data',
                  color: '#7722CC',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Mode',
                      name: 'mode',
                      type: 'options',
                      options: [
                          {
                              name: 'Binary to JSON',
                              value: 'binaryToJson',
                              description: 'Move data from Binary to JSON',
                          },
                          {
                              name: 'JSON to Binary',
                              value: 'jsonToBinary',
                              description: 'Move data from JSON to Binary',
                          },
                      ],
                      default: 'binaryToJson',
                      description: 'From and to where data should be moved',
                  },
                  {
                      displayName: 'Set All Data',
                      name: 'setAllData',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              mode: ['binaryToJson'],
                          },
                      },
                      default: true,
                      description: 'Whether all JSON data should be replaced with the data retrieved from binary key. Else the data will be written to a single key.',
                  },
                  {
                      displayName: 'Source Key',
                      name: 'sourceKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['binaryToJson'],
                          },
                      },
                      default: 'data',
                      required: true,
                      placeholder: 'data',
                      description: 'The name of the binary key to get data from. It is also possible to define deep keys by using dot-notation like for example: "level1.level2.currentKey".',
                  },
                  {
                      displayName: 'Destination Key',
                      name: 'destinationKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['binaryToJson'],
                              setAllData: [false],
                          },
                      },
                      default: 'data',
                      required: true,
                      placeholder: '',
                      description: 'The name the JSON key to copy data to. It is also possible to define deep keys by using dot-notation like for example: "level1.level2.newKey".',
                  },
                  {
                      displayName: 'Convert All Data',
                      name: 'convertAllData',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              mode: ['jsonToBinary'],
                          },
                      },
                      default: true,
                      description: 'Whether all JSON data should be converted to binary. Else only the data of one key will be converted.',
                  },
                  {
                      displayName: 'Source Key',
                      name: 'sourceKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              convertAllData: [false],
                              mode: ['jsonToBinary'],
                          },
                      },
                      default: 'data',
                      required: true,
                      placeholder: 'data',
                      description: 'The name of the JSON key to get data from. It is also possible to define deep keys by using dot-notation like for example: "level1.level2.currentKey".',
                  },
                  {
                      displayName: 'Destination Key',
                      name: 'destinationKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['jsonToBinary'],
                          },
                      },
                      default: 'data',
                      required: true,
                      placeholder: 'data',
                      description: 'The name the binary key to copy data to. It is also possible to define deep keys by using dot-notation like for example: "level1.level2.newKey".',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Data Is Base64',
                              name: 'dataIsBase64',
                              type: 'boolean',
                              displayOptions: {
                                  hide: {
                                      useRawData: [true],
                                  },
                                  show: {
                                      '/mode': ['jsonToBinary'],
                                      '/convertAllData': [false],
                                  },
                              },
                              default: false,
                              description: 'Whether to keep the binary data as base64 string',
                          },
                          {
                              displayName: 'Encoding',
                              name: 'encoding',
                              type: 'options',
                              options: encodeDecodeOptions,
                              displayOptions: {
                                  show: {
                                      '/mode': ['binaryToJson', 'jsonToBinary'],
                                  },
                              },
                              default: 'utf8',
                              description: 'Set the encoding of the data stream',
                          },
                          {
                              displayName: 'Strip BOM',
                              name: 'stripBOM',
                              displayOptions: {
                                  show: {
                                      '/mode': ['binaryToJson'],
                                      encoding: bomAware,
                                  },
                              },
                              type: 'boolean',
                              default: true,
                          },
                          {
                              displayName: 'Add BOM',
                              name: 'addBOM',
                              displayOptions: {
                                  show: {
                                      '/mode': ['jsonToBinary'],
                                      encoding: bomAware,
                                  },
                              },
                              type: 'boolean',
                              default: false,
                          },
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/mode': ['jsonToBinary'],
                                  },
                              },
                              default: '',
                              placeholder: 'example.json',
                              description: 'The file name to set',
                          },
                          {
                              displayName: 'JSON Parse',
                              name: 'jsonParse',
                              type: 'boolean',
                              displayOptions: {
                                  hide: {
                                      keepAsBase64: [true],
                                  },
                                  show: {
                                      '/mode': ['binaryToJson'],
                                      '/setAllData': [false],
                                  },
                              },
                              default: false,
                              description: 'Whether to run JSON parse on the data to get proper object data',
                          },
                          {
                              displayName: 'Keep Source',
                              name: 'keepSource',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the source key should be kept. By default it will be deleted.',
                          },
                          {
                              displayName: 'Keep As Base64',
                              name: 'keepAsBase64',
                              type: 'boolean',
                              displayOptions: {
                                  hide: {
                                      jsonParse: [true],
                                  },
                                  show: {
                                      '/mode': ['binaryToJson'],
                                      '/setAllData': [false],
                                  },
                              },
                              default: false,
                              description: 'Whether to keep the binary data as base64 string',
                          },
                          {
                              displayName: 'MIME Type',
                              name: 'mimeType',
                              type: 'string',
                              displayOptions: {
                                  show: {
                                      '/mode': ['jsonToBinary'],
                                  },
                              },
                              default: 'application/json',
                              placeholder: 'application/json',
                              description: 'The mime-type to set. By default will the mime-type for JSON be set.',
                          },
                          {
                              displayName: 'Use Raw Data',
                              name: 'useRawData',
                              type: 'boolean',
                              displayOptions: {
                                  hide: {
                                      dataIsBase64: [true],
                                  },
                                  show: {
                                      '/mode': ['jsonToBinary'],
                                  },
                              },
                              default: false,
                              description: 'Whether to use data as is and do not JSON.stringify it',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const mode = this.getNodeParameter('mode', 0);
          const returnData = [];
          let item;
          let newItem;
          let options;
          for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
              item = items[itemIndex];
              options = this.getNodeParameter('options', itemIndex, {});
              newItem = {
                  json: {},
                  pairedItem: {
                      item: itemIndex,
                  },
              };
              if (mode === 'binaryToJson') {
                  const setAllData = this.getNodeParameter('setAllData', itemIndex);
                  const sourceKey = this.getNodeParameter('sourceKey', itemIndex);
                  const value = (0, get_1.default)(item.binary, sourceKey);
                  if (value === undefined) {
                      continue;
                  }
                  const encoding = options.encoding || 'utf8';
                  const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, sourceKey);
                  let convertedValue;
                  if (setAllData) {
                      convertedValue = iconv_lite_1.default.decode(buffer, encoding, {
                          stripBOM: options.stripBOM,
                      });
                      newItem.json = (0, n8n_workflow_1.jsonParse)(convertedValue);
                  }
                  else {
                      newItem.json = (0, n8n_workflow_1.deepCopy)(item.json);
                      if (options.keepAsBase64 !== true) {
                          convertedValue = iconv_lite_1.default.decode(buffer, encoding, {
                              stripBOM: options.stripBOM,
                          });
                      }
                      else {
                          convertedValue = Buffer.from(buffer).toString(n8n_workflow_1.BINARY_ENCODING);
                      }
                      if (options.jsonParse) {
                          convertedValue = (0, n8n_workflow_1.jsonParse)(convertedValue);
                      }
                      const destinationKey = this.getNodeParameter('destinationKey', itemIndex, '');
                      (0, set_1.default)(newItem.json, destinationKey, convertedValue);
                  }
                  if (options.keepSource === true) {
                      newItem.binary = item.binary;
                  }
                  else {
                      newItem.binary = (0, n8n_workflow_1.deepCopy)(item.binary);
                      (0, unset_1.default)(newItem.binary, sourceKey);
                  }
              }
              else if (mode === 'jsonToBinary') {
                  const convertAllData = this.getNodeParameter('convertAllData', itemIndex);
                  const destinationKey = this.getNodeParameter('destinationKey', itemIndex);
                  const encoding = options.encoding || 'utf8';
                  let value = item.json;
                  if (!convertAllData) {
                      const sourceKey = this.getNodeParameter('sourceKey', itemIndex);
                      value = (0, get_1.default)(item.json, sourceKey);
                  }
                  if (value === undefined) {
                      continue;
                  }
                  if (item.binary !== undefined) {
                      newItem.binary = (0, n8n_workflow_1.deepCopy)(item.binary);
                  }
                  else {
                      newItem.binary = {};
                  }
                  const mimeType = options.mimeType || 'application/json';
                  const convertedValue = {
                      data: '',
                      mimeType,
                      fileType: (0, n8n_workflow_1.fileTypeFromMimeType)(mimeType),
                  };
                  if (options.dataIsBase64 !== true) {
                      if (options.useRawData !== true || typeof value === 'object') {
                          value = JSON.stringify(value);
                      }
                      convertedValue.fileSize = (0, pretty_bytes_1.default)(value.length);
                      convertedValue.data = iconv_lite_1.default
                          .encode(value, encoding, { addBOM: options.addBOM })
                          .toString(n8n_workflow_1.BINARY_ENCODING);
                  }
                  else {
                      convertedValue.data = value;
                  }
                  if (options.fileName) {
                      convertedValue.fileName = options.fileName;
                  }
                  (0, set_1.default)(newItem.binary, destinationKey, convertedValue);
                  if (options.keepSource === true) {
                      newItem.json = item.json;
                  }
                  else {
                      if (convertAllData) {
                          newItem.json = {};
                      }
                      else {
                          newItem.json = (0, n8n_workflow_1.deepCopy)(item.json);
                          const sourceKey = this.getNodeParameter('sourceKey', itemIndex);
                          (0, unset_1.default)(newItem.json, sourceKey);
                      }
                  }
              }
              else {
                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${mode}" is not known!`, {
                      itemIndex,
                  });
              }
              returnData.push(newItem);
          }
          return [returnData];
      }
  }
  exports.MoveBinaryData = MoveBinaryData;
  //# sourceMappingURL=MoveBinaryData.node.js.map

example_workflow:
  {"name":"Convert to/from binary data Example Workflow","nodes":[{"parameters":{},"id":"jjdmrw8i6fw8k2kj2nl7","name":"Convert to/from binary data","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}


node_type: n8n-nodes-base.Msg91
name: Msg91
display_name: MSG91
description: Sends transactional SMS via MSG91
category: transform
icon: file:msg91.png
code_hash: 2f2d50fba570ecb3206112e2444333e5650effbec0b672b39030df8621bfce89
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Msg91
documentation_title: MSG91 node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"msg91","description":"Templates for msg91"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Msg91 = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Msg91 {
      constructor() {
          this.description = {
              displayName: 'MSG91',
              name: 'msg91',
              icon: 'file:msg91.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Sends transactional SMS via MSG91',
              defaults: {
                  name: 'MSG91',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'msg91Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS',
                              action: 'Send an SMS',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Sender ID',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: '4155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The number from which to send the message',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: '+14155238886',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The number, with coutry code, to which to send the message',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The message to send',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let operation;
          let resource;
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          for (let i = 0; i < items.length; i++) {
              endpoint = '';
              body = {};
              qs = {};
              resource = this.getNodeParameter('resource', i);
              operation = this.getNodeParameter('operation', i);
              if (resource === 'sms') {
                  if (operation === 'send') {
                      requestMethod = 'GET';
                      endpoint = '/sendhttp.php';
                      qs.route = 4;
                      qs.country = 0;
                      qs.sender = this.getNodeParameter('from', i);
                      qs.mobiles = this.getNodeParameter('to', i);
                      qs.message = this.getNodeParameter('message', i);
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                  }
              }
              else {
                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                      itemIndex: i,
                  });
              }
              const responseData = await GenericFunctions_1.msg91ApiRequest.call(this, requestMethod, endpoint, body, qs);
              returnData.push({ requestId: responseData });
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Msg91 = Msg91;
  //# sourceMappingURL=Msg91.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Msg91Api = void 0;
  class Msg91Api {
      constructor() {
          this.name = 'msg91Api';
          this.displayName = 'Msg91 Api';
          this.documentationUrl = 'msg91';
          this.properties = [
              {
                  displayName: 'Authentication Key',
                  name: 'authkey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.Msg91Api = Msg91Api;
  //# sourceMappingURL=Msg91Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Msg91Api = void 0;
  class Msg91Api {
      constructor() {
          this.name = 'msg91Api';
          this.displayName = 'Msg91 Api';
          this.documentationUrl = 'msg91';
          this.properties = [
              {
                  displayName: 'Authentication Key',
                  name: 'authkey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.Msg91Api = Msg91Api;
  //# sourceMappingURL=Msg91Api.credentials.js.map

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

  # MSG91 node

  Use the MSG91 node to automate work in MSG91, and integrate MSG91 with other applications. n8n supports sending SMS with MSG91.

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

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

  ## Operations

  * SMS
      * Send SMS

  ## Templates and examples

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

  ## Find your Sender ID

  1. Log in to your MSG91 dashboard.
  2. Select **Sender Id** in the left panel.
  3. If you don't already have one, select **Add Sender Id +**, fill in the details, and select **Save Sender Id**.

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


node_type: n8n-nodes-base.Mocean
name: Mocean
display_name: Mocean
description: Send SMS and voice messages via Mocean
category: transform
icon: file:mocean.svg
code_hash: bdddaf8866b35055676200185cbfc23b07a661b4300009e3eeacb5ce74fc057e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Mocean
documentation_title: Mocean node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mocean","description":"Templates for mocean"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Mocean = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Mocean {
      constructor() {
          this.description = {
              displayName: 'Mocean',
              name: 'mocean',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              icon: 'file:mocean.svg',
              group: ['transform'],
              version: 1,
              description: 'Send SMS and voice messages via Mocean',
              defaults: {
                  name: 'Mocean',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'moceanApi',
                      required: true,
                      testedBy: 'moceanApiTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                          {
                              name: 'Voice',
                              value: 'voice',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms', 'voice'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS/Voice message',
                              action: 'Send an SMS',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: 'Sender Number',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'Number to which to send the message',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: 'Receipient number',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'Number from which to send the message',
                  },
                  {
                      displayName: 'Language',
                      name: 'language',
                      type: 'options',
                      options: [
                          {
                              name: 'Chinese Mandarin (China)',
                              value: 'cmn-CN',
                          },
                          {
                              name: 'English (United Kingdom)',
                              value: 'en-GB',
                          },
                          {
                              name: 'English (United States)',
                              value: 'en-US',
                          },
                          {
                              name: 'Japanese (Japan)',
                              value: 'ja-JP',
                          },
                          {
                              name: 'Korean (Korea)',
                              value: 'ko-KR',
                          },
                      ],
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['voice'],
                          },
                      },
                      default: 'en-US',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      placeholder: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'Message to send',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Delivery Report URL',
                              name: 'dlrUrl',
                              type: 'string',
                              default: '',
                              placeholder: '',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async moceanApiTest(credential) {
                      const credentials = credential.data;
                      const query = {};
                      query['mocean-api-key'] = credentials['mocean-api-key'];
                      query['mocean-api-secret'] = credentials['mocean-api-secret'];
                      const options = {
                          method: 'GET',
                          qs: query,
                          uri: 'https://rest.moceanapi.com/rest/2/account/balance',
                          json: true,
                      };
                      try {
                          await this.helpers.request(options);
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: `Connection details not valid: ${error.message}`,
                          };
                      }
                      return {
                          status: 'OK',
                          message: 'Authentication successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let endpoint;
          let operation;
          let requestMethod;
          let resource;
          let text;
          let dlrUrl;
          let dataKey;
          let body;
          let qs;
          for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
              body = {};
              qs = {};
              try {
                  resource = this.getNodeParameter('resource', itemIndex, '');
                  operation = this.getNodeParameter('operation', itemIndex, '');
                  text = this.getNodeParameter('message', itemIndex, '');
                  requestMethod = 'POST';
                  body['mocean-from'] = this.getNodeParameter('from', itemIndex, '');
                  body['mocean-to'] = this.getNodeParameter('to', itemIndex, '');
                  if (resource === 'voice') {
                      const language = this.getNodeParameter('language', itemIndex);
                      const command = [
                          {
                              action: 'say',
                              language,
                              text,
                          },
                      ];
                      dataKey = 'voice';
                      body['mocean-command'] = JSON.stringify(command);
                      endpoint = '/rest/2/voice/dial';
                  }
                  else if (resource === 'sms') {
                      dlrUrl = this.getNodeParameter('options.dlrUrl', itemIndex, '');
                      dataKey = 'messages';
                      body['mocean-text'] = text;
                      if (dlrUrl !== '') {
                          body['mocean-dlr-url'] = dlrUrl;
                          body['mocean-dlr-mask'] = '1';
                      }
                      endpoint = '/rest/2/sms';
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource ${resource}`, {
                          itemIndex,
                      });
                  }
                  if (operation === 'send') {
                      const responseData = await GenericFunctions_1.moceanApiRequest.call(this, requestMethod, endpoint, body, qs);
                      for (const item of responseData[dataKey]) {
                          item.type = resource;
                          returnData.push(item);
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation ${operation}`, {
                          itemIndex,
                      });
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Mocean = Mocean;
  //# sourceMappingURL=Mocean.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MoceanApi = void 0;
  class MoceanApi {
      constructor() {
          this.name = 'moceanApi';
          this.displayName = 'Mocean Api';
          this.documentationUrl = 'mocean';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'mocean-api-key',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'mocean-api-secret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MoceanApi = MoceanApi;
  //# sourceMappingURL=MoceanApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MoceanApi = void 0;
  class MoceanApi {
      constructor() {
          this.name = 'moceanApi';
          this.displayName = 'Mocean Api';
          this.documentationUrl = 'mocean';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'mocean-api-key',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'API Secret',
                  name: 'mocean-api-secret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MoceanApi = MoceanApi;
  //# sourceMappingURL=MoceanApi.credentials.js.map

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

  # Mocean node

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

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

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

  ## Operations

  * SMS
      * Send SMS/Voice message
  * Voice
      * Send SMS/Voice message

  ## Templates and examples

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

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


node_type: n8n-nodes-base.N8n
name: N8n
display_name: n8n
description: Handle events and perform actions on your n8n instance
category: transform
icon: file:n8n.svg
code_hash: 25e366d56d1bd2a332ffffad191bc91b827011483a2ac2e0ca54ae1573799d5f
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.N8n
documentation_title: n8n
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"n8n","description":"Templates for n8n"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8n = void 0;
  const AuditDescription_1 = require("./AuditDescription");
  const CredentialDescription_1 = require("./CredentialDescription");
  const ExecutionDescription_1 = require("./ExecutionDescription");
  const WorkflowDescription_1 = require("./WorkflowDescription");
  const WorkflowLocator_1 = require("./WorkflowLocator");
  class N8n {
      constructor() {
          this.description = {
              displayName: 'n8n',
              name: 'n8n',
              icon: 'file:n8n.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Handle events and perform actions on your n8n instance',
              defaults: {
                  name: 'n8n',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'n8nApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  returnFullResponse: true,
                  baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
                  headers: {
                      Accept: 'application/json',
                      'Content-Type': 'application/json',
                  },
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Audit',
                              value: 'audit',
                          },
                          {
                              name: 'Credential',
                              value: 'credential',
                          },
                          {
                              name: 'Execution',
                              value: 'execution',
                          },
                          {
                              name: 'Workflow',
                              value: 'workflow',
                          },
                      ],
                      default: 'workflow',
                  },
                  ...AuditDescription_1.auditOperations,
                  ...AuditDescription_1.auditFields,
                  ...CredentialDescription_1.credentialOperations,
                  ...CredentialDescription_1.credentialFields,
                  ...ExecutionDescription_1.executionOperations,
                  ...ExecutionDescription_1.executionFields,
                  ...WorkflowDescription_1.workflowOperations,
                  ...WorkflowDescription_1.workflowFields,
              ],
          };
          this.methods = {
              listSearch: {
                  searchWorkflows: WorkflowLocator_1.searchWorkflows,
              },
          };
      }
  }
  exports.N8n = N8n;
  //# sourceMappingURL=N8n.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8nApi = void 0;
  class N8nApi {
      constructor() {
          this.name = 'n8nApi';
          this.displayName = 'n8n API';
          this.documentationUrl = 'https://docs.n8n.io/api/authentication/';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The API key for the n8n instance',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
                  placeholder: 'https://<name>.app.n8n.cloud/api/v1',
                  description: 'The API URL of the n8n instance',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-N8N-API-KEY': '={{ $credentials.apiKey }}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{ $credentials.baseUrl }}',
                  url: '/workflows?limit=5',
              },
          };
      }
  }
  exports.N8nApi = N8nApi;
  //# sourceMappingURL=N8nApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8nApi = void 0;
  class N8nApi {
      constructor() {
          this.name = 'n8nApi';
          this.displayName = 'n8n API';
          this.documentationUrl = 'https://docs.n8n.io/api/authentication/';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The API key for the n8n instance',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
                  placeholder: 'https://<name>.app.n8n.cloud/api/v1',
                  description: 'The API URL of the n8n instance',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-N8N-API-KEY': '={{ $credentials.apiKey }}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{ $credentials.baseUrl }}',
                  url: '/workflows?limit=5',
              },
          };
      }
  }
  exports.N8nApi = N8nApi;
  //# sourceMappingURL=N8nApi.credentials.js.map

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

  # n8n

  A node to integrate with n8n itself. This node allows you to consume the [n8n API](/api/index.md) in your workflows.

  Refer to the [n8n REST API documentation](/api/index.md) for more information on using the n8n API. Refer to [API endpoint reference](/api/api-reference.md) for working with the API endpoints directly.

  /// note | Credentials
  You can find authentication information for this node in the [API authentication](/api/authentication.md) documentation.
  ///

  /// warning | SSL
  This node doesn't support SSL. If your server requires an SSL connection, use the [HTTP Request node](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/index.md) to call the [n8n API](/api/index.md).
  The HTTP Request node has options to [provide the SSL certificate](/integrations/builtin/credentials/httprequest.md#provide-an-ssl-certificate).
  ///

  ## Operations

  * Audit
  	* [**Generate** a security audit](#generate-audit)
  * Credential
  	* [**Create** a credential](#create-credential)
  	* [**Delete** a credential](#delete-credential)
  	* [**Get Schema**](#get-credential-schema): Use this operation to get credential data schema for type
  * Execution
  	* [**Get** an execution](#get-execution)
  	* [**Get Many** executions](#get-many-executions)
  	* [**Delete** an execution](#delete-execution)
  * Workflow
  	* [**Activate** a workflow](#activate-deactivate-delete-and-get-workflow)
  	* [**Create** a workflow](#create-workflow)
  	* [**Deactivate** a workflow](#activate-deactivate-delete-and-get-workflow)
  	* [**Delete** a workflow](#activate-deactivate-delete-and-get-workflow)
  	* [**Get** a workflow](#activate-deactivate-delete-and-get-workflow)
  	* [**Get Many** workflows](#get-many-workflows)
  	* [**Update** a workflow](#update-workflow)

  ## Generate audit

  This operation has no parameters. Configure it with these options:

  * **Categories**: Select the risk categories you want the audit to include. Options include:
  	* **Credentials**
  	* **Database**
  	* **Filesystem**
  	* **Instance**
  	* **Nodes**
  * **Days Abandoned Workflow**: Use this option to set the number of days without execution after which a workflow should be considered abandoned. Enter a number of days. The default is `90`.

  ## Create credential

  Configure this operation with these parameters:

  * **Name**: Enter the name of the credential you'd like to create.
  * **Credential Type**: Enter the credential's type. The available types depend on nodes installed on the n8n instance. Some built-in types include `githubApi`, `notionApi`, and `slackApi`.
  * **Data**: Enter a valid JSON object with the required properties for this **Credential Type**. To see the expected format, use the **Get Schema** operation.

  ## Delete credential

  Configure this operation with this parameter:

  * **Credential ID**: Enter the ID of the credential you want to delete.

  ## Get credential schema

  Configure this operation with this parameter:

  * **Credential Type**: Enter the credential's type. The available types depend on nodes installed on the n8n instance. Some built-in types include `githubApi`, `notionApi`, and `slackApi`.

  ## Get execution

  Configure this operation with this parameter:

  * **Execution ID**: Enter the ID of the execution you want to retrieve.

  ### Get execution option

  You can further configure this operation with this **Option**:

  * **Include Execution Details**: Use this control to set whether to include the detailed execution data (turned on) or not (turned off).

  ## Get many executions

  Configure this operation with these parameters:

  * **Return All**: Set whether to return all results (turned on) or whether to limit the results to the entered **Limit** (turned on).
  * **Limit**: Set the number of results to return if the **Return All** control is turned off.

  ### Get many executions filters

  You can further configure this operation with these **Filters**:

  * **Workflow**: Filter the executions by workflow. Options include:
  	* **From list**: Select a workflow to use as a filter.
  	* **By URL**: Enter a workflow URL to use as a filter.
  	* **By ID**: Enter a workflow ID to use as a filter.
  * **Status**: Filter the executions by status. Options include:
  	* **Error**
  	* **Success**
  	* **Waiting**

  ### Get many execution options

  You can further configure this operation with this **Option**:

  * **Include Execution Details**: Use this control to set whether to include the detailed execution data (turned on) or not (turned off).

  ## Delete execution

  Configure this operation with this parameter:

  * **Execution ID**: Enter the ID of the execution you want to delete.

  ## Activate, deactivate, delete, and get workflow

  The **Activate**, **Deactivate**, **Delete**, and **Get** workflow operations all include the same parameter for you to select the **Workflow** you want to perform the operation on. Options include:

  * **From list**: Select the workflow from the list.
  * **By URL**: Enter the URL of the workflow.
  * **By ID**: Enter the ID of the workflow.

  ## Create workflow

  Configure this operation with this parameter:

  * **Workflow Object**: Enter a valid JSON object with the new workflow's details. The object requires these fields:
  	* `name`
  	* `nodes`
  	* `connections`
  	* `settings`

  Refer to the [n8n API | Create a workflow documentation](/api/api-reference.md/#tag/Workflow/paths/~1workflows/post) for more information.

  ## Get many workflows

  Configure this operation with these parameters:

  * **Return All**: Set whether to return all results (turned on) or whether to limit the results to the entered **Limit** (turned on).
  * **Limit**: Set the number of results to return if the **Return All** control is turned off.

  ### Get many workflows filters

  You can further configure this operation with these **Filters**:

  * **Return Only Active Workflows**: Select whether to return only active workflows (turned on) or active and inactive workflows (turned off).
  * **Tags**: Enter a comma-separated list of tags the returned workflows must have.

  ## Update workflow

  Configure this operation with these parameters:

  * **Workflow**: Select the workflow you want to update. Options include:
  	* **From list**: Select the workflow from the list.
  	* **By URL**: Enter the URL of the workflow.
  	* **By ID**: Enter the ID of the workflow.
  * **Workflow Object**: Enter a valid JSON object to update the workflow with. The object requires these fields:
  	* `name`
  	* `nodes`
  	* `connections`
  	* `settings`

  Refer to the [n8n API | Update a workflow documentation](https://docs.n8n.io/api/api-reference/#tag/Workflow/paths/~1workflows~1%7Bid%7D/put) for more information.

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Misp
name: Misp
display_name: MISP
description: Consume the MISP API
category: transform
icon: file:misp.svg
code_hash: 70ea7dbd5226d92f7c70290d0f29ecb75282633ded988db37a2b68e5f40404bd
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Misp
documentation_title: MISP node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"misp","description":"Templates for misp"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Misp = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Misp {
      constructor() {
          this.description = {
              displayName: 'MISP',
              name: 'misp',
              icon: 'file:misp.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the MISP API',
              defaults: {
                  name: 'MISP',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mispApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Attribute',
                              value: 'attribute',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Event Tag',
                              value: 'eventTag',
                          },
                          {
                              name: 'Feed',
                              value: 'feed',
                          },
                          {
                              name: 'Galaxy',
                              value: 'galaxy',
                          },
                          {
                              name: 'Noticelist',
                              value: 'noticelist',
                          },
                          {
                              name: 'Organisation',
                              value: 'organisation',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'Warninglist',
                              value: 'warninglist',
                          },
                      ],
                      default: 'attribute',
                  },
                  ...descriptions_1.attributeOperations,
                  ...descriptions_1.attributeFields,
                  ...descriptions_1.eventOperations,
                  ...descriptions_1.eventFields,
                  ...descriptions_1.eventTagOperations,
                  ...descriptions_1.eventTagFields,
                  ...descriptions_1.feedOperations,
                  ...descriptions_1.feedFields,
                  ...descriptions_1.galaxyOperations,
                  ...descriptions_1.galaxyFields,
                  ...descriptions_1.noticelistOperations,
                  ...descriptions_1.noticelistFields,
                  ...descriptions_1.organisationOperations,
                  ...descriptions_1.organisationFields,
                  ...descriptions_1.tagOperations,
                  ...descriptions_1.tagFields,
                  ...descriptions_1.userOperations,
                  ...descriptions_1.userFields,
                  ...descriptions_1.warninglistOperations,
                  ...descriptions_1.warninglistFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getOrgs() {
                      const responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/organisations'));
                      return responseData.map((i) => ({ name: i.Organisation.name, value: i.Organisation.id }));
                  },
                  async getSharingGroups() {
                      const responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/sharing_groups'));
                      return responseData.response.map((i) => ({
                          name: i.SharingGroup.name,
                          value: i.SharingGroup.id,
                      }));
                  },
                  async getTags() {
                      const responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/tags'));
                      return responseData.Tag.map((i) => ({ name: i.name, value: i.id }));
                  },
                  async getUsers() {
                      const responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/admin/users'));
                      return responseData.map((i) => ({ name: i.User.email, value: i.User.id }));
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'attribute') {
                      if (operation === 'create') {
                          const body = {
                              type: this.getNodeParameter('type', i),
                              value: this.getNodeParameter('value', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          GenericFunctions_1.throwOnMissingSharingGroup.call(this, additionalFields);
                          if (Object.keys(additionalFields)) {
                              Object.assign(body, additionalFields);
                          }
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/attributes/add/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint, body);
                          responseData = responseData.Attribute;
                      }
                      else if (operation === 'delete') {
                          const attributeId = this.getNodeParameter('attributeId', i);
                          const endpoint = `/attributes/delete/${attributeId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const attributeId = this.getNodeParameter('attributeId', i);
                          const endpoint = `/attributes/view/${attributeId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Attribute;
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.mispApiRequestAllItems.call(this, '/attributes');
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          GenericFunctions_1.throwOnMissingSharingGroup.call(this, updateFields);
                          Object.assign(body, updateFields);
                          const attributeId = this.getNodeParameter('attributeId', i);
                          const endpoint = `/attributes/edit/${attributeId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'PUT', endpoint, body);
                          responseData = responseData.Attribute;
                      }
                  }
                  else if (resource === 'event') {
                      if (operation === 'create') {
                          const body = {
                              org_id: this.getNodeParameter('org_id', i),
                              info: this.getNodeParameter('information', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          GenericFunctions_1.throwOnMissingSharingGroup.call(this, additionalFields);
                          if (Object.keys(additionalFields)) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', '/events', body);
                          responseData = responseData.Event;
                      }
                      else if (operation === 'delete') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/delete/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/view/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Event;
                          delete responseData.Attribute;
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.mispApiRequestAllItems.call(this, '/events');
                      }
                      else if (operation === 'publish') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/publish/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint);
                      }
                      else if (operation === 'unpublish') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/unpublish/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          GenericFunctions_1.throwOnMissingSharingGroup.call(this, updateFields);
                          Object.assign(body, updateFields);
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/edit/${eventId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'PUT', endpoint, body);
                          responseData = responseData.Event;
                          delete responseData.Attribute;
                      }
                  }
                  else if (resource === 'eventTag') {
                      if (operation === 'add') {
                          const body = {
                              event: this.getNodeParameter('eventId', i),
                              tag: this.getNodeParameter('tagId', i),
                          };
                          const endpoint = '/events/addTag';
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'remove') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const tagId = this.getNodeParameter('tagId', i);
                          const endpoint = `/events/removeTag/${eventId}/${tagId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint);
                      }
                  }
                  else if (resource === 'feed') {
                      if (operation === 'create') {
                          const url = this.getNodeParameter('url', i);
                          GenericFunctions_1.throwOnInvalidUrl.call(this, url);
                          const body = {
                              name: this.getNodeParameter('name', i),
                              provider: this.getNodeParameter('provider', i),
                              url,
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields)) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', '/feeds/add', body);
                          responseData = responseData.Feed;
                      }
                      else if (operation === 'disable') {
                          const feedId = this.getNodeParameter('feedId', i);
                          const endpoint = `/feeds/disable/${feedId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint);
                      }
                      else if (operation === 'enable') {
                          const feedId = this.getNodeParameter('feedId', i);
                          const endpoint = `/feeds/enable/${feedId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint);
                      }
                      else if (operation === 'get') {
                          const feedId = this.getNodeParameter('feedId', i);
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', `/feeds/view/${feedId}`);
                          responseData = responseData.Feed;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequestAllItems.call(this, '/feeds'));
                          responseData = responseData.map((entry) => entry.Feed);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          if (updateFields.url) {
                              GenericFunctions_1.throwOnInvalidUrl.call(this, updateFields.url);
                          }
                          Object.assign(body, updateFields);
                          const feedId = this.getNodeParameter('feedId', i);
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'PUT', `/feeds/edit/${feedId}`, body);
                          responseData = responseData.Feed;
                      }
                  }
                  else if (resource === 'galaxy') {
                      if (operation === 'delete') {
                          const galaxyId = this.getNodeParameter('galaxyId', i);
                          const endpoint = `/galaxies/delete/${galaxyId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const galaxyId = this.getNodeParameter('galaxyId', i);
                          const endpoint = `/galaxies/view/${galaxyId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Galaxy;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequestAllItems.call(this, '/galaxies'));
                          responseData = responseData.map((entry) => entry.Galaxy);
                      }
                  }
                  else if (resource === 'noticelist') {
                      if (operation === 'get') {
                          const noticelistId = this.getNodeParameter('noticelistId', i);
                          const endpoint = `/noticelists/view/${noticelistId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Noticelist;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequestAllItems.call(this, '/noticelists'));
                          responseData = responseData.map((entry) => entry.Noticelist);
                      }
                  }
                  else if (resource === 'organisation') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields)) {
                              Object.assign(body, additionalFields);
                          }
                          const endpoint = '/admin/organisations/add';
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', endpoint, body);
                          responseData = responseData.Organisation;
                      }
                      else if (operation === 'delete') {
                          const organisationId = this.getNodeParameter('organisationId', i);
                          const endpoint = `/admin/organisations/delete/${organisationId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const organisationId = this.getNodeParameter('organisationId', i);
                          const endpoint = `/organisations/view/${organisationId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Organisation;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequestAllItems.call(this, '/organisations'));
                          responseData = responseData.map((entry) => entry.Organisation);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          Object.assign(body, updateFields);
                          const organisationId = this.getNodeParameter('organisationId', i);
                          const endpoint = `/admin/organisations/edit/${organisationId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'PUT', endpoint, body);
                          responseData = responseData.Organisation;
                      }
                  }
                  else if (resource === 'tag') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const { colour } = this.getNodeParameter('additionalFields', i);
                          if (colour) {
                              Object.assign(body, {
                                  colour: !colour.startsWith('#') ? `#${colour}` : colour,
                              });
                          }
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', '/tags/add', body);
                          responseData = responseData.Tag;
                      }
                      else if (operation === 'delete') {
                          const tagId = this.getNodeParameter('tagId', i);
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', `/tags/delete/${tagId}`);
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/tags'));
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', 0);
                              responseData = responseData.Tag.slice(0, limit);
                          }
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          Object.assign(body, updateFields);
                          const { colour, name } = updateFields;
                          Object.assign(body, {
                              ...(name && { name }),
                              ...(colour && { colour: !colour.startsWith('#') ? `#${colour}` : colour }),
                          });
                          const tagId = this.getNodeParameter('tagId', i);
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', `/tags/edit/${tagId}`, body);
                          responseData = responseData.Tag;
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'create') {
                          const body = {
                              email: this.getNodeParameter('email', i),
                              role_id: this.getNodeParameter('role_id', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields)) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'POST', '/admin/users/add', body);
                          responseData = responseData.User;
                      }
                      else if (operation === 'delete') {
                          const userId = this.getNodeParameter('userId', i);
                          const endpoint = `/admin/users/delete/${userId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const userId = this.getNodeParameter('userId', i);
                          const endpoint = `/admin/users/view/${userId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.User;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequestAllItems.call(this, '/admin/users'));
                          responseData = responseData.map((entry) => entry.User);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          GenericFunctions_1.throwOnEmptyUpdate.call(this, resource, updateFields);
                          Object.assign(body, updateFields);
                          const userId = this.getNodeParameter('userId', i);
                          const endpoint = `/admin/users/edit/${userId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'PUT', endpoint, body);
                          responseData = responseData.User;
                      }
                  }
                  else if (resource === 'warninglist') {
                      if (operation === 'get') {
                          const warninglistId = this.getNodeParameter('warninglistId', i);
                          const endpoint = `/warninglists/view/${warninglistId}`;
                          responseData = await GenericFunctions_1.mispApiRequest.call(this, 'GET', endpoint);
                          responseData = responseData.Warninglist;
                      }
                      else if (operation === 'getAll') {
                          responseData = (await GenericFunctions_1.mispApiRequest.call(this, 'GET', '/warninglists'));
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', 0);
                              responseData = responseData.Warninglists.slice(0, limit).map((entry) => entry.Warninglist);
                          }
                          else {
                              responseData = responseData.Warninglists.map((entry) => entry.Warninglist);
                          }
                      }
                  }
              }
              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.Misp = Misp;
  //# sourceMappingURL=Misp.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MispApi = void 0;
  class MispApi {
      constructor() {
          this.name = 'mispApi';
          this.displayName = 'MISP API';
          this.documentationUrl = 'misp';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Allow Unauthorized Certificates',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.baseUrl.replace(new RegExp("/$"), "")}}',
                  url: '/tags',
                  skipSslCertificateValidation: '={{$credentials.allowUnauthorizedCerts}}',
              },
          };
      }
  }
  exports.MispApi = MispApi;
  //# sourceMappingURL=MispApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MispApi = void 0;
  class MispApi {
      constructor() {
          this.name = 'mispApi';
          this.displayName = 'MISP API';
          this.documentationUrl = 'misp';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Allow Unauthorized Certificates',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.baseUrl.replace(new RegExp("/$"), "")}}',
                  url: '/tags',
                  skipSslCertificateValidation: '={{$credentials.allowUnauthorizedCerts}}',
              },
          };
      }
  }
  exports.MispApi = MispApi;
  //# sourceMappingURL=MispApi.credentials.js.map

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

  # MISP node

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

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

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

  ## Operations

  * Attribute
      * Create
      * Delete
      * Get
      * Get All
  	* Search
      * Update
  * Event
      * Create
      * Delete
      * Get
      * Get All
      * Publish
  	* Search
      * Unpublish
      * Update
  * Event Tag
      * Add
      * Remove
  * Feed
      * Create
      * Disable
      * Enable
      * Get
      * Get All
      * Update
  * Galaxy
      * Delete
      * Get
      * Get All
  * Noticelist
      * Get
      * Get All
  * Object
  	* Search
  * Organisation
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Tag
      * Create
      * Delete
      * Get All
      * Update
  * User
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Warninglist
      * Get
      * Get All

  ## Templates and examples

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

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

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


node_type: n8n-nodes-base.MonicaCrm
name: MonicaCrm
display_name: Monica CRM
description: Consume the Monica CRM API
category: transform
icon: file:monicaCrm.png
code_hash: 0db18b80574c5a1563944176ada3f2416c35261c67a5e76e2b90db7993bcbf90
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.MonicaCrm
documentation_title: Monica CRM node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"monica-crm","description":"Templates for monica-crm"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MonicaCrm = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class MonicaCrm {
      constructor() {
          this.description = {
              displayName: 'Monica CRM',
              name: 'monicaCrm',
              icon: 'file:monicaCrm.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Monica CRM API',
              defaults: {
                  name: 'Monica CRM',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'monicaCrmApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Activity',
                              value: 'activity',
                          },
                          {
                              name: 'Call',
                              value: 'call',
                          },
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Contact Field',
                              value: 'contactField',
                          },
                          {
                              name: 'Contact Tag',
                              value: 'contactTag',
                          },
                          {
                              name: 'Conversation',
                              value: 'conversation',
                          },
                          {
                              name: 'Conversation Message',
                              value: 'conversationMessage',
                          },
                          {
                              name: 'Journal Entry',
                              value: 'journalEntry',
                          },
                          {
                              name: 'Note',
                              value: 'note',
                          },
                          {
                              name: 'Reminder',
                              value: 'reminder',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                      ],
                      default: 'contact',
                  },
                  ...descriptions_1.activityOperations,
                  ...descriptions_1.activityFields,
                  ...descriptions_1.callOperations,
                  ...descriptions_1.callFields,
                  ...descriptions_1.contactOperations,
                  ...descriptions_1.contactFields,
                  ...descriptions_1.contactFieldOperations,
                  ...descriptions_1.contactFieldFields,
                  ...descriptions_1.contactTagOperations,
                  ...descriptions_1.contactTagFields,
                  ...descriptions_1.conversationOperations,
                  ...descriptions_1.conversationFields,
                  ...descriptions_1.conversationMessageOperations,
                  ...descriptions_1.conversationMessageFields,
                  ...descriptions_1.journalEntryOperations,
                  ...descriptions_1.journalEntryFields,
                  ...descriptions_1.noteOperations,
                  ...descriptions_1.noteFields,
                  ...descriptions_1.reminderOperations,
                  ...descriptions_1.reminderFields,
                  ...descriptions_1.tagOperations,
                  ...descriptions_1.tagFields,
                  ...descriptions_1.taskOperations,
                  ...descriptions_1.taskFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getActivityTypes() {
                      const responseData = (await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', '/activitytypes'));
                      return (0, GenericFunctions_1.toOptions)(responseData);
                  },
                  async getTagsToAdd() {
                      const responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/tags', {}, {}, { forLoader: true });
                      return responseData.map(({ name }) => ({ value: name, name }));
                  },
                  async getTagsToRemove() {
                      const responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/tags', {}, {}, { forLoader: true });
                      return responseData.map(({ id, name }) => ({ value: id, name }));
                  },
                  async getContactFieldTypes() {
                      const responseData = (await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', '/contactfieldtypes'));
                      return (0, GenericFunctions_1.toOptions)(responseData);
                  },
                  async getGenders() {
                      const responseData = (await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', '/genders'));
                      return (0, GenericFunctions_1.toOptions)(responseData);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'activity') {
                      if (operation === 'create') {
                          const contacts = this.getNodeParameter('contacts', i);
                          const happenedAt = this.getNodeParameter('happenedAt', i);
                          const body = {
                              activity_type_id: this.getNodeParameter('activityTypeId', i),
                              contacts: contacts.split(','),
                              happened_at: happenedAt.split('T')[0],
                              summary: this.getNodeParameter('summary', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/activities', body);
                      }
                      else if (operation === 'delete') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const endpoint = `/activities/${activityId}`;
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const endpoint = `/activities/${activityId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const endpoint = '/activities';
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const activityId = this.getNodeParameter('activityId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/activities/${activityId}`);
                          const body = {
                              activity_type_id: data.activity_type.id,
                              contacts: data.attendees.contacts.map((contact) => contact.id),
                              happened_at: data.happened_at,
                              summary: data.summary,
                          };
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          body.happened_at = body.happened_at.split('T')[0];
                          if (typeof body.contacts === 'string') {
                              body.contacts = body.contacts.split(',');
                          }
                          const endpoint = `/activities/${activityId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'call') {
                      if (operation === 'create') {
                          const body = {
                              called_at: this.getNodeParameter('calledAt', i),
                              contact_id: this.getNodeParameter('contactId', i),
                              content: this.getNodeParameter('content', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/calls', body);
                      }
                      else if (operation === 'delete') {
                          const callId = this.getNodeParameter('callId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', `/calls/${callId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const callId = this.getNodeParameter('callId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/calls/${callId}`);
                      }
                      else if (operation === 'getAll') {
                          const endpoint = '/calls';
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const callId = this.getNodeParameter('callId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/calls/${callId}`);
                          const body = {
                              called_at: data.called_at,
                          };
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', `/calls/${callId}`, body);
                      }
                  }
                  else if (resource === 'contact') {
                      if (operation === 'create') {
                          const body = {
                              first_name: this.getNodeParameter('firstName', i),
                              gender_id: this.getNodeParameter('genderId', i),
                          };
                          const { isDeceased = false, deceasedDate, birthdate, ...rest } = this.getNodeParameter('additionalFields', i);
                          body.is_birthdate_known = false;
                          body.is_deceased = isDeceased;
                          body.is_deceased_date_known = false;
                          if (birthdate) {
                              body.is_birthdate_known = true;
                              const [day, month, year] = (0, GenericFunctions_1.getDateParts)(birthdate);
                              body.birthdate_day = day;
                              body.birthdate_month = month;
                              body.birthdate_year = year;
                          }
                          if (deceasedDate) {
                              body.is_deceased = true;
                              body.is_deceased_date_known = true;
                              const [day, month, year] = (0, GenericFunctions_1.getDateParts)(deceasedDate);
                              body.deceased_date_day = day;
                              body.deceased_date_month = month;
                              body.deceased_date_year = year;
                          }
                          if (Object.keys(rest).length) {
                              Object.assign(body, rest);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/contacts', body);
                      }
                      else if (operation === 'delete') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const endpoint = `/contacts/${contactId}`;
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const endpoint = `/contacts/${contactId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          if (Object.keys(filters).length) {
                              Object.assign(qs, filters);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/contacts', {}, qs);
                      }
                      else if (operation === 'update') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/contacts/${contactId}`);
                          const body = {
                              first_name: data.first_name,
                          };
                          const { is_deaceased = false, deceased_date, birthdate, ...rest } = this.getNodeParameter('updateFields', i);
                          body.is_birthdate_known = false;
                          body.is_deceased = is_deaceased;
                          body.is_deceased_date_known = false;
                          if (birthdate) {
                              body.is_birthdate_known = true;
                              const [day, month, year] = (0, GenericFunctions_1.getDateParts)(birthdate);
                              body.birthdate_day = day;
                              body.birthdate_month = month;
                              body.birthdate_year = year;
                          }
                          if (deceased_date) {
                              body.is_deceased = true;
                              body.is_deceased_date_known = true;
                              const [day, month, year] = (0, GenericFunctions_1.getDateParts)(deceased_date);
                              body.deceased_date_day = day;
                              body.deceased_date_month = month;
                              body.deceased_date_year = year;
                          }
                          if (Object.keys(rest).length) {
                              Object.assign(body, rest);
                          }
                          const endpoint = `/contacts/${contactId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'contactField') {
                      if (operation === 'create') {
                          const body = {
                              contact_field_type_id: this.getNodeParameter('contactFieldTypeId', i),
                              contact_id: this.getNodeParameter('contactId', i),
                              data: this.getNodeParameter('data', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/contactfields', body);
                      }
                      else if (operation === 'delete') {
                          const contactFieldId = this.getNodeParameter('contactFieldId', i);
                          const endpoint = `/contactfields/${contactFieldId}`;
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const contactFieldId = this.getNodeParameter('contactFieldId', i);
                          const endpoint = `/contactfields/${contactFieldId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const endpoint = `/contact/${contactId}/contactfields`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const body = {
                              contact_field_type_id: this.getNodeParameter('contactFieldTypeId', i),
                              contact_id: this.getNodeParameter('contactId', i),
                              data: this.getNodeParameter('data', i),
                          };
                          const contactFieldId = this.getNodeParameter('contactFieldId', i);
                          const endpoint = `/contactfields/${contactFieldId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'contactTag') {
                      if (operation === 'add') {
                          const body = {
                              tags: this.getNodeParameter('tagsToAdd', i),
                          };
                          const contactId = this.getNodeParameter('contactId', i);
                          const endpoint = `/contacts/${contactId}/setTags`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'remove') {
                          const body = {
                              tags: this.getNodeParameter('tagsToRemove', i),
                          };
                          const contactId = this.getNodeParameter('contactId', i);
                          const endpoint = `/contacts/${contactId}/unsetTag`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', endpoint, body);
                      }
                  }
                  else if (resource === 'conversation') {
                      if (operation === 'create') {
                          const body = {
                              contact_field_type_id: this.getNodeParameter('contactFieldTypeId', i),
                              contact_id: this.getNodeParameter('contactId', i),
                              happened_at: this.getNodeParameter('happenedAt', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/conversations', body);
                      }
                      else if (operation === 'delete') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const endpoint = `/conversations/${conversationId}`;
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const endpoint = `/conversations/${conversationId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const body = {
                              contact_field_type_id: this.getNodeParameter('contactFieldTypeId', i),
                              happened_at: this.getNodeParameter('happenedAt', i),
                          };
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const endpoint = `/conversations/${conversationId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'conversationMessage') {
                      if (operation === 'add') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const endpoint = `/conversations/${conversationId}/messages`;
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/conversations/${conversationId}`);
                          const body = {
                              contact_id: data.contact.id,
                              content: this.getNodeParameter('content', i),
                              written_at: this.getNodeParameter('writtenAt', i),
                              written_by_me: this.getNodeParameter('writtenByMe', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'update') {
                          const conversationId = this.getNodeParameter('conversationId', i);
                          const messageId = this.getNodeParameter('messageId', i);
                          const endpoint = `/conversations/${conversationId}/messages/${messageId}`;
                          const updateFields = this.getNodeParameter('updateFields', i, {});
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/conversations/${conversationId}`);
                          const message = data.messages.filter((entry) => entry.id === parseInt(messageId, 10))[0];
                          const body = {
                              contact_id: data.contact.id,
                              content: message.content,
                              written_at: message.written_at,
                              written_by_me: message.written_by_me,
                          };
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'journalEntry') {
                      if (operation === 'create') {
                          const body = {
                              title: this.getNodeParameter('title', i),
                              post: this.getNodeParameter('post', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/journal', body);
                      }
                      else if (operation === 'delete') {
                          const journalId = this.getNodeParameter('journalId', i);
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', `/journal/${journalId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const journalId = this.getNodeParameter('journalId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/journal/${journalId}`);
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/journal');
                      }
                      else if (operation === 'update') {
                          const journalId = this.getNodeParameter('journalId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/journal/${journalId}`);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              post: data.post,
                              title: data.title,
                          };
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', `/journal/${journalId}`, body);
                      }
                  }
                  else if (resource === 'note') {
                      if (operation === 'create') {
                          const body = {
                              body: this.getNodeParameter('body', i),
                              contact_id: this.getNodeParameter('contactId', i),
                          };
                          body.is_favorited = this.getNodeParameter('additionalFields.isFavorited', i, false);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/notes', body);
                      }
                      else if (operation === 'delete') {
                          const noteId = this.getNodeParameter('noteId', i);
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', `/notes/${noteId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const noteId = this.getNodeParameter('noteId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/notes/${noteId}`);
                      }
                      else if (operation === 'getAll') {
                          const endpoint = '/notes';
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const noteId = this.getNodeParameter('noteId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/notes/${noteId}`);
                          const body = {
                              body: data.body,
                              contact_id: data.contact.id,
                          };
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', `/notes/${noteId}`, body);
                      }
                  }
                  else if (resource === 'reminder') {
                      if (operation === 'create') {
                          const initialDate = this.getNodeParameter('initialDate', i);
                          const body = {
                              contact_id: this.getNodeParameter('contactId', i),
                              frequency_type: this.getNodeParameter('frequencyType', i),
                              frequency_number: this.getNodeParameter('frequencyNumber', i, 1),
                              initial_date: initialDate.split('T')[0],
                              title: this.getNodeParameter('title', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/reminders', body);
                      }
                      else if (operation === 'delete') {
                          const reminderId = this.getNodeParameter('reminderId', i);
                          const endpoint = `/reminders/${reminderId}`;
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const reminderId = this.getNodeParameter('reminderId', i);
                          const endpoint = `/reminders/${reminderId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/reminders');
                      }
                      else if (operation === 'update') {
                          const reminderId = this.getNodeParameter('reminderId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/reminders/${reminderId}`);
                          const body = {
                              contact_id: data.contact.id,
                              frequency_type: data.frequency_type,
                              frequency_number: data.frequency_number,
                              initial_date: data.initial_date,
                              title: data.title,
                          };
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          body.initial_date = body.initial_date.split('T')[0];
                          const endpoint = `/reminders/${reminderId}`;
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'tag') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/tags', body);
                      }
                      else if (operation === 'delete') {
                          const tagId = this.getNodeParameter('tagId', i);
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', `/tags/${tagId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const tagId = this.getNodeParameter('tagId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/tags/${tagId}`);
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', '/tags');
                      }
                      else if (operation === 'update') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const tagId = this.getNodeParameter('tagId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', `/tags/${tagId}`, body);
                      }
                  }
                  else if (resource === 'task') {
                      if (operation === 'create') {
                          const body = {
                              contact_id: this.getNodeParameter('contactId', i),
                              title: this.getNodeParameter('title', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'POST', '/tasks', body);
                      }
                      else if (operation === 'delete') {
                          const taskId = this.getNodeParameter('taskId', i);
                          await GenericFunctions_1.monicaCrmApiRequest.call(this, 'DELETE', `/tasks/${taskId}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const taskId = this.getNodeParameter('taskId', i);
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/tasks/${taskId}`);
                      }
                      else if (operation === 'getAll') {
                          const endpoint = '/tasks';
                          responseData = await GenericFunctions_1.monicaCrmApiRequestAllItems.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const { data } = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'GET', `/tasks/${taskId}`);
                          const body = {
                              contact_id: data.contact.id,
                              title: data.title,
                              completed: data.completed,
                          };
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          responseData = await GenericFunctions_1.monicaCrmApiRequest.call(this, 'PUT', `/tasks/${taskId}`, body);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              if (['create', 'get', 'update', 'add'].includes(operation)) {
                  responseData = responseData.data;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.MonicaCrm = MonicaCrm;
  //# sourceMappingURL=MonicaCrm.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MonicaCrmApi = void 0;
  class MonicaCrmApi {
      constructor() {
          this.name = 'monicaCrmApi';
          this.displayName = 'Monica CRM API';
          this.documentationUrl = 'monicaCrm';
          this.properties = [
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Self-Hosted Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MonicaCrmApi = MonicaCrmApi;
  //# sourceMappingURL=MonicaCrmApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MonicaCrmApi = void 0;
  class MonicaCrmApi {
      constructor() {
          this.name = 'monicaCrmApi';
          this.displayName = 'Monica CRM API';
          this.documentationUrl = 'monicaCrm';
          this.properties = [
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Self-Hosted Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MonicaCrmApi = MonicaCrmApi;
  //# sourceMappingURL=MonicaCrmApi.credentials.js.map

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

  # Monica CRM node

  Use the Monica CRM node to automate work in Monica CRM, and integrate Monica CRM with other applications. n8n has built-in support for a wide range of Monica CRM features, including creating, updating, deleting, and getting activities, calls, contracts, messages, tasks, and notes. 

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

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

  ## Operations

  * Activity
      * Create an activity
      * Delete an activity
      * Retrieve an activity
      * Retrieve all activities
      * Update an activity
  * Call
      * Create a call
      * Delete a call
      * Retrieve a call
      * Retrieve all calls
      * Update a call
  * Contact
      * Create a contact
      * Delete a contact
      * Retrieve a contact
      * Retrieve all contacts
      * Update a contact
  * Contact Field
      * Create a contact field
      * Delete a contact field
      * Retrieve a contact field
      * Update a contact field
  * Contact Tag
      * Add
      * Remove
  * Conversation
      * Create a conversation
      * Delete a conversation
      * Retrieve a conversation
      * Update a conversation
  * Conversation Message
      * Add a message to a conversation
      * Update a message in a conversation
  * Journal Entry
      * Create a journal entry
      * Delete a journal entry
      * Retrieve a journal entry
      * Retrieve all journal entries
      * Update a journal entry
  * Note
      * Create a note
      * Delete a note
      * Retrieve a note
      * Retrieve all notes
      * Update a note
  * Reminder
      * Create a reminder
      * Delete a reminder
      * Retrieve a reminder
      * Retrieve all reminders
      * Update a reminder
  * Tag
      * Create a tag
      * Delete a tag
      * Retrieve a tag
      * Retrieve all tags
      * Update a tag
  * Task
      * Create a task
      * Delete a task
      * Retrieve a task
      * Retrieve all tasks
      * Update a task

  ## Templates and examples

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

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


node_type: n8n-nodes-base.MondayCom
name: MondayCom
display_name: Monday.com
description: Consume Monday.com API
category: output
icon: file:mondayCom.svg
code_hash: 2d6d2778a0bd18f40f8fe7d6ba9d6fe081f822e1491320263604668ca13d5bb3
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.MondayCom
documentation_title: monday.com node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"mondaycom","description":"Templates for mondaycom"}]
related_resources: []
required_scopes: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-09 15:18:22
updated_at: 2025-06-09 15:18:22
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MondayCom = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const BoardDescription_1 = require("./BoardDescription");
  const BoardColumnDescription_1 = require("./BoardColumnDescription");
  const BoardGroupDescription_1 = require("./BoardGroupDescription");
  const BoardItemDescription_1 = require("./BoardItemDescription");
  const change_case_1 = require("change-case");
  class MondayCom {
      constructor() {
          this.description = {
              displayName: 'Monday.com',
              name: 'mondayCom',
              icon: 'file:mondayCom.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Monday.com API',
              defaults: {
                  name: 'Monday.com',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'mondayComApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'mondayComOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Board',
                              value: 'board',
                          },
                          {
                              name: 'Board Column',
                              value: 'boardColumn',
                          },
                          {
                              name: 'Board Group',
                              value: 'boardGroup',
                          },
                          {
                              name: 'Board Item',
                              value: 'boardItem',
                          },
                      ],
                      default: 'board',
                  },
                  ...BoardDescription_1.boardOperations,
                  ...BoardDescription_1.boardFields,
                  ...BoardColumnDescription_1.boardColumnOperations,
                  ...BoardColumnDescription_1.boardColumnFields,
                  ...BoardGroupDescription_1.boardGroupOperations,
                  ...BoardGroupDescription_1.boardGroupFields,
                  ...BoardItemDescription_1.boardItemOperations,
                  ...BoardItemDescription_1.boardItemFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getBoards() {
                      const returnData = [];
                      const body = {
                          query: `query ($page: Int, $limit: Int) {
  							boards (page: $page, limit: $limit){
  								id
  								description
  								name
  							}
  						}`,
                          variables: {
                              page: 1,
                          },
                      };
                      const boards = await GenericFunctions_1.mondayComApiRequestAllItems.call(this, 'data.boards', body);
                      if (boards === undefined) {
                          return returnData;
                      }
                      for (const board of boards) {
                          const boardName = board.name;
                          const boardId = board.id;
                          const boardDescription = board.description;
                          returnData.push({
                              name: boardName,
                              value: boardId,
                              description: boardDescription,
                          });
                      }
                      return returnData;
                  },
                  async getColumns() {
                      const returnData = [];
                      const boardId = parseInt(this.getCurrentNodeParameter('boardId'), 10);
                      const body = {
                          query: `query ($boardId: [Int]) {
  							boards (ids: $boardId){
  								columns() {
  									id
  									title
  								}
  							}
  						}`,
                          variables: {
                              page: 1,
                              boardId,
                          },
                      };
                      const { data } = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                      if (data === undefined) {
                          return returnData;
                      }
                      const columns = data.boards[0].columns;
                      for (const column of columns) {
                          const columnName = column.title;
                          const columnId = column.id;
                          returnData.push({
                              name: columnName,
                              value: columnId,
                          });
                      }
                      return returnData;
                  },
                  async getGroups() {
                      const returnData = [];
                      const boardId = parseInt(this.getCurrentNodeParameter('boardId'), 10);
                      const body = {
                          query: `query ($boardId: Int!) {
  							boards ( ids: [$boardId]){
  								groups () {
  									id
  									title
  								}
  							}
  						}`,
                          variables: {
                              boardId,
                          },
                      };
                      const { data } = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                      if (data === undefined) {
                          return returnData;
                      }
                      const groups = data.boards[0].groups;
                      for (const group of groups) {
                          const groupName = group.title;
                          const groupId = group.id;
                          returnData.push({
                              name: groupName,
                              value: groupId,
                          });
                      }
                      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 === 'board') {
                      if (operation === 'archive') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const body = {
                              query: `mutation ($id: Int!) {
  									archive_board (board_id: $id) {
  										id
  									}
  								}`,
                              variables: {
                                  id: boardId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.archive_board;
                      }
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const kind = this.getNodeParameter('kind', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              query: `mutation ($name: String!, $kind: BoardKind!, $templateId: Int) {
  									create_board (board_name: $name, board_kind: $kind, template_id: $templateId) {
  										id
  									}
  								}`,
                              variables: {
                                  name,
                                  kind,
                              },
                          };
                          if (additionalFields.templateId) {
                              body.variables.templateId = additionalFields.templateId;
                          }
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.create_board;
                      }
                      if (operation === 'get') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const body = {
                              query: `query ($id: [Int]) {
  									boards (ids: $id){
  										id
  										name
  										description
  										state
  										board_folder_id
  										board_kind
  										owner() {
  											id
  										}
  									}
  								}`,
                              variables: {
                                  id: boardId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.boards;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const body = {
                              query: `query ($page: Int, $limit: Int) {
  									boards (page: $page, limit: $limit){
  										id
  										name
  										description
  										state
  										board_folder_id
  										board_kind
  										owner() {
  											id
  										}
  									}
  								}`,
                              variables: {
                                  page: 1,
                              },
                          };
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mondayComApiRequestAllItems.call(this, 'data.boards', body);
                          }
                          else {
                              body.variables.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                              responseData = responseData.data.boards;
                          }
                      }
                  }
                  if (resource === 'boardColumn') {
                      if (operation === 'create') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const title = this.getNodeParameter('title', i);
                          const columnType = this.getNodeParameter('columnType', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $title: String!, $columnType: ColumnType, $defaults: JSON ) {
  									create_column (board_id: $boardId, title: $title, column_type: $columnType, defaults: $defaults) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  title,
                                  columnType: (0, change_case_1.snakeCase)(columnType),
                              },
                          };
                          if (additionalFields.defaults) {
                              try {
                                  JSON.parse(additionalFields.defaults);
                              }
                              catch (error) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Defauls must be a valid JSON', {
                                      itemIndex: i,
                                  });
                              }
                              body.variables.defaults = JSON.stringify(JSON.parse(additionalFields.defaults));
                          }
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.create_column;
                      }
                      if (operation === 'getAll') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const body = {
                              query: `query ($boardId: [Int]) {
  									boards (ids: $boardId){
  										columns() {
  											id
  											title
  											type
  											settings_str
  											archived
  										}
  									}
  								}`,
                              variables: {
                                  page: 1,
                                  boardId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.boards[0].columns;
                      }
                  }
                  if (resource === 'boardGroup') {
                      if (operation === 'create') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $groupName: String!) {
  									create_group (board_id: $boardId, group_name: $groupName) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  groupName: name,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.create_group;
                      }
                      if (operation === 'delete') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const groupId = this.getNodeParameter('groupId', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $groupId: String!) {
  									delete_group (board_id: $boardId, group_id: $groupId) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  groupId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.delete_group;
                      }
                      if (operation === 'getAll') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const body = {
                              query: `query ($boardId: [Int]) {
  									boards (ids: $boardId, ){
  										id
  										groups() {
  											id
  											title
  											color
  											position
  											archived
  										}
  									}
  								}`,
                              variables: {
                                  boardId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.boards[0].groups;
                      }
                  }
                  if (resource === 'boardItem') {
                      if (operation === 'addUpdate') {
                          const itemId = parseInt(this.getNodeParameter('itemId', i), 10);
                          const value = this.getNodeParameter('value', i);
                          const body = {
                              query: `mutation ($itemId: Int!, $value: String!) {
  									create_update (item_id: $itemId, body: $value) {
  										id
  									}
  								}`,
                              variables: {
                                  itemId,
                                  value,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.create_update;
                      }
                      if (operation === 'changeColumnValue') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const itemId = parseInt(this.getNodeParameter('itemId', i), 10);
                          const columnId = this.getNodeParameter('columnId', i);
                          const value = this.getNodeParameter('value', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $itemId: Int!, $columnId: String!, $value: JSON!) {
  									change_column_value (board_id: $boardId, item_id: $itemId, column_id: $columnId, value: $value) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  itemId,
                                  columnId,
                              },
                          };
                          try {
                              JSON.parse(value);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Custom Values must be a valid JSON', {
                                  itemIndex: i,
                              });
                          }
                          body.variables.value = JSON.stringify(JSON.parse(value));
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.change_column_value;
                      }
                      if (operation === 'changeMultipleColumnValues') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const itemId = parseInt(this.getNodeParameter('itemId', i), 10);
                          const columnValues = this.getNodeParameter('columnValues', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $itemId: Int!, $columnValues: JSON!) {
  									change_multiple_column_values (board_id: $boardId, item_id: $itemId, column_values: $columnValues) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  itemId,
                              },
                          };
                          try {
                              JSON.parse(columnValues);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Custom Values must be a valid JSON', {
                                  itemIndex: i,
                              });
                          }
                          body.variables.columnValues = JSON.stringify(JSON.parse(columnValues));
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.change_multiple_column_values;
                      }
                      if (operation === 'create') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const groupId = this.getNodeParameter('groupId', i);
                          const itemName = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              query: `mutation ($boardId: Int!, $groupId: String!, $itemName: String!, $columnValues: JSON) {
  									create_item (board_id: $boardId, group_id: $groupId, item_name: $itemName, column_values: $columnValues) {
  										id
  									}
  								}`,
                              variables: {
                                  boardId,
                                  groupId,
                                  itemName,
                              },
                          };
                          if (additionalFields.columnValues) {
                              try {
                                  JSON.parse(additionalFields.columnValues);
                              }
                              catch (error) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Custom Values must be a valid JSON', {
                                      itemIndex: i,
                                  });
                              }
                              body.variables.columnValues = JSON.stringify(JSON.parse(additionalFields.columnValues));
                          }
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.create_item;
                      }
                      if (operation === 'delete') {
                          const itemId = parseInt(this.getNodeParameter('itemId', i), 10);
                          const body = {
                              query: `mutation ($itemId: Int!) {
  									delete_item (item_id: $itemId) {
  										id
  									}
  								}`,
                              variables: {
                                  itemId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.delete_item;
                      }
                      if (operation === 'get') {
                          const itemIds = this.getNodeParameter('itemId', i)
                              .split(',')
                              .map((n) => parseInt(n, 10));
                          const body = {
                              query: `query ($itemId: [Int!]){
  									items (ids: $itemId) {
  										id
  										name
  										created_at
  										state
  										column_values() {
  											id
  											text
  											title
  											type
  											value
  											additional_info
  										}
  									}
  								}`,
                              variables: {
                                  itemId: itemIds,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.items;
                      }
                      if (operation === 'getAll') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const groupId = this.getNodeParameter('groupId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const body = {
                              query: `query ($boardId: [Int], $groupId: [String], $page: Int, $limit: Int) {
  									boards (ids: $boardId) {
  										groups (ids: $groupId) {
  											id
  											items(limit: $limit, page: $page) {
  												id
  												name
  												created_at
  												state
  												column_values() {
  													id
  													text
  													title
  													type
  													value
  													additional_info
  												}
  											}
  										}
  									}
  								}`,
                              variables: {
                                  boardId,
                                  groupId,
                              },
                          };
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mondayComApiRequestAllItems.call(this, 'data.boards[0].groups[0].items', body);
                          }
                          else {
                              body.variables.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                              responseData = responseData.data.boards[0].groups[0].items;
                          }
                      }
                      if (operation === 'getByColumnValue') {
                          const boardId = parseInt(this.getNodeParameter('boardId', i), 10);
                          const columnId = this.getNodeParameter('columnId', i);
                          const columnValue = this.getNodeParameter('columnValue', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const body = {
                              query: `query ($boardId: Int!, $columnId: String!, $columnValue: String!, $page: Int, $limit: Int ){
  									items_by_column_values (board_id: $boardId, column_id: $columnId, column_value: $columnValue, page: $page, limit: $limit) {
  										id
  										name
  										created_at
  										state
  										board {
  											id
  										}
  										column_values() {
  											id
  											text
  											title
  											type
  											value
  											additional_info
  										}
  									}
  								}`,
                              variables: {
                                  boardId,
                                  columnId,
                                  columnValue,
                              },
                          };
                          if (returnAll) {
                              responseData = await GenericFunctions_1.mondayComApiRequestAllItems.call(this, 'data.items_by_column_values', body);
                          }
                          else {
                              body.variables.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                              responseData = responseData.data.items_by_column_values;
                          }
                      }
                      if (operation === 'move') {
                          const groupId = this.getNodeParameter('groupId', i);
                          const itemId = parseInt(this.getNodeParameter('itemId', i), 10);
                          const body = {
                              query: `mutation ($groupId: String!, $itemId: Int!) {
  									move_item_to_group (group_id: $groupId, item_id: $itemId) {
  										id
  									}
  								}`,
                              variables: {
                                  groupId,
                                  itemId,
                              },
                          };
                          responseData = await GenericFunctions_1.mondayComApiRequest.call(this, body);
                          responseData = responseData.data.move_item_to_group;
                      }
                  }
                  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.MondayCom = MondayCom;
  //# sourceMappingURL=MondayCom.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MondayComApi = void 0;
  class MondayComApi {
      constructor() {
          this.name = 'mondayComApi';
          this.displayName = 'Monday.com API';
          this.documentationUrl = 'mondayCom';
          this.properties = [
              {
                  displayName: 'Token V2',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MondayComApi = MondayComApi;
  //# sourceMappingURL=MondayComApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MondayComOAuth2Api = void 0;
  const scopes = ['boards:write', 'boards:read'];
  class MondayComOAuth2Api {
      constructor() {
          this.name = 'mondayComOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Monday.com OAuth2 API';
          this.documentationUrl = 'mondaycom';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://auth.monday.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://auth.monday.com/oauth2/token',
                  required: true,
              },
              {
                  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.MondayComOAuth2Api = MondayComOAuth2Api;
  //# sourceMappingURL=MondayComOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MondayComApi = void 0;
  class MondayComApi {
      constructor() {
          this.name = 'mondayComApi';
          this.displayName = 'Monday.com API';
          this.documentationUrl = 'mondayCom';
          this.properties = [
              {
                  displayName: 'Token V2',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.MondayComApi = MondayComApi;
  //# sourceMappingURL=MondayComApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MondayComOAuth2Api = void 0;
  const scopes = ['boards:write', 'boards:read'];
  class MondayComOAuth2Api {
      constructor() {
          this.name = 'mondayComOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Monday.com OAuth2 API';
          this.documentationUrl = 'mondaycom';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://auth.monday.com/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://auth.monday.com/oauth2/token',
                  required: true,
              },
              {
                  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.MondayComOAuth2Api = MondayComOAuth2Api;
  //# sourceMappingURL=MondayComOAuth2Api.credentials.js.map

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

  # monday.com node

  Use the monday.com node to automate work in monday.com, and integrate monday.com with other applications. n8n has built-in support for a wide range of monday.com features, including creating a new board, and adding, deleting, and getting items on the board.

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

  /// warning | Minimum required version
  This node requires n8n version 1.22.6 or above.
  ///

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

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

  ## Operations

  * Board
      * Archive a board
      * Create a new board
      * Get a board
      * Get all boards
  * Board Column
      * Create a new column
      * Get all columns
  * Board Group
      * Delete a group in a board
      * Create a group in a board
      * Get list of groups in a board
  * Board Item
      * Add an update to an item.
      * Change a column value for a board item
      * Change multiple column values for a board item
      * Create an item in a board's group
      * Delete an item
      * Get an item
      * Get all items
      * Get items by column value
      * Move item to group

  ## Templates and examples

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

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

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


