# nodes

node_type: n8n-nodes-base.Webhook
name: Webhook
display_name: Webhook
description: Starts the workflow when a webhook is called
category: trigger
icon: file:webhook.svg
code_hash: 143d6bbdce335c5a9204112b2c1e8b92e4061d75ba3cb23301845f6fed9e6c71
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook
documentation_title: Respond to Webhook
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"respond-to-webhook","description":"Templates for respond-to-webhook"}]
related_resources: []
required_scopes: []
parameter_schemas: []
version_info: {"breakingChanges":[],"currentVersion":"1.22.0","deprecated":true,"deprecationNotice":"in 1.22.0"}
example_parameters: {"dynamic_property":null,"path":"example-value","webhookNotice":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:24
updated_at: 2025-06-12 08:59:24
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Webhook = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const promises_1 = require("stream/promises");
  const fs_1 = require("fs");
  const uuid_1 = require("uuid");
  const basic_auth_1 = __importDefault(require("basic-auth"));
  const isbot_1 = __importDefault(require("isbot"));
  const tmp_promise_1 = require("tmp-promise");
  const description_1 = require("./description");
  const error_1 = require("./error");
  class Webhook extends n8n_workflow_1.Node {
      constructor() {
          super(...arguments);
          this.authPropertyName = 'authentication';
          this.description = {
              displayName: 'Webhook',
              icon: 'file:webhook.svg',
              name: 'webhook',
              group: ['trigger'],
              version: 1,
              description: 'Starts the workflow when a webhook is called',
              eventTriggerDescription: 'Waiting for you to call the Test URL',
              activationMessage: 'You can now make calls to your production webhook URL.',
              defaults: {
                  name: 'Webhook',
              },
              triggerPanel: {
                  header: '',
                  executionsHelp: {
                      inactive: 'Webhooks have two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the \'listen\' button, then make a request to the test URL. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key="activate">Activate</a> the workflow, then make requests to the production URL. These executions will show up in the executions list, but not in the editor.',
                      active: 'Webhooks have two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the \'listen\' button, then make a request to the test URL. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. Since the workflow is activated, you can make requests to the production URL. These executions will show up in the <a data-key="executions">executions list</a>, but not in the editor.',
                  },
                  activationHint: 'Once you’ve finished building your workflow, run it without having to click this button by using the production webhook URL.',
              },
              inputs: [],
              outputs: ['main'],
              credentials: (0, description_1.credentialsProperty)(this.authPropertyName),
              webhooks: [description_1.defaultWebhookDescription],
              properties: [
                  (0, description_1.authenticationProperty)(this.authPropertyName),
                  description_1.httpMethodsProperty,
                  {
                      displayName: 'Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      placeholder: 'webhook',
                      required: true,
                      description: 'The path to listen to',
                  },
                  description_1.responseModeProperty,
                  {
                      displayName: 'Insert a \'Respond to Webhook\' node to control when and how you respond. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/" target="_blank">More details</a>',
                      name: 'webhookNotice',
                      type: 'notice',
                      displayOptions: {
                          show: {
                              responseMode: ['responseNode'],
                          },
                      },
                      default: '',
                  },
                  description_1.responseCodeProperty,
                  description_1.responseDataProperty,
                  description_1.responseBinaryPropertyNameProperty,
                  description_1.optionsProperty,
              ],
          };
      }
      async webhook(context) {
          var _a;
          const options = context.getNodeParameter('options', {});
          const req = context.getRequestObject();
          const resp = context.getResponseObject();
          try {
              if (options.ignoreBots && (0, isbot_1.default)(req.headers['user-agent']))
                  throw new error_1.WebhookAuthorizationError(403);
              await this.validateAuth(context);
          }
          catch (error) {
              if (error instanceof error_1.WebhookAuthorizationError) {
                  resp.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' });
                  resp.end(error.message);
                  return { noWebhookResponse: true };
              }
              throw error;
          }
          if (options.binaryData) {
              return this.handleBinaryData(context);
          }
          if (req.contentType === 'multipart/form-data') {
              return this.handleFormData(context);
          }
          const response = {
              json: {
                  headers: req.headers,
                  params: req.params,
                  query: req.query,
                  body: req.body,
              },
              binary: options.rawBody
                  ? {
                      data: {
                          data: req.rawBody.toString(n8n_workflow_1.BINARY_ENCODING),
                          mimeType: (_a = req.contentType) !== null && _a !== void 0 ? _a : 'application/json',
                      },
                  }
                  : undefined,
          };
          return {
              webhookResponse: options.responseData,
              workflowData: [[response]],
          };
      }
      async validateAuth(context) {
          const authentication = context.getNodeParameter(this.authPropertyName);
          if (authentication === 'none')
              return;
          const req = context.getRequestObject();
          const headers = context.getHeaderData();
          if (authentication === 'basicAuth') {
              let expectedAuth;
              try {
                  expectedAuth = await context.getCredentials('httpBasicAuth');
              }
              catch { }
              if (expectedAuth === undefined || !expectedAuth.user || !expectedAuth.password) {
                  throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
              }
              const providedAuth = (0, basic_auth_1.default)(req);
              if (!providedAuth)
                  throw new error_1.WebhookAuthorizationError(401);
              if (providedAuth.name !== expectedAuth.user || providedAuth.pass !== expectedAuth.password) {
                  throw new error_1.WebhookAuthorizationError(403);
              }
          }
          else if (authentication === 'headerAuth') {
              let expectedAuth;
              try {
                  expectedAuth = await context.getCredentials('httpHeaderAuth');
              }
              catch { }
              if (expectedAuth === undefined || !expectedAuth.name || !expectedAuth.value) {
                  throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
              }
              const headerName = expectedAuth.name.toLowerCase();
              const expectedValue = expectedAuth.value;
              if (!headers.hasOwnProperty(headerName) ||
                  headers[headerName] !== expectedValue) {
                  throw new error_1.WebhookAuthorizationError(403);
              }
          }
      }
      async handleFormData(context) {
          var _a;
          const req = context.getRequestObject();
          const options = context.getNodeParameter('options', {});
          const { data, files } = req.body;
          const returnItem = {
              binary: {},
              json: {
                  headers: req.headers,
                  params: req.params,
                  query: req.query,
                  body: data,
              },
          };
          let count = 0;
          for (const key of Object.keys(files)) {
              const processFiles = [];
              let multiFile = false;
              if (Array.isArray(files[key])) {
                  processFiles.push(...files[key]);
                  multiFile = true;
              }
              else {
                  processFiles.push(files[key]);
              }
              let fileCount = 0;
              for (const file of processFiles) {
                  let binaryPropertyName = key;
                  if (binaryPropertyName.endsWith('[]')) {
                      binaryPropertyName = binaryPropertyName.slice(0, -2);
                  }
                  if (multiFile) {
                      binaryPropertyName += fileCount++;
                  }
                  if (options.binaryPropertyName) {
                      binaryPropertyName = `${options.binaryPropertyName}${count}`;
                  }
                  returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(file.filepath, (_a = file.originalFilename) !== null && _a !== void 0 ? _a : file.newFilename, file.mimetype);
                  count += 1;
              }
          }
          return { workflowData: [[returnItem]] };
      }
      async handleBinaryData(context) {
          var _a, _b, _c;
          const req = context.getRequestObject();
          const options = context.getNodeParameter('options', {});
          const binaryFile = await (0, tmp_promise_1.file)({ prefix: 'n8n-webhook-' });
          try {
              await (0, promises_1.pipeline)(req, (0, fs_1.createWriteStream)(binaryFile.path));
              const returnItem = {
                  binary: {},
                  json: {
                      headers: req.headers,
                      params: req.params,
                      query: req.query,
                      body: {},
                  },
              };
              const binaryPropertyName = (options.binaryPropertyName || 'data');
              const fileName = (_b = (_a = req.contentDisposition) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : (0, uuid_1.v4)();
              returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(binaryFile.path, fileName, (_c = req.contentType) !== null && _c !== void 0 ? _c : 'application/octet-stream');
              return { workflowData: [[returnItem]] };
          }
          catch (error) {
              throw new n8n_workflow_1.NodeOperationError(context.getNode(), error);
          }
          finally {
              await binaryFile.cleanup();
          }
      }
  }
  exports.Webhook = Webhook;
  //# sourceMappingURL=Webhook.node.js.map

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

  # Respond to Webhook

  Use the Respond to Webhook node to control the response to incoming webhooks. This node works with the [Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md) node.

  /// note | Runs once for the first data item
  The Respond to Webhook node runs once, using the first incoming data item. Refer to [Return more than one data item](#return-more-than-one-data-item-deprecated) for more information.
  ///

  ## How to use Respond to Webhook

  To use the Respond to Webhook node:

  1. Add a [Webhook](/integrations/builtin/core-nodes/n8n-nodes-base.webhook/index.md) node as the trigger node for the workflow.
  1. In the Webhook node, set **Respond** to **Using 'Respond to Webhook' node**.
  1. Add the Respond to Webhook node anywhere in your workflow. If you want it to return data from other nodes, place it after those nodes.

  ## Node parameters

  Configure the node behavior using these parameters.

  ### Respond With

  Choose what data to send in the webhook response.

  - **All Incoming Items**: Respond with all the JSON items from the input.
  - **Binary File**: Respond with a binary file defined in **Response Data Source**.
  - **First Incoming Item**: Respond with the first incoming item's JSON.
  - **JSON**: Respond with a JSON object defined in **Response Body**.
  - **JWT Token**: Respond with a JSON Web Token (JWT).
  - **No Data**: No response payload.
  - **Redirect**: Redirect to a URL set in **Redirect URL**.
  - **Text**: Respond with text set in **Response Body**.

  ## Node options

  Select **Add Option** to view and set the options.

  - **Response Code**: Set the [response code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) to use.
  - **Response Headers**: Define the response headers to send.
  - **Put Response in Field**: Available when you respond with **All Incoming Items** or **First Incoming Item**. Set the field name for the field containing the response data.

  ## Templates and examples

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

  ## Workflow behavior

  When using the Respond to Webhook node, workflows behave as follows:

  - The workflow finishes without executing the Respond to Webhook node: it returns a standard message with a 200 status.
  - The workflow errors before the first Respond to Webhook node executes: the workflow returns an error message with a 500 status.
  - A second Respond to Webhook node executes after the first one: the workflow ignores it.
  - A Respond to Webhook node executes but there was no webhook: the workflow ignores the Respond to Webhook node.

  ## Output the response sent to the webhook

  By default, the Respond to Webhook node has a single output branch that contains the node's input data.

  You can optionally enable a second output branch containing the response sent to the webhook. To enable this secondary output, open the Respond to Webhook node on the canvas and select the **Settings** tab. Activate the **Enable Response Output Branch** option.

  The node will now have two outputs:

  * **Input Data**: The original output, passing on the node's input.
  * **Response**: The response object sent to the webhook.

  ## Return more than one data item (deprecated)

  /// note | Deprecated in 1.22.0
  n8n 1.22.0 added support for returning all data items using the **All Incoming Items** option. n8n recommends upgrading to the latest version of n8n, instead of using the workarounds described in this section.
  ///

  The Respond to Webhook node runs once, using the first incoming data item. This includes when using [expressions](/code/expressions.md). You can't force looping using the Loop node: the workflow will run, but the webhook response will still only contain the results of the first execution. 

  If you need to return more than one data item, choose one of these options:

  - Instead of using the Respond to Webhook node, use the **When Last Node Finishes** option in **Respond** in the Webhook node. Use this when you want to return the final data that the workflow outputs.
  - Use the [Aggregate](/integrations/builtin/core-nodes/n8n-nodes-base.aggregate.md) node to turn multiple items into a single item before passing the data to the Respond to Webhook node. Set **Aggregate** to **All Item Data (Into a Single List)**.

workflow_examples:
  [{"name":"dynamic_credentials_using_expressions","workflow":{"name":"Dynamic credentials using expressions","nodes":[{"parameters":{"path":"da4071f2-7550-4dae-aa48-8bced4291643","formTitle":"Test dynamic credentials","formDescription":"This form is for testing an n8n workflow that demonstrates setting credentials with expressions.","formFields":{"values":[{"fieldLabel":"Enter your NASA API key","requiredField":true}]},"responseMode":"responseNode"},"id":"cc6f2b1e-0ed0-4d22-8a44-d7223ba283b4","name":"n8n Form Trigger","type":"n8n-nodes-base.formTrigger","typeVersion":2,"position":[560,520],"webhookId":"da4071f2-7550-4dae-aa48-8bced4291643"},{"parameters":{"additionalFields":{}},"id":"ef336bae-3d4f-419c-ab5c-b9f0de89f170","name":"NASA","type":"n8n-nodes-base.nasa","typeVersion":1,"position":[900,520],"credentials":{"nasaApi":{"id":"QDDBOZOD6k3ijL5t","name":"NASA account"}}},{"parameters":{"respondWith":"redirect","redirectURL":"={{ $json.url }}","options":{}},"id":"143bcdb6-aca0-4dd8-9204-9777271cd230","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","typeVersion":1,"position":[1220,520]},{"parameters":{"content":"This workflow shows how to set credentials dynamically using expressions.\n\n\nFirst, set up your NASA credential: \n\n1. Create a new NASA credential.\n1. Hover over **API Key**.\n1. Toggle **Expression** on.\n1. In the **API Key** field, enter `{{ $json[\"Enter your NASA API key\"] }}`.\n\n\nThen, test the workflow:\n\n1. Get an [API key from NASA](https://api.nasa.gov/)\n2. Select **Execute workflow**\n3. Enter your key using the form.\n4. The workflow runs and sends you to the NASA picture of the day.\n\n\nFor more information on expressions, refer to [n8n documentation | Expressions](https://docs.n8n.io/code/expressions/).","height":564,"width":322,"color":4},"id":"0a0dee23-fa16-4f09-b5e0-856f47fb53d0","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[120,140]},{"parameters":{"content":"User submits an API key using the form","height":319},"id":"dd766e32-334d-4e46-9daa-7800b134a3a5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[500,380]},{"parameters":{"content":"The workflow passes the key to the NASA node. You can reference the value using the expression `$json[\"Enter your NASA API key\"]`. This is also available to the node credential. ","height":319,"color":5},"id":"3d8f02e6-e029-41dc-89ad-0f5cffe09348","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[820,380]},{"parameters":{"content":"The Respond to Webhook node controls the form response (in this example, redirecting the user to an image)","height":319},"id":"096eb6ab-c276-4687-9dc0-50e16a8f709a","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1140,380]}],"pinData":{},"connections":{"n8n Form Trigger":{"main":[[{"node":"NASA","type":"main","index":0}]]},"NASA":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.respondToWebhook","version":1,"parameters":{"respondWith":"redirect","redirectURL":"={{ $json.url }}","options":{}},"position":[1220,520]}],"connections":{"n8n Form Trigger":{"main":[[{"node":"NASA","type":"main","index":0}]]},"NASA":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]}},"source":"docs/_workflows/credentials/dynamic_credentials_using_expressions.json"},{"name":"webhook-example","workflow":{"name":"Extract from file example","nodes":[{"parameters":{"httpMethod":"POST","path":"06696ea7-9dc7-464a-873b-3feb095b0874","options":{"rawBody":true}},"type":"n8n-nodes-base.webhook","typeVersion":2,"position":[-380,-80],"id":"dfbd51af-6050-47c5-a26c-74cba77f65f7","name":"Webhook","webhookId":"06696ea7-9dc7-464a-873b-3feb095b0874"},{"parameters":{"options":{"headerRow":false}},"type":"n8n-nodes-base.extractFromFile","typeVersion":1,"position":[-160,-80],"id":"1b1e4643-8269-402b-83af-dfd90fd6a0b5","name":"Extract from File"}],"pinData":{},"connections":{"Webhook":{"main":[[{"node":"Extract from File","type":"main","index":0}]]}},"active":true,"settings":{"executionOrder":"v1"},"versionId":"dd2bf7f1-692a-41a8-9c2e-7931de57fa13","meta":{"instanceId":"1060f46e51fc7902c377ab29d7cbfb87696ddf6b3c5c27cbbb65c3cb36e21baf"},"id":"9i3iDZf5MpjlJ2sh","tags":[]},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.webhook","version":2,"parameters":{"httpMethod":"POST","path":"06696ea7-9dc7-464a-873b-3feb095b0874","options":{"rawBody":true}},"position":[-380,-80]}],"connections":{"Webhook":{"main":[[{"node":"Extract from File","type":"main","index":0}]]}},"source":"docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile/webhook-example.json","description":"Workflow example from docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile/webhook-example.json"}]

troubleshooting_info:
  [{"issue":"How to use Respond to Webhook","solution":"To use the Respond to Webhook node:"},{"issue":"Node parameters","solution":"Configure the node behavior using these parameters."},{"issue":"Respond With","solution":"Choose what data to send in the webhook response."},{"issue":"Node options","solution":"Select **Add Option** to view and set the options."},{"issue":"Workflow behavior","solution":"When using the Respond to Webhook node, workflows behave as follows:"},{"issue":"Output the response sent to the webhook","solution":"By default, the Respond to Webhook node has a single output branch that contains the node's input data."},{"issue":"Return more than one data item (deprecated)","solution":"/// note | Deprecated in 1.22.0\nn8n 1.22.0 added support for returning all data items using the **All Incoming Items** option. n8n recommends upgrading to the latest version of n8n, instead of using the workarounds described in this section.\n///"}]

node_connections:
  [{"fromNode":"n8n Form Trigger","toNode":"NASA","connectionType":"main"},{"fromNode":"NASA","toNode":"Respond to Webhook","connectionType":"main"},{"fromNode":"Webhook","toNode":"Extract from File","connectionType":"main"}]

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

properties_schema:
  [{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"(0, description_1.authenticationProperty)(this.authPropertyName)"},{"displayName":"Path","name":"path","type":"string","default":"","required":true,"description":"The path to listen to","placeholder":"webhook"},{"displayName":"Insert a \\","name":"webhookNotice","type":"notice","default":""}]


node_type: n8n-nodes-base.Vero
name: Vero
display_name: Vero
description: Consume Vero API
category: output
icon: file:vero.svg
code_hash: 37d697c0a7127e11a8f6dd2ee542a7dfbbf0ba4c38649c1acd4b7496c07fbeef
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Vero
documentation_title: Vero node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"vero","description":"Templates for vero"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"user","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:24
updated_at: 2025-06-12 08:59:24
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Vero = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const UserDescription_1 = require("./UserDescription");
  const EventDescripion_1 = require("./EventDescripion");
  class Vero {
      constructor() {
          this.description = {
              displayName: 'Vero',
              name: 'vero',
              icon: 'file:vero.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Vero API',
              defaults: {
                  name: 'Vero',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'veroApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'User',
                              value: 'user',
                              description: 'Create, update and manage the subscription status of your users',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                              description: 'Track events based on actions your customers take in real time',
                          },
                      ],
                      default: 'user',
                  },
                  ...UserDescription_1.userOperations,
                  ...EventDescripion_1.eventOperations,
                  ...UserDescription_1.userFields,
                  ...EventDescripion_1.eventFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  if (resource === 'user') {
                      if (operation === 'create') {
                          const id = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              id,
                          };
                          if (additionalFields.email) {
                              body.email = additionalFields.email;
                          }
                          if (!jsonActive) {
                              const dataAttributesValues = this.getNodeParameter('dataAttributesUi', i).dataAttributesValues;
                              if (dataAttributesValues) {
                                  const dataAttributes = {};
                                  for (let index = 0; index < dataAttributesValues.length; index++) {
                                      dataAttributes[dataAttributesValues[index].key] =
                                          dataAttributesValues[index].value;
                                      body.data = dataAttributes;
                                  }
                              }
                          }
                          else {
                              const dataAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('dataAttributesJson', i));
                              if (dataAttributesJson) {
                                  body.data = dataAttributesJson;
                              }
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', '/users/track', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'alias') {
                          const id = this.getNodeParameter('id', i);
                          const newId = this.getNodeParameter('newId', i);
                          const body = {
                              id,
                              new_id: newId,
                          };
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'PUT', '/users/reidentify', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'unsubscribe' ||
                          operation === 'resubscribe' ||
                          operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          const body = {
                              id,
                          };
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', `/users/${operation}`, body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                      if (operation === 'addTags' || operation === 'removeTags') {
                          const id = this.getNodeParameter('id', i);
                          const tags = this.getNodeParameter('tags', i).split(',');
                          const body = {
                              id,
                          };
                          if (operation === 'addTags') {
                              body.add = JSON.stringify(tags);
                          }
                          if (operation === 'removeTags') {
                              body.remove = JSON.stringify(tags);
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'PUT', '/users/tags/edit', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                  }
                  if (resource === 'event') {
                      if (operation === 'track') {
                          const id = this.getNodeParameter('id', i);
                          const email = this.getNodeParameter('email', i);
                          const eventName = this.getNodeParameter('eventName', i);
                          const jsonActive = this.getNodeParameter('jsonParameters', i);
                          const body = {
                              identity: { id, email },
                              event_name: eventName,
                              email,
                          };
                          if (!jsonActive) {
                              const dataAttributesValues = this.getNodeParameter('dataAttributesUi', i).dataAttributesValues;
                              if (dataAttributesValues) {
                                  const dataAttributes = {};
                                  for (let index = 0; index < dataAttributesValues.length; index++) {
                                      dataAttributes[dataAttributesValues[index].key] =
                                          dataAttributesValues[index].value;
                                      body.data = JSON.stringify(dataAttributes);
                                  }
                              }
                              const extraAttributesValues = this.getNodeParameter('extraAttributesUi', i).extraAttributesValues;
                              if (extraAttributesValues) {
                                  const extraAttributes = {};
                                  for (let index = 0; index < extraAttributesValues.length; index++) {
                                      extraAttributes[extraAttributesValues[index].key] =
                                          extraAttributesValues[index].value;
                                      body.extras = JSON.stringify(extraAttributes);
                                  }
                              }
                          }
                          else {
                              const dataAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('dataAttributesJson', i));
                              if (dataAttributesJson) {
                                  body.data = JSON.stringify(dataAttributesJson);
                              }
                              const extraAttributesJson = (0, GenericFunctions_1.validateJSON)(this.getNodeParameter('extraAttributesJson', i));
                              if (extraAttributesJson) {
                                  body.extras = JSON.stringify(extraAttributesJson);
                              }
                          }
                          try {
                              responseData = await GenericFunctions_1.veroApiRequest.call(this, 'POST', '/events/track', body);
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                  }
                  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.Vero = Vero;
  //# sourceMappingURL=Vero.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VeroApi = void 0;
  class VeroApi {
      constructor() {
          this.name = 'veroApi';
          this.displayName = 'Vero API';
          this.documentationUrl = 'vero';
          this.properties = [
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.VeroApi = VeroApi;
  //# sourceMappingURL=VeroApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.VeroApi = void 0;
  class VeroApi {
      constructor() {
          this.name = 'veroApi';
          this.displayName = 'Vero API';
          this.documentationUrl = 'vero';
          this.properties = [
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.VeroApi = VeroApi;
  //# sourceMappingURL=VeroApi.credentials.js.map

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

  # Vero node

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

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

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

  ## Operations

  * User
      * Create or update a user profile
      * Change a users identifier
      * Unsubscribe a user.
      * Resubscribe a user.
      * Delete a user.
      * Adds a tag to a users profile.
      * Removes a tag from a users profile.
  * Event
      * Track an event for a specific customer

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"user","description":"Create, update and manage the subscription status of your users","options":[{"name":"User","value":"user","description":"Create, update and manage the subscription status of your users"},{"name":"Event","value":"event","description":"Track events based on actions your customers take in real time"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescripion_1.eventOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescripion_1.eventFields"}]


node_type: n8n-nodes-base.Wekan
name: Wekan
display_name: Wekan
description: Consume Wekan API
category: transform
icon: file:wekan.png
code_hash: 7fa9339c04210a8df356f15f28131919effd00d88c7ed637e194ef9000461f1a
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Wekan
documentation_title: Wekan node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"wekan","description":"Templates for wekan"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"resource":"board","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:24
updated_at: 2025-06-12 08:59:24
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Wekan = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const BoardDescription_1 = require("./BoardDescription");
  const CardDescription_1 = require("./CardDescription");
  const CardCommentDescription_1 = require("./CardCommentDescription");
  const ChecklistDescription_1 = require("./ChecklistDescription");
  const ChecklistItemDescription_1 = require("./ChecklistItemDescription");
  const ListDescription_1 = require("./ListDescription");
  const utilities_1 = require("../../utils/utilities");
  class Wekan {
      constructor() {
          this.description = {
              displayName: 'Wekan',
              name: 'wekan',
              icon: 'file:wekan.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Wekan API',
              defaults: {
                  name: 'Wekan',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wekanApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Board',
                              value: 'board',
                          },
                          {
                              name: 'Card',
                              value: 'card',
                          },
                          {
                              name: 'Card Comment',
                              value: 'cardComment',
                          },
                          {
                              name: 'Checklist',
                              value: 'checklist',
                          },
                          {
                              name: 'Checklist Item',
                              value: 'checklistItem',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'card',
                  },
                  ...BoardDescription_1.boardOperations,
                  ...CardDescription_1.cardOperations,
                  ...CardCommentDescription_1.cardCommentOperations,
                  ...ChecklistDescription_1.checklistOperations,
                  ...ChecklistItemDescription_1.checklistItemOperations,
                  ...ListDescription_1.listOperations,
                  ...BoardDescription_1.boardFields,
                  ...CardDescription_1.cardFields,
                  ...CardCommentDescription_1.cardCommentFields,
                  ...ChecklistDescription_1.checklistFields,
                  ...ChecklistItemDescription_1.checklistItemFields,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getUsers() {
                      const returnData = [];
                      const users = await GenericFunctions_1.apiRequest.call(this, 'GET', 'users', {}, {});
                      for (const user of users) {
                          returnData.push({
                              name: user.username,
                              value: user._id,
                          });
                      }
                      return returnData;
                  },
                  async getBoards() {
                      const returnData = [];
                      const user = await GenericFunctions_1.apiRequest.call(this, 'GET', 'user', {}, {});
                      const boards = await GenericFunctions_1.apiRequest.call(this, 'GET', `users/${user._id}/boards`, {}, {});
                      for (const board of boards) {
                          returnData.push({
                              name: board.title,
                              value: board._id,
                          });
                      }
                      return returnData;
                  },
                  async getLists() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const lists = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/lists`, {}, {});
                      for (const list of lists) {
                          returnData.push({
                              name: list.title,
                              value: list._id,
                          });
                      }
                      return returnData;
                  },
                  async getSwimlanes() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const swimlanes = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/swimlanes`, {}, {});
                      for (const swimlane of swimlanes) {
                          returnData.push({
                              name: swimlane.title,
                              value: swimlane._id,
                          });
                      }
                      return returnData;
                  },
                  async getCards() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const listId = this.getCurrentNodeParameter('listId');
                      const cards = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/lists/${listId}/cards`, {}, {});
                      for (const card of cards) {
                          returnData.push({
                              name: card.title,
                              value: card._id,
                          });
                      }
                      return returnData;
                  },
                  async getChecklists() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const checklists = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/checklists`, {}, {});
                      for (const checklist of checklists) {
                          returnData.push({
                              name: checklist.title,
                              value: checklist._id,
                          });
                      }
                      return returnData;
                  },
                  async getChecklistItems() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const checklistId = this.getCurrentNodeParameter('checklistId');
                      const checklist = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`, {}, {});
                      for (const item of checklist.items) {
                          returnData.push({
                              name: item.title,
                              value: item._id,
                          });
                      }
                      return returnData;
                  },
                  async getComments() {
                      const returnData = [];
                      const boardId = this.getCurrentNodeParameter('boardId');
                      const cardId = this.getCurrentNodeParameter('cardId');
                      const comments = await GenericFunctions_1.apiRequest.call(this, 'GET', `boards/${boardId}/cards/${cardId}/comments`, {}, {});
                      for (const comment of comments) {
                          returnData.push({
                              name: comment.comment,
                              value: comment._id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let returnAll;
          let limit;
          const operation = this.getNodeParameter('operation', 0);
          const resource = this.getNodeParameter('resource', 0);
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          for (let i = 0; i < items.length; i++) {
              try {
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'board') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'boards';
                          body.title = this.getNodeParameter('title', i);
                          body.owner = this.getNodeParameter('owner', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const userId = this.getNodeParameter('IdUser', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `users/${userId}/boards`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'card') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards`;
                          body.title = this.getNodeParameter('title', i);
                          body.swimlaneId = this.getNodeParameter('swimlaneId', i);
                          body.authorId = this.getNodeParameter('authorId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const fromObject = this.getNodeParameter('fromObject', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (fromObject === 'list') {
                              const listId = this.getNodeParameter('listId', i);
                              endpoint = `boards/${boardId}/lists/${listId}/cards`;
                          }
                          if (fromObject === 'swimlane') {
                              const swimlaneId = this.getNodeParameter('swimlaneId', i);
                              endpoint = `boards/${boardId}/swimlanes/${swimlaneId}/cards`;
                          }
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/lists/${listId}/cards/${cardId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'cardComment') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments`;
                          body.authorId = this.getNodeParameter('authorId', i);
                          body.comment = this.getNodeParameter('comment', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments/${commentId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const commentId = this.getNodeParameter('commentId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments/${commentId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/comments`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'list') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          endpoint = `boards/${boardId}/lists`;
                          body.title = this.getNodeParameter('title', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const listId = this.getNodeParameter('listId', i);
                          endpoint = `boards/${boardId}/lists/${listId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `boards/${boardId}/lists`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklist') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists`;
                          body.title = this.getNodeParameter('title', i);
                          body.items = this.getNodeParameter('items', i);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          returnAll = this.getNodeParameter('returnAll', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists`;
                      }
                      else if (operation === 'getCheckItem') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'deleteCheckItem') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'updateCheckItem') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'checklistItem') {
                      if (operation === 'get') {
                          requestMethod = 'GET';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const boardId = this.getNodeParameter('boardId', i);
                          const cardId = this.getNodeParameter('cardId', i);
                          const checklistId = this.getNodeParameter('checklistId', i);
                          const itemId = this.getNodeParameter('checklistItemId', i);
                          endpoint = `boards/${boardId}/cards/${cardId}/checklists/${checklistId}/items/${itemId}`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          Object.assign(body, updateFields);
                      }
                  }
                  let responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, body, qs);
                  if (returnAll === false && Array.isArray(responseData)) {
                      limit = this.getNodeParameter('limit', i);
                      responseData = responseData.splice(0, limit);
                  }
                  const executionData = this.helpers.constructExecutionMetaData((0, utilities_1.wrapData)(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Wekan = Wekan;
  //# sourceMappingURL=Wekan.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WekanApi = void 0;
  class WekanApi {
      constructor() {
          this.name = 'wekanApi';
          this.displayName = 'Wekan API';
          this.documentationUrl = 'wekan';
          this.properties = [
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://wekan.yourdomain.com',
              },
              {
                  displayName: 'Session Token',
                  name: 'token',
                  type: 'hidden',
                  typeOptions: {
                      expirable: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
                  url: '/api/user',
              },
          };
      }
      async preAuthentication(credentials) {
          const url = credentials.url;
          const { token } = (await this.helpers.httpRequest({
              method: 'POST',
              url: `${url.endsWith('/') ? url.slice(0, -1) : url}/users/login`,
              body: {
                  username: credentials.username,
                  password: credentials.password,
              },
          }));
          return { token };
      }
  }
  exports.WekanApi = WekanApi;
  //# sourceMappingURL=WekanApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WekanApi = void 0;
  class WekanApi {
      constructor() {
          this.name = 'wekanApi';
          this.displayName = 'Wekan API';
          this.documentationUrl = 'wekan';
          this.properties = [
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://wekan.yourdomain.com',
              },
              {
                  displayName: 'Session Token',
                  name: 'token',
                  type: 'hidden',
                  typeOptions: {
                      expirable: true,
                  },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.token}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.url.replace(new RegExp("/$"), "")}}',
                  url: '/api/user',
              },
          };
      }
      async preAuthentication(credentials) {
          const url = credentials.url;
          const { token } = (await this.helpers.httpRequest({
              method: 'POST',
              url: `${url.endsWith('/') ? url.slice(0, -1) : url}/users/login`,
              body: {
                  username: credentials.username,
                  password: credentials.password,
              },
          }));
          return { token };
      }
  }
  exports.WekanApi = WekanApi;
  //# sourceMappingURL=WekanApi.credentials.js.map

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

  # Wekan node

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

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

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

  ## Operations

  * Board
      * Create a new board
      * Delete a board
      * Get the data of a board
      * Get all user boards
  * Card
      * Create a new card
      * Delete a card
      * Get a card
      * Get all cards
      * Update a card
  * Card Comment
      * Create a comment on a card
      * Delete a comment from a card
      * Get a card comment
      * Get all card comments
  * Checklist
      * Create a new checklist
      * Delete a checklist
      * Get the data of a checklist
      * Returns all checklists for the card
  * Checklist Item
      * Delete a checklist item
      * Get a checklist item
      * Update a checklist item
  * List
      * Create a new list
      * Delete a list
      * Get the data of a list
      * Get all board lists

  ## Templates and examples

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

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

  ## Load all the parameters for the node

  To load all the parameters, for example, Author ID, you need to give admin permissions to the user. Refer to the [Wekan documentation](https://github.com/wekan/wekan/wiki/Features#members-click-member-initials-or-avatar--permissions-adminnormalcomment-only){:target=_blank .external-link} to learn how to change permissions.

troubleshooting_info:
  [{"issue":"Load all the parameters for the node","solution":"To load all the parameters, for example, Author ID, you need to give admin permissions to the user. Refer to the [Wekan documentation](https://github.com/wekan/wekan/wiki/Features#members-click-member-initials-or-avatar--permissions-adminnormalcomment-only){:target=_blank .external-link} to learn how to change permissions."}]

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"card","options":[{"name":"Board","value":"board"},{"name":"Card","value":"card"},{"name":"Card Comment","value":"cardComment"},{"name":"Checklist","value":"checklist"},{"name":"Checklist Item","value":"checklistItem"},{"name":"List","value":"list"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...BoardDescription_1.boardOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CardDescription_1.cardOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CardCommentDescription_1.cardCommentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistDescription_1.checklistOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistItemDescription_1.checklistItemOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...BoardDescription_1.boardFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CardDescription_1.cardFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CardCommentDescription_1.cardCommentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistDescription_1.checklistFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChecklistItemDescription_1.checklistItemFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"}]


node_type: n8n-nodes-base.Webflow
name: Webflow
display_name: Webflow
description: Consume the Webflow API
category: transform
icon: file:webflow.svg
code_hash: 6862aa4d34cdafe233189a97054c7356a36907c43238db2ef115afd5041849b0
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Webflow
documentation_title: Webflow node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"webflow","description":"Templates for webflow"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"accessToken","resource":"item","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:24
updated_at: 2025-06-12 08:59:24
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Webflow = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ItemDescription_1 = require("./ItemDescription");
  class Webflow {
      constructor() {
          this.description = {
              displayName: 'Webflow',
              name: 'webflow',
              icon: 'file:webflow.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Webflow API',
              defaults: {
                  name: 'Webflow',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'webflowApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'webflowOAuth2Api',
                      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: 'Item',
                              value: 'item',
                          },
                      ],
                      default: 'item',
                  },
                  ...ItemDescription_1.itemOperations,
                  ...ItemDescription_1.itemFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSites() {
                      const returnData = [];
                      const sites = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', '/sites');
                      for (const site of sites) {
                          returnData.push({
                              name: site.name,
                              value: site._id,
                          });
                      }
                      return returnData;
                  },
                  async getCollections() {
                      const returnData = [];
                      const siteId = this.getCurrentNodeParameter('siteId');
                      const collections = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/sites/${siteId}/collections`);
                      for (const collection of collections) {
                          returnData.push({
                              name: collection.name,
                              value: collection._id,
                          });
                      }
                      return returnData;
                  },
                  async getFields() {
                      const returnData = [];
                      const collectionId = this.getCurrentNodeParameter('collectionId');
                      const { fields } = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}`);
                      for (const field of fields) {
                          returnData.push({
                              name: `${field.name} (${field.type}) ${field.required ? ' (required)' : ''}`,
                              value: field.slug,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      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 === 'item') {
                      if (operation === 'create') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const properties = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          const live = this.getNodeParameter('live', i);
                          const fields = {};
                          properties.forEach((data) => (fields[data.fieldId] = data.fieldValue));
                          const body = {
                              fields,
                          };
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'POST', `/collections/${collectionId}/items`, body, { live });
                      }
                      else if (operation === 'delete') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'DELETE', `/collections/${collectionId}/items/${itemId}`);
                      }
                      else if (operation === 'get') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}/items/${itemId}`);
                          responseData = responseData.items;
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', 0);
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const qs = {};
                          if (returnAll) {
                              responseData = await GenericFunctions_1.webflowApiRequestAllItems.call(this, 'GET', `/collections/${collectionId}/items`, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'GET', `/collections/${collectionId}/items`, {}, qs);
                              responseData = responseData.items;
                          }
                      }
                      else if (operation === 'update') {
                          const collectionId = this.getNodeParameter('collectionId', i);
                          const itemId = this.getNodeParameter('itemId', i);
                          const properties = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          const live = this.getNodeParameter('live', i);
                          const fields = {};
                          properties.forEach((data) => (fields[data.fieldId] = data.fieldValue));
                          const body = {
                              fields,
                          };
                          responseData = await GenericFunctions_1.webflowApiRequest.call(this, 'PUT', `/collections/${collectionId}/items/${itemId}`, body, { live });
                      }
                  }
                  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.Webflow = Webflow;
  //# sourceMappingURL=Webflow.node.js.map

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

  // --- Next Credential File ---

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

  // --- Next Credential File ---

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

  // --- Next Credential File ---

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

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

  # Webflow node

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

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

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

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

  ## Operations

  * Item
      * Create
      * Delete
      * Get
      * Get All
      * Update

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"item","options":[{"name":"Item","value":"item"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ItemDescription_1.itemOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ItemDescription_1.itemFields"}]


node_type: n8n-nodes-base.Vonage
name: Vonage
display_name: Vonage
description: Consume Vonage API
category: input
icon: file:vonage.png
code_hash: e56e55473d1585492c17d8199060fe1141d9eb4abc7d0d136b4a41da521a523e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Vonage
documentation_title: Vonage node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"vonage","description":"Templates for vonage"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:24
updated_at: 2025-06-12 08:59:24
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Vonage = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Vonage {
      constructor() {
          this.description = {
              displayName: 'Vonage',
              name: 'vonage',
              icon: 'file:vonage.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Vonage API',
              defaults: {
                  name: 'Vonage',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'vonageApi',
                      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,
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              action: 'Send an SMS',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      default: 'send',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The name or number the message should be sent from',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The number that the message should be sent to. Numbers are specified in E.164 format.',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: '',
                      description: 'The body of the message being sent',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                              operation: ['send'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Account Ref',
                              name: 'account-ref',
                              type: 'string',
                              default: '',
                              description: 'An optional string used to identify separate accounts using the SMS endpoint for billing purposes. To use this feature, please email support@nexmo.com.',
                          },
                          {
                              displayName: 'Callback',
                              name: 'callback',
                              type: 'string',
                              default: '',
                              description: 'The webhook endpoint the delivery receipt for this sms is sent to. This parameter overrides the webhook endpoint you set in Dashboard.',
                          },
                          {
                              displayName: 'Client Ref',
                              name: 'client-ref',
                              type: 'string',
                              default: '',
                              description: 'You can optionally include your own reference of up to 40 characters',
                          },
                          {
                              displayName: 'Message Class',
                              name: 'message-class',
                              type: 'options',
                              options: [
                                  {
                                      name: '0',
                                      value: 0,
                                  },
                                  {
                                      name: '1',
                                      value: 1,
                                  },
                                  {
                                      name: '2',
                                      value: 2,
                                  },
                                  {
                                      name: '3',
                                      value: 3,
                                  },
                              ],
                              default: '',
                              description: 'The Data Coding Scheme value of the message',
                          },
                          {
                              displayName: 'Protocol ID',
                              name: 'protocol-id',
                              type: 'string',
                              default: '',
                              description: 'The value of the protocol identifier to use. Ensure that the value is aligned with udh.',
                          },
                          {
                              displayName: 'Status Report Req',
                              name: 'status-report-req',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to receive a Delivery Receipt',
                          },
                          {
                              displayName: 'TTL (in Minutes)',
                              name: 'ttl',
                              type: 'number',
                              default: 4320,
                              description: 'By default Nexmo attempt delivery for 72 hours',
                          },
                      ],
                  },
              ],
          };
      }
      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 === 'sms') {
                      if (operation === 'send') {
                          const from = this.getNodeParameter('from', i);
                          const to = this.getNodeParameter('to', i);
                          const type = this.getNodeParameter('type', i, 'text');
                          const body = {
                              from,
                              to,
                              type,
                          };
                          if (type === 'text' || type === 'unicode') {
                              const message = this.getNodeParameter('message', i);
                              body.text = message;
                          }
                          if (type === 'binary') {
                              const data = this.getNodeParameter('body', i);
                              const udh = this.getNodeParameter('udh', i);
                              body.udh = udh;
                              body.body = data;
                          }
                          if (type === 'wappush') {
                              const title = this.getNodeParameter('title', i);
                              const url = this.getNodeParameter('url', i);
                              const validity = this.getNodeParameter('validity', i);
                              body.title = title;
                              body.url = url;
                              body.validity = validity * 60000;
                          }
                          if (type === 'vcard') {
                              const vcard = this.getNodeParameter('vcard', i);
                              body.vcard = vcard;
                          }
                          if (type === 'vcal') {
                              const vcal = this.getNodeParameter('vcal', i);
                              body.vcal = vcal;
                          }
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          if (body.ttl) {
                              body.ttl = body.ttl * 60000;
                          }
                          responseData = await GenericFunctions_1.vonageApiRequest.call(this, 'POST', '/sms/json', body);
                          responseData = responseData.messages;
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
              if (Array.isArray(responseData)) {
                  returnData.push.apply(returnData, responseData);
              }
              else if (responseData !== undefined) {
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Vonage = Vonage;
  //# sourceMappingURL=Vonage.node.js.map

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

  // --- Next Credential File ---

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

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

  # Vonage node

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

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

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

  ## Operations

  * SMS
      * Send

  ## Templates and examples

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

example_workflow:
  {"name":"Vonage Example Workflow","nodes":[{"parameters":{"resource":"sms","operation":"send","from":"example-value","to":"example-value","message":"example-value","additionalFields":{}},"id":"jsxo55t1o8e51ow1cpmg","name":"Vonage","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"sms","operation":"send","from":"example-value","to":"example-value","message":"example-value","additionalFields":{}}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"sms","options":[{"name":"SMS","value":"sms"}]},{"displayName":"Operation","name":"operation","type":"options","default":"send","options":[{"name":"Send","value":"send"}]},{"displayName":"From","name":"from","type":"string","default":"","description":"The name or number the message should be sent from"},{"displayName":"To","name":"to","type":"string","default":"","description":"The number that the message should be sent to. Numbers are specified in E.164 format."},{"displayName":"Message","name":"message","type":"string","default":"","description":"The body of the message being sent"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"An optional string used to identify separate accounts using the SMS endpoint for billing purposes. To use this feature, please email support@nexmo.com.","placeholder":"Add Field"}]


node_type: n8n-nodes-base.Wordpress
name: Wordpress
display_name: Wordpress
description: Consume Wordpress API
category: output
icon: file:wordpress.svg
code_hash: 1aa9205e0c6d3a7ea7839b9436e584331e3ac4a84917f24f07219a83e8fbd60f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Wordpress
documentation_title: WordPress node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"wordpress","description":"Templates for wordpress"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"post","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Wordpress = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const PostDescription_1 = require("./PostDescription");
  const UserDescription_1 = require("./UserDescription");
  class Wordpress {
      constructor() {
          this.description = {
              displayName: 'Wordpress',
              name: 'wordpress',
              icon: 'file:wordpress.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Wordpress API',
              defaults: {
                  name: 'Wordpress',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wordpressApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Post',
                              value: 'post',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'post',
                  },
                  ...PostDescription_1.postOperations,
                  ...PostDescription_1.postFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCategories() {
                      const returnData = [];
                      const categories = await GenericFunctions_1.wordpressApiRequestAllItems.call(this, 'GET', '/categories', {});
                      for (const category of categories) {
                          const categoryName = category.name;
                          const categoryId = category.id;
                          returnData.push({
                              name: categoryName,
                              value: categoryId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.wordpressApiRequestAllItems.call(this, 'GET', '/tags', {});
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.id;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getAuthors() {
                      const returnData = [];
                      const authors = await GenericFunctions_1.wordpressApiRequestAllItems.call(this, 'GET', '/users', {}, { who: 'authors' });
                      for (const author of authors) {
                          const authorName = author.name;
                          const authorId = author.id;
                          returnData.push({
                              name: authorName,
                              value: authorId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'post') {
                      if (operation === 'create') {
                          const title = this.getNodeParameter('title', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              title,
                          };
                          if (additionalFields.authorId) {
                              body.author = additionalFields.authorId;
                          }
                          if (additionalFields.content) {
                              body.content = additionalFields.content;
                          }
                          if (additionalFields.slug) {
                              body.slug = additionalFields.slug;
                          }
                          if (additionalFields.password) {
                              body.password = additionalFields.password;
                          }
                          if (additionalFields.status) {
                              body.status = additionalFields.status;
                          }
                          if (additionalFields.commentStatus) {
                              body.comment_status = additionalFields.commentStatus;
                          }
                          if (additionalFields.pingStatus) {
                              body.ping_status = additionalFields.pingStatus;
                          }
                          if (additionalFields.sticky) {
                              body.sticky = additionalFields.sticky;
                          }
                          if (additionalFields.postTemplate) {
                              body.template = this.getNodeParameter('additionalFields.postTemplate.values.template', i, '');
                          }
                          if (additionalFields.categories) {
                              body.categories = additionalFields.categories;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.format) {
                              body.format = additionalFields.format;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'POST', '/posts', body);
                      }
                      if (operation === 'update') {
                          const postId = this.getNodeParameter('postId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: parseInt(postId, 10),
                          };
                          if (updateFields.authorId) {
                              body.author = updateFields.authorId;
                          }
                          if (updateFields.title) {
                              body.title = updateFields.title;
                          }
                          if (updateFields.content) {
                              body.content = updateFields.content;
                          }
                          if (updateFields.slug) {
                              body.slug = updateFields.slug;
                          }
                          if (updateFields.password) {
                              body.password = updateFields.password;
                          }
                          if (updateFields.status) {
                              body.status = updateFields.status;
                          }
                          if (updateFields.commentStatus) {
                              body.comment_status = updateFields.commentStatus;
                          }
                          if (updateFields.pingStatus) {
                              body.ping_status = updateFields.pingStatus;
                          }
                          if (updateFields.sticky) {
                              body.sticky = updateFields.sticky;
                          }
                          if (updateFields.postTemplate) {
                              body.template = this.getNodeParameter('updateFields.postTemplate.values.template', i, '');
                          }
                          if (updateFields.categories) {
                              body.categories = updateFields.categories;
                          }
                          if (updateFields.tags) {
                              body.tags = updateFields.tags;
                          }
                          if (updateFields.format) {
                              body.format = updateFields.format;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'POST', `/posts/${postId}`, body);
                      }
                      if (operation === 'get') {
                          const postId = this.getNodeParameter('postId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.password) {
                              qs.password = options.password;
                          }
                          if (options.context) {
                              qs.context = options.context;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'GET', `/posts/${postId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.context) {
                              qs.context = options.context;
                          }
                          if (options.orderBy) {
                              qs.orderby = options.orderBy;
                          }
                          if (options.order) {
                              qs.order = options.order;
                          }
                          if (options.search) {
                              qs.search = options.search;
                          }
                          if (options.after) {
                              qs.after = options.after;
                          }
                          if (options.author) {
                              qs.author = options.author;
                          }
                          if (options.categories) {
                              qs.categories = options.categories;
                          }
                          if (options.excludedCategories) {
                              qs.categories_exclude = options.excludedCategories;
                          }
                          if (options.tags) {
                              qs.tags = options.tags;
                          }
                          if (options.excludedTags) {
                              qs.tags_exclude = options.excludedTags;
                          }
                          if (options.sticky) {
                              qs.sticky = options.sticky;
                          }
                          if (options.status) {
                              qs.status = options.status;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.wordpressApiRequestAllItems.call(this, 'GET', '/posts', {}, qs);
                          }
                          else {
                              qs.per_page = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'GET', '/posts', {}, qs);
                          }
                      }
                      if (operation === 'delete') {
                          const postId = this.getNodeParameter('postId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.force) {
                              qs.force = options.force;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'DELETE', `/posts/${postId}`, {}, qs);
                      }
                  }
                  if (resource === 'user') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const username = this.getNodeParameter('username', i);
                          const firstName = this.getNodeParameter('firstName', i);
                          const lastName = this.getNodeParameter('lastName', i);
                          const email = this.getNodeParameter('email', i);
                          const password = this.getNodeParameter('password', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                              username,
                              first_name: firstName,
                              last_name: lastName,
                              email,
                              password,
                          };
                          if (additionalFields.url) {
                              body.url = additionalFields.url;
                          }
                          if (additionalFields.description) {
                              body.description = additionalFields.description;
                          }
                          if (additionalFields.nickname) {
                              body.nickname = additionalFields.nickname;
                          }
                          if (additionalFields.slug) {
                              body.slug = additionalFields.slug;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'POST', '/users', body);
                      }
                      if (operation === 'update') {
                          const userId = this.getNodeParameter('userId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              id: userId,
                          };
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.firstName) {
                              body.first_name = updateFields.firstName;
                          }
                          if (updateFields.lastName) {
                              body.last_name = updateFields.lastName;
                          }
                          if (updateFields.email) {
                              body.email = updateFields.email;
                          }
                          if (updateFields.password) {
                              body.password = updateFields.password;
                          }
                          if (updateFields.username) {
                              body.username = updateFields.username;
                          }
                          if (updateFields.url) {
                              body.url = updateFields.url;
                          }
                          if (updateFields.description) {
                              body.description = updateFields.description;
                          }
                          if (updateFields.nickname) {
                              body.nickname = updateFields.nickname;
                          }
                          if (updateFields.slug) {
                              body.slug = updateFields.slug;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'POST', `/users/${userId}`, body);
                      }
                      if (operation === 'get') {
                          const userId = this.getNodeParameter('userId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.context) {
                              qs.context = options.context;
                          }
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'GET', `/users/${userId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.context) {
                              qs.context = options.context;
                          }
                          if (options.orderBy) {
                              qs.orderby = options.orderBy;
                          }
                          if (options.order) {
                              qs.order = options.order;
                          }
                          if (options.search) {
                              qs.search = options.search;
                          }
                          if (options.who) {
                              qs.who = options.who;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.wordpressApiRequestAllItems.call(this, 'GET', '/users', {}, qs);
                          }
                          else {
                              qs.per_page = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'GET', '/users', {}, qs);
                          }
                      }
                      if (operation === 'delete') {
                          const reassign = this.getNodeParameter('reassign', i);
                          qs.reassign = reassign;
                          qs.force = true;
                          responseData = await GenericFunctions_1.wordpressApiRequest.call(this, 'DELETE', '/users/me', {}, qs);
                      }
                  }
                  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.Wordpress = Wordpress;
  //# sourceMappingURL=Wordpress.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WordpressApi = void 0;
  class WordpressApi {
      constructor() {
          this.name = 'wordpressApi';
          this.displayName = 'Wordpress API';
          this.documentationUrl = 'wordpress';
          this.properties = [
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'Wordpress URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: '={{$credentials.username}}',
                      password: '={{$credentials.password}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials?.url}}/wp-json/wp/v2',
                  url: '/users',
                  method: 'GET',
              },
          };
      }
  }
  exports.WordpressApi = WordpressApi;
  //# sourceMappingURL=WordpressApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WordpressApi = void 0;
  class WordpressApi {
      constructor() {
          this.name = 'wordpressApi';
          this.displayName = 'Wordpress API';
          this.documentationUrl = 'wordpress';
          this.properties = [
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
              },
              {
                  displayName: 'Wordpress URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  auth: {
                      username: '={{$credentials.username}}',
                      password: '={{$credentials.password}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials?.url}}/wp-json/wp/v2',
                  url: '/users',
                  method: 'GET',
              },
          };
      }
  }
  exports.WordpressApi = WordpressApi;
  //# sourceMappingURL=WordpressApi.credentials.js.map

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

  # WordPress node

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

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

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

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

  ## Operations

  * Post
      * Create a post
      * Get a post
      * Get all posts
      * Update a post
  * Pages
      * Create a page
      * Get a page
      * Get all pages
      * Update a page
  * User
      * Create a user
      * Get a user
      * Get all users
      * Update a user

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"post","options":[{"name":"Post","value":"post"},{"name":"User","value":"user"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PostDescription_1.postOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PostDescription_1.postFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"}]


node_type: n8n-nodes-base.Wise
name: Wise
display_name: Wise
description: Consume the Wise API
category: transform
icon: file:wise.svg
code_hash: 07a5d221159d4a3ca44885812009b5ebf053effe21c97ccc94fde861dd9a5607
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Wise
documentation_title: Wise node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"wise","description":"Templates for wise"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"account","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
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.Wise = void 0;
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const omit_1 = __importDefault(require("lodash/omit"));
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  const uuid_1 = require("uuid");
  class Wise {
      constructor() {
          this.description = {
              displayName: 'Wise',
              name: 'wise',
              icon: 'file:wise.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Wise API',
              defaults: {
                  name: 'Wise',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wiseApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Exchange Rate',
                              value: 'exchangeRate',
                          },
                          {
                              name: 'Profile',
                              value: 'profile',
                          },
                          {
                              name: 'Quote',
                              value: 'quote',
                          },
                          {
                              name: 'Recipient',
                              value: 'recipient',
                          },
                          {
                              name: 'Transfer',
                              value: 'transfer',
                          },
                      ],
                      default: 'account',
                  },
                  ...descriptions_1.accountOperations,
                  ...descriptions_1.accountFields,
                  ...descriptions_1.exchangeRateOperations,
                  ...descriptions_1.exchangeRateFields,
                  ...descriptions_1.profileOperations,
                  ...descriptions_1.profileFields,
                  ...descriptions_1.quoteOperations,
                  ...descriptions_1.quoteFields,
                  ...descriptions_1.recipientOperations,
                  ...descriptions_1.recipientFields,
                  ...descriptions_1.transferOperations,
                  ...descriptions_1.transferFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getBorderlessAccounts() {
                      const qs = {
                          profileId: this.getNodeParameter('profileId', 0),
                      };
                      const accounts = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/borderless-accounts', {}, qs);
                      return accounts.map(({ id, balances }) => ({
                          name: balances.map(({ currency }) => currency).join(' - '),
                          value: id,
                      }));
                  },
                  async getProfiles() {
                      const profiles = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/profiles');
                      return profiles.map(({ id, type }) => ({
                          name: type.charAt(0).toUpperCase() + type.slice(1),
                          value: id,
                      }));
                  },
                  async getRecipients() {
                      const qs = {
                          profileId: this.getNodeParameter('profileId', 0),
                      };
                      const recipients = (await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/accounts', {}, qs));
                      return recipients.reduce((activeRecipients, { active, id, accountHolderName, currency, country, type }) => {
                          if (active) {
                              const recipient = {
                                  name: `[${currency}] ${accountHolderName} - (${country !== null ? country + ' - ' : ''}${type})`,
                                  value: id,
                              };
                              activeRecipients.push(recipient);
                          }
                          return activeRecipients;
                      }, []);
                  },
              },
          };
      }
      async execute() {
          var _a, _b;
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const timezone = this.getTimezone();
          let responseData;
          const returnData = [];
          let binaryOutput = false;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'account') {
                      if (operation === 'getBalances') {
                          const qs = {
                              profileId: this.getNodeParameter('profileId', i),
                          };
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/borderless-accounts', {}, qs);
                      }
                      else if (operation === 'getCurrencies') {
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/borderless-accounts/balance-currencies');
                      }
                      else if (operation === 'getStatement') {
                          const profileId = this.getNodeParameter('profileId', i);
                          const borderlessAccountId = this.getNodeParameter('borderlessAccountId', i);
                          const format = this.getNodeParameter('format', i);
                          const endpoint = `v3/profiles/${profileId}/borderless-accounts/${borderlessAccountId}/statement.${format}`;
                          const qs = {
                              currency: this.getNodeParameter('currency', i),
                          };
                          const { lineStyle, range } = this.getNodeParameter('additionalFields', i);
                          if (lineStyle !== undefined) {
                              qs.type = lineStyle;
                          }
                          if (range !== undefined) {
                              qs.intervalStart = moment_timezone_1.default
                                  .tz(range.rangeProperties.intervalStart, timezone)
                                  .utc()
                                  .format();
                              qs.intervalEnd = moment_timezone_1.default
                                  .tz(range.rangeProperties.intervalEnd, timezone)
                                  .utc()
                                  .format();
                          }
                          else {
                              qs.intervalStart = (0, moment_timezone_1.default)().subtract(1, 'months').utc().format();
                              qs.intervalEnd = (0, moment_timezone_1.default)().utc().format();
                          }
                          if (format === 'json') {
                              responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', endpoint, {}, qs);
                          }
                          else {
                              const data = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', endpoint, {}, qs, {
                                  encoding: 'arraybuffer',
                              });
                              const binaryProperty = this.getNodeParameter('binaryProperty', i);
                              items[i].binary = (_a = items[i].binary) !== null && _a !== void 0 ? _a : {};
                              items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data, this.getNodeParameter('fileName', i));
                              responseData = items;
                              binaryOutput = true;
                          }
                      }
                  }
                  else if (resource === 'exchangeRate') {
                      if (operation === 'get') {
                          const qs = {
                              source: this.getNodeParameter('source', i),
                              target: this.getNodeParameter('target', i),
                          };
                          const { interval, range, time } = this.getNodeParameter('additionalFields', i);
                          if (interval !== undefined) {
                              qs.group = interval;
                          }
                          if (time !== undefined) {
                              qs.time = time;
                          }
                          if (range !== undefined && time === undefined) {
                              qs.from = moment_timezone_1.default.tz(range.rangeProperties.from, timezone).utc().format();
                              qs.to = moment_timezone_1.default.tz(range.rangeProperties.to, timezone).utc().format();
                          }
                          else if (time === undefined) {
                              qs.from = (0, moment_timezone_1.default)().subtract(1, 'months').utc().format();
                              qs.to = (0, moment_timezone_1.default)().format();
                          }
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/rates', {}, qs);
                      }
                  }
                  else if (resource === 'profile') {
                      if (operation === 'get') {
                          const profileId = this.getNodeParameter('profileId', i);
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', `v1/profiles/${profileId}`);
                      }
                      else if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/profiles');
                      }
                  }
                  else if (resource === 'recipient') {
                      if (operation === 'getAll') {
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/accounts');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                  }
                  else if (resource === 'quote') {
                      if (operation === 'create') {
                          const body = {
                              profile: this.getNodeParameter('profileId', i),
                              sourceCurrency: this.getNodeParameter('sourceCurrency', i).toUpperCase(),
                              targetCurrency: this.getNodeParameter('targetCurrency', i).toUpperCase(),
                          };
                          const amountType = this.getNodeParameter('amountType', i);
                          if (amountType === 'source') {
                              body.sourceAmount = this.getNodeParameter('amount', i);
                          }
                          else if (amountType === 'target') {
                              body.targetAmount = this.getNodeParameter('amount', i);
                          }
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'POST', 'v2/quotes', body, {});
                      }
                      else if (operation === 'get') {
                          const quoteId = this.getNodeParameter('quoteId', i);
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', `v2/quotes/${quoteId}`);
                      }
                  }
                  else if (resource === 'transfer') {
                      if (operation === 'create') {
                          const body = {
                              quoteUuid: this.getNodeParameter('quoteId', i),
                              targetAccount: this.getNodeParameter('targetAccountId', i),
                              customerTransactionId: (0, uuid_1.v4)(),
                          };
                          const { reference } = this.getNodeParameter('additionalFields', i);
                          if (reference !== undefined) {
                              body.details = { reference };
                          }
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'POST', 'v1/transfers', body, {});
                      }
                      else if (operation === 'delete') {
                          const transferId = this.getNodeParameter('transferId', i);
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'PUT', `v1/transfers/${transferId}/cancel`);
                      }
                      else if (operation === 'execute') {
                          const profileId = this.getNodeParameter('profileId', i);
                          const transferId = this.getNodeParameter('transferId', i);
                          const endpoint = `v3/profiles/${profileId}/transfers/${transferId}/payments`;
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'POST', endpoint, { type: 'BALANCE' }, {});
                          const { environment } = await this.getCredentials('wiseApi');
                          if (environment === 'test') {
                              for (const testEndpoint of [
                                  'processing',
                                  'funds_converted',
                                  'outgoing_payment_sent',
                              ]) {
                                  await GenericFunctions_1.wiseApiRequest.call(this, 'GET', `v1/simulation/transfers/${transferId}/${testEndpoint}`);
                              }
                          }
                      }
                      else if (operation === 'get') {
                          const transferId = this.getNodeParameter('transferId', i);
                          const downloadReceipt = this.getNodeParameter('downloadReceipt', i);
                          if (downloadReceipt) {
                              const data = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', `v1/transfers/${transferId}/receipt.pdf`, {}, {}, { encoding: 'arraybuffer' });
                              const binaryProperty = this.getNodeParameter('binaryProperty', i);
                              items[i].binary = (_b = items[i].binary) !== null && _b !== void 0 ? _b : {};
                              items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data, this.getNodeParameter('fileName', i));
                              responseData = items;
                              binaryOutput = true;
                          }
                          else {
                              responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', `v1/transfers/${transferId}`);
                          }
                      }
                      else if (operation === 'getAll') {
                          const qs = {
                              profile: this.getNodeParameter('profileId', i),
                          };
                          const filters = this.getNodeParameter('filters', i);
                          Object.keys((0, omit_1.default)(filters, 'range')).forEach((key) => {
                              qs[key] = filters[key];
                          });
                          if (filters.range !== undefined) {
                              qs.createdDateStart = (0, moment_timezone_1.default)(filters.range.rangeProperties.createdDateStart).format();
                              qs.createdDateEnd = (0, moment_timezone_1.default)(filters.range.rangeProperties.createdDateEnd).format();
                          }
                          else {
                              qs.createdDateStart = (0, moment_timezone_1.default)().subtract(1, 'months').format();
                              qs.createdDateEnd = (0, moment_timezone_1.default)().format();
                          }
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.wiseApiRequest.call(this, 'GET', 'v1/transfers', {}, qs);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.toString() });
                      continue;
                  }
                  throw error;
              }
              Array.isArray(responseData)
                  ? returnData.push(...responseData)
                  : returnData.push(responseData);
          }
          if (binaryOutput && responseData !== undefined) {
              return [responseData];
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Wise = Wise;
  //# sourceMappingURL=Wise.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WiseApi = void 0;
  class WiseApi {
      constructor() {
          this.name = 'wiseApi';
          this.displayName = 'Wise API';
          this.documentationUrl = 'wise';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'live',
                  options: [
                      {
                          name: 'Live',
                          value: 'live',
                      },
                      {
                          name: 'Test',
                          value: 'test',
                      },
                  ],
              },
              {
                  displayName: 'Private Key (Optional)',
                  name: 'privateKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Optional private key used for Strong Customer Authentication (SCA). Only needed to retrieve statements, and execute transfers.',
              },
          ];
      }
  }
  exports.WiseApi = WiseApi;
  //# sourceMappingURL=WiseApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WiseApi = void 0;
  class WiseApi {
      constructor() {
          this.name = 'wiseApi';
          this.displayName = 'Wise API';
          this.documentationUrl = 'wise';
          this.properties = [
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'live',
                  options: [
                      {
                          name: 'Live',
                          value: 'live',
                      },
                      {
                          name: 'Test',
                          value: 'test',
                      },
                  ],
              },
              {
                  displayName: 'Private Key (Optional)',
                  name: 'privateKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'Optional private key used for Strong Customer Authentication (SCA). Only needed to retrieve statements, and execute transfers.',
              },
          ];
      }
  }
  exports.WiseApi = WiseApi;
  //# sourceMappingURL=WiseApi.credentials.js.map

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

  # Wise node

  Use the Wise node to automate work in Wise, and integrate Wise with other applications. n8n has built-in support for a wide range of Wise features, including getting profiles, exchange rates, and recipients. 

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

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

  ## Operations

  * Account
      * Retrieve balances for all account currencies of this user.
      * Retrieve currencies in the borderless account of this user.
      * Retrieve the statement for the borderless account of this user.
  * Exchange Rate
      * Get
  * Profile
      * Get
      * Get All
  * Recipient
      * Get All
  * Quote
      * Create
      * Get
  * Transfer
      * Create
      * Delete
      * Execute
      * Get
      * Get All

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"account","options":[{"name":"Account","value":"account"},{"name":"Exchange Rate","value":"exchangeRate"},{"name":"Profile","value":"profile"},{"name":"Quote","value":"quote"},{"name":"Recipient","value":"recipient"},{"name":"Transfer","value":"transfer"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.accountOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.accountFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.exchangeRateOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.exchangeRateFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.profileOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.profileFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.quoteOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.quoteFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.recipientOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.recipientFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.transferOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.transferFields"}]


node_type: n8n-nodes-base.WhatsApp
name: WhatsApp
display_name: WhatsApp Business Cloud
description: Access WhatsApp API
category: output
icon: file:whatsapp.svg
code_hash: f36be4f477cb2d0526f7bfdf3caeae4ed3518eb4a3b170d72e96b88e2dc44367
example_parameters: {"resource":"message","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WhatsApp = void 0;
  const MessagesDescription_1 = require("./MessagesDescription");
  const MediaDescription_1 = require("./MediaDescription");
  class WhatsApp {
      constructor() {
          this.description = {
              displayName: 'WhatsApp Business Cloud',
              name: 'whatsApp',
              icon: 'file:whatsapp.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{ $parameter["resource"] + ": " + $parameter["operation"] }}',
              description: 'Access WhatsApp API',
              defaults: {
                  name: 'WhatsApp Business Cloud',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'whatsAppApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  baseURL: 'https://graph.facebook.com/v13.0/',
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                          },
                          {
                              name: 'Media',
                              value: 'media',
                          },
                      ],
                      default: 'message',
                  },
                  ...MessagesDescription_1.messageFields,
                  ...MediaDescription_1.mediaFields,
                  ...MessagesDescription_1.messageTypeFields,
                  ...MediaDescription_1.mediaTypeFields,
              ],
          };
      }
  }
  exports.WhatsApp = WhatsApp;
  //# sourceMappingURL=WhatsApp.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WhatsAppApi = void 0;
  class WhatsAppApi {
      constructor() {
          this.name = 'whatsAppApi';
          this.displayName = 'WhatsApp API';
          this.documentationUrl = 'whatsApp';
          this.properties = [
              {
                  displayName: 'Access Token',
                  type: 'string',
                  typeOptions: { password: true },
                  name: 'accessToken',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Bussiness Account ID',
                  type: 'string',
                  name: 'businessAccountId',
                  default: '',
                  required: true,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://graph.facebook.com/v13.0',
                  url: '/',
                  ignoreHttpStatusErrors: true,
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'error.type',
                          value: 'OAuthException',
                          message: 'Invalid access token',
                      },
                  },
              ],
          };
      }
  }
  exports.WhatsAppApi = WhatsAppApi;
  //# sourceMappingURL=WhatsAppApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WhatsAppApi = void 0;
  class WhatsAppApi {
      constructor() {
          this.name = 'whatsAppApi';
          this.displayName = 'WhatsApp API';
          this.documentationUrl = 'whatsApp';
          this.properties = [
              {
                  displayName: 'Access Token',
                  type: 'string',
                  typeOptions: { password: true },
                  name: 'accessToken',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Bussiness Account ID',
                  type: 'string',
                  name: 'businessAccountId',
                  default: '',
                  required: true,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://graph.facebook.com/v13.0',
                  url: '/',
                  ignoreHttpStatusErrors: true,
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'error.type',
                          value: 'OAuthException',
                          message: 'Invalid access token',
                      },
                  },
              ],
          };
      }
  }
  exports.WhatsAppApi = WhatsAppApi;
  //# sourceMappingURL=WhatsAppApi.credentials.js.map

example_workflow:
  {"name":"WhatsApp Business Cloud Example Workflow","nodes":[{"parameters":{"resource":"message","dynamic_property":null},"id":"8wmv55478kpbwko5do0kww","name":"WhatsApp Business Cloud","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"message","options":[{"name":"Message","value":"message"},{"name":"Media","value":"media"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MessagesDescription_1.messageFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MediaDescription_1.mediaFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MessagesDescription_1.messageTypeFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MediaDescription_1.mediaTypeFields"}]


node_type: n8n-nodes-base.WooCommerce
name: WooCommerce
display_name: WooCommerce
description: Consume WooCommerce API
category: output
icon: file:wooCommerce.svg
code_hash: 32e6ebee88d5a70ca7263620ddae947e08465e8c9a0eede9550f542ea9ab9e60
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.WooCommerce
documentation_title: WooCommerce node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"woocommerce","description":"Templates for woocommerce"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"customer","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WooCommerce = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ProductDescription_1 = require("./ProductDescription");
  const OrderDescription_1 = require("./OrderDescription");
  const descriptions_1 = require("./descriptions");
  class WooCommerce {
      constructor() {
          this.description = {
              displayName: 'WooCommerce',
              name: 'wooCommerce',
              icon: 'file:wooCommerce.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume WooCommerce API',
              defaults: {
                  name: 'WooCommerce',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'wooCommerceApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Customer',
                              value: 'customer',
                          },
                          {
                              name: 'Order',
                              value: 'order',
                          },
                          {
                              name: 'Product',
                              value: 'product',
                          },
                      ],
                      default: 'product',
                  },
                  ...descriptions_1.customerOperations,
                  ...descriptions_1.customerFields,
                  ...ProductDescription_1.productOperations,
                  ...ProductDescription_1.productFields,
                  ...OrderDescription_1.orderOperations,
                  ...OrderDescription_1.orderFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCategories() {
                      const returnData = [];
                      const categories = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products/categories', {});
                      for (const category of categories) {
                          const categoryName = category.name;
                          const categoryId = category.id;
                          returnData.push({
                              name: categoryName,
                              value: categoryId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products/tags', {});
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.id;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'customer') {
                  if (operation === 'create') {
                      const body = {
                          email: this.getNodeParameter('email', i),
                      };
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (Object.keys(additionalFields).length) {
                          Object.assign(body, (0, GenericFunctions_1.adjustMetadata)(additionalFields));
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/customers', body);
                  }
                  else if (operation === 'delete') {
                      const customerId = this.getNodeParameter('customerId', i);
                      qs.force = true;
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', endpoint, {}, qs);
                  }
                  else if (operation === 'get') {
                      const customerId = this.getNodeParameter('customerId', i);
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', endpoint);
                  }
                  else if (operation === 'getAll') {
                      const filters = this.getNodeParameter('filters', i);
                      const returnAll = this.getNodeParameter('returnAll', i);
                      if (Object.keys(filters).length) {
                          Object.assign(qs, filters);
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/customers', {}, {});
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/customers', {}, qs);
                      }
                  }
                  else if (operation === 'update') {
                      const body = {};
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if (Object.keys(updateFields).length) {
                          Object.assign(body, (0, GenericFunctions_1.adjustMetadata)(updateFields));
                      }
                      const customerId = this.getNodeParameter('customerId', i);
                      const endpoint = `/customers/${customerId}`;
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', endpoint, body);
                  }
              }
              else if (resource === 'product') {
                  if (operation === 'create') {
                      const name = this.getNodeParameter('name', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          name,
                      };
                      (0, GenericFunctions_1.setFields)(additionalFields, body);
                      if (additionalFields.categories) {
                          body.categories = additionalFields.categories.map((category) => ({
                              id: parseInt(category, 10),
                          }));
                      }
                      const images = this.getNodeParameter('imagesUi', i)
                          .imagesValues;
                      if (images) {
                          body.images = images;
                      }
                      const dimension = this.getNodeParameter('dimensionsUi', i)
                          .dimensionsValues;
                      if (dimension) {
                          body.dimensions = dimension;
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/products', body);
                  }
                  if (operation === 'update') {
                      const productId = this.getNodeParameter('productId', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      const body = {};
                      (0, GenericFunctions_1.setFields)(updateFields, body);
                      const images = this.getNodeParameter('imagesUi', i)
                          .imagesValues;
                      if (images) {
                          body.images = images;
                      }
                      const dimension = this.getNodeParameter('dimensionsUi', i)
                          .dimensionsValues;
                      if (dimension) {
                          body.dimensions = dimension;
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', `/products/${productId}`, body);
                  }
                  if (operation === 'get') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', `/products/${productId}`, {}, qs);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      if (options.after) {
                          qs.after = options.after;
                      }
                      if (options.before) {
                          qs.before = options.before;
                      }
                      if (options.category) {
                          qs.category = options.category;
                      }
                      if (options.context) {
                          qs.context = options.context;
                      }
                      if (options.featured) {
                          qs.featured = options.featured;
                      }
                      if (options.maxPrice) {
                          qs.max_price = options.maxPrice;
                      }
                      if (options.minPrice) {
                          qs.max_price = options.minPrice;
                      }
                      if (options.order) {
                          qs.order = options.order;
                      }
                      if (options.orderBy) {
                          qs.orderby = options.orderBy;
                      }
                      if (options.search) {
                          qs.search = options.search;
                      }
                      if (options.sku) {
                          qs.sku = options.sku;
                      }
                      if (options.slug) {
                          qs.slug = options.slug;
                      }
                      if (options.status) {
                          qs.status = options.status;
                      }
                      if (options.stockStatus) {
                          qs.stock_status = options.stockStatus;
                      }
                      if (options.tag) {
                          qs.tag = options.tag;
                      }
                      if (options.taxClass) {
                          qs.tax_class = options.taxClass;
                      }
                      if (options.type) {
                          qs.type = options.type;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/products', {}, qs);
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/products', {}, qs);
                      }
                  }
                  if (operation === 'delete') {
                      const productId = this.getNodeParameter('productId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', `/products/${productId}`, {}, { force: true });
                  }
              }
              if (resource === 'order') {
                  if (operation === 'create') {
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {};
                      (0, GenericFunctions_1.setFields)(additionalFields, body);
                      const billing = this.getNodeParameter('billingUi', i)
                          .billingValues;
                      if (billing !== undefined) {
                          body.billing = billing;
                          (0, GenericFunctions_1.toSnakeCase)(billing);
                      }
                      const shipping = this.getNodeParameter('shippingUi', i)
                          .shippingValues;
                      if (shipping !== undefined) {
                          body.shipping = shipping;
                          (0, GenericFunctions_1.toSnakeCase)(shipping);
                      }
                      const couponLines = this.getNodeParameter('couponLinesUi', i)
                          .couponLinesValues;
                      if (couponLines) {
                          body.coupon_lines = couponLines;
                          (0, GenericFunctions_1.setMetadata)(couponLines);
                          (0, GenericFunctions_1.toSnakeCase)(couponLines);
                      }
                      const feeLines = this.getNodeParameter('feeLinesUi', i)
                          .feeLinesValues;
                      if (feeLines) {
                          body.fee_lines = feeLines;
                          (0, GenericFunctions_1.setMetadata)(feeLines);
                          (0, GenericFunctions_1.toSnakeCase)(feeLines);
                      }
                      const lineItems = this.getNodeParameter('lineItemsUi', i)
                          .lineItemsValues;
                      if (lineItems) {
                          body.line_items = lineItems;
                          (0, GenericFunctions_1.setMetadata)(lineItems);
                          (0, GenericFunctions_1.toSnakeCase)(lineItems);
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      const shippingLines = this.getNodeParameter('shippingLinesUi', i)
                          .shippingLinesValues;
                      if (shippingLines) {
                          body.shipping_lines = shippingLines;
                          (0, GenericFunctions_1.setMetadata)(shippingLines);
                          (0, GenericFunctions_1.toSnakeCase)(shippingLines);
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'POST', '/orders', body);
                  }
                  if (operation === 'update') {
                      const orderId = this.getNodeParameter('orderId', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      const body = {};
                      if (updateFields.currency) {
                          body.currency = updateFields.currency;
                      }
                      if (updateFields.customerId) {
                          body.customer_id = parseInt(updateFields.customerId, 10);
                      }
                      if (updateFields.customerNote) {
                          body.customer_note = updateFields.customerNote;
                      }
                      if (updateFields.parentId) {
                          body.parent_id = parseInt(updateFields.parentId, 10);
                      }
                      if (updateFields.paymentMethodId) {
                          body.payment_method = updateFields.paymentMethodId;
                      }
                      if (updateFields.paymentMethodTitle) {
                          body.payment_method_title = updateFields.paymentMethodTitle;
                      }
                      if (updateFields.status) {
                          body.status = updateFields.status;
                      }
                      if (updateFields.transactionID) {
                          body.transaction_id = updateFields.transactionID;
                      }
                      const billing = this.getNodeParameter('billingUi', i)
                          .billingValues;
                      if (billing !== undefined) {
                          body.billing = billing;
                          (0, GenericFunctions_1.toSnakeCase)(billing);
                      }
                      const shipping = this.getNodeParameter('shippingUi', i)
                          .shippingValues;
                      if (shipping !== undefined) {
                          body.shipping = shipping;
                          (0, GenericFunctions_1.toSnakeCase)(shipping);
                      }
                      const couponLines = this.getNodeParameter('couponLinesUi', i)
                          .couponLinesValues;
                      if (couponLines) {
                          body.coupon_lines = couponLines;
                          (0, GenericFunctions_1.setMetadata)(couponLines);
                          (0, GenericFunctions_1.toSnakeCase)(couponLines);
                      }
                      const feeLines = this.getNodeParameter('feeLinesUi', i)
                          .feeLinesValues;
                      if (feeLines) {
                          body.fee_lines = feeLines;
                          (0, GenericFunctions_1.setMetadata)(feeLines);
                          (0, GenericFunctions_1.toSnakeCase)(feeLines);
                      }
                      const lineItems = this.getNodeParameter('lineItemsUi', i)
                          .lineItemsValues;
                      if (lineItems) {
                          body.line_items = lineItems;
                          (0, GenericFunctions_1.setMetadata)(lineItems);
                          (0, GenericFunctions_1.toSnakeCase)(lineItems);
                      }
                      const metadata = this.getNodeParameter('metadataUi', i)
                          .metadataValues;
                      if (metadata) {
                          body.meta_data = metadata;
                      }
                      const shippingLines = this.getNodeParameter('shippingLinesUi', i)
                          .shippingLinesValues;
                      if (shippingLines) {
                          body.shipping_lines = shippingLines;
                          (0, GenericFunctions_1.setMetadata)(shippingLines);
                          (0, GenericFunctions_1.toSnakeCase)(shippingLines);
                      }
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'PUT', `/orders/${orderId}`, body);
                  }
                  if (operation === 'get') {
                      const orderId = this.getNodeParameter('orderId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', `/orders/${orderId}`, {}, qs);
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const options = this.getNodeParameter('options', i);
                      if (options.after) {
                          qs.after = options.after;
                      }
                      if (options.before) {
                          qs.before = options.before;
                      }
                      if (options.category) {
                          qs.category = options.category;
                      }
                      if (options.customer) {
                          qs.customer = parseInt(options.customer, 10);
                      }
                      if (options.decimalPoints) {
                          qs.dp = options.decimalPoints;
                      }
                      if (options.product) {
                          qs.product = parseInt(options.product, 10);
                      }
                      if (options.order) {
                          qs.order = options.order;
                      }
                      if (options.orderBy) {
                          qs.orderby = options.orderBy;
                      }
                      if (options.search) {
                          qs.search = options.search;
                      }
                      if (options.status) {
                          qs.status = options.status;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.woocommerceApiRequestAllItems.call(this, 'GET', '/orders', {}, qs);
                      }
                      else {
                          qs.per_page = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'GET', '/orders', {}, qs);
                      }
                  }
                  if (operation === 'delete') {
                      const orderId = this.getNodeParameter('orderId', i);
                      responseData = await GenericFunctions_1.woocommerceApiRequest.call(this, 'DELETE', `/orders/${orderId}`, {}, { force: true });
                  }
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.WooCommerce = WooCommerce;
  //# sourceMappingURL=WooCommerce.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WooCommerceApi = void 0;
  class WooCommerceApi {
      constructor() {
          this.name = 'wooCommerceApi';
          this.displayName = 'WooCommerce API';
          this.documentationUrl = 'wooCommerce';
          this.properties = [
              {
                  displayName: 'Consumer Key',
                  name: 'consumerKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Consumer Secret',
                  name: 'consumerSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'WooCommerce URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
              {
                  displayName: 'Include Credentials in Query',
                  name: 'includeCredentialsInQuery',
                  type: 'boolean',
                  default: false,
                  description: 'Whether credentials should be included in the query. Occasionally, some servers may not parse the Authorization header correctly (if you see a “Consumer key is missing” error when authenticating over SSL, you have a server issue). In this case, you may provide the consumer key/secret as query string parameters instead.',
              },
          ];
          this.test = {
              request: {
                  baseURL: '={{$credentials.url}}/wp-json/wc/v3',
                  url: '/products/categories',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              user: credentials.consumerKey,
              password: credentials.consumerSecret,
          };
          if (credentials.includeCredentialsInQuery === true && requestOptions.qs) {
              delete requestOptions.auth;
              Object.assign(requestOptions.qs, {
                  consumer_key: credentials.consumerKey,
                  consumer_secret: credentials.consumerSecret,
              });
          }
          return requestOptions;
      }
  }
  exports.WooCommerceApi = WooCommerceApi;
  //# sourceMappingURL=WooCommerceApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WooCommerceApi = void 0;
  class WooCommerceApi {
      constructor() {
          this.name = 'wooCommerceApi';
          this.displayName = 'WooCommerce API';
          this.documentationUrl = 'wooCommerce';
          this.properties = [
              {
                  displayName: 'Consumer Key',
                  name: 'consumerKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Consumer Secret',
                  name: 'consumerSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'WooCommerce URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://example.com',
              },
              {
                  displayName: 'Include Credentials in Query',
                  name: 'includeCredentialsInQuery',
                  type: 'boolean',
                  default: false,
                  description: 'Whether credentials should be included in the query. Occasionally, some servers may not parse the Authorization header correctly (if you see a “Consumer key is missing” error when authenticating over SSL, you have a server issue). In this case, you may provide the consumer key/secret as query string parameters instead.',
              },
          ];
          this.test = {
              request: {
                  baseURL: '={{$credentials.url}}/wp-json/wc/v3',
                  url: '/products/categories',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              user: credentials.consumerKey,
              password: credentials.consumerSecret,
          };
          if (credentials.includeCredentialsInQuery === true && requestOptions.qs) {
              delete requestOptions.auth;
              Object.assign(requestOptions.qs, {
                  consumer_key: credentials.consumerKey,
                  consumer_secret: credentials.consumerSecret,
              });
          }
          return requestOptions;
      }
  }
  exports.WooCommerceApi = WooCommerceApi;
  //# sourceMappingURL=WooCommerceApi.credentials.js.map

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

  # WooCommerce node

  Use the WooCommerce node to automate work in WooCommerce, and integrate WooCommerce with other applications. n8n has built-in support for a wide range of WooCommerce features, including creating and deleting customers, orders, and products. 

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

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

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

  ## Operations

  * Customer
      * Create a customer
      * Delete a customer
      * Retrieve a customer
      * Retrieve all customers
      * Update a customer
  * Order
      * Create a order
      * Delete a order
      * Get a order
      * Get all orders
      * Update an order
  * Product
      * Create a product
      * Delete a product
      * Get a product
      * Get all products
      * Update a product

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"product","options":[{"name":"Customer","value":"customer"},{"name":"Order","value":"order"},{"name":"Product","value":"product"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.customerOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.customerFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProductDescription_1.productOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProductDescription_1.productFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrderDescription_1.orderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrderDescription_1.orderFields"}]


node_type: n8n-nodes-base.WriteBinaryFile
name: WriteBinaryFile
display_name: Write Binary File
description: Writes a binary file to disk
category: output
icon: fa:file-export
code_hash: 20162b6ab682660dc6c2229e1af0ac916ec38d2570006eaf9b0b6df2be10f946
example_parameters: {"fileName":"Example Name","dataPropertyName":"Example Name","options":{}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WriteBinaryFile = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class WriteBinaryFile {
      constructor() {
          this.description = {
              displayName: 'Write Binary File',
              name: 'writeBinaryFile',
              icon: 'fa:file-export',
              group: ['output'],
              version: 1,
              description: 'Writes a binary file to disk',
              defaults: {
                  name: 'Write Binary File',
                  color: '#CC2233',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'File Name',
                      name: 'fileName',
                      type: 'string',
                      default: '',
                      required: true,
                      placeholder: '/data/example.jpg',
                      description: 'Path to which the file should be written',
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      description: 'Name of the binary property which contains the data for the file to be written',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Append',
                              name: 'append',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to append to an existing file',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let item;
          for (let itemIndex = 0; itemIndex < length; itemIndex++) {
              try {
                  const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
                  const fileName = this.getNodeParameter('fileName', itemIndex);
                  const options = this.getNodeParameter('options', 0, {});
                  const flag = options.append ? 'a' : 'w';
                  item = items[itemIndex];
                  const newItem = {
                      json: {},
                      pairedItem: {
                          item: itemIndex,
                      },
                  };
                  Object.assign(newItem.json, item.json);
                  const binaryData = this.helpers.assertBinaryData(itemIndex, dataPropertyName);
                  let fileContent;
                  if (binaryData.id) {
                      fileContent = await this.helpers.getBinaryStream(binaryData.id);
                  }
                  else {
                      fileContent = Buffer.from(binaryData.data, n8n_workflow_1.BINARY_ENCODING);
                  }
                  await this.helpers.writeContentToFile(fileName, fileContent, flag);
                  if (item.binary !== undefined) {
                      newItem.binary = {};
                      Object.assign(newItem.binary, item.binary);
                  }
                  newItem.json.fileName = fileName;
                  returnData.push(newItem);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: itemIndex,
                          },
                      });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.WriteBinaryFile = WriteBinaryFile;
  //# sourceMappingURL=WriteBinaryFile.node.js.map

example_workflow:
  {"name":"Write Binary File Example Workflow","nodes":[{"parameters":{"fileName":"Example Name","dataPropertyName":"Example Name","options":{}},"id":"ao56yr9gg88nlyzwvxgot","name":"Write Binary File","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"File Name","name":"fileName","type":"string","default":"","required":true,"description":"Path to which the file should be written","placeholder":"/data/example.jpg"},{"displayName":"Property Name","name":"dataPropertyName","type":"string","default":"data","required":true,"description":"Name of the binary property which contains the data for the file to be written"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Whether to append to an existing file","placeholder":"Add Option"}]


node_type: n8n-nodes-base.WorkflowTrigger
name: WorkflowTrigger
display_name: Workflow Trigger
description: Triggers based on various lifecycle events, like when a workflow is activated
category: trigger
icon: fa:network-wired
code_hash: 254166977ea09fe9d47202b97e9ab3e90bae00f8a02f4072c9d221a554e687ce
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.WorkflowTrigger
documentation_title: Workflow Trigger node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"workflow-trigger","description":"Templates for workflow-trigger"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"events":"[]","pollTimes":{"item":[{"mode":"everyMinute"}]}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:26
updated_at: 2025-06-12 08:59:26
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.WorkflowTrigger = void 0;
  class WorkflowTrigger {
      constructor() {
          this.description = {
              displayName: 'Workflow Trigger',
              name: 'workflowTrigger',
              icon: 'fa:network-wired',
              group: ['trigger'],
              version: 1,
              description: 'Triggers based on various lifecycle events, like when a workflow is activated',
              eventTriggerDescription: '',
              mockManualExecution: true,
              activationMessage: 'Your workflow will now trigger executions on the event you have defined.',
              defaults: {
                  name: 'Workflow Trigger',
                  color: '#ff6d5a',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Events',
                      name: 'events',
                      type: 'multiOptions',
                      required: true,
                      default: [],
                      description: `Specifies under which conditions an execution should happen:
  					<ul>
  						<li><b>Active Workflow Updated</b>: Triggers when this workflow is updated</li>
  						<li><b>Workflow Activated</b>: Triggers when this workflow is activated</li>
  					</ul>`,
                      options: [
                          {
                              name: 'Active Workflow Updated',
                              value: 'update',
                              description: 'Triggers when this workflow is updated',
                          },
                          {
                              name: 'Workflow Activated',
                              value: 'activate',
                              description: 'Triggers when this workflow is activated',
                          },
                      ],
                  },
              ],
          };
      }
      async trigger() {
          const events = this.getNodeParameter('events', []);
          const activationMode = this.getActivationMode();
          if (events.includes(activationMode)) {
              let event;
              if (activationMode === 'activate') {
                  event = 'Workflow activated';
              }
              if (activationMode === 'update') {
                  event = 'Workflow updated';
              }
              this.emit([
                  this.helpers.returnJsonArray([
                      { event, timestamp: new Date().toISOString(), workflow_id: this.getWorkflow().id },
                  ]),
              ]);
          }
          const manualTriggerFunction = async () => {
              this.emit([
                  this.helpers.returnJsonArray([
                      {
                          event: 'Manual execution',
                          timestamp: new Date().toISOString(),
                          workflow_id: this.getWorkflow().id,
                      },
                  ]),
              ]);
          };
          return {
              manualTriggerFunction,
          };
      }
  }
  exports.WorkflowTrigger = WorkflowTrigger;
  //# sourceMappingURL=WorkflowTrigger.node.js.map

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

  # Workflow Trigger node

  The Workflow Trigger node gets triggered when a workflow is updated or activated.

  /// warning | Deprecated
  n8n has deprecated the Workflow Trigger node and moved its functionality to the [n8n Trigger node](/integrations/builtin/core-nodes/n8n-nodes-base.n8ntrigger.md).
  ///

  /// note | Keep in mind
  If you want to use the Workflow Trigger node for a workflow, add the node to the workflow. You don't have to create a separate workflow.
  ///

  The Workflow Trigger node gets triggered for the workflow that it gets added to. You can use the Workflow Trigger node to trigger a workflow to notify the state of the workflow.

  ## Node parameters

  The node includes a single parameter to identify the **Events** that should trigger it. Choose from these events:

  - **Active Workflow Updated**: If you select this event, the node triggers when this workflow is updated.
  - **Workflow Activated**: If you select this event, the node triggers when this workflow is activated.

  You can select one or both of these events.

  ## Templates and examples

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

workflow_examples:
  [{"name":"ask_a_human","workflow":{"name":"Ask a human","nodes":[{"parameters":{},"id":"a60c8572-56c1-4bf3-8352-a6419a475887","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","typeVersion":1.1,"position":[900,760]},{"parameters":{"name":"dont_know_tool","description":"Use this tool if you don't know the answer to the user's question, or if you're not very confident about your answer.","workflowId":"={{ $workflow.id}}","fields":{"values":[{"name":"chatInput","stringValue":"={{ $('Chat Trigger').item.json.chatInput }}"}]}},"id":"b4f2e26c-903b-46b8-bd8b-110fd64de9e4","name":"Not sure?","type":"@n8n/n8n-nodes-langchain.toolWorkflow","typeVersion":1,"position":[1120,760]},{"parameters":{},"id":"951cc691-b422-4ce6-901f-b7feb3afd1ad","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","typeVersion":1,"position":[540,1360]},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It checks if the user has supplied an email address. If they haven't it prompts them to provide one. If they have, it messages a customer support channel for help.","height":775.3931210698682,"width":1118.3459011229047,"color":7},"id":"194ba9c0-e256-449a-8da7-ac5339123a99","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[500,1020],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"38c6b363-45a7-4e72-9e40-8c0df3cc480f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[500,460],"typeVersion":1},{"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"id":"0389315b-e48d-4b00-b9a1-899302b1b094","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1060,700],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":213.44323866265472,"width":150,"color":2},"id":"fb11064a-4cf5-4110-9e39-af24a3225164","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[700,680]},{"parameters":{"content":"**Set your credentials and Slack details**","height":250.57252651663197,"width":178.0499248677781,"color":2},"id":"d689021d-0a46-4dff-a01a-0b01ecdd198b","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1020,1180]},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Hi! Please respond to this as if you don't know the answer to my query._","height":214.8397420554627,"width":185.9375,"color":4},"id":"0926cd61-c0b8-4bae-ae65-9afd130d17cd","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[340,520],"typeVersion":1},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"id":"cde69dfe-252e-4a05-8d56-fa79431df5d8","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1580,1600]},{"parameters":{},"id":"927b775a-47f6-4067-a1a5-5f13dea28e45","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1,"position":[600,520],"webhookId":"785e0c0c-12e5-4249-9abe-47bb131975cb"},{"parameters":{"jsCode":"response = {\"response\":\"I'm sorry I don't know the answer. Please repeat your question and include your email address so I can request help.\"};\nreturn response;"},"id":"971e7b90-c2d8-4292-9da8-732d7d399f04","name":"Prompt the user to provide an email","type":"n8n-nodes-base.code","typeVersion":2,"position":[1060,1520]},{"parameters":{"jsCode":"response = {\"response\": \"Thank you for getting in touch. I've messaged a human to help.\"}\nreturn response;"},"id":"6f5a21b3-c145-46c8-8e69-660100c4a6fc","name":"Confirm that we've messaged a human","type":"n8n-nodes-base.code","typeVersion":2,"position":[1300,1260]},{"parameters":{"options":{"systemMessage":"Try to answer the user's question. When you can't answer, or you're not confident of the answer, use the appropriate tool. When you use the dont_know_tool, respond with the message from the tool."}},"id":"8b17da5e-e392-4028-91b0-bc02d34e46ed","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","typeVersion":1.2,"position":[820,520]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"5e21e7c5-db60-4111-bb17-c289ae0fc159","leftValue":"={{ $('Execute Workflow Trigger').item.json.chatInput }}","rightValue":"/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/gi","operator":{"type":"string","operation":"regex"}}],"combinator":"and"},"options":{}},"id":"990ecd3b-6aa0-4b17-8d01-d606b9164fa8","name":"Check if user has provided email","type":"n8n-nodes-base.if","typeVersion":2,"position":[760,1360]},{"parameters":{"select":"channel","channelId":{"__rl":true,"value":"","mode":"name"},"text":"={{ \"A user had a question the bot couldn't answer. Here's their message: \" + $('Execute Workflow Trigger').item.json.chatInput }}","otherOptions":{}},"id":"d14da0ae-06ca-422b-b5b6-e7759e74c787","name":"Message Slack for help","type":"n8n-nodes-base.slack","typeVersion":2.1,"position":[1060,1260]},{"parameters":{"model":"gpt-4","options":{"temperature":0.2}},"id":"278391c7-6945-495e-a4f1-74fb8fcc3549","name":"GPT4","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[740,740]}],"pinData":{},"connections":{"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Not sure?":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Check if user has provided email","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Check if user has provided email":{"main":[[{"node":"Message Slack for help","type":"main","index":0}],[{"node":"Prompt the user to provide an email","type":"main","index":0}]]},"Message Slack for help":{"main":[[{"node":"Confirm that we've messaged a human","type":"main","index":0}]]},"GPT4":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.executeWorkflowTrigger","version":1,"parameters":{},"position":[540,1360]}],"connections":{"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Not sure?":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Check if user has provided email","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Check if user has provided email":{"main":[[{"node":"Message Slack for help","type":"main","index":0}],[{"node":"Prompt the user to provide an email","type":"main","index":0}]]},"Message Slack for help":{"main":[[{"node":"Confirm that we've messaged a human","type":"main","index":0}]]},"GPT4":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/ask_a_human.json"},{"name":"chat_with_google_sheets_docs_version","workflow":{"name":"Chat with Google Sheets (docs version)","nodes":[{"parameters":{},"id":"e96a5e41-f0d6-49c1-977e-ff724a857212","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","position":[540,1240],"typeVersion":1},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It returns three different types of data from the Google Sheet, which can be used together for more complex queries without returning the whole sheet (which might be too big for GPT to handle).","height":612.0936015224503,"width":1449.2963504228514,"color":7},"id":"67facef0-e9c6-4280-8232-78f654b420d5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[461.9740563285368,970.616715060075],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"bc448102-954b-451e-9bf7-bcadbc53bdbc","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[460,460],"typeVersion":1},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Which is our biggest customer?_","height":183.85014518022527,"width":185.9375,"color":4},"id":"afb2da2f-8da2-4ee8-bff9-55a99eeecc5c","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[300,540],"typeVersion":1},{"parameters":{},"id":"5d56d128-9a83-45ee-a34c-bc1190d59322","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[600,560],"webhookId":"e3f23177-c7c1-417b-a513-1c1090dda0a2","typeVersion":1},{"parameters":{"authentication":"serviceAccount","documentId":{"__rl":true,"mode":"url","value":"={{ $json.sheetUrl }}"},"sheetName":{"__rl":true,"mode":"url","value":"={{ $json.sheetUrl }}"},"options":{}},"id":"3c0e4b48-a27b-472f-948e-9aa001c49149","name":"Get Google sheet contents","type":"n8n-nodes-base.googleSheets","position":[980,1240],"typeVersion":4.2},{"parameters":{"fields":{"values":[{"name":"sheetUrl"}]},"options":{}},"id":"67f9c172-e70f-4a0f-afd3-513cfeae09db","name":"Set Google Sheet URL","type":"n8n-nodes-base.set","position":[760,1240],"typeVersion":3.2},{"parameters":{"fields":{"values":[{"name":"response","stringValue":"={{ Object.keys($json) }}"}]},"include":"none","options":{}},"id":"d49223eb-2927-4ddd-bd2c-cd439f927341","name":"Get column names","type":"n8n-nodes-base.set","position":[1440,1060],"executeOnce":true,"typeVersion":3.2},{"parameters":{"jsCode":"return {\n  'response': JSON.stringify($input.all().map(x => x.json))\n}"},"id":"37ceba7a-1f0b-4de7-ae4a-d29a18dabaf6","name":"Prepare output","type":"n8n-nodes-base.code","position":[1720,1240],"typeVersion":2},{"parameters":{"name":"list_columns_tool","description":"=### List all column names in customer data\nThis is useful to find out what data is available for each customer. Returns a JSON array containing all the column names.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"column_names"}]}},"id":"94516eb1-89fc-4d3f-8000-d0fa43cd71cd","name":"List columns tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[940,780],"typeVersion":1},{"parameters":{"name":"get_customer_tool","description":"=### Get all columns for a given customer\nTo use this mode, pass the row number of the customer. Returns a JSON object with all the column names and their values.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"row"}]}},"id":"006745a1-3df7-4de9-9483-c6e133272c55","name":"Get customer tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1220,780],"typeVersion":1},{"parameters":{},"id":"c3d20569-1374-4f8d-8779-23b98952d124","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[800,780],"typeVersion":1.1},{"parameters":{"name":"column_values_tool","description":"=### Get the specified column value for all customers\nThis is useful if you want to find out which customers have a certain value for a given column. Returns an array of JSON objects, one per customer. Each JSON object includes the column being requested, plus the row_number column. (The row_number column can be used to request the full customer data in a second step.). To use this mode, pass the name of the column to fetch.\n\nYou may want to call the 'list columns' tool first to find out which columns you could be fetching.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"column_values"}]}},"id":"3a370ae9-eaf8-4e84-948b-848c461ac9eb","name":"Get column values tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1080,780],"typeVersion":1},{"parameters":{"text":"={{ $json.chatInput }}","options":{"maxIterations":10}},"id":"8f2a4854-2177-4ac8-9501-fa36cf2a3d73","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[820,560],"typeVersion":1.1},{"parameters":{"content":"**These tools all call the sub-workflow below**","height":179.21380662202682,"width":432.3271051132649,"color":5},"id":"2576563b-a104-4d99-b3c8-b53bff4c740c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[900,740.8693557231958],"typeVersion":1},{"parameters":{"content":"**Change the URL of the Google Sheet**","height":226.64416053838073,"width":179.99762227826224,"color":2},"id":"5b623d9e-e188-403d-a702-9ece6172a487","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[723,1172],"typeVersion":1},{"parameters":{"model":"gpt-4","options":{"temperature":0}},"id":"2b8c8a67-a4df-4f5c-8c13-3cb2d25d2c5f","name":"GPT4 Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[660,780],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"id":"f39d0c9b-4055-4331-83c8-3dbffb43478e","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[620,720]},{"parameters":{"content":"**Set your credentials**","height":237,"width":176,"color":2},"id":"a8e09ef8-4dc6-4918-9194-047de402a8fa","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[940,1172]},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":126.0084096222716,"width":291.1204551358572},"id":"a391dfb1-f408-4498-99cd-d35a258d6c9a","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1740,1540]},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"column_names","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"col names"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"9fe58592-72e2-4379-9bdb-10da19c8218b","leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"column_values","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"col values"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"c1836f93-7874-43a4-98ff-cc487b276600","leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"row","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"rows"}]},"options":{}},"id":"907deea9-26cc-427e-93fc-52ce6b67e5e1","name":"Check operations","type":"n8n-nodes-base.switch","typeVersion":3,"position":[1220,1240]},{"parameters":{"fields":{"values":[{"name":"={{ $('Execute Workflow Trigger').item.json.query }}","stringValue":"={{ $json[$('Execute Workflow Trigger').item.json.query] }}"},{"name":"row_number","stringValue":"={{ $json.row_number }}"}]},"include":"none","options":{}},"id":"f2ebcae6-3cfb-4862-a927-dc66bd24f197","name":"Prepare column data","type":"n8n-nodes-base.set","position":[1440,1240],"typeVersion":3.2},{"parameters":{"conditions":{"options":{"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"bf712098-97e4-42cb-8e08-2ee32d19d3e7","operator":{"type":"number","operation":"equals"},"leftValue":"={{ $json.row_number }}","rightValue":"={{ $('Execute Workflow Trigger').item.json.query }}"}]},"options":{"looseTypeValidation":true}},"id":"f40acb04-ef06-4670-b8b1-86b04f066af8","name":"Filter out other rows","type":"n8n-nodes-base.filter","position":[1440,1420],"typeVersion":2}],"pinData":{},"connections":{"GPT4 Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Get column names":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Get customer tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"List columns tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Set Google Sheet URL":{"main":[[{"node":"Get Google sheet contents","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Get column values tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Set Google Sheet URL","type":"main","index":0}]]},"Get Google sheet contents":{"main":[[{"node":"Check operations","type":"main","index":0}]]},"Check operations":{"main":[[{"node":"Get column names","type":"main","index":0}],[{"node":"Prepare column data","type":"main","index":0}],[{"node":"Filter out other rows","type":"main","index":0}]]},"Prepare column data":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Filter out other rows":{"main":[[{"node":"Prepare output","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.executeWorkflowTrigger","version":1,"parameters":{},"position":[540,1240]}],"connections":{"GPT4 Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Get column names":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Get customer tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"List columns tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Set Google Sheet URL":{"main":[[{"node":"Get Google sheet contents","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Get column values tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Set Google Sheet URL","type":"main","index":0}]]},"Get Google sheet contents":{"main":[[{"node":"Check operations","type":"main","index":0}]]},"Check operations":{"main":[[{"node":"Get column names","type":"main","index":0}],[{"node":"Prepare column data","type":"main","index":0}],[{"node":"Filter out other rows","type":"main","index":0}]]},"Prepare column data":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Filter out other rows":{"main":[[{"node":"Prepare output","type":"main","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/chat_with_google_sheets_docs_version.json"},{"name":"let_your_ai_call_an_api","workflow":{"name":"Let your AI call an API","nodes":[{"parameters":{},"id":"35ce49a9-eda1-4da5-a6cb-39a39680111b","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","position":[520,1140],"typeVersion":1},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It calls an example API called \"Bored API\" and returns a string with an activity idea.","height":775.3931210698682,"width":1180.0825159534493,"color":7},"id":"ec6e261b-922f-401c-9392-12ff73488a5f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[460,960],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"25780e87-0ae0-4bee-9582-75f98bf66635","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[460,460],"typeVersion":1},{"parameters":{},"id":"f262f04b-964c-47c0-b7dc-a86b82b0184b","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[600,560],"webhookId":"e3f23177-c7c1-417b-a513-1c1090dda0a2","typeVersion":1},{"parameters":{},"id":"29678c05-9a48-41ec-9c5c-af36ee0d7fc6","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[860,780],"typeVersion":1.1},{"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"id":"e078f88b-489c-42ea-9544-6bdaeae213a0","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1020,720],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"id":"1d1d1a4e-0d1d-4094-81c7-e01f2674df0d","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[620,720]},{"parameters":{"content":"**Set your credentials**","height":170.10898979087855,"width":152.85917676941358,"color":2},"id":"8c83d554-bf1f-4b3c-abb9-a6bb76846698","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[880,1540.2624287261167]},{"parameters":{"name":"activity_tool","description":"=Suggest an activity for a person to do. Use this tool if someone is bored, or asking for ideas of things to do.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"chatInput","stringValue":"={{ $('Chat Trigger').item.json.chatInput }}"}]}},"id":"82a3c606-0d7a-4b45-aae7-df35525615f7","name":"Activity tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1080,780],"typeVersion":1},{"parameters":{"text":"={{ $json.chatInput }}","options":{"maxIterations":10}},"id":"716dea0d-a987-4cf7-ae4a-bf0f7c7d7da9","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[820,560],"typeVersion":1.1},{"parameters":{},"id":"f469fba8-07ae-4c79-a79c-2c49946d94e2","name":"Auto-fixing Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserAutofixing","typeVersion":1,"position":[920,1380]},{"parameters":{"content":"**Set your credentials**","height":189.79768930311286,"width":150,"color":2},"id":"e6d252d3-d78e-4827-b911-0528c3b80794","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[648.9502850955331,1340]},{"parameters":{"model":"gpt-4","options":{}},"id":"f65054a9-771c-47f8-94cc-4ed766f89d19","name":"GPT4 Model 1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[660,780],"typeVersion":1},{"parameters":{"model":"gpt-4","options":{}},"id":"94c2a6d8-cab9-48c2-8801-4306f0957f50","name":"GPT4 Model 2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[700,1420]},{"parameters":{"model":"gpt-4","options":{}},"id":"5f423800-2eaf-43f5-bd59-dc1212cb55ad","name":"GPT4 Model 3","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[920,1600]},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Hi! Please suggest something to do. I feel like learning something new._","height":214.8397420554627,"width":185.9375,"color":4},"id":"8ba60ef6-c375-41d9-bf79-1f19f1495adb","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[300,540],"typeVersion":1},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"id":"4bbd5942-4f2a-4a9a-a26c-61f95ad57549","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1500,1540]},{"parameters":{"jsonSchema":"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"type\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"data\": {\n          \"enum\": [\"education\", \"recreational\",\"social\",\"diy\",\"charity\",\"cooking\",\"relaxation\",\"music\",\"busywork\"]\n        }\n      }\n    },\n    \"participants\": {\n      \"type\": \"number\"\n    }\n  }\n}"},"id":"a50c7858-b0fd-44d6-898d-452ffc5cbd72","name":"Structure as JSON","type":"@n8n/n8n-nodes-langchain.outputParserStructured","typeVersion":1,"position":[1120,1520]},{"parameters":{"url":"http://www.boredapi.com/api/activity/","sendQuery":true,"queryParameters":{"parameters":[{"name":"type","value":"={{ $json.output.type.data }}"},{"name":"participants","value":"={{ $json.output.participants }}"}]},"options":{}},"id":"340c2536-6e79-4af6-9cd0-5cbf6eae1983","name":"Call the API","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[1120,1140]},{"parameters":{"prompt":"={{ $('Execute Workflow Trigger').item.json.chatInput }}"},"id":"d7d5455c-2e46-4896-853c-6b527e9403e4","name":"Work out activity type and number of people","type":"@n8n/n8n-nodes-langchain.chainLlm","typeVersion":1.3,"position":[740,1140]},{"parameters":{"assignments":{"assignments":[{"id":"e37e64f6-64e7-4fbd-9ea1-e9d3ef99b39c","name":"response","value":"={{ $json.activity }}","type":"string"}]},"options":{}},"id":"83f9ac05-4583-4cc4-bcc8-29ae450c95cb","name":"Set 'response' value","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[1340,1140]}],"pinData":{},"connections":{"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Work out activity type and number of people","type":"main","index":0}]]},"Activity tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Auto-fixing Output Parser":{"ai_outputParser":[[{"node":"Work out activity type and number of people","type":"ai_outputParser","index":0}]]},"GPT4 Model 1":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"GPT4 Model 2":{"ai_languageModel":[[{"node":"Work out activity type and number of people","type":"ai_languageModel","index":0}]]},"GPT4 Model 3":{"ai_languageModel":[[{"node":"Auto-fixing Output Parser","type":"ai_languageModel","index":0}]]},"Structure as JSON":{"ai_outputParser":[[{"node":"Auto-fixing Output Parser","type":"ai_outputParser","index":0}]]},"Call the API":{"main":[[{"node":"Set 'response' value","type":"main","index":0}]]},"Work out activity type and number of people":{"main":[[{"node":"Call the API","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.executeWorkflowTrigger","version":1,"parameters":{},"position":[520,1140]}],"connections":{"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Work out activity type and number of people","type":"main","index":0}]]},"Activity tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Auto-fixing Output Parser":{"ai_outputParser":[[{"node":"Work out activity type and number of people","type":"ai_outputParser","index":0}]]},"GPT4 Model 1":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"GPT4 Model 2":{"ai_languageModel":[[{"node":"Work out activity type and number of people","type":"ai_languageModel","index":0}]]},"GPT4 Model 3":{"ai_languageModel":[[{"node":"Auto-fixing Output Parser","type":"ai_languageModel","index":0}]]},"Structure as JSON":{"ai_outputParser":[[{"node":"Auto-fixing Output Parser","type":"ai_outputParser","index":0}]]},"Call the API":{"main":[[{"node":"Set 'response' value","type":"main","index":0}]]},"Work out activity type and number of people":{"main":[[{"node":"Call the API","type":"main","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/let_your_ai_call_an_api.json"}]

troubleshooting_info:
  [{"issue":"Node parameters","solution":"The node includes a single parameter to identify the **Events** that should trigger it. Choose from these events:"}]

node_connections:
[cell repeats an earlier one in this file: 2794 characters]

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

properties_schema:
  [{"displayName":"Events","name":"events","type":"multiOptions","default":"[]","required":true,"description":"Specifies under which conditions an execution should happen:\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><b>Active Workflow Updated</b>: Triggers when this workflow is updated</li>\n\t\t\t\t\t\t<li><b>Workflow Activated</b>: Triggers when this workflow is activated</li>\n\t\t\t\t\t</ul>","options":[{"name":"Active Workflow Updated","value":"update","description":"Triggers when this workflow is updated"},{"name":"Workflow Activated","value":"activate","description":"Triggers when this workflow is activated"}]}]


node_type: n8n-nodes-base.Xml
name: Xml
display_name: XML
description: Convert data from and to XML
category: transform
icon: fa:file-code
code_hash: 09aee64eeb21c4566e8cd0c36ea6ba97e480c62938dc579228fb1b60c842f65b
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.Xml
documentation_title: XML
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"xml","description":"Templates for xml"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"mode":"jsonToxml","dataPropertyName":"Example Name","options":{}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Xml = void 0;
  const xml2js_1 = require("xml2js");
  const n8n_workflow_1 = require("n8n-workflow");
  class Xml {
      constructor() {
          this.description = {
              displayName: 'XML',
              name: 'xml',
              icon: 'fa:file-code',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["mode"]==="jsonToxml" ? "JSON to XML" : "XML to JSON"}}',
              description: 'Convert data from and to XML',
              defaults: {
                  name: 'XML',
                  color: '#333377',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Mode',
                      name: 'mode',
                      type: 'options',
                      options: [
                          {
                              name: 'JSON to XML',
                              value: 'jsonToxml',
                              description: 'Converts data from JSON to XML',
                          },
                          {
                              name: 'XML to JSON',
                              value: 'xmlToJson',
                              description: 'Converts data from XML to JSON',
                          },
                      ],
                      default: 'xmlToJson',
                      description: 'From and to what format the data should be converted',
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['jsonToxml'],
                          },
                      },
                      default: 'data',
                      required: true,
                      description: 'Name of the property to which to contains the converted XML data',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      displayOptions: {
                          show: {
                              mode: ['jsonToxml'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Allow Surrogate Chars',
                              name: 'allowSurrogateChars',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to allow using characters from the Unicode surrogate blocks',
                          },
                          {
                              displayName: 'Attribute Key',
                              name: 'attrkey',
                              type: 'string',
                              default: '$',
                              description: 'Prefix that is used to access the attributes',
                          },
                          {
                              displayName: 'Cdata',
                              name: 'cdata',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to wrap text nodes in &lt;![CDATA[ ... ]]&gt; instead of escaping when necessary. Does not add &lt;![CDATA[ ... ]]&gt; if it is not required.',
                          },
                          {
                              displayName: 'Character Key',
                              name: 'charkey',
                              type: 'string',
                              default: '_',
                              description: 'Prefix that is used to access the character content',
                          },
                          {
                              displayName: 'Headless',
                              name: 'headless',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to omit the XML header',
                          },
                          {
                              displayName: 'Root Name',
                              name: 'rootName',
                              type: 'string',
                              default: 'root',
                              description: 'Root element name to be used',
                          },
                      ],
                  },
                  {
                      displayName: 'Property Name',
                      name: 'dataPropertyName',
                      type: 'string',
                      displayOptions: {
                          show: {
                              mode: ['xmlToJson'],
                          },
                      },
                      default: 'data',
                      required: true,
                      description: 'Name of the property which contains the XML data to convert',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      displayOptions: {
                          show: {
                              mode: ['xmlToJson'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Attribute Key',
                              name: 'attrkey',
                              type: 'string',
                              default: '$',
                              description: 'Prefix that is used to access the attributes',
                          },
                          {
                              displayName: 'Character Key',
                              name: 'charkey',
                              type: 'string',
                              default: '_',
                              description: 'Prefix that is used to access the character content',
                          },
                          {
                              displayName: 'Explicit Array',
                              name: 'explicitArray',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to always put child nodes in an array if true; otherwise an array is created only if there is more than one',
                          },
                          {
                              displayName: 'Explicit Root',
                              name: 'explicitRoot',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to set this if you want to get the root node in the resulting object',
                          },
                          {
                              displayName: 'Ignore Attributes',
                              name: 'ignoreAttrs',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to ignore all XML attributes and only create text nodes',
                          },
                          {
                              displayName: 'Merge Attributes',
                              name: 'mergeAttrs',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to merge attributes and child elements as properties of the parent, instead of keying attributes off a child attribute object. This option is ignored if ignoreAttrs is true.',
                          },
                          {
                              displayName: 'Normalize',
                              name: 'normalize',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to trim whitespaces inside text nodes',
                          },
                          {
                              displayName: 'Normalize Tags',
                              name: 'normalizeTags',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to normalize all tag names to lowercase',
                          },
                          {
                              displayName: 'Trim',
                              name: 'trim',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to trim the whitespace at the beginning and end of text nodes',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const mode = this.getNodeParameter('mode', 0);
          const dataPropertyName = this.getNodeParameter('dataPropertyName', 0);
          const options = this.getNodeParameter('options', 0, {});
          let item;
          const returnData = [];
          for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
              try {
                  item = items[itemIndex];
                  if (mode === 'xmlToJson') {
                      const parserOptions = Object.assign({
                          mergeAttrs: true,
                          explicitArray: false,
                      }, options);
                      const parser = new xml2js_1.Parser(parserOptions);
                      if (item.json[dataPropertyName] === undefined) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Item has no JSON property called "${dataPropertyName}"`, { itemIndex });
                      }
                      const json = await parser.parseStringPromise(item.json[dataPropertyName]);
                      returnData.push({ json: (0, n8n_workflow_1.deepCopy)(json) });
                  }
                  else if (mode === 'jsonToxml') {
                      const builder = new xml2js_1.Builder(options);
                      returnData.push({
                          json: {
                              [dataPropertyName]: builder.buildObject(items[itemIndex].json),
                          },
                          pairedItem: {
                              item: itemIndex,
                          },
                      });
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${mode}" is not known!`, {
                          itemIndex,
                      });
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      items[itemIndex] = {
                          json: {
                              error: error.message,
                          },
                          pairedItem: {
                              item: itemIndex,
                          },
                      };
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Xml = Xml;
  //# sourceMappingURL=Xml.node.js.map

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

  # XML

  Use the XML node to convert data from and to XML.

  /// note | Binary files
  If your XML is within a binary file, use the [Extract from File](/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile.md) node to convert it to text first.
  ///

  ## Node parameters

  - **Mode**: The format the data should be converted from and to.
  	- **JSON to XML**: Converts data from JSON to XML.
      - **XML to JSON**: Converts data from XML to JSON.
  - **Property Name**: Enter the name of the property which contains the data to convert.

  ## Node options

  These options are available regardless of the **Mode** you select:

  - **Attribute Key**: Enter the prefix used to access the attributes. Default is `$`.
  - **Character Key**: Enter the prefix used to access the character content. Default is `_`.

  All other options depend on the selected **Mode**.

  ### JSON to XML options

  These options only appear if you select **JSON to XML** as the **Mode**:

  - **Allow Surrogate Chars**: Set whether to allow using characters from the Unicode surrogate blocks (turned on) or not (turned off).
  - **Cdata**: Set whether to wrap text nodes in `<![CDATA[ ... ]]>` instead of escaping when it's required (turned on) or not (turned off).
      * Turning this option on doesn't add `<![CDATA[ ... ]]>` if it's not required.
  - **Headless**: Set whether to omit the XML header (turned on) or include it (turned off).
  - **Root Name**: Enter the root element name to use.

  ### XML to JSON options

  These options only appear if you select **XML to JSON** as the **Mode**:

  - **Explicit Array**: Set whether to put child nodes in an array (turned on) or create an array only if there's more than one child node (turned off).
  - **Explicit Root**: Set whether to get the root node in the resulting object (turned on) or not (turned off).
  - **Ignore Attributes**: Set whether to ignore all XML attributes and only create text nodes (turned on) or not (turned off).
  - **Merge Attributes**: Set whether to merge attributes and child elements as properties of the parent (turned on) or key attributes off a child attribute object (turned off). This option is ignored if **Ignore Attribute** is turned on.
  - **Normalize**: Set whether to trim whitespaces inside the text nodes (turned on) or not to trim them (turned off).
  - **Normalize Tags**: Set whether to normalize all tag names to lowercase (turned on) or keep tag names as-is (turned off).
  - **Trim**: Set whether to trim the whitespace at the beginning and end of text nodes (turned on) or to leave the whitespace as-is (turned off).

  ## Templates and examples

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

workflow_examples:
  [{"name":"populate_a_pinecone_vector_database_from_a_website","workflow":{"name":"Populate a Pinecone vector database from a website","nodes":[{"parameters":{"model":"text-embedding-3-large","options":{},"requestOptions":{}},"id":"856f2426-b4b5-4180-a422-d26692844afb","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","typeVersion":1,"position":[80,1040],"credentials":{"openAiApi":{"id":"tW3bkXa0SAK0OzvR","name":"OpenAi account Debs"}}},{"parameters":{"options":{},"requestOptions":{}},"id":"1e702984-6f79-416e-981a-6728d4b3c233","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","typeVersion":1,"position":[260,960]},{"parameters":{"options":{"splitCode":"markdown"},"requestOptions":{}},"id":"2d1f30fd-f251-4389-8f6d-2c950018a91f","name":"Recursive Character Text Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","typeVersion":1,"position":[300,1160]},{"parameters":{"batchSize":10,"options":{}},"id":"4e8a9d4c-6009-4d9b-b603-0438c65ba9df","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","typeVersion":3,"position":[-840,1040]},{"parameters":{"model":{"__rl":true,"value":"gpt-4o","mode":"list","cachedResultName":"gpt-4o"},"options":{},"requestOptions":{}},"id":"e7967355-41b4-4bc5-b192-c8bc0699e925","name":"OpenAI Model","type":"@n8n/n8n-nodes-langchain.lmOpenAi","typeVersion":1,"position":[-1320,1680],"credentials":{"openAiApi":{"id":"tW3bkXa0SAK0OzvR","name":"OpenAi account Debs"}}},{"parameters":{"url":"https://n8n-io.github.io/n8n-demo-website/sitemap.xml","options":{}},"id":"5fb88663-f28b-4da2-acd9-1cbb0c5d28e7","name":"Get sitemap","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[-1480,740]},{"parameters":{"options":{"explicitRoot":false,"ignoreAttrs":true}},"id":"0e6287b8-9a65-4af0-8e69-3aae3648fd13","name":"Turn XML sitemap into JSON","type":"n8n-nodes-base.xml","typeVersion":1,"position":[-1260,740]},{"parameters":{"fieldToSplitOut":"url","options":{}},"id":"acd3e717-99f5-4238-aa4d-795caef660b1","name":"Turn the URL array into multiple items","type":"n8n-nodes-base.splitOut","typeVersion":1,"position":[-1040,740]},{"parameters":{},"id":"f3b4ad5e-b261-4b97-9077-3b9259d5b37d","name":"Wait 5 seconds","type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[-320,1060],"webhookId":"f4e7dead-77ad-4216-a5a0-ef95914bf3ab"},{"parameters":{"url":"={{ $json.loc }}","options":{}},"id":"361b2a70-d0c5-4498-8a70-0688710e76e6","name":"Get pages listed in the sitemap","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[-580,1060]},{"parameters":{},"id":"14ddd282-9bf0-459f-9595-5154e16f9cc0","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1,"position":[-1620,1420],"webhookId":"4b338d3c-b03f-42f2-94c1-9353d0f1fbc2"},{"parameters":{"promptType":"define","text":"={{ $('Chat Trigger').item.json.chatInput }}"},"id":"263585e6-02bb-4940-9bb3-15f32b0f8079","name":"Question and Answer Chain","type":"@n8n/n8n-nodes-langchain.chainRetrievalQa","typeVersion":1.3,"position":[-1280,1420]},{"parameters":{"topK":10,"requestOptions":{}},"id":"91ad53ec-a761-43f6-a6f1-835263222e0c","name":"Vector Store Retriever","type":"@n8n/n8n-nodes-langchain.retrieverVectorStore","typeVersion":1,"position":[-1080,1620]},{"parameters":{"model":"text-embedding-3-large","options":{},"requestOptions":{}},"id":"5c55cb38-be26-405d-bd39-d29e0a33b683","name":"Embeddings OpenAI2","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","typeVersion":1,"position":[-780,2040],"credentials":{"openAiApi":{"id":"tW3bkXa0SAK0OzvR","name":"OpenAi account Debs"}}},{"parameters":{"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"content"}]},"options":{}},"id":"48dbd7f7-1ca1-41e2-9fd5-e916ea76589b","name":"Aggregate","type":"n8n-nodes-base.aggregate","typeVersion":1,"position":[-100,740]},{"parameters":{"content":"**Aggregate into one item**\n\nThe Pinecone node loops over each input item. This is standard n8n node behavior.\n\nThis means if you want to use the **Clear namespace** setting in the Pinecone node, you need to input a single item.","height":381.66422439067196,"color":5},"id":"5b70d4ae-1889-43d3-b92d-bf73e43236bd","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-160,520]},{"parameters":{"content":"### Workflow to scrape data and send it to Pinecone","height":878.8927796727229,"width":2382.6739342193496,"color":7},"id":"e9b5d557-51af-48d1-af33-8783f9ca3718","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1856.703373323493,480]},{"parameters":{"content":"### Workflow to chat and get answers from the Pinecone vector database","height":825.9872504327399,"width":1181.407211476183,"color":7},"id":"7efa097b-d4f2-49a4-9da5-4fcf6b83be3b","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1680,1380]},{"parameters":{"content":"## Try it out \n\n1. Set credentials and choose your Pinecone vector database. See the notes on individual nodes for details.\n2. Select **Execute workflow** to run the main workflow and load data into Pinecone.\n3. Select **Chat** and try asking:\n\n_What is the purpose of the n8n demo website?_","height":326.49681260818465,"color":4},"id":"f21bc32b-a405-4d71-b6c9-7bffbb6faed9","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-2040,560]},{"parameters":{"content":"**Setup**\n\n1. In Pinecone, create a vector database. Set **Dimensions** to `3072` and **Metric** to `cosine`. You can use the free starter plan.\n2. In the Pinecone node, set your credentials.\n3. Select your Pinecone index.","height":381.3701016273242,"width":304.1011298750183,"color":2},"id":"4be87782-f811-418f-b4b5-9e12c4cf7970","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[140,520]},{"parameters":{"mode":"insert","pineconeIndex":{},"options":{"clearNamespace":true,"pineconeNamespace":"test-web-scraper"}},"id":"94035a97-5a09-493c-aaae-dcba7bbf8526","name":"Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","typeVersion":1,"position":[160,740],"credentials":{"pineconeApi":{"id":"lruA9GaKZSEY8dky","name":"Debs Pinecone"}}},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","width":331.8066536811489},"id":"2be1433b-0488-4c7e-8c10-e771d4dd4686","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[460,1280]},{"parameters":{"content":"**Set your credentials**","height":206.68134932939768,"width":182.42633582707612,"color":2},"id":"fffbb04d-6d61-4dfa-bfd3-46b8c92a36d5","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[20,1000]},{"parameters":{"content":"**Set your credentials**","height":184.89671964234537,"width":173.09006596119673,"color":2},"id":"810ac5e1-d730-47af-9282-64ab0b4fca16","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1369.107685156473,1620.2285847094058]},{"parameters":{"content":"**Set your credentials**","height":192.67694453057842,"width":221.3274602682409,"color":2},"id":"2cecc8ac-3c65-4294-8a5d-2842bc07d10a","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-860,1980]},{"parameters":{"pineconeIndex":{"__rl":true,"value":"debs-test","mode":"list","cachedResultName":"debs-test"},"options":{"pineconeNamespace":"test-web-scraper"}},"id":"e673c46e-0815-4b58-9a8f-2fb86445b578","name":"Pinecone Vector Store2","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","typeVersion":1,"position":[-980,1840],"credentials":{"pineconeApi":{"id":"lruA9GaKZSEY8dky","name":"Debs Pinecone"}}},{"parameters":{"content":"**Set your credentials**\n\n**Select your Pinecone index***","width":367.59568816702017,"color":2},"id":"ca4499ae-4e27-4848-9654-f7e744c081e7","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1080,1760]},{"parameters":{},"id":"b43ddbd1-adfd-4bba-bee5-4b81229e88dd","name":"Start the workflow by clicking \"Execute workflow\"","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[-1700,740]},{"parameters":{"operation":"extractHtmlContent","extractionValues":{"values":[{"key":"content","cssSelector":".md-content","returnValue":"html"}]},"options":{"trimValues":true,"cleanUpText":true}},"id":"d39624d7-93c0-4452-81b1-ffa04b216ceb","name":"Extract main content","type":"n8n-nodes-base.html","typeVersion":1.2,"position":[-380,740]},{"parameters":{"content":"**Batch the calls to the website**\n\nFor the small demo website in this example, this is not essential. If you want to use this example with a larger website, batching like this helps avoid timeouts. Using the Wait node between batches avoids hitting the website with too many requests too fast.","height":298.48800301054644,"width":316.2462039046831,"color":5},"id":"9825926d-ce6d-429e-9006-6ff5fd1f46ca","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1220,1020]},{"parameters":{"content":"## How to scrape a different website\n\nThis workflow uses a small example website provided by n8n. To use a different site:\n\n1. Change the sitemap URL in **Get sitemap**.\n2. Update **Extract main content** according to the HTML structure of the website you're scraping.","height":356.06166718347},"id":"7c2e4bde-3900-49b0-9bee-704e34664163","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-2040,960]}],"pinData":{},"connections":{"Embeddings OpenAI":{"ai_embedding":[[{"node":"Pinecone Vector Store","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Pinecone Vector Store","type":"ai_document","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"Loop Over Items":{"main":[[{"node":"Extract main content","type":"main","index":0}],[{"node":"Get pages listed in the sitemap","type":"main","index":0}]]},"Get sitemap":{"main":[[{"node":"Turn XML sitemap into JSON","type":"main","index":0}]]},"Turn XML sitemap into JSON":{"main":[[{"node":"Turn the URL array into multiple items","type":"main","index":0}]]},"Turn the URL array into multiple items":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Wait 5 seconds":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Get pages listed in the sitemap":{"main":[[{"node":"Wait 5 seconds","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"Question and Answer Chain","type":"main","index":0}]]},"OpenAI Model":{"ai_languageModel":[[{"node":"Question and Answer Chain","type":"ai_languageModel","index":0}]]},"Vector Store Retriever":{"ai_retriever":[[{"node":"Question and Answer Chain","type":"ai_retriever","index":0}]]},"Embeddings OpenAI2":{"ai_embedding":[[{"node":"Pinecone Vector Store2","type":"ai_embedding","index":0}]]},"Aggregate":{"main":[[{"node":"Pinecone Vector Store","type":"main","index":0}]]},"Pinecone Vector Store2":{"ai_vectorStore":[[{"node":"Vector Store Retriever","type":"ai_vectorStore","index":0}]]},"Start the workflow by clicking \"Execute workflow\"":{"main":[[{"node":"Get sitemap","type":"main","index":0}]]},"Extract main content":{"main":[[{"node":"Aggregate","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.xml","version":1,"parameters":{"options":{"explicitRoot":false,"ignoreAttrs":true}},"position":[-1260,740]}],"connections":{"Embeddings OpenAI":{"ai_embedding":[[{"node":"Pinecone Vector Store","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Pinecone Vector Store","type":"ai_document","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"Loop Over Items":{"main":[[{"node":"Extract main content","type":"main","index":0}],[{"node":"Get pages listed in the sitemap","type":"main","index":0}]]},"Get sitemap":{"main":[[{"node":"Turn XML sitemap into JSON","type":"main","index":0}]]},"Turn XML sitemap into JSON":{"main":[[{"node":"Turn the URL array into multiple items","type":"main","index":0}]]},"Turn the URL array into multiple items":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Wait 5 seconds":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Get pages listed in the sitemap":{"main":[[{"node":"Wait 5 seconds","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"Question and Answer Chain","type":"main","index":0}]]},"OpenAI Model":{"ai_languageModel":[[{"node":"Question and Answer Chain","type":"ai_languageModel","index":0}]]},"Vector Store Retriever":{"ai_retriever":[[{"node":"Question and Answer Chain","type":"ai_retriever","index":0}]]},"Embeddings OpenAI2":{"ai_embedding":[[{"node":"Pinecone Vector Store2","type":"ai_embedding","index":0}]]},"Aggregate":{"main":[[{"node":"Pinecone Vector Store","type":"main","index":0}]]},"Pinecone Vector Store2":{"ai_vectorStore":[[{"node":"Vector Store Retriever","type":"ai_vectorStore","index":0}]]},"Start the workflow by clicking \"Execute workflow\"":{"main":[[{"node":"Get sitemap","type":"main","index":0}]]},"Extract main content":{"main":[[{"node":"Aggregate","type":"main","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/populate_a_pinecone_vector_database_from_a_website.json"}]

troubleshooting_info:
  [{"issue":"Node parameters","solution":"- **Mode**: The format the data should be converted from and to.\n\t- **JSON to XML**: Converts data from JSON to XML.\n    - **XML to JSON**: Converts data from XML to JSON.\n- **Property Name**: Enter the name of the property which contains the data to convert."},{"issue":"Node options","solution":"These options are available regardless of the **Mode** you select:"},{"issue":"JSON to XML options","solution":"These options only appear if you select **JSON to XML** as the **Mode**:"},{"issue":"XML to JSON options","solution":"These options only appear if you select **XML to JSON** as the **Mode**:"}]

node_connections:
  [{"fromNode":"Embeddings OpenAI","toNode":"Pinecone Vector Store","connectionType":"ai_embedding"},{"fromNode":"Default Data Loader","toNode":"Pinecone Vector Store","connectionType":"ai_document"},{"fromNode":"Recursive Character Text Splitter","toNode":"Default Data Loader","connectionType":"ai_textSplitter"},{"fromNode":"Loop Over Items","toNode":"Extract main content","connectionType":"main"},{"fromNode":"Loop Over Items","toNode":"Get pages listed in the sitemap","connectionType":"main"},{"fromNode":"Get sitemap","toNode":"Turn XML sitemap into JSON","connectionType":"main"},{"fromNode":"Turn XML sitemap into JSON","toNode":"Turn the URL array into multiple items","connectionType":"main"},{"fromNode":"Turn the URL array into multiple items","toNode":"Loop Over Items","connectionType":"main"},{"fromNode":"Wait 5 seconds","toNode":"Loop Over Items","connectionType":"main"},{"fromNode":"Get pages listed in the sitemap","toNode":"Wait 5 seconds","connectionType":"main"},{"fromNode":"Chat Trigger","toNode":"Question and Answer Chain","connectionType":"main"},{"fromNode":"OpenAI Model","toNode":"Question and Answer Chain","connectionType":"ai_languageModel"},{"fromNode":"Vector Store Retriever","toNode":"Question and Answer Chain","connectionType":"ai_retriever"},{"fromNode":"Embeddings OpenAI2","toNode":"Pinecone Vector Store2","connectionType":"ai_embedding"},{"fromNode":"Aggregate","toNode":"Pinecone Vector Store","connectionType":"main"},{"fromNode":"Pinecone Vector Store2","toNode":"Vector Store Retriever","connectionType":"ai_vectorStore"},{"fromNode":"Start the workflow by clicking \"Execute workflow\"","toNode":"Get sitemap","connectionType":"main"},{"fromNode":"Extract main content","toNode":"Aggregate","connectionType":"main"}]

example_workflow:
  {"name":"XML Example Workflow","nodes":[{"parameters":{"mode":"jsonToxml","dataPropertyName":"Example Name","options":{}},"id":"5j7jtki20zj4poc6obwn46","name":"XML","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Mode","name":"mode","type":"options","default":"xmlToJson","description":"Converts data from JSON to XML","options":[{"name":"JSON to XML","value":"jsonToxml","description":"Converts data from JSON to XML"},{"name":"XML to JSON","value":"xmlToJson","description":"Converts data from XML to JSON"}]},{"displayName":"Property Name","name":"dataPropertyName","type":"string","default":"data","required":true,"description":"Name of the property to which to contains the converted XML data"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Whether to allow using characters from the Unicode surrogate blocks","placeholder":"Add Option"},{"displayName":"Property Name","name":"dataPropertyName","type":"string","default":"data","required":true,"description":"Name of the property which contains the XML data to convert"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Prefix that is used to access the attributes","placeholder":"Add Option"}]


node_type: n8n-nodes-base.Zulip
name: Zulip
display_name: Zulip
description: Consume Zulip API
category: output
icon: file:zulip.svg
code_hash: 1b814052a8925706b11e31e9ba04beb7adf7197e26060dedcbad6187f2c9159b
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Zulip
documentation_title: Zulip node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"zulip","description":"Templates for zulip"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"message","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Zulip = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const MessageDescription_1 = require("./MessageDescription");
  const change_case_1 = require("change-case");
  const StreamDescription_1 = require("./StreamDescription");
  const UserDescription_1 = require("./UserDescription");
  class Zulip {
      constructor() {
          this.description = {
              displayName: 'Zulip',
              name: 'zulip',
              icon: 'file:zulip.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Zulip API',
              defaults: {
                  name: 'Zulip',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'zulipApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Message',
                              value: 'message',
                          },
                          {
                              name: 'Stream',
                              value: 'stream',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'message',
                  },
                  ...MessageDescription_1.messageOperations,
                  ...MessageDescription_1.messageFields,
                  ...StreamDescription_1.streamOperations,
                  ...StreamDescription_1.streamFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getStreams() {
                      const returnData = [];
                      const { streams } = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', '/streams');
                      for (const stream of streams) {
                          const streamName = stream.name;
                          const streamId = stream.stream_id;
                          returnData.push({
                              name: streamName,
                              value: streamId,
                          });
                      }
                      return returnData;
                  },
                  async getTopics() {
                      const streamId = this.getCurrentNodeParameter('stream');
                      const returnData = [];
                      const { topics } = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', `/users/me/${streamId}/topics`);
                      for (const topic of topics) {
                          const topicName = topic.name;
                          const topicId = topic.name;
                          returnData.push({
                              name: topicName,
                              value: topicId,
                          });
                      }
                      return returnData;
                  },
                  async getUsers() {
                      const returnData = [];
                      const { members } = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', '/users');
                      for (const member of members) {
                          const memberName = member.full_name;
                          const memberId = member.email;
                          returnData.push({
                              name: memberName,
                              value: memberId,
                          });
                      }
                      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 === 'message') {
                      if (operation === 'sendPrivate') {
                          const to = this.getNodeParameter('to', i).join(',');
                          const content = this.getNodeParameter('content', i);
                          const body = {
                              type: 'private',
                              to,
                              content,
                          };
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'POST', '/messages', body);
                      }
                      if (operation === 'sendStream') {
                          const stream = this.getNodeParameter('stream', i);
                          const topic = this.getNodeParameter('topic', i);
                          const content = this.getNodeParameter('content', i);
                          const body = {
                              type: 'stream',
                              to: stream,
                              topic,
                              content,
                          };
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'POST', '/messages', body);
                      }
                      if (operation === 'update') {
                          const messageId = this.getNodeParameter('messageId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.content) {
                              body.content = updateFields.content;
                          }
                          if (updateFields.propagateMode) {
                              body.propagat_mode = (0, change_case_1.snakeCase)(updateFields.propagateMode);
                          }
                          if (updateFields.topic) {
                              body.topic = updateFields.topic;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'PATCH', `/messages/${messageId}`, body);
                      }
                      if (operation === 'get') {
                          const messageId = this.getNodeParameter('messageId', i);
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', `/messages/${messageId}`);
                      }
                      if (operation === 'delete') {
                          const messageId = this.getNodeParameter('messageId', i);
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'DELETE', `/messages/${messageId}`);
                      }
                      if (operation === 'updateFile') {
                          const credentials = await this.getCredentials('zulipApi');
                          const dataBinaryProperty = this.getNodeParameter('dataBinaryProperty', i);
                          const binaryData = this.helpers.assertBinaryData(i, dataBinaryProperty);
                          const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, dataBinaryProperty);
                          const formData = {
                              file: {
                                  value: binaryDataBuffer,
                                  options: {
                                      filename: binaryData.fileName,
                                      contentType: binaryData.mimeType,
                                  },
                              },
                          };
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'POST', '/user_uploads', {}, {}, undefined, { formData });
                          responseData.uri = `${credentials.url}${responseData.uri}`;
                      }
                  }
                  if (resource === 'stream') {
                      const body = {};
                      if (operation === 'getAll') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.includePublic) {
                              body.include_public = additionalFields.includePublic;
                          }
                          if (additionalFields.includeSubscribed) {
                              body.include_subscribed = additionalFields.includeSubscribed;
                          }
                          if (additionalFields.includeAllActive) {
                              body.include_all_active = additionalFields.includeAllActive;
                          }
                          if (additionalFields.includeDefault) {
                              body.include_default = additionalFields.includeDefault;
                          }
                          if (additionalFields.includeOwnersubscribed) {
                              body.include_owner_subscribed = additionalFields.includeOwnersubscribed;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', '/streams', body);
                          responseData = responseData.streams;
                      }
                      if (operation === 'getSubscribed') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.includeSubscribers) {
                              body.include_subscribers = additionalFields.includeSubscribers;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', '/users/me/subscriptions', body);
                          responseData = responseData.subscriptions;
                      }
                      if (operation === 'create') {
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const subscriptions = this.getNodeParameter('subscriptions', i);
                          body.subscriptions = JSON.stringify(subscriptions.properties);
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              body.subscriptions = JSON.stringify(subscriptions.properties);
                              if (additionalFields.inviteOnly) {
                                  body.invite_only = additionalFields.inviteOnly;
                              }
                              if (additionalFields.principals) {
                                  const principals = [];
                                  additionalFields.principals.properties.map((principal) => {
                                      principals.push(principal.email);
                                  });
                                  body.principals = JSON.stringify(principals);
                              }
                              if (additionalFields.authorizationErrorsFatal) {
                                  body.authorization_errors_fatal =
                                      additionalFields.authorizationErrorsFatal;
                              }
                              if (additionalFields.historyPublicToSubscribers) {
                                  body.history_public_to_subscribers =
                                      additionalFields.historyPublicToSubscribers;
                              }
                              if (additionalFields.streamPostPolicy) {
                                  body.stream_post_policy = additionalFields.streamPostPolicy;
                              }
                              if (additionalFields.announce) {
                                  body.announce = additionalFields.announce;
                              }
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'POST', '/users/me/subscriptions', body);
                      }
                      if (operation === 'delete') {
                          const streamId = this.getNodeParameter('streamId', i);
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'DELETE', `/streams/${streamId}`, {});
                      }
                      if (operation === 'update') {
                          const streamId = this.getNodeParameter('streamId', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              if (additionalFields.description) {
                                  body.description = JSON.stringify(additionalFields.description);
                              }
                              if (additionalFields.newName) {
                                  body.new_name = JSON.stringify(additionalFields.newName);
                              }
                              if (additionalFields.isPrivate) {
                                  body.is_private = additionalFields.isPrivate;
                              }
                              if (additionalFields.isAnnouncementOnly) {
                                  body.is_announcement_only = additionalFields.isAnnouncementOnly;
                              }
                              if (additionalFields.streamPostPolicy) {
                                  body.stream_post_policy = additionalFields.streamPostPolicy;
                              }
                              if (additionalFields.historyPublicToSubscribers) {
                                  body.history_public_to_subscribers =
                                      additionalFields.historyPublicToSubscribers;
                              }
                              responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'PATCH', `/streams/${streamId}`, body);
                          }
                      }
                  }
                  if (resource === 'user') {
                      const body = {};
                      if (operation === 'get') {
                          const userId = this.getNodeParameter('userId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.clientGravatar) {
                              body.client_gravatar = additionalFields.client_gravatar;
                          }
                          if (additionalFields.includeCustomProfileFields) {
                              body.include_custom_profile_fields =
                                  additionalFields.includeCustomProfileFields;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', `/users/${userId}`, body);
                      }
                      if (operation === 'getAll') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.clientGravatar) {
                              body.client_gravatar = additionalFields.client_gravatar;
                          }
                          if (additionalFields.includeCustomProfileFields) {
                              body.include_custom_profile_fields =
                                  additionalFields.includeCustomProfileFields;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'GET', '/users', body);
                          responseData = responseData.members;
                      }
                      if (operation === 'create') {
                          body.email = this.getNodeParameter('email', i);
                          body.password = this.getNodeParameter('password', i);
                          body.full_name = this.getNodeParameter('fullName', i);
                          body.short_name = this.getNodeParameter('shortName', i);
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'POST', '/users', body);
                      }
                      if (operation === 'update') {
                          const userId = this.getNodeParameter('userId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.fullName) {
                              body.full_name = JSON.stringify(additionalFields.fullName);
                          }
                          if (additionalFields.isAdmin) {
                              body.is_admin = additionalFields.isAdmin;
                          }
                          if (additionalFields.isGuest) {
                              body.is_guest = additionalFields.isGuest;
                          }
                          if (additionalFields.role) {
                              body.role = additionalFields.role;
                          }
                          if (additionalFields.profileData) {
                              body.profile_data = additionalFields.profileData.properties;
                          }
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'PATCH', `/users/${userId}`, body);
                      }
                      if (operation === 'deactivate') {
                          const userId = this.getNodeParameter('userId', i);
                          responseData = await GenericFunctions_1.zulipApiRequest.call(this, 'DELETE', `/users/${userId}`, body);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Zulip = Zulip;
  //# sourceMappingURL=Zulip.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZulipApi = void 0;
  class ZulipApi {
      constructor() {
          this.name = 'zulipApi';
          this.displayName = 'Zulip API';
          this.documentationUrl = 'zulip';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://yourZulipDomain.zulipchat.com',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.ZulipApi = ZulipApi;
  //# sourceMappingURL=ZulipApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZulipApi = void 0;
  class ZulipApi {
      constructor() {
          this.name = 'zulipApi';
          this.displayName = 'Zulip API';
          this.documentationUrl = 'zulip';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://yourZulipDomain.zulipchat.com',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.ZulipApi = ZulipApi;
  //# sourceMappingURL=ZulipApi.credentials.js.map

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

  # Zulip node

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

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

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

  ## Operations

  * Message
      * Delete a message
      * Get a message
      * Send a private message
      * Send a message to stream
      * Update a message
      * Upload a file
  * Stream
      * Create a stream.
      * Delete a stream.
      * Get all streams.
      * Get subscribed streams.
      * Update a stream.
  * User
      * Create a user.
      * Deactivate a user.
      * Get a user.
      * Get all users.
      * Update a user.

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"message","options":[{"name":"Message","value":"message"},{"name":"Stream","value":"stream"},{"name":"User","value":"user"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MessageDescription_1.messageOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MessageDescription_1.messageFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StreamDescription_1.streamOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StreamDescription_1.streamFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"}]


node_type: n8n-nodes-base.Xero
name: Xero
display_name: Xero
description: Consume Xero API
category: output
icon: file:xero.svg
code_hash: aba95b820352106355fa38f55f10b5075b9568611f3b9bb24eb9473d6bbe146b
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Xero
documentation_title: Xero node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"xero","description":"Templates for xero"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"contact","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Xero = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const InvoiceDescription_1 = require("./InvoiceDescription");
  const ContactDescription_1 = require("./ContactDescription");
  class Xero {
      constructor() {
          this.description = {
              displayName: 'Xero',
              name: 'xero',
              icon: 'file:xero.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Xero API',
              defaults: {
                  name: 'Xero',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'xeroOAuth2Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Invoice',
                              value: 'invoice',
                          },
                      ],
                      default: 'invoice',
                  },
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...InvoiceDescription_1.invoiceOperations,
                  ...InvoiceDescription_1.invoiceFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getItemCodes() {
                      const organizationId = this.getCurrentNodeParameter('organizationId');
                      const returnData = [];
                      const { Items: items } = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/items', {
                          organizationId,
                      });
                      for (const item of items) {
                          const itemName = item.Description;
                          const itemId = item.Code;
                          returnData.push({
                              name: itemName,
                              value: itemId,
                          });
                      }
                      return returnData;
                  },
                  async getAccountCodes() {
                      const organizationId = this.getCurrentNodeParameter('organizationId');
                      const returnData = [];
                      const { Accounts: accounts } = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/Accounts', {
                          organizationId,
                      });
                      for (const account of accounts) {
                          const accountName = account.Name;
                          const accountId = account.Code;
                          returnData.push({
                              name: accountName,
                              value: accountId,
                          });
                      }
                      return returnData;
                  },
                  async getTenants() {
                      const returnData = [];
                      const tenants = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '', {}, {}, 'https://api.xero.com/connections');
                      for (const tenant of tenants) {
                          const tenantName = tenant.tenantName;
                          const tenantId = tenant.tenantId;
                          returnData.push({
                              name: tenantName,
                              value: tenantId,
                          });
                      }
                      return returnData;
                  },
                  async getBrandingThemes() {
                      const organizationId = this.getCurrentNodeParameter('organizationId');
                      const returnData = [];
                      const { BrandingThemes: themes } = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/BrandingThemes', { organizationId });
                      for (const theme of themes) {
                          const themeName = theme.Name;
                          const themeId = theme.BrandingThemeID;
                          returnData.push({
                              name: themeName,
                              value: themeId,
                          });
                      }
                      return returnData;
                  },
                  async getCurrencies() {
                      const organizationId = this.getCurrentNodeParameter('organizationId');
                      const returnData = [];
                      const { Currencies: currencies } = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/Currencies', {
                          organizationId,
                      });
                      for (const currency of currencies) {
                          const currencyName = currency.Code;
                          const currencyId = currency.Description;
                          returnData.push({
                              name: currencyName,
                              value: currencyId,
                          });
                      }
                      return returnData;
                  },
                  async getTrakingCategories() {
                      const organizationId = this.getCurrentNodeParameter('organizationId');
                      const returnData = [];
                      const { TrackingCategories: categories } = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/TrackingCategories', { organizationId });
                      for (const category of categories) {
                          const categoryName = category.Name;
                          const categoryId = category.TrackingCategoryID;
                          returnData.push({
                              name: categoryName,
                              value: categoryId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  if (resource === 'invoice') {
                      if (operation === 'create') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const type = this.getNodeParameter('type', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          const lineItemsValues = this.getNodeParameter('lineItemsUi', i)
                              .lineItemsValues;
                          const body = {
                              organizationId,
                              Type: type,
                              Contact: { ContactID: contactId },
                          };
                          if (lineItemsValues) {
                              const lineItems = [];
                              for (const lineItemValue of lineItemsValues) {
                                  const lineItem = {
                                      Tracking: [],
                                  };
                                  lineItem.AccountCode = lineItemValue.accountCode;
                                  lineItem.Description = lineItemValue.description;
                                  lineItem.DiscountRate = lineItemValue.discountRate;
                                  lineItem.ItemCode = lineItemValue.itemCode;
                                  lineItem.LineAmount = lineItemValue.lineAmount;
                                  lineItem.Quantity = lineItemValue.quantity.toString();
                                  lineItem.TaxAmount = lineItemValue.taxAmount;
                                  lineItem.TaxType = lineItemValue.taxType;
                                  lineItem.UnitAmount = lineItemValue.unitAmount;
                                  lineItems.push(lineItem);
                              }
                              body.LineItems = lineItems;
                          }
                          if (additionalFields.brandingThemeId) {
                              body.BrandingThemeID = additionalFields.brandingThemeId;
                          }
                          if (additionalFields.currency) {
                              body.CurrencyCode = additionalFields.currency;
                          }
                          if (additionalFields.currencyRate) {
                              body.CurrencyRate = additionalFields.currencyRate;
                          }
                          if (additionalFields.date) {
                              body.Date = additionalFields.date;
                          }
                          if (additionalFields.dueDate) {
                              body.DueDate = additionalFields.dueDate;
                          }
                          if (additionalFields.dueDate) {
                              body.DueDate = additionalFields.dueDate;
                          }
                          if (additionalFields.expectedPaymentDate) {
                              body.ExpectedPaymentDate = additionalFields.expectedPaymentDate;
                          }
                          if (additionalFields.invoiceNumber) {
                              body.InvoiceNumber = additionalFields.invoiceNumber;
                          }
                          if (additionalFields.lineAmountType) {
                              body.LineAmountTypes = additionalFields.lineAmountType;
                          }
                          if (additionalFields.plannedPaymentDate) {
                              body.PlannedPaymentDate = additionalFields.plannedPaymentDate;
                          }
                          if (additionalFields.reference) {
                              body.Reference = additionalFields.reference;
                          }
                          if (additionalFields.sendToContact) {
                              body.SentToContact = additionalFields.sendToContact;
                          }
                          if (additionalFields.status) {
                              body.Status = additionalFields.status;
                          }
                          if (additionalFields.url) {
                              body.Url = additionalFields.url;
                          }
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'POST', '/Invoices', body);
                          responseData = responseData.Invoices;
                      }
                      if (operation === 'update') {
                          const invoiceId = this.getNodeParameter('invoiceId', i);
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {
                              organizationId,
                          };
                          if (updateFields.lineItemsUi) {
                              const lineItemsValues = updateFields.lineItemsUi
                                  .lineItemsValues;
                              if (lineItemsValues) {
                                  const lineItems = [];
                                  for (const lineItemValue of lineItemsValues) {
                                      const lineItem = {
                                          Tracking: [],
                                      };
                                      lineItem.AccountCode = lineItemValue.accountCode;
                                      lineItem.Description = lineItemValue.description;
                                      lineItem.DiscountRate = lineItemValue.discountRate;
                                      lineItem.ItemCode = lineItemValue.itemCode;
                                      lineItem.LineAmount = lineItemValue.lineAmount;
                                      lineItem.Quantity = lineItemValue.quantity.toString();
                                      lineItem.TaxAmount = lineItemValue.taxAmount;
                                      lineItem.TaxType = lineItemValue.taxType;
                                      lineItem.UnitAmount = lineItemValue.unitAmount;
                                      lineItems.push(lineItem);
                                  }
                                  body.LineItems = lineItems;
                              }
                          }
                          if (updateFields.type) {
                              body.Type = updateFields.type;
                          }
                          if (updateFields.Contact) {
                              body.Contact = { ContactID: updateFields.contactId };
                          }
                          if (updateFields.brandingThemeId) {
                              body.BrandingThemeID = updateFields.brandingThemeId;
                          }
                          if (updateFields.currency) {
                              body.CurrencyCode = updateFields.currency;
                          }
                          if (updateFields.currencyRate) {
                              body.CurrencyRate = updateFields.currencyRate;
                          }
                          if (updateFields.date) {
                              body.Date = updateFields.date;
                          }
                          if (updateFields.dueDate) {
                              body.DueDate = updateFields.dueDate;
                          }
                          if (updateFields.dueDate) {
                              body.DueDate = updateFields.dueDate;
                          }
                          if (updateFields.expectedPaymentDate) {
                              body.ExpectedPaymentDate = updateFields.expectedPaymentDate;
                          }
                          if (updateFields.invoiceNumber) {
                              body.InvoiceNumber = updateFields.invoiceNumber;
                          }
                          if (updateFields.lineAmountType) {
                              body.LineAmountTypes = updateFields.lineAmountType;
                          }
                          if (updateFields.plannedPaymentDate) {
                              body.PlannedPaymentDate = updateFields.plannedPaymentDate;
                          }
                          if (updateFields.reference) {
                              body.Reference = updateFields.reference;
                          }
                          if (updateFields.sendToContact) {
                              body.SentToContact = updateFields.sendToContact;
                          }
                          if (updateFields.status) {
                              body.Status = updateFields.status;
                          }
                          if (updateFields.url) {
                              body.Url = updateFields.url;
                          }
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'POST', `/Invoices/${invoiceId}`, body);
                          responseData = responseData.Invoices;
                      }
                      if (operation === 'get') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const invoiceId = this.getNodeParameter('invoiceId', i);
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', `/Invoices/${invoiceId}`, {
                              organizationId,
                          });
                          responseData = responseData.Invoices;
                      }
                      if (operation === 'getAll') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.statuses) {
                              qs.statuses = options.statuses.join(',');
                          }
                          if (options.orderBy) {
                              qs.order = `${options.orderBy} ${options.sortOrder === undefined ? 'DESC' : options.sortOrder}`;
                          }
                          if (options.where) {
                              qs.where = options.where;
                          }
                          if (options.createdByMyApp) {
                              qs.createdByMyApp = options.createdByMyApp;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.xeroApiRequestAllItems.call(this, 'Invoices', 'GET', '/Invoices', { organizationId }, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/Invoices', { organizationId }, qs);
                              responseData = responseData.Invoices;
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'contact') {
                      if (operation === 'create') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const addressesUi = additionalFields.addressesUi;
                          const phonesUi = additionalFields.phonesUi;
                          const body = {
                              Name: name,
                          };
                          if (additionalFields.accountNumber) {
                              body.AccountNumber = additionalFields.accountNumber;
                          }
                          if (additionalFields.bankAccountDetails) {
                              body.BankAccountDetails = additionalFields.bankAccountDetails;
                          }
                          if (additionalFields.contactNumber) {
                              body.ContactNumber = additionalFields.contactNumber;
                          }
                          if (additionalFields.contactStatus) {
                              body.ContactStatus = additionalFields.contactStatus;
                          }
                          if (additionalFields.defaultCurrency) {
                              body.DefaultCurrency = additionalFields.defaultCurrency;
                          }
                          if (additionalFields.emailAddress) {
                              body.EmailAddress = additionalFields.emailAddress;
                          }
                          if (additionalFields.firstName) {
                              body.FirstName = additionalFields.firstName;
                          }
                          if (additionalFields.lastName) {
                              body.LastName = additionalFields.lastName;
                          }
                          if (additionalFields.purchasesDefaultAccountCode) {
                              body.PurchasesDefaultAccountCode =
                                  additionalFields.purchasesDefaultAccountCode;
                          }
                          if (additionalFields.salesDefaultAccountCode) {
                              body.SalesDefaultAccountCode = additionalFields.salesDefaultAccountCode;
                          }
                          if (additionalFields.skypeUserName) {
                              body.SkypeUserName = additionalFields.skypeUserName;
                          }
                          if (additionalFields.taxNumber) {
                              body.taxNumber = additionalFields.taxNumber;
                          }
                          if (additionalFields.xeroNetworkKey) {
                              body.xeroNetworkKey = additionalFields.xeroNetworkKey;
                          }
                          if (phonesUi) {
                              const phoneValues = phonesUi === null || phonesUi === void 0 ? void 0 : phonesUi.phonesValues;
                              if (phoneValues) {
                                  const phones = [];
                                  for (const phoneValue of phoneValues) {
                                      const phone = {};
                                      phone.PhoneType = phoneValue.phoneType;
                                      phone.PhoneNumber = phoneValue.phoneNumber;
                                      phone.PhoneAreaCode = phoneValue.phoneAreaCode;
                                      phone.PhoneCountryCode = phoneValue.phoneCountryCode;
                                      phones.push(phone);
                                  }
                                  body.Phones = phones;
                              }
                          }
                          if (addressesUi) {
                              const addressValues = addressesUi === null || addressesUi === void 0 ? void 0 : addressesUi.addressesValues;
                              if (addressValues) {
                                  const addresses = [];
                                  for (const addressValue of addressValues) {
                                      const address = {};
                                      address.AddressType = addressValue.type;
                                      address.AddressLine1 = addressValue.line1;
                                      address.AddressLine2 = addressValue.line2;
                                      address.City = addressValue.city;
                                      address.Region = addressValue.region;
                                      address.PostalCode = addressValue.postalCode;
                                      address.Country = addressValue.country;
                                      address.AttentionTo = addressValue.attentionTo;
                                      addresses.push(address);
                                  }
                                  body.Addresses = addresses;
                              }
                          }
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'POST', '/Contacts', {
                              organizationId,
                              Contacts: [body],
                          });
                          responseData = responseData.Contacts;
                      }
                      if (operation === 'get') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', `/Contacts/${contactId}`, {
                              organizationId,
                          });
                          responseData = responseData.Contacts;
                      }
                      if (operation === 'getAll') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.includeArchived) {
                              qs.includeArchived = options.includeArchived;
                          }
                          if (options.orderBy) {
                              qs.order = `${options.orderBy} ${options.sortOrder === undefined ? 'DESC' : options.sortOrder}`;
                          }
                          if (options.where) {
                              qs.where = options.where;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.xeroApiRequestAllItems.call(this, 'Contacts', 'GET', '/Contacts', { organizationId }, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'GET', '/Contacts', { organizationId }, qs);
                              responseData = responseData.Contacts;
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const addressesUi = updateFields.addressesUi;
                          const phonesUi = updateFields.phonesUi;
                          const body = {};
                          if (updateFields.accountNumber) {
                              body.AccountNumber = updateFields.accountNumber;
                          }
                          if (updateFields.name) {
                              body.Name = updateFields.name;
                          }
                          if (updateFields.bankAccountDetails) {
                              body.BankAccountDetails = updateFields.bankAccountDetails;
                          }
                          if (updateFields.contactNumber) {
                              body.ContactNumber = updateFields.contactNumber;
                          }
                          if (updateFields.contactStatus) {
                              body.ContactStatus = updateFields.contactStatus;
                          }
                          if (updateFields.defaultCurrency) {
                              body.DefaultCurrency = updateFields.defaultCurrency;
                          }
                          if (updateFields.emailAddress) {
                              body.EmailAddress = updateFields.emailAddress;
                          }
                          if (updateFields.firstName) {
                              body.FirstName = updateFields.firstName;
                          }
                          if (updateFields.lastName) {
                              body.LastName = updateFields.lastName;
                          }
                          if (updateFields.purchasesDefaultAccountCode) {
                              body.PurchasesDefaultAccountCode = updateFields.purchasesDefaultAccountCode;
                          }
                          if (updateFields.salesDefaultAccountCode) {
                              body.SalesDefaultAccountCode = updateFields.salesDefaultAccountCode;
                          }
                          if (updateFields.skypeUserName) {
                              body.SkypeUserName = updateFields.skypeUserName;
                          }
                          if (updateFields.taxNumber) {
                              body.taxNumber = updateFields.taxNumber;
                          }
                          if (updateFields.xeroNetworkKey) {
                              body.xeroNetworkKey = updateFields.xeroNetworkKey;
                          }
                          if (phonesUi) {
                              const phoneValues = phonesUi === null || phonesUi === void 0 ? void 0 : phonesUi.phonesValues;
                              if (phoneValues) {
                                  const phones = [];
                                  for (const phoneValue of phoneValues) {
                                      const phone = {};
                                      phone.PhoneType = phoneValue.phoneType;
                                      phone.PhoneNumber = phoneValue.phoneNumber;
                                      phone.PhoneAreaCode = phoneValue.phoneAreaCode;
                                      phone.PhoneCountryCode = phoneValue.phoneCountryCode;
                                      phones.push(phone);
                                  }
                                  body.Phones = phones;
                              }
                          }
                          if (addressesUi) {
                              const addressValues = addressesUi === null || addressesUi === void 0 ? void 0 : addressesUi.addressesValues;
                              if (addressValues) {
                                  const addresses = [];
                                  for (const addressValue of addressValues) {
                                      const address = {};
                                      address.AddressType = addressValue.type;
                                      address.AddressLine1 = addressValue.line1;
                                      address.AddressLine2 = addressValue.line2;
                                      address.City = addressValue.city;
                                      address.Region = addressValue.region;
                                      address.PostalCode = addressValue.postalCode;
                                      address.Country = addressValue.country;
                                      address.AttentionTo = addressValue.attentionTo;
                                      addresses.push(address);
                                  }
                                  body.Addresses = addresses;
                              }
                          }
                          responseData = await GenericFunctions_1.xeroApiRequest.call(this, 'POST', `/Contacts/${contactId}`, {
                              organizationId,
                              Contacts: [body],
                          });
                          responseData = responseData.Contacts;
                      }
                  }
                  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.Xero = Xero;
  //# sourceMappingURL=Xero.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.XeroOAuth2Api = void 0;
  const scopes = [
      'offline_access',
      'accounting.transactions',
      'accounting.settings',
      'accounting.contacts',
  ];
  class XeroOAuth2Api {
      constructor() {
          this.name = 'xeroOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Xero OAuth2 API';
          this.documentationUrl = 'xero';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://login.xero.com/identity/connect/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://identity.xero.com/connect/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.XeroOAuth2Api = XeroOAuth2Api;
  //# sourceMappingURL=XeroOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.XeroOAuth2Api = void 0;
  const scopes = [
      'offline_access',
      'accounting.transactions',
      'accounting.settings',
      'accounting.contacts',
  ];
  class XeroOAuth2Api {
      constructor() {
          this.name = 'xeroOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Xero OAuth2 API';
          this.documentationUrl = 'xero';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://login.xero.com/identity/connect/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://identity.xero.com/connect/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.XeroOAuth2Api = XeroOAuth2Api;
  //# sourceMappingURL=XeroOAuth2Api.credentials.js.map

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

  # Xero node

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

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

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

  ## Operations

  * Contact
      * Create a contact
      * Get a contact
      * Get all contacts
      * Update a contact
  * Invoice
      * Create a invoice
      * Get a invoice
      * Get all invoices
      * Update a invoice

  ## Templates and examples

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

  ## Related resources

  Refer to [Xero's API documentation](https://developer.xero.com/documentation/api/accounting/overview){:target=_blank .external-link} for more information about the service.

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

related_resources:
  [{"title":"Xero's API documentation","url":"https://developer.xero.com/documentation/api/accounting/overview","type":"external"}]

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"invoice","options":[{"name":"Contact","value":"contact"},{"name":"Invoice","value":"invoice"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...InvoiceDescription_1.invoiceOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...InvoiceDescription_1.invoiceFields"}]


node_type: n8n-nodes-base.Yourls
name: Yourls
display_name: Yourls
description: Consume Yourls API
category: input
icon: file:yourls.png
code_hash: f151d26502f0f4c7287ac076071905adcc0d2dded190cf040d5bebe6d06a2cf9
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Yourls
documentation_title: Yourls node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"yourls","description":"Templates for yourls"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"url","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Yourls = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const UrlDescription_1 = require("./UrlDescription");
  class Yourls {
      constructor() {
          this.description = {
              displayName: 'Yourls',
              name: 'yourls',
              icon: 'file:yourls.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Yourls API',
              defaults: {
                  name: 'Yourls',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'yourlsApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'URL',
                              value: 'url',
                          },
                      ],
                      default: 'url',
                  },
                  ...UrlDescription_1.urlOperations,
                  ...UrlDescription_1.urlFields,
              ],
          };
      }
      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 === 'url') {
                      if (operation === 'shorten') {
                          const url = this.getNodeParameter('url', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.url = url;
                          qs.action = 'shorturl';
                          Object.assign(qs, additionalFields);
                          responseData = await GenericFunctions_1.yourlsApiRequest.call(this, 'GET', {}, qs);
                      }
                      if (operation === 'expand') {
                          const shortUrl = this.getNodeParameter('shortUrl', i);
                          qs.shorturl = shortUrl;
                          qs.action = 'expand';
                          responseData = await GenericFunctions_1.yourlsApiRequest.call(this, 'GET', {}, qs);
                      }
                      if (operation === 'stats') {
                          const shortUrl = this.getNodeParameter('shortUrl', i);
                          qs.shorturl = shortUrl;
                          qs.action = 'url-stats';
                          responseData = await GenericFunctions_1.yourlsApiRequest.call(this, 'GET', {}, qs);
                          responseData = responseData.link;
                      }
                  }
                  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.Yourls = Yourls;
  //# sourceMappingURL=Yourls.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.YourlsApi = void 0;
  class YourlsApi {
      constructor() {
          this.name = 'yourlsApi';
          this.displayName = 'Yourls API';
          this.documentationUrl = 'yourls';
          this.properties = [
              {
                  displayName: 'Signature',
                  name: 'signature',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'http://localhost:8080',
              },
          ];
      }
  }
  exports.YourlsApi = YourlsApi;
  //# sourceMappingURL=YourlsApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.YourlsApi = void 0;
  class YourlsApi {
      constructor() {
          this.name = 'yourlsApi';
          this.displayName = 'Yourls API';
          this.documentationUrl = 'yourls';
          this.properties = [
              {
                  displayName: 'Signature',
                  name: 'signature',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'http://localhost:8080',
              },
          ];
      }
  }
  exports.YourlsApi = YourlsApi;
  //# sourceMappingURL=YourlsApi.credentials.js.map

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

  # Yourls node

  Use the Yourls node to automate work in Yourls, and integrate Yourls with other applications. n8n has built-in support for a wide range of Yourls features, including expanding and shortening URLs. 

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

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

  ## Operations

  * URL
      * Expand a URL
      * Shorten a URL
      * Get stats about one short URL

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"url","options":[{"name":"URL","value":"url"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UrlDescription_1.urlOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UrlDescription_1.urlFields"}]


node_type: n8n-nodes-base.Zendesk
name: Zendesk
display_name: Zendesk
description: Consume Zendesk API
category: output
icon: file:zendesk.svg
code_hash: 88e68de64c851f4c26efadf449ffbca89eabfb9b4ccda678908be23fbabe14b8
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Zendesk
documentation_title: Zendesk node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"zendesk","description":"Templates for zendesk"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"apiToken","resource":"ticket","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Zendesk = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const TicketDescription_1 = require("./TicketDescription");
  const TicketFieldDescription_1 = require("./TicketFieldDescription");
  const UserDescription_1 = require("./UserDescription");
  const OrganizationDescription_1 = require("./OrganizationDescription");
  class Zendesk {
      constructor() {
          this.description = {
              displayName: 'Zendesk',
              name: 'zendesk',
              icon: 'file:zendesk.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Zendesk API',
              defaults: {
                  name: 'Zendesk',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'zendeskApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['apiToken'],
                          },
                      },
                  },
                  {
                      name: 'zendeskOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'API Token',
                              value: 'apiToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'apiToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Ticket',
                              value: 'ticket',
                              description: 'Tickets are the means through which your end users (customers) communicate with agents in Zendesk Support',
                          },
                          {
                              name: 'Ticket Field',
                              value: 'ticketField',
                              description: 'Manage system and custom ticket fields',
                          },
                          {
                              name: 'User',
                              value: 'user',
                              description: 'Manage users',
                          },
                          {
                              name: 'Organization',
                              value: 'organization',
                              description: 'Manage organizations',
                          },
                      ],
                      default: 'ticket',
                  },
                  ...TicketDescription_1.ticketOperations,
                  ...TicketDescription_1.ticketFields,
                  ...TicketFieldDescription_1.ticketFieldOperations,
                  ...TicketFieldDescription_1.ticketFieldFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
                  ...OrganizationDescription_1.organizationOperations,
                  ...OrganizationDescription_1.organizationFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCustomFields() {
                      const returnData = [];
                      const customFields = [
                          'text',
                          'textarea',
                          'date',
                          'integer',
                          'decimal',
                          'regexp',
                          'multiselect',
                          'tagger',
                      ];
                      const fields = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'ticket_fields', 'GET', '/ticket_fields');
                      for (const field of fields) {
                          if (customFields.includes(field.type)) {
                              const fieldName = field.title;
                              const fieldId = field.id;
                              returnData.push({
                                  name: fieldName,
                                  value: fieldId,
                              });
                          }
                      }
                      return returnData;
                  },
                  async getGroups() {
                      const returnData = [];
                      const groups = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'groups', 'GET', '/groups');
                      for (const group of groups) {
                          const groupName = group.name;
                          const groupId = group.id;
                          returnData.push({
                              name: groupName,
                              value: groupId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'tags', 'GET', '/tags');
                      for (const tag of tags) {
                          const tagName = tag.name;
                          const tagId = tag.name;
                          returnData.push({
                              name: tagName,
                              value: tagId,
                          });
                      }
                      return returnData;
                  },
                  async getLocales() {
                      const returnData = [];
                      const locales = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'locales', 'GET', '/locales');
                      for (const locale of locales) {
                          const localeName = `${locale.locale} - ${locale.name}`;
                          const localeId = locale.locale;
                          returnData.push({
                              name: localeName,
                              value: localeId,
                          });
                      }
                      return returnData;
                  },
                  async getUserFields() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'user_fields', 'GET', '/user_fields');
                      for (const field of fields) {
                          const fieldName = field.title;
                          const fieldId = field.key;
                          returnData.push({
                              name: fieldName,
                              value: fieldId,
                          });
                      }
                      return returnData;
                  },
                  async getOrganizationFields() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'organization_fields', 'GET', '/organization_fields');
                      for (const field of fields) {
                          const fieldName = field.title;
                          const fieldId = field.key;
                          returnData.push({
                              name: fieldName,
                              value: fieldId,
                          });
                      }
                      return returnData;
                  },
                  async getOrganizations() {
                      const returnData = [];
                      const fields = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'organizations', 'GET', '/organizations', {}, {});
                      for (const field of fields) {
                          returnData.push({
                              name: field.name,
                              value: field.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  if (resource === 'ticket') {
                      if (operation === 'create') {
                          const description = this.getNodeParameter('description', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const comment = {
                              body: description,
                          };
                          const body = {
                              comment,
                          };
                          if (jsonParameters) {
                              const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                              if (additionalFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(additionalFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const additionalFields = this.getNodeParameter('additionalFields', i);
                              if (additionalFields.type) {
                                  body.type = additionalFields.type;
                              }
                              if (additionalFields.externalId) {
                                  body.external_id = additionalFields.externalId;
                              }
                              if (additionalFields.subject) {
                                  body.subject = additionalFields.subject;
                              }
                              if (additionalFields.status) {
                                  body.status = additionalFields.status;
                              }
                              if (additionalFields.recipient) {
                                  body.recipient = additionalFields.recipient;
                              }
                              if (additionalFields.group) {
                                  body.group_id = additionalFields.group;
                              }
                              if (additionalFields.tags) {
                                  body.tags = additionalFields.tags;
                              }
                              if (additionalFields.customFieldsUi) {
                                  body.custom_fields = additionalFields.customFieldsUi
                                      .customFieldsValues;
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'POST', '/tickets', { ticket: body });
                          responseData = responseData.ticket;
                      }
                      if (operation === 'update') {
                          const ticketId = this.getNodeParameter('id', i);
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          const body = {};
                          if (jsonParameters) {
                              const updateFieldsJson = this.getNodeParameter('updateFieldsJson', i);
                              if (updateFieldsJson !== '') {
                                  if ((0, GenericFunctions_1.validateJSON)(updateFieldsJson) !== undefined) {
                                      Object.assign(body, JSON.parse(updateFieldsJson));
                                  }
                                  else {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                                  }
                              }
                          }
                          else {
                              const updateFields = this.getNodeParameter('updateFields', i);
                              if (updateFields.type) {
                                  body.type = updateFields.type;
                              }
                              if (updateFields.externalId) {
                                  body.external_id = updateFields.externalId;
                              }
                              if (updateFields.subject) {
                                  body.subject = updateFields.subject;
                              }
                              if (updateFields.status) {
                                  body.status = updateFields.status;
                              }
                              if (updateFields.recipient) {
                                  body.recipient = updateFields.recipient;
                              }
                              if (updateFields.group) {
                                  body.group_id = updateFields.group;
                              }
                              if (updateFields.tags) {
                                  body.tags = updateFields.tags;
                              }
                              if (updateFields.customFieldsUi) {
                                  body.custom_fields = updateFields.customFieldsUi
                                      .customFieldsValues;
                              }
                              if (updateFields.assigneeEmail) {
                                  body.assignee_email = updateFields.assigneeEmail;
                              }
                              if (updateFields.internalNote) {
                                  const comment = {
                                      html_body: updateFields.internalNote,
                                      public: false,
                                  };
                                  body.comment = comment;
                              }
                              if (updateFields.publicReply) {
                                  const comment = {
                                      body: updateFields.publicReply,
                                      public: true,
                                  };
                                  body.comment = comment;
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'PUT', `/tickets/${ticketId}`, {
                              ticket: body,
                          });
                          responseData = responseData.ticket;
                      }
                      if (operation === 'get') {
                          const ticketType = this.getNodeParameter('ticketType', i);
                          const ticketId = this.getNodeParameter('id', i);
                          const endpoint = ticketType === 'regular' ? `/tickets/${ticketId}` : `/suspended_tickets/${ticketId}`;
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', endpoint, {});
                          responseData = responseData.ticket || responseData.suspended_ticket;
                      }
                      if (operation === 'getAll') {
                          const ticketType = this.getNodeParameter('ticketType', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          qs.query = 'type:ticket';
                          if (options.query) {
                              qs.query += ` ${options.query}`;
                          }
                          if (options.status) {
                              qs.query += ` status:${options.status}`;
                          }
                          if (options.group) {
                              qs.query += ` group:${options.group}`;
                          }
                          if (options.sortBy) {
                              qs.sort_by = options.sortBy;
                          }
                          if (options.sortOrder) {
                              qs.sort_order = options.sortOrder;
                          }
                          const endpoint = ticketType === 'regular' ? '/search' : '/suspended_tickets';
                          const property = ticketType === 'regular' ? 'results' : 'suspended_tickets';
                          if (returnAll) {
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, property, 'GET', endpoint, {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', endpoint, {}, qs);
                              responseData = responseData.results || responseData.suspended_tickets;
                          }
                      }
                      if (operation === 'delete') {
                          const ticketType = this.getNodeParameter('ticketType', i);
                          const ticketId = this.getNodeParameter('id', i);
                          const endpoint = ticketType === 'regular' ? `/tickets/${ticketId}` : `/suspended_tickets/${ticketId}`;
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'DELETE', endpoint, {});
                          responseData = { success: true };
                      }
                      if (operation === 'recover') {
                          const ticketId = this.getNodeParameter('id', i);
                          try {
                              responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'PUT', `/suspended_tickets/${ticketId}/recover`, {});
                              responseData = responseData.ticket;
                          }
                          catch (error) {
                              throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                          }
                      }
                  }
                  if (resource === 'ticketField') {
                      if (operation === 'get') {
                          const ticketFieldId = this.getNodeParameter('ticketFieldId', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/ticket_fields/${ticketFieldId}`, {});
                          responseData = responseData.ticket_field;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'ticket_fields', 'GET', '/ticket_fields', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'ticket_fields', 'GET', '/ticket_fields', {}, qs);
                              responseData = responseData.slice(0, limit);
                          }
                      }
                  }
                  if (resource === 'user') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                          };
                          Object.assign(body, additionalFields);
                          if (body.userFieldsUi) {
                              const userFieldsUI = body.userFieldsUi
                                  .userFieldValues;
                              if (userFieldsUI) {
                                  body.user_fields = {};
                                  for (const userField of userFieldsUI) {
                                      body.user_fields[userField.field] = userField.value;
                                  }
                                  delete body.userFieldsUi;
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'POST', '/users', { user: body });
                          responseData = responseData.user;
                      }
                      if (operation === 'update') {
                          const userId = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          Object.assign(body, updateFields);
                          if (body.userFieldsUi) {
                              const userFieldsUI = body.userFieldsUi
                                  .userFieldValues;
                              if (userFieldsUI) {
                                  body.user_fields = {};
                                  for (const userField of userFieldsUI) {
                                      body.user_fields[userField.field] = userField.value;
                                  }
                                  delete body.userFieldsUi;
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'PUT', `/users/${userId}`, {
                              user: body,
                          });
                          responseData = responseData.user;
                      }
                      if (operation === 'get') {
                          const userId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/users/${userId}`, {});
                          responseData = responseData.user;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('filters', i);
                          Object.assign(qs, options);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'users', 'GET', '/users', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', '/users', {}, qs);
                              responseData = responseData.users;
                          }
                      }
                      if (operation === 'getOrganizations') {
                          const userId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/users/${userId}/organizations`, {});
                          responseData = responseData.organizations;
                      }
                      if (operation === 'search') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('filters', i);
                          Object.assign(qs, options);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'users', 'GET', '/users/search', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', '/users/search', {}, qs);
                              responseData = responseData.users;
                          }
                      }
                      if (operation === 'delete') {
                          const userId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'DELETE', `/users/${userId}`, {});
                          responseData = responseData.user;
                      }
                      if (operation === 'getRelatedData') {
                          const userId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/users/${userId}/related`, {});
                          responseData = responseData.user_related;
                      }
                  }
                  if (resource === 'organization') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          const { organizationFieldsUi, ...rest } = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, rest);
                          if (organizationFieldsUi === null || organizationFieldsUi === void 0 ? void 0 : organizationFieldsUi.organizationFieldValues.length) {
                              const organizationFieldsUI = organizationFieldsUi.organizationFieldValues;
                              if (organizationFieldsUI.length) {
                                  body.organization_fields = {};
                                  for (const organizationField of organizationFieldsUI) {
                                      body.organization_fields[organizationField.field] = organizationField.value;
                                  }
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'POST', '/organizations', {
                              organization: body,
                          });
                          responseData = responseData.organization;
                      }
                      if (operation === 'delete') {
                          const organizationId = this.getNodeParameter('id', i);
                          await GenericFunctions_1.zendeskApiRequest.call(this, 'DELETE', `/organizations/${organizationId}`, {});
                          responseData = { success: true };
                      }
                      if (operation === 'count') {
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', '/organizations/count', {});
                          responseData = responseData.count;
                      }
                      if (operation === 'get') {
                          const organizationId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/organizations/${organizationId}`, {});
                          responseData = responseData.organization;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.zendeskApiRequestAllItems.call(this, 'organizations', 'GET', '/organizations', {}, qs);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              qs.per_page = limit;
                              responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', '/organizations', {}, qs);
                              responseData = responseData.organizations;
                          }
                      }
                      if (operation === 'getRelatedData') {
                          const organizationId = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'GET', `/organizations/${organizationId}/related`, {});
                          responseData = responseData.organization_related;
                      }
                      if (operation === 'update') {
                          const organizationId = this.getNodeParameter('id', i);
                          const body = {};
                          const { organizationFieldsUi, ...rest } = this.getNodeParameter('updateFields', i);
                          Object.assign(body, rest);
                          if (organizationFieldsUi === null || organizationFieldsUi === void 0 ? void 0 : organizationFieldsUi.organizationFieldValues.length) {
                              const organizationFieldsUI = organizationFieldsUi.organizationFieldValues;
                              if (organizationFieldsUI.length) {
                                  body.organization_fields = {};
                                  for (const organizationField of organizationFieldsUI) {
                                      body.organization_fields[organizationField.field] = organizationField.value;
                                  }
                              }
                          }
                          responseData = await GenericFunctions_1.zendeskApiRequest.call(this, 'PUT', `/organizations/${organizationId}`, { organization: body });
                          responseData = responseData.organization;
                      }
                  }
                  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.Zendesk = Zendesk;
  //# sourceMappingURL=Zendesk.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZendeskApi = void 0;
  class ZendeskApi {
      constructor() {
          this.name = 'zendeskApi';
          this.displayName = 'Zendesk API';
          this.documentationUrl = 'zendesk';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  description: 'The subdomain of your Zendesk work environment',
                  placeholder: 'company',
                  default: '',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
              },
          ];
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.subdomain}}.zendesk.com/api/v2',
                  url: '/ticket_fields.json',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              username: `${credentials.email}/token`,
              password: credentials.apiToken,
          };
          return requestOptions;
      }
  }
  exports.ZendeskApi = ZendeskApi;
  //# sourceMappingURL=ZendeskApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZendeskOAuth2Api = void 0;
  const scopes = ['read', 'write'];
  class ZendeskOAuth2Api {
      constructor() {
          this.name = 'zendeskOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Zendesk OAuth2 API';
          this.documentationUrl = 'zendesk';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'n8n',
                  description: 'The subdomain of your Zendesk work environment',
                  required: true,
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.zendesk.com/oauth/authorizations/new',
                  description: 'URL to get authorization code. Replace {SUBDOMAIN_HERE} with your subdomain.',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.zendesk.com/oauth/tokens',
                  description: 'URL to get access token. Replace {SUBDOMAIN_HERE} with your subdomain.',
                  required: true,
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
                  description: 'For some services additional query parameters have to be set which can be defined here',
                  placeholder: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ZendeskOAuth2Api = ZendeskOAuth2Api;
  //# sourceMappingURL=ZendeskOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZendeskApi = void 0;
  class ZendeskApi {
      constructor() {
          this.name = 'zendeskApi';
          this.displayName = 'Zendesk API';
          this.documentationUrl = 'zendesk';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  description: 'The subdomain of your Zendesk work environment',
                  placeholder: 'company',
                  default: '',
              },
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Token',
                  name: 'apiToken',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
              },
          ];
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.subdomain}}.zendesk.com/api/v2',
                  url: '/ticket_fields.json',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              username: `${credentials.email}/token`,
              password: credentials.apiToken,
          };
          return requestOptions;
      }
  }
  exports.ZendeskApi = ZendeskApi;
  //# sourceMappingURL=ZendeskApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ZendeskOAuth2Api = void 0;
  const scopes = ['read', 'write'];
  class ZendeskOAuth2Api {
      constructor() {
          this.name = 'zendeskOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Zendesk OAuth2 API';
          this.documentationUrl = 'zendesk';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'n8n',
                  description: 'The subdomain of your Zendesk work environment',
                  required: true,
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.zendesk.com/oauth/authorizations/new',
                  description: 'URL to get authorization code. Replace {SUBDOMAIN_HERE} with your subdomain.',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.zendesk.com/oauth/tokens',
                  description: 'URL to get access token. Replace {SUBDOMAIN_HERE} with your subdomain.',
                  required: true,
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: scopes.join(' '),
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
                  description: 'For some services additional query parameters have to be set which can be defined here',
                  placeholder: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ZendeskOAuth2Api = ZendeskOAuth2Api;
  //# sourceMappingURL=ZendeskOAuth2Api.credentials.js.map

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

  # Zendesk node

  Use the Zendesk node to automate work in Zendesk, and integrate Zendesk with other applications. n8n has built-in support for a wide range of Zendesk features, including creating, and deleting tickets, users, and organizations. 

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

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

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

  ## Operations

  * Ticket
      * Create a ticket
      * Delete a ticket
      * Get a ticket
      * Get all tickets
      * Recover a suspended ticket
      * Update a ticket
  * Ticket Field
      * Get a ticket field
      * Get all system and custom ticket fields
  * User
      * Create a user
      * Delete a user
      * Get a user
      * Get all users
      * Get a user's organizations
      * Get data related to the user
      * Search users
      * Update a user
  * Organization
      * Create an organization
      * Delete an organization
      * Count organizations
      * Get an organization
      * Get all organizations
      * Get data related to the organization
      * Update a organization

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"apiToken","options":[{"name":"API Token","value":"apiToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"ticket","description":"Tickets are the means through which your end users (customers) communicate with agents in Zendesk Support","options":[{"name":"Ticket","value":"ticket","description":"Tickets are the means through which your end users (customers) communicate with agents in Zendesk Support"},{"name":"Ticket Field","value":"ticketField","description":"Manage system and custom ticket fields"},{"name":"User","value":"user","description":"Manage users"},{"name":"Organization","value":"organization","description":"Manage organizations"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TicketDescription_1.ticketOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TicketDescription_1.ticketFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TicketFieldDescription_1.ticketFieldOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TicketFieldDescription_1.ticketFieldFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrganizationDescription_1.organizationOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrganizationDescription_1.organizationFields"}]


node_type: n8n-nodes-base.Zammad
name: Zammad
display_name: Zammad
description: Consume the Zammad API
category: input
icon: file:zammad.svg
code_hash: e36ae4ec17e8db702c4d105e9179bc5068a484ceaf7033667c28278b5edf87b8
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Zammad
documentation_title: Zammad node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"zammad","description":"Templates for zammad"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"basicAuth","resource":"group","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:27
updated_at: 2025-06-12 08:59:27
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Zammad = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Zammad {
      constructor() {
          this.description = {
              displayName: 'Zammad',
              name: 'zammad',
              icon: 'file:zammad.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Zammad API',
              defaults: {
                  name: 'Zammad',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'zammadBasicAuthApi',
                      required: true,
                      testedBy: 'zammadBasicAuthApiTest',
                      displayOptions: {
                          show: {
                              authentication: ['basicAuth'],
                          },
                      },
                  },
                  {
                      name: 'zammadTokenAuthApi',
                      required: true,
                      testedBy: 'zammadTokenAuthApiTest',
                      displayOptions: {
                          show: {
                              authentication: ['tokenAuth'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Basic Auth',
                              value: 'basicAuth',
                          },
                          {
                              name: 'Token Auth',
                              value: 'tokenAuth',
                          },
                      ],
                      default: 'tokenAuth',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      noDataExpression: true,
                      type: 'options',
                      options: [
                          {
                              name: 'Group',
                              value: 'group',
                          },
                          {
                              name: 'Organization',
                              value: 'organization',
                          },
                          {
                              name: 'Ticket',
                              value: 'ticket',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'user',
                  },
                  ...descriptions_1.groupDescription,
                  ...descriptions_1.organizationDescription,
                  ...descriptions_1.ticketDescription,
                  ...descriptions_1.userDescription,
              ],
          };
          this.methods = {
              loadOptions: {
                  async loadGroupCustomFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getGroupCustomFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadOrganizationCustomFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getOrganizationCustomFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadUserCustomFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getUserCustomFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadTicketCustomFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getTicketCustomFields)(allFields).map((i) => ({ name: i.name, value: i.id }));
                  },
                  async loadGroupFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getGroupFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadOrganizationFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getOrganizationFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadTicketFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getTicketFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadUserFields() {
                      const allFields = await GenericFunctions_1.getAllFields.call(this);
                      return (0, GenericFunctions_1.getUserFields)(allFields).map(GenericFunctions_1.fieldToLoadOption);
                  },
                  async loadGroupNames() {
                      const groups = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/groups'));
                      return groups.map((i) => ({ name: i.name, value: i.name }));
                  },
                  async loadOrganizationNames() {
                      const orgs = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/organizations'));
                      return orgs.filter(GenericFunctions_1.isNotZammadFoundation).map((i) => ({ name: i.name, value: i.name }));
                  },
                  async loadCustomerEmails() {
                      const users = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/users'));
                      return users.filter(GenericFunctions_1.isCustomer).map((i) => ({ name: i.email, value: i.email }));
                  },
                  async loadGroups() {
                      const groups = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/groups'));
                      return groups.map((i) => ({ name: i.name, value: i.id }));
                  },
                  async loadOrganizations() {
                      const orgs = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/organizations'));
                      return orgs.filter(GenericFunctions_1.isNotZammadFoundation).map((i) => ({ name: i.name, value: i.id }));
                  },
                  async loadUsers() {
                      const users = (await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/users'));
                      return users.filter(GenericFunctions_1.doesNotBelongToZammad).map((i) => ({ name: i.login, value: i.id }));
                  },
              },
              credentialTest: {
                  async zammadBasicAuthApiTest(credential) {
                      const credentials = credential.data;
                      const baseUrl = (0, GenericFunctions_1.tolerateTrailingSlash)(credentials.baseUrl);
                      const options = {
                          method: 'GET',
                          uri: `${baseUrl}/api/v1/users/me`,
                          json: true,
                          rejectUnauthorized: !credentials.allowUnauthorizedCerts,
                          auth: {
                              user: credentials.username,
                              pass: credentials.password,
                          },
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                  },
                  async zammadTokenAuthApiTest(credential) {
                      const credentials = credential.data;
                      const baseUrl = (0, GenericFunctions_1.tolerateTrailingSlash)(credentials.baseUrl);
                      const options = {
                          method: 'GET',
                          uri: `${baseUrl}/api/v1/users/me`,
                          json: true,
                          rejectUnauthorized: !credentials.allowUnauthorizedCerts,
                          headers: {
                              Authorization: `Token token=${credentials.accessToken}`,
                          },
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                  },
              },
          };
      }
      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 === 'user') {
                      if (operation === 'create') {
                          const body = {
                              firstname: this.getNodeParameter('firstname', i),
                              lastname: this.getNodeParameter('lastname', i),
                          };
                          const { addressUi, customFieldsUi, ...rest } = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, addressUi === null || addressUi === void 0 ? void 0 : addressUi.addressDetails);
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'POST', '/users', body);
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (!Object.keys(updateFields).length) {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const { addressUi, customFieldsUi, ...rest } = updateFields;
                          Object.assign(body, addressUi === null || addressUi === void 0 ? void 0 : addressUi.addressDetails);
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'PUT', `/users/${id}`, body);
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          await GenericFunctions_1.zammadApiRequest.call(this, 'DELETE', `/users/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/users/${id}`);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const { sortUi, ...rest } = this.getNodeParameter('filters', i);
                          Object.assign(qs, sortUi === null || sortUi === void 0 ? void 0 : sortUi.sortDetails);
                          Object.assign(qs, rest);
                          qs.query || (qs.query = '');
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const limit = returnAll ? 0 : this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.zammadApiRequestAllItems
                              .call(this, 'GET', '/users/search', {}, qs, limit)
                              .then((response) => {
                              return response.map((user) => {
                                  const { _preferences, ...data } = user;
                                  return data;
                              });
                          });
                      }
                      else if (operation === 'getSelf') {
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', '/users/me');
                      }
                  }
                  else if (resource === 'organization') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const { customFieldsUi, ...rest } = this.getNodeParameter('additionalFields', i);
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'POST', '/organizations', body);
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (!Object.keys(updateFields).length) {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const { customFieldsUi, ...rest } = updateFields;
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'PUT', `/organizations/${id}`, body);
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          await GenericFunctions_1.zammadApiRequest.call(this, 'DELETE', `/organizations/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/organizations/${id}`);
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const limit = returnAll ? 0 : this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.zammadApiRequestAllItems.call(this, 'GET', '/organizations', {}, {}, limit);
                      }
                  }
                  else if (resource === 'group') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          const { customFieldsUi, ...rest } = this.getNodeParameter('additionalFields', i);
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'POST', '/groups', body);
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (!Object.keys(updateFields).length) {
                              GenericFunctions_1.throwOnEmptyUpdate.call(this, resource);
                          }
                          const { customFieldsUi, ...rest } = updateFields;
                          customFieldsUi === null || customFieldsUi === void 0 ? void 0 : customFieldsUi.customFieldPairs.forEach((pair) => {
                              body[pair.name] = pair.value;
                          });
                          Object.assign(body, rest);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'PUT', `/groups/${id}`, body);
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          await GenericFunctions_1.zammadApiRequest.call(this, 'DELETE', `/groups/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/groups/${id}`);
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const limit = returnAll ? 0 : this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.zammadApiRequestAllItems.call(this, 'GET', '/groups', {}, {}, limit);
                      }
                  }
                  else if (resource === 'ticket') {
                      if (operation === 'create') {
                          const body = {
                              article: {},
                              title: this.getNodeParameter('title', i),
                              group: this.getNodeParameter('group', i),
                              customer: this.getNodeParameter('customer', i),
                          };
                          const article = this.getNodeParameter('article', i);
                          if (!Object.keys(article).length) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Article is required', { itemIndex: i });
                          }
                          const { articleDetails: { visibility, ...rest }, } = article;
                          body.article = {
                              ...rest,
                              internal: visibility === 'internal',
                          };
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'POST', '/tickets', body);
                          const { id } = responseData;
                          responseData.articles = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/ticket_articles/by_ticket/${id}`);
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          await GenericFunctions_1.zammadApiRequest.call(this, 'DELETE', `/tickets/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/tickets/${id}`);
                          responseData.articles = await GenericFunctions_1.zammadApiRequest.call(this, 'GET', `/ticket_articles/by_ticket/${id}`);
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const limit = returnAll ? 0 : this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.zammadApiRequestAllItems.call(this, 'GET', '/tickets', {}, {}, limit);
                      }
                  }
                  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.Zammad = Zammad;
  //# sourceMappingURL=Zammad.node.js.map

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

  # Zammad node

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

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

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

  ## Operations

  * Group
      * Create
      * Delete
      * Get
      * Get many
      * Update
  * Organization
      * Create
      * Delete
      * Get
      * Get many
      * Update
  * Ticket
      * Create
      * Delete
      * Get
      * Get many
  * User
      * Create
      * Delete
      * Get
      * Get many
  	* Get self
      * Update

  ## Templates and examples

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

example_workflow:
  {"name":"Zammad Example Workflow","nodes":[{"parameters":{"authentication":"basicAuth","resource":"group","dynamic_property":null},"id":"6u9rjl694w3akkq43yusll","name":"Zammad","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"tokenAuth","options":[{"name":"Basic Auth","value":"basicAuth"},{"name":"Token Auth","value":"tokenAuth"}]},{"displayName":"Resource","name":"resource","type":"options","default":"user","options":[{"name":"Group","value":"group"},{"name":"Organization","value":"organization"},{"name":"Ticket","value":"ticket"},{"name":"User","value":"user"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.groupDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.organizationDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.ticketDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.userDescription"}]


