# nodes

node_type: n8n-nodes-base.NocoDB
name: NocoDB
display_name: NocoDB
description: Read, update, write and delete data from NocoDB
category: input
icon: file:nocodb.svg
code_hash: 7d751f624d7bbb1b691ac33e2946f2b503c7a129ad9b490811c60d03b5f90921
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.NocoDB
documentation_title: NocoDB node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"nocodb","description":"Templates for nocodb"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"authentication":"nocoDb","resource":"row","operation":"create","dynamic_property":null}
package_name: n8n-nodes-base
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NocoDB = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const OperationDescription_1 = require("./OperationDescription");
  class NocoDB {
      constructor() {
          this.description = {
              displayName: 'NocoDB',
              name: 'nocoDb',
              icon: 'file:nocodb.svg',
              group: ['input'],
              version: [1, 2],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Read, update, write and delete data from NocoDB',
              defaults: {
                  name: 'NocoDB',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'nocoDb',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['nocoDb'],
                          },
                      },
                  },
                  {
                      name: 'nocoDbApiToken',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['nocoDbApiToken'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'User Token',
                              value: 'nocoDb',
                          },
                          {
                              name: 'API Token',
                              value: 'nocoDbApiToken',
                          },
                      ],
                      default: 'nocoDb',
                  },
                  {
                      displayName: 'API Version',
                      name: 'version',
                      type: 'options',
                      displayOptions: {
                          show: {
                              '@version': [1],
                          },
                      },
                      isNodeSetting: true,
                      options: [
                          {
                              name: 'Before v0.90.0',
                              value: 1,
                          },
                          {
                              name: 'v0.90.0 Onwards',
                              value: 2,
                          },
                      ],
                      default: 1,
                  },
                  {
                      displayName: 'API Version',
                      name: 'version',
                      type: 'options',
                      displayOptions: {
                          show: {
                              '@version': [2],
                          },
                      },
                      isNodeSetting: true,
                      options: [
                          {
                              name: 'Before v0.90.0',
                              value: 1,
                          },
                          {
                              name: 'v0.90.0 Onwards',
                              value: 2,
                          },
                      ],
                      default: 2,
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Row',
                              value: 'row',
                          },
                      ],
                      default: 'row',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['row'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a row',
                              action: 'Create a row',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a row',
                              action: 'Delete a row',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve a row',
                              action: 'Get a row',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Retrieve many rows',
                              action: 'Get many rows',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a row',
                              action: 'Update a row',
                          },
                      ],
                      default: 'get',
                  },
                  ...OperationDescription_1.operationFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getProjects() {
                      try {
                          const requestMethod = 'GET';
                          const endpoint = '/api/v1/db/meta/projects/';
                          const responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, {}, {});
                          return responseData.list.map((i) => ({ name: i.title, value: i.id }));
                      }
                      catch (e) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), new Error('Error while fetching projects!', { cause: e }));
                      }
                  },
                  async getTables() {
                      const projectId = this.getNodeParameter('projectId', 0);
                      if (projectId) {
                          try {
                              const requestMethod = 'GET';
                              const endpoint = `/api/v1/db/meta/projects/${projectId}/tables`;
                              const responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endpoint, {}, {});
                              return responseData.list.map((i) => ({ name: i.title, value: i.id }));
                          }
                          catch (e) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), new Error('Error while fetching tables!', { cause: e }));
                          }
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No project selected!');
                      }
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let responseData;
          const version = this.getNodeParameter('version', 0);
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let returnAll = false;
          let requestMethod = '';
          let qs = {};
          let endPoint = '';
          const projectId = this.getNodeParameter('projectId', 0);
          const table = this.getNodeParameter('table', 0);
          if (resource === 'row') {
              if (operation === 'create') {
                  requestMethod = 'POST';
                  if (version === 1) {
                      endPoint = `/nc/${projectId}/api/v1/${table}/bulk`;
                  }
                  else if (version === 2) {
                      endPoint = `/api/v1/db/data/bulk/noco/${projectId}/${table}`;
                  }
                  const body = [];
                  for (let i = 0; i < items.length; i++) {
                      const newItem = {};
                      const dataToSend = this.getNodeParameter('dataToSend', i);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              newItem[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              if (!field.binaryData) {
                                  newItem[field.fieldName] = field.fieldValue;
                              }
                              else if (field.binaryProperty) {
                                  const binaryPropertyName = field.binaryProperty;
                                  const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                                  const formData = {
                                      file: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                              contentType: binaryData.mimeType,
                                          },
                                      },
                                      json: JSON.stringify({
                                          api: 'xcAttachmentUpload',
                                          project_id: projectId,
                                          dbAlias: 'db',
                                          args: {},
                                      }),
                                  };
                                  let postUrl = '';
                                  if (version === 1) {
                                      postUrl = '/dashboard';
                                  }
                                  else if (version === 2) {
                                      postUrl = '/api/v1/db/storage/upload';
                                  }
                                  responseData = await GenericFunctions_1.apiRequest.call(this, 'POST', postUrl, {}, { project_id: projectId }, undefined, {
                                      formData,
                                  });
                                  newItem[field.fieldName] = JSON.stringify([responseData]);
                              }
                          }
                      }
                      body.push(newItem);
                  }
                  try {
                      responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endPoint, body, qs);
                      let id = responseData[0];
                      for (let i = body.length - 1; i >= 0; i--) {
                          body[i].id = id--;
                      }
                      returnData.push(...body);
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          returnData.push({ error: error.toString() });
                      }
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
              }
              if (operation === 'delete') {
                  requestMethod = 'DELETE';
                  let primaryKey = 'id';
                  if (version === 1) {
                      endPoint = `/nc/${projectId}/api/v1/${table}/bulk`;
                  }
                  else if (version === 2) {
                      endPoint = `/api/v1/db/data/bulk/noco/${projectId}/${table}`;
                      primaryKey = this.getNodeParameter('primaryKey', 0);
                      if (primaryKey === 'custom') {
                          primaryKey = this.getNodeParameter('customPrimaryKey', 0);
                      }
                  }
                  const body = [];
                  for (let i = 0; i < items.length; i++) {
                      const id = this.getNodeParameter('id', i);
                      body.push({ [primaryKey]: id });
                  }
                  try {
                      responseData = (await GenericFunctions_1.apiRequest.call(this, requestMethod, endPoint, body, qs));
                      if (version === 1) {
                          returnData.push(...items.map((item) => item.json));
                      }
                      else if (version === 2) {
                          returnData.push(...responseData.map((result, index) => {
                              if (result === 0) {
                                  const errorMessage = `The row with the ID "${body[index].id}" could not be deleted. It probably doesn't exist.`;
                                  if (this.continueOnFail()) {
                                      return { error: errorMessage };
                                  }
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: errorMessage }, { message: errorMessage, itemIndex: index });
                              }
                              return {
                                  success: true,
                              };
                          }));
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          returnData.push({ error: error.toString() });
                      }
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
              }
              if (operation === 'getAll') {
                  const data = [];
                  const downloadAttachments = this.getNodeParameter('downloadAttachments', 0);
                  try {
                      for (let i = 0; i < items.length; i++) {
                          requestMethod = 'GET';
                          if (version === 1) {
                              endPoint = `/nc/${projectId}/api/v1/${table}`;
                          }
                          else if (version === 2) {
                              endPoint = `/api/v1/db/data/noco/${projectId}/${table}`;
                          }
                          returnAll = this.getNodeParameter('returnAll', 0);
                          qs = this.getNodeParameter('options', i, {});
                          if (qs.sort) {
                              const properties = qs.sort.property;
                              qs.sort = properties
                                  .map((prop) => `${prop.direction === 'asc' ? '' : '-'}${prop.field}`)
                                  .join(',');
                          }
                          if (qs.fields) {
                              qs.fields = qs.fields.join(',');
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.apiRequestAllItems.call(this, requestMethod, endPoint, {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', 0);
                              responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endPoint, {}, qs);
                              if (version === 2) {
                                  responseData = responseData.list;
                              }
                          }
                          const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                          if (downloadAttachments) {
                              const downloadFieldNames = this.getNodeParameter('downloadFieldNames', 0).split(',');
                              const response = await GenericFunctions_1.downloadRecordAttachments.call(this, responseData, downloadFieldNames);
                              data.push(...response);
                          }
                      }
                      if (downloadAttachments) {
                          return [data];
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          returnData.push({ json: { error: error.toString() } });
                      }
                      else {
                          throw error;
                      }
                  }
                  return [returnData];
              }
              if (operation === 'get') {
                  requestMethod = 'GET';
                  const newItems = [];
                  for (let i = 0; i < items.length; i++) {
                      try {
                          const id = this.getNodeParameter('id', i);
                          if (version === 1) {
                              endPoint = `/nc/${projectId}/api/v1/${table}/${id}`;
                          }
                          else if (version === 2) {
                              endPoint = `/api/v1/db/data/noco/${projectId}/${table}/${id}`;
                          }
                          responseData = await GenericFunctions_1.apiRequest.call(this, requestMethod, endPoint, {}, qs);
                          if (version === 2) {
                              if (Object.keys(responseData).length === 0) {
                                  const errorMessage = `The row with the ID "${id}" could not be queried. It probably doesn't exist.`;
                                  if (this.continueOnFail()) {
                                      newItems.push({ json: { error: errorMessage } });
                                      continue;
                                  }
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: errorMessage }, { message: errorMessage, itemIndex: i });
                              }
                          }
                          const downloadAttachments = this.getNodeParameter('downloadAttachments', i);
                          if (downloadAttachments) {
                              const downloadFieldNames = this.getNodeParameter('downloadFieldNames', i).split(',');
                              const data = await GenericFunctions_1.downloadRecordAttachments.call(this, [responseData], downloadFieldNames);
                              const newItem = {
                                  binary: data[0].binary,
                                  json: {},
                              };
                              const executionData = this.helpers.constructExecutionMetaData([newItem], { itemData: { item: i } });
                              newItems.push(...executionData);
                          }
                          else {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                              newItems.push(...executionData);
                          }
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.toString() }), { itemData: { item: i } });
                              newItems.push(...executionData);
                              continue;
                          }
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
                      }
                  }
                  return [newItems];
              }
              if (operation === 'update') {
                  requestMethod = 'PATCH';
                  let primaryKey = 'id';
                  if (version === 1) {
                      endPoint = `/nc/${projectId}/api/v1/${table}/bulk`;
                      requestMethod = 'PUT';
                  }
                  else if (version === 2) {
                      endPoint = `/api/v1/db/data/bulk/noco/${projectId}/${table}`;
                      primaryKey = this.getNodeParameter('primaryKey', 0);
                      if (primaryKey === 'custom') {
                          primaryKey = this.getNodeParameter('customPrimaryKey', 0);
                      }
                  }
                  const body = [];
                  for (let i = 0; i < items.length; i++) {
                      const id = this.getNodeParameter('id', i);
                      const newItem = { [primaryKey]: id };
                      const dataToSend = this.getNodeParameter('dataToSend', i);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              newItem[key] = items[i].json[key];
                          }
                      }
                      else {
                          const fields = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fields) {
                              if (!field.binaryData) {
                                  newItem[field.fieldName] = field.fieldValue;
                              }
                              else if (field.binaryProperty) {
                                  const binaryPropertyName = field.binaryProperty;
                                  const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
                                  const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                                  const formData = {
                                      file: {
                                          value: dataBuffer,
                                          options: {
                                              filename: binaryData.fileName,
                                              contentType: binaryData.mimeType,
                                          },
                                      },
                                      json: JSON.stringify({
                                          api: 'xcAttachmentUpload',
                                          project_id: projectId,
                                          dbAlias: 'db',
                                          args: {},
                                      }),
                                  };
                                  let postUrl = '';
                                  if (version === 1) {
                                      postUrl = '/dashboard';
                                  }
                                  else if (version === 2) {
                                      postUrl = '/api/v1/db/storage/upload';
                                  }
                                  responseData = await GenericFunctions_1.apiRequest.call(this, 'POST', postUrl, {}, { project_id: projectId }, undefined, {
                                      formData,
                                  });
                                  newItem[field.fieldName] = JSON.stringify([responseData]);
                              }
                          }
                      }
                      body.push(newItem);
                  }
                  try {
                      responseData = (await GenericFunctions_1.apiRequest.call(this, requestMethod, endPoint, body, qs));
                      if (version === 1) {
                          returnData.push(...body);
                      }
                      else if (version === 2) {
                          returnData.push(...responseData.map((result, index) => {
                              if (result === 0) {
                                  const errorMessage = `The row with the ID "${body[index].id}" could not be updated. It probably doesn't exist.`;
                                  if (this.continueOnFail()) {
                                      return { error: errorMessage };
                                  }
                                  throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: errorMessage }, { message: errorMessage, itemIndex: index });
                              }
                              return {
                                  success: true,
                              };
                          }));
                      }
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          returnData.push({ error: error.toString() });
                      }
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.NocoDB = NocoDB;
  //# sourceMappingURL=NocoDB.node.js.map

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

  # NocoDB node

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

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

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

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

  ## Operations

  * Row
      * Create
      * Delete
      * Get
      * Get Many
      * Update a row

  ## Templates and examples

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

  ## Relates resources

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

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

troubleshooting_info:
  [{"issue":"Relates resources","solution":"Refer to [NocoDB's documentation](https://docs.nocodb.com/){:target=_blank .external-link} for more information about the service."}]

example_workflow:
  {"name":"NocoDB Example Workflow","nodes":[{"parameters":{"authentication":"nocoDb","resource":"row","operation":"create","dynamic_property":null},"id":"xxu8ldyiowdwonuusv2wv","name":"NocoDB","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":"nocoDb","options":[{"name":"User Token","value":"nocoDb"},{"name":"API Token","value":"nocoDbApiToken"}]},{"displayName":"API Version","name":"version","type":"options","default":1,"options":[{"name":"Before v0.90.0"},{"name":"v0.90.0 Onwards"}]},{"displayName":"API Version","name":"version","type":"options","default":2,"options":[{"name":"Before v0.90.0"},{"name":"v0.90.0 Onwards"}]},{"displayName":"Resource","name":"resource","type":"options","default":"row","options":[{"name":"Row","value":"row"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Create a row","options":[{"name":"Create","value":"create","description":"Create a row"},{"name":"Delete","value":"delete","description":"Delete a row"},{"name":"Get","value":"get","description":"Retrieve a row"},{"name":"Get Many","value":"getAll","description":"Retrieve many rows"},{"name":"Update","value":"update","description":"Update a row"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OperationDescription_1.operationFields"}]


node_type: n8n-nodes-base.N8nTrigger
name: N8nTrigger
display_name: n8n Trigger
description: Handle events and perform actions on your n8n instance
category: trigger
icon: file:n8nTrigger.svg
code_hash: 49ad2807ae9b686c67c1b63651607ff4bf9d2730636ac4ee6b1ee6dac7520e05
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.N8nTrigger
documentation_title: n8n Trigger node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"n8n-trigger","description":"Templates for n8n-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:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8nTrigger = void 0;
  class N8nTrigger {
      constructor() {
          this.description = {
              displayName: 'n8n Trigger',
              name: 'n8nTrigger',
              icon: 'file:n8nTrigger.svg',
              group: ['trigger'],
              version: 1,
              description: 'Handle events and perform actions on your n8n instance',
              eventTriggerDescription: '',
              mockManualExecution: true,
              defaults: {
                  name: 'n8n Trigger',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Events',
                      name: 'events',
                      type: 'multiOptions',
                      required: true,
                      default: [],
                      description: 'Specifies under which conditions an execution should happen: <b>Instance started</b>: Triggers when this n8n instance is started or re-started',
                      options: [
                          {
                              name: 'Instance Started',
                              value: 'init',
                              description: 'Triggers when this n8n instance is started or re-started',
                          },
                      ],
                  },
              ],
          };
      }
      async trigger() {
          const events = this.getNodeParameter('events', []);
          const activationMode = this.getActivationMode();
          if (events.includes(activationMode)) {
              let event;
              if (activationMode === 'init') {
                  event = 'Instance started';
              }
              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.N8nTrigger = N8nTrigger;
  //# sourceMappingURL=N8nTrigger.node.js.map

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

  # n8n Trigger node

  The n8n Trigger node triggers when the current workflow updates or activates, or when the n8n instance starts or restarts. You can use the n8n Trigger node to notify when these events occur.

  ## 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.
  - **Instance started**: If you select this event, the node triggers when the n8n instance starts or restarts.
  - **Workflow Activated**: If you select this event, the node triggers when this workflow is activated.

  You can select one or more of these events.

  ## Templates and examples

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

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

example_workflow:
  {"name":"n8n Trigger Example Workflow","nodes":[{"parameters":{"events":"[]","pollTimes":{"item":[{"mode":"everyMinute"}]}},"id":"vkhgitjblr9vt9nlugml5","name":"n8n 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: <b>Instance started</b>: Triggers when this n8n instance is started or re-started","options":[{"name":"Instance Started","value":"init","description":"Triggers when this n8n instance is started or re-started"}]}]


node_type: n8n-nodes-base.NoOp
name: NoOp
display_name: No Operation, do nothing
description: No Operation
category: organization
icon: fa:arrow-right
code_hash: 278af9bf87c21e19e021d2b0d95db30e200ff832063dacdd6c6c9707ade374f6
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.NoOp
documentation_title: No Operation, do nothing
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"no-operation-do-nothing","description":"Templates for no-operation-do-nothing"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NoOp = void 0;
  class NoOp {
      constructor() {
          this.description = {
              displayName: 'No Operation, do nothing',
              name: 'noOp',
              icon: 'fa:arrow-right',
              group: ['organization'],
              version: 1,
              description: 'No Operation',
              defaults: {
                  name: 'No Operation, do nothing',
                  color: '#b0b0b0',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [],
          };
      }
      async execute() {
          const items = this.getInputData();
          return [items];
      }
  }
  exports.NoOp = NoOp;
  //# sourceMappingURL=NoOp.node.js.map

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

  # No Operation, do nothing

  Use the No Operation, do nothing node when you don't want to perform any operations. The purpose of this node is to make the workflow easier to read and understand where the flow of data stops. This can help others visually get a better understanding of the workflow.

  ## Templates and examples

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

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


node_type: n8n-nodes-base.Netlify
name: Netlify
display_name: Netlify
description: Consume Netlify API
category: transform
icon: file:netlify.svg
code_hash: da09d02d0d7620d84e394d150cea0f5613386191bcbea87271e7f06c30b5b31a
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Netlify
documentation_title: Netlify node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"netlify","description":"Templates for netlify"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"deploy","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Netlify = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const DeployDescription_1 = require("./DeployDescription");
  const SiteDescription_1 = require("./SiteDescription");
  class Netlify {
      constructor() {
          this.description = {
              displayName: 'Netlify',
              name: 'netlify',
              icon: 'file:netlify.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Netlify API',
              defaults: {
                  name: 'Netlify',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'netlifyApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Deploy',
                              value: 'deploy',
                          },
                          {
                              name: 'Site',
                              value: 'site',
                          },
                      ],
                      default: 'deploy',
                      required: true,
                  },
                  ...DeployDescription_1.deployOperations,
                  ...DeployDescription_1.deployFields,
                  ...SiteDescription_1.siteOperations,
                  ...SiteDescription_1.siteFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSites() {
                      const returnData = [];
                      const sites = await GenericFunctions_1.netlifyApiRequest.call(this, 'GET', '/sites');
                      for (const site of sites) {
                          returnData.push({
                              name: site.name,
                              value: site.site_id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const length = items.length;
          let responseData;
          const returnData = [];
          const qs = {};
          const body = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'deploy') {
                      if (operation === 'cancel') {
                          const deployId = this.getNodeParameter('deployId', i);
                          responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'POST', `/deploys/${deployId}/cancel`, body, qs);
                      }
                      if (operation === 'create') {
                          const siteId = this.getNodeParameter('siteId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          if (body.title) {
                              qs.title = body.title;
                              delete body.title;
                          }
                          responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'POST', `/sites/${siteId}/deploys`, body, qs);
                      }
                      if (operation === 'get') {
                          const siteId = this.getNodeParameter('siteId', i);
                          const deployId = this.getNodeParameter('deployId', i);
                          responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'GET', `/sites/${siteId}/deploys/${deployId}`, body, qs);
                      }
                      if (operation === 'getAll') {
                          const siteId = this.getNodeParameter('siteId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.netlifyRequestAllItems.call(this, 'GET', `/sites/${siteId}/deploys`);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'GET', `/sites/${siteId}/deploys`, {}, { per_page: limit });
                          }
                      }
                  }
                  if (resource === 'site') {
                      if (operation === 'delete') {
                          const siteId = this.getNodeParameter('siteId', i);
                          responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'DELETE', `/sites/${siteId}`);
                      }
                      if (operation === 'get') {
                          const siteId = this.getNodeParameter('siteId', i);
                          responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'GET', `/sites/${siteId}`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.netlifyRequestAllItems.call(this, 'GET', '/sites', {}, { filter: 'all' });
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.netlifyApiRequest.call(this, 'GET', '/sites', {}, { filter: 'all', per_page: limit });
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Netlify = Netlify;
  //# sourceMappingURL=Netlify.node.js.map

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

  // --- Next Credential File ---

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

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

  # Netlify node

  Use the Netlify node to automate work in Netlify, and integrate Netlify with other applications. n8n has built-in support for a wide range of Netlify features, including getting and cancelling deployments, as well as deleting, and getting sites. 

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

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

  ## Operations

  * Deploy
      * Cancel a deployment
      * Create a new deployment
      * Get a deployment
      * Get all deployments
  * Site
      * Delete a site
      * Get a site
      * Returns all sites

  ## Templates and examples

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

example_workflow:
  {"name":"Netlify Example Workflow","nodes":[{"parameters":{"resource":"deploy","dynamic_property":null},"id":"qc3cjv2078omauvbgn4vti","name":"Netlify","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":"deploy","required":true,"options":[{"name":"Deploy","value":"deploy"},{"name":"Site","value":"site"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DeployDescription_1.deployOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DeployDescription_1.deployFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SiteDescription_1.siteOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SiteDescription_1.siteFields"}]


node_type: n8n-nodes-base.Nasa
name: Nasa
display_name: NASA
description: Retrieve data from the NASA API
category: transform
icon: file:nasa.png
code_hash: f7745392ff0a92efee6e82a6d34f397404666cfd4c56ac723875c1b6aa5d0589
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Nasa
documentation_title: NASA node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"nasa","description":"Templates for nasa"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
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.Nasa = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_1 = __importDefault(require("moment"));
  class Nasa {
      constructor() {
          this.description = {
              displayName: 'NASA',
              name: 'nasa',
              icon: 'file:nasa.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              description: 'Retrieve data from the NASA API',
              defaults: {
                  name: 'NASA',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'nasaApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Asteroid Neo-Browse',
                              value: 'asteroidNeoBrowse',
                          },
                          {
                              name: 'Asteroid Neo-Feed',
                              value: 'asteroidNeoFeed',
                          },
                          {
                              name: 'Asteroid Neo-Lookup',
                              value: 'asteroidNeoLookup',
                          },
                          {
                              name: 'Astronomy Picture of the Day',
                              value: 'astronomyPictureOfTheDay',
                          },
                          {
                              name: 'DONKI Coronal Mass Ejection',
                              value: 'donkiCoronalMassEjection',
                          },
                          {
                              name: 'DONKI High Speed Stream',
                              value: 'donkiHighSpeedStream',
                          },
                          {
                              name: 'DONKI Interplanetary Shock',
                              value: 'donkiInterplanetaryShock',
                          },
                          {
                              name: 'DONKI Magnetopause Crossing',
                              value: 'donkiMagnetopauseCrossing',
                          },
                          {
                              name: 'DONKI Notification',
                              value: 'donkiNotifications',
                          },
                          {
                              name: 'DONKI Radiation Belt Enhancement',
                              value: 'donkiRadiationBeltEnhancement',
                          },
                          {
                              name: 'DONKI Solar Energetic Particle',
                              value: 'donkiSolarEnergeticParticle',
                          },
                          {
                              name: 'DONKI Solar Flare',
                              value: 'donkiSolarFlare',
                          },
                          {
                              name: 'DONKI WSA+EnlilSimulation',
                              value: 'donkiWsaEnlilSimulation',
                          },
                          {
                              name: 'Earth Asset',
                              value: 'earthAssets',
                          },
                          {
                              name: 'Earth Imagery',
                              value: 'earthImagery',
                          },
                      ],
                      default: 'astronomyPictureOfTheDay',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['astronomyPictureOfTheDay'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get the Astronomy Picture of the Day',
                              action: 'Get the astronomy picture of the day',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['asteroidNeoFeed'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve a list of asteroids based on their closest approach date to Earth',
                              action: 'Get an asteroid neo feed',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['asteroidNeoLookup'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Look up an asteroid based on its NASA SPK-ID',
                              action: 'Get an asteroid neo lookup',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['asteroidNeoBrowse'],
                          },
                      },
                      options: [
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Browse the overall asteroid dataset',
                              action: 'Get many asteroid neos',
                          },
                      ],
                      default: 'getAll',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiCoronalMassEjection'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI coronal mass ejection data',
                              action: 'Get a DONKI coronal mass ejection',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiGeomagneticStorm'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI geomagnetic storm data',
                              action: 'Get a DONKI geomagnetic storm',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiInterplanetaryShock'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI interplanetary shock data',
                              action: 'Get a DONKI interplanetary shock',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiSolarFlare'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI solar flare data',
                              action: 'Get a DONKI solar flare',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiSolarEnergeticParticle'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI solar energetic particle data',
                              action: 'Get a DONKI solar energetic particle',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiMagnetopauseCrossing'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve data on DONKI magnetopause crossings',
                              action: 'Get a DONKI magnetopause crossing',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiRadiationBeltEnhancement'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI radiation belt enhancement data',
                              action: 'Get a DONKI radiation belt enhancement',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiHighSpeedStream'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI high speed stream data',
                              action: 'Get a DONKI high speed stream',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiWsaEnlilSimulation'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI WSA+EnlilSimulation data',
                              action: 'Get a DONKI wsa enlil simulation',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['donkiNotifications'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve DONKI notifications data',
                              action: 'Get a DONKI notifications',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['earthImagery'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve Earth imagery',
                              action: 'Get Earth imagery',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['earthAssets'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve Earth assets',
                              action: 'Get Earth assets',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['inSightMarsWeatherService'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve Insight Mars Weather Service data',
                              action: 'Get Insight Mars Weather Service',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['imageAndVideoLibrary'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve Image and Video Library data',
                              action: 'Get image and video library data',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['techTransfer'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve TechTransfer data',
                              action: 'Get a TechTransfer data',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['twoLineElementSet'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve Two-Line Element Set data',
                              action: 'Get a Two-Line Element Set',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Asteroid ID',
                      name: 'asteroidId',
                      type: 'string',
                      required: true,
                      default: '',
                      placeholder: '3542519',
                      description: 'The ID of the asteroid to be returned',
                      displayOptions: {
                          show: {
                              resource: ['asteroidNeoLookup'],
                              operation: ['get'],
                          },
                      },
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['asteroidNeoLookup'],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Include Close Approach Data',
                              name: 'includeCloseApproachData',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to include all the close approach data in the asteroid lookup',
                          },
                      ],
                  },
                  {
                      displayName: 'Download Image',
                      name: 'download',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['astronomyPictureOfTheDay'],
                          },
                      },
                      default: true,
                      description: 'By default just the URL of the image is returned. When set to true the image will be downloaded.',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      required: true,
                      default: 'data',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['astronomyPictureOfTheDay'],
                              download: [true],
                          },
                      },
                      description: 'Name of the binary property to which to write to',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      default: {},
                      placeholder: 'Add field',
                      displayOptions: {
                          show: {
                              resource: ['astronomyPictureOfTheDay'],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Date',
                              name: 'date',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      default: {},
                      placeholder: 'Add field',
                      displayOptions: {
                          show: {
                              resource: [
                                  'asteroidNeoFeed',
                                  'donkiCoronalMassEjection',
                                  'donkiGeomagneticStorm',
                                  'donkiSolarFlare',
                                  'donkiSolarEnergeticParticle',
                                  'donkiMagnetopauseCrossing',
                                  'donkiRadiationBeltEnhancement',
                                  'donkiHighSpeedStream',
                                  'donkiWsaEnlilSimulation',
                                  'donkiNotifications',
                              ],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Start Date',
                              name: 'startDate',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                          },
                          {
                              displayName: 'End Date',
                              name: 'endDate',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      default: {},
                      placeholder: 'Add field',
                      displayOptions: {
                          show: {
                              resource: ['donkiInterplanetaryShock'],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Start Date',
                              name: 'startDate',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                          },
                          {
                              displayName: 'End Date',
                              name: 'endDate',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                          },
                          {
                              displayName: 'Location',
                              name: 'location',
                              type: 'options',
                              default: 'ALL',
                              description: 'The location of the geomagnetic storm',
                              options: [
                                  {
                                      name: 'All',
                                      value: 'ALL',
                                  },
                                  {
                                      name: 'Earth',
                                      value: 'earth',
                                  },
                                  {
                                      name: 'Messenger',
                                      value: 'MESSENGER',
                                  },
                                  {
                                      name: 'Stereo A',
                                      value: 'STEREO A',
                                  },
                                  {
                                      name: 'Stereo B',
                                      value: 'STEREO B',
                                  },
                              ],
                          },
                          {
                              displayName: 'Catalog',
                              name: 'catalog',
                              type: 'options',
                              default: 'ALL',
                              description: 'The catalog of the geomagnetic storm',
                              options: [
                                  {
                                      name: 'All',
                                      value: 'ALL',
                                  },
                                  {
                                      name: 'SWRC Catalog',
                                      value: 'SWRC_CATALOG',
                                  },
                                  {
                                      name: 'Winslow Messenger ICME Catalog',
                                      value: 'WINSLOW_MESSENGER_ICME_CATALOG',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Latitude',
                      name: 'lat',
                      type: 'number',
                      default: '',
                      placeholder: '47.751076',
                      description: 'Latitude for the location of the image',
                      displayOptions: {
                          show: {
                              resource: ['earthImagery', 'earthAssets'],
                              operation: ['get'],
                          },
                      },
                  },
                  {
                      displayName: 'Longitude',
                      name: 'lon',
                      type: 'number',
                      default: '',
                      placeholder: '-120.740135',
                      description: 'Longitude for the location of the image',
                      displayOptions: {
                          show: {
                              resource: ['earthImagery', 'earthAssets'],
                              operation: ['get'],
                          },
                      },
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      required: true,
                      default: 'data',
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['earthImagery'],
                          },
                      },
                      description: 'Name of the binary property to which to write to',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      default: {},
                      placeholder: 'Add field',
                      displayOptions: {
                          show: {
                              resource: ['earthImagery', 'earthAssets'],
                              operation: ['get'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Date',
                              name: 'date',
                              type: 'dateTime',
                              default: '',
                              placeholder: 'YYYY-MM-DD',
                              description: 'Date of the image',
                          },
                          {
                              displayName: 'Degrees',
                              name: 'dim',
                              type: 'number',
                              default: '',
                              placeholder: '0.025',
                              description: 'Width and height of the image in degrees',
                          },
                      ],
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      typeOptions: {
                          minValue: 1,
                      },
                      description: 'Max number of results to return',
                      default: 20,
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const qs = {};
          let returnAll = false;
          let propertyName = '';
          let download = false;
          for (let i = 0; i < items.length; i++) {
              try {
                  let endpoint = '';
                  let includeCloseApproachData = false;
                  let additionalFields;
                  try {
                      additionalFields = this.getNodeParameter('additionalFields', i);
                  }
                  catch (error) {
                      additionalFields = {};
                  }
                  if (resource === 'astronomyPictureOfTheDay') {
                      if (operation === 'get') {
                          endpoint = '/planetary/apod';
                          qs.date =
                              (0, moment_1.default)(additionalFields.date).format('YYYY-MM-DD') ||
                                  (0, moment_1.default)().format('YYYY-MM-DD');
                      }
                  }
                  if (resource === 'asteroidNeoFeed') {
                      if (operation === 'get') {
                          endpoint = '/neo/rest/v1/feed';
                          propertyName = 'near_earth_objects';
                          const currentDate = (0, moment_1.default)().format('YYYY-MM-DD');
                          qs.start_date =
                              (0, moment_1.default)(additionalFields.startDate).format('YYYY-MM-DD') || currentDate;
                          qs.end_date =
                              (0, moment_1.default)(additionalFields.endDate).format('YYYY-MM-DD') || currentDate;
                      }
                  }
                  if (resource === 'asteroidNeoLookup') {
                      if (operation === 'get') {
                          const asteroidId = this.getNodeParameter('asteroidId', i);
                          includeCloseApproachData = additionalFields.includeCloseApproachData;
                          endpoint = `/neo/rest/v1/neo/${asteroidId}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation '${operation}' is unknown!`, { itemIndex: i });
                      }
                  }
                  if (resource === 'asteroidNeoBrowse') {
                      if (operation === 'getAll') {
                          returnAll = this.getNodeParameter('returnAll', 0);
                          if (!returnAll) {
                              qs.size = this.getNodeParameter('limit', 0);
                          }
                          propertyName = 'near_earth_objects';
                          endpoint = '/neo/rest/v1/neo/browse';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation '${operation}' is unknown!`, { itemIndex: i });
                      }
                  }
                  if (resource.startsWith('donki')) {
                      if (additionalFields.startDate) {
                          qs.startDate = (0, moment_1.default)(additionalFields.startDate).format('YYYY-MM-DD');
                      }
                      else {
                          qs.startDate = (0, moment_1.default)().subtract(30, 'days').format('YYYY-MM-DD');
                      }
                      if (additionalFields.endDate) {
                          qs.endDate = (0, moment_1.default)(additionalFields.endDate).format('YYYY-MM-DD');
                      }
                      else {
                          qs.endDate = (0, moment_1.default)().format('YYYY-MM-DD');
                      }
                      if (resource === 'donkiCoronalMassEjection') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/CME';
                          }
                      }
                      else if (resource === 'donkiGeomagneticStorm') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/GST';
                          }
                      }
                      else if (resource === 'donkiInterplanetaryShock') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/IPS';
                              qs.location = additionalFields.location || 'ALL';
                              qs.catalog = additionalFields.catalog || 'ALL';
                          }
                      }
                      else if (resource === 'donkiSolarFlare') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/FLR';
                          }
                      }
                      else if (resource === 'donkiSolarEnergeticParticle') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/SEP';
                          }
                      }
                      else if (resource === 'donkiMagnetopauseCrossing') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/MPC';
                          }
                      }
                      else if (resource === 'donkiRadiationBeltEnhancement') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/RBE';
                          }
                      }
                      else if (resource === 'donkiHighSpeedStream') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/HSS';
                          }
                      }
                      else if (resource === 'donkiWsaEnlilSimulation') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/WSAEnlilSimulations';
                          }
                      }
                      else if (resource === 'donkiNotifications') {
                          if (operation === 'get') {
                              endpoint = '/DONKI/notifications';
                              qs.type = additionalFields.type || 'all';
                          }
                      }
                  }
                  if (resource === 'earthImagery') {
                      if (operation === 'get') {
                          endpoint = '/planetary/earth/imagery';
                          qs.lat = this.getNodeParameter('lat', i);
                          qs.lon = this.getNodeParameter('lon', i);
                          qs.dim = additionalFields.dim || 0.025;
                          if (additionalFields.date) {
                              qs.date = (0, moment_1.default)(additionalFields.date).format('YYYY-MM-DD');
                          }
                          else {
                              qs.date = (0, moment_1.default)().format('YYYY-MM-DD');
                          }
                      }
                  }
                  if (resource === 'earthAssets') {
                      if (operation === 'get') {
                          endpoint = '/planetary/earth/assets';
                          qs.lat = this.getNodeParameter('lat', i);
                          qs.lon = this.getNodeParameter('lon', i);
                          qs.dim = additionalFields.dim || 0.025;
                          if (additionalFields.date) {
                              qs.date = (0, moment_1.default)(additionalFields.date).format('YYYY-MM-DD');
                          }
                      }
                      if (operation === 'get') {
                          endpoint = '/insight_weather/earth/imagery';
                          qs.feedtype = 'json';
                          qs.ver = '1.0';
                      }
                  }
                  if (returnAll) {
                      responseData = GenericFunctions_1.nasaApiRequestAllItems.call(this, propertyName, 'GET', endpoint, qs);
                  }
                  else {
                      responseData = await GenericFunctions_1.nasaApiRequest.call(this, 'GET', endpoint, qs);
                      if (propertyName !== '') {
                          responseData = responseData[propertyName];
                      }
                  }
                  if (resource === 'asteroidNeoLookup' && operation === 'get' && !includeCloseApproachData) {
                      delete responseData.close_approach_data;
                  }
                  if (resource === 'asteroidNeoFeed') {
                      const date = Object.keys(responseData)[0];
                      responseData = responseData[date];
                  }
                  if (resource === 'earthImagery') {
                      const binaryProperty = this.getNodeParameter('binaryPropertyName', i);
                      const data = await GenericFunctions_1.nasaApiRequest.call(this, 'GET', endpoint, qs, { encoding: null });
                      const newItem = {
                          json: items[i].json,
                          binary: {},
                      };
                      if (items[i].binary !== undefined) {
                          Object.assign(newItem.binary, items[i].binary);
                      }
                      items[i] = newItem;
                      items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data);
                  }
                  if (resource === 'astronomyPictureOfTheDay') {
                      download = this.getNodeParameter('download', 0);
                      if (download) {
                          const binaryProperty = this.getNodeParameter('binaryPropertyName', i);
                          const data = await GenericFunctions_1.nasaApiRequest.call(this, 'GET', endpoint, qs, { encoding: null }, responseData.hdurl);
                          const filename = responseData.hdurl.split('/');
                          const newItem = {
                              json: items[i].json,
                              binary: {},
                          };
                          Object.assign(newItem.json, responseData);
                          if (items[i].binary !== undefined) {
                              Object.assign(newItem.binary, items[i].binary);
                          }
                          items[i] = newItem;
                          items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data, filename[filename.length - 1]);
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      if (resource === 'earthImagery' && operation === 'get') {
                          items[i].json = { error: error.message };
                      }
                      else if (resource === 'astronomyPictureOfTheDay' && operation === 'get' && download) {
                          items[i].json = { error: error.message };
                      }
                      else {
                          const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                          returnData.push(...executionErrorData);
                      }
                      continue;
                  }
                  throw error;
              }
          }
          if (resource === 'earthImagery' && operation === 'get') {
              return [items];
          }
          else if (resource === 'astronomyPictureOfTheDay' && operation === 'get' && download) {
              return [items];
          }
          else {
              return [returnData];
          }
      }
  }
  exports.Nasa = Nasa;
  //# sourceMappingURL=Nasa.node.js.map

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

  // --- Next Credential File ---

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

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

  # NASA node

  Use the NASA node to automate work in NASA, and integrate NASA with other applications. n8n has built-in support for a wide range of NASA features, including retrieving imagery and data. 

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

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

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

  ## Operations

  * Astronomy Picture of the Day
      * Get the Astronomy Picture of the Day
  * Asteroid Neo-Feed
      * Retrieve a list of asteroids based on their closest approach date to Earth
  * Asteroid Neo-Lookup
      * Look up an asteroid based on its NASA SPK-ID
  * Asteroid Neo-Browse
      * Browse the overall asteroid dataset
  * DONKI Coronal Mass Ejection
      * Retrieve DONKI coronal mass ejection data
  * DONKI Interplanetary Shock
      * Retrieve DONKI interplanetary shock data
  * DONKI Solar Flare
      * Retrieve DONKI solar flare data
  * DONKI Solar Energetic Particle
      * Retrieve DONKI solar energetic particle data
  * DONKI Magnetopause Crossing
      * Retrieve data on DONKI magnetopause crossings
  * DONKI Radiation Belt Enhancement
      * Retrieve DONKI radiation belt enhancement data
  * DONKI High Speed Stream
      * Retrieve DONKI high speed stream data
  * DONKI WSA+EnlilSimulation
      * Retrieve DONKI WSA+EnlilSimulation data
  * DONKI Notifications
      * Retrieve DONKI notifications data
  * Earth Imagery
      * Retrieve Earth imagery
  * Earth Assets
      * Retrieve Earth assets

  ## Templates and examples

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

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.nasa","version":1,"parameters":{"additionalFields":{}},"position":[900,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":"tutorial","workflow":{"name":"Tutorial-workflow","nodes":[{"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtDay":[1],"triggerAtHour":9}]}},"type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[-680,100],"id":"ef14445c-2f5f-4c78-96c8-66732feb7a8f","name":"Schedule Trigger"},{"parameters":{"resource":"donkiSolarFlare","additionalFields":{"startDate":"={{ $today.minus(7, 'days') }}"}},"type":"n8n-nodes-base.nasa","typeVersion":1,"position":[-460,100],"id":"52c58b93-c780-4aff-a216-d67b28195a45","name":"NASA","credentials":{"nasaApi":{"id":"sSVnxV9AcBmBOYn8","name":"NASA account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"2f469c8e-12b3-4ee5-95fc-ff81508d0b43","leftValue":"={{ $json.classType }}","rightValue":"C","operator":{"type":"string","operation":"contains"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[-240,100],"id":"b54e3289-9ebb-451f-8bac-87edeeeced13","name":"If"},{"parameters":{"resource":"request","operation":"send","binId":"1741914338605-0907339996192","binContent":"=There was a solar flare of class {{$json[\"classType\"]}}","requestOptions":{}},"type":"n8n-nodes-base.postBin","typeVersion":1,"position":[-20,0],"id":"a8b602b6-17b1-4274-8d33-73344b6bb8fb","name":"PostBin(true)"},{"parameters":{"resource":"request","operation":"send","binId":"1741914338605-0907339996192","binContent":"=There was a solar flare of class {{$json[\"classType\"]}}","requestOptions":{}},"type":"n8n-nodes-base.postBin","typeVersion":1,"position":[-20,200],"id":"09c2c7a4-c229-430d-a5b0-8d7491515d9f","name":"PostBin(false)"},{"parameters":{"content":"## Setup required\n\nYou need to create a NASA account and create credentials, and create a bin with Postbin and enter the ID - see [the documentation](https://docs.n8n.io/try-it-out/longer-introduction/)","height":120,"width":600},"type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-720,-60],"id":"08e0b8f9-c90e-4c9c-a663-01aca805b9be","name":"Sticky Note"}],"pinData":{},"connections":{"Schedule Trigger":{"main":[[{"node":"NASA","type":"main","index":0}]]},"NASA":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"PostBin(true)","type":"main","index":0}],[{"node":"PostBin(false)","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"versionId":"37de4877-e4f6-4b9a-b6f0-9b7e7aea0163","meta":{"templateCredsSetupCompleted":true,"instanceId":"cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"},"id":"DPzMzTIyDrYohiw4","tags":[{"createdAt":"2021-06-25T07:47:07.640Z","updatedAt":"2021-06-25T07:47:07.640Z","id":"1","name":"docs"}]},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.nasa","version":1,"parameters":{"resource":"donkiSolarFlare","additionalFields":{"startDate":"={{ $today.minus(7, 'days') }}"}},"position":[-460,100]}],"connections":{"Schedule Trigger":{"main":[[{"node":"NASA","type":"main","index":0}]]},"NASA":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"PostBin(true)","type":"main","index":0}],[{"node":"PostBin(false)","type":"main","index":0}]]}},"source":"docs/_workflows/try-it-out/quickstart/tutorial.json","description":"Workflow example from docs/_workflows/try-it-out/quickstart/tutorial.json"}]

node_connections:
  [{"fromNode":"n8n Form Trigger","toNode":"NASA","connectionType":"main"},{"fromNode":"NASA","toNode":"Respond to Webhook","connectionType":"main"},{"fromNode":"Schedule Trigger","toNode":"NASA","connectionType":"main"},{"fromNode":"NASA","toNode":"If","connectionType":"main"},{"fromNode":"If","toNode":"PostBin(true)","connectionType":"main"},{"fromNode":"If","toNode":"PostBin(false)","connectionType":"main"}]

example_workflow:
  {"name":"NASA Example Workflow","nodes":[{"parameters":{"resource":"asteroidNeoBrowse","operation":"get","asteroidId":"example-value","additionalFields":{},"download":true,"binaryPropertyName":"Example Name","lat":10,"lon":10,"returnAll":false,"limit":20},"id":"8y0k4b8906n9xpu7p3xpb","name":"NASA","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"asteroidNeoBrowse","operation":"get","asteroidId":"example-value","additionalFields":{},"download":true,"binaryPropertyName":"Example Name","lat":10,"lon":10,"returnAll":false,"limit":20}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"astronomyPictureOfTheDay","options":[{"name":"Asteroid Neo-Browse","value":"asteroidNeoBrowse"},{"name":"Asteroid Neo-Feed","value":"asteroidNeoFeed"},{"name":"Asteroid Neo-Lookup","value":"asteroidNeoLookup"},{"name":"Astronomy Picture of the Day","value":"astronomyPictureOfTheDay"},{"name":"DONKI Coronal Mass Ejection","value":"donkiCoronalMassEjection"},{"name":"DONKI High Speed Stream","value":"donkiHighSpeedStream"},{"name":"DONKI Interplanetary Shock","value":"donkiInterplanetaryShock"},{"name":"DONKI Magnetopause Crossing","value":"donkiMagnetopauseCrossing"},{"name":"DONKI Notification","value":"donkiNotifications"},{"name":"DONKI Radiation Belt Enhancement","value":"donkiRadiationBeltEnhancement"},{"name":"DONKI Solar Energetic Particle","value":"donkiSolarEnergeticParticle"},{"name":"DONKI Solar Flare","value":"donkiSolarFlare"},{"name":"DONKI WSA+EnlilSimulation","value":"donkiWsaEnlilSimulation"},{"name":"Earth Asset","value":"earthAssets"},{"name":"Earth Imagery","value":"earthImagery"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Get the Astronomy Picture of the Day","options":[{"name":"Get","value":"get","description":"Get the Astronomy Picture of the Day"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve a list of asteroids based on their closest approach date to Earth","options":[{"name":"Get","value":"get","description":"Retrieve a list of asteroids based on their closest approach date to Earth"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Look up an asteroid based on its NASA SPK-ID","options":[{"name":"Get","value":"get","description":"Look up an asteroid based on its NASA SPK-ID"}]},{"displayName":"Operation","name":"operation","type":"options","default":"getAll","description":"Browse the overall asteroid dataset","options":[{"name":"Get Many","value":"getAll","description":"Browse the overall asteroid dataset"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI coronal mass ejection data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI coronal mass ejection data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI geomagnetic storm data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI geomagnetic storm data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI interplanetary shock data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI interplanetary shock data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI solar flare data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI solar flare data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI solar energetic particle data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI solar energetic particle data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve data on DONKI magnetopause crossings","options":[{"name":"Get","value":"get","description":"Retrieve data on DONKI magnetopause crossings"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI radiation belt enhancement data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI radiation belt enhancement data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI high speed stream data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI high speed stream data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI WSA+EnlilSimulation data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI WSA+EnlilSimulation data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve DONKI notifications data","options":[{"name":"Get","value":"get","description":"Retrieve DONKI notifications data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve Earth imagery","options":[{"name":"Get","value":"get","description":"Retrieve Earth imagery"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve Earth assets","options":[{"name":"Get","value":"get","description":"Retrieve Earth assets"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve Insight Mars Weather Service data","options":[{"name":"Get","value":"get","description":"Retrieve Insight Mars Weather Service data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve Image and Video Library data","options":[{"name":"Get","value":"get","description":"Retrieve Image and Video Library data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve TechTransfer data","options":[{"name":"Get","value":"get","description":"Retrieve TechTransfer data"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Retrieve Two-Line Element Set data","options":[{"name":"Get","value":"get","description":"Retrieve Two-Line Element Set data"}]},{"displayName":"Asteroid ID","name":"asteroidId","type":"string","default":"","required":true,"description":"The ID of the asteroid to be returned","placeholder":"3542519"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Whether to include all the close approach data in the asteroid lookup","placeholder":"Add Field"},{"displayName":"Download Image","name":"download","type":"boolean","default":true,"description":"By default just the URL of the image is returned. When set to true the image will be downloaded."},{"displayName":"Binary Property","name":"binaryPropertyName","type":"string","default":"data","required":true,"description":"Name of the binary property to which to write to"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","placeholder":"Add field"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","placeholder":"Add field"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"The location of the geomagnetic storm","placeholder":"Add field"},{"displayName":"Latitude","name":"lat","type":"number","default":"","description":"Latitude for the location of the image","placeholder":"47.751076"},{"displayName":"Longitude","name":"lon","type":"number","default":"","description":"Longitude for the location of the image","placeholder":"-120.740135"},{"displayName":"Binary Property","name":"binaryPropertyName","type":"string","default":"data","required":true,"description":"Name of the binary property to which to write to"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Date of the image","placeholder":"Add field"},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":20,"description":"Max number of results to return"}]


node_type: n8n-nodes-base.Notion
name: Notion
display_name: Notion
description: Consume Notion API
category: output
icon: file:notion.svg
code_hash: c03a7082cc459b1fc4b4a722f00708276fbcd7889708aebbb5f396e16cf17439
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Notion = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const NotionV1_node_1 = require("./v1/NotionV1.node");
  const NotionV2_node_1 = require("./v2/NotionV2.node");
  class Notion extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Notion',
              name: 'notion',
              icon: 'file:notion.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Notion API',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new NotionV1_node_1.NotionV1(baseDescription),
              2: new NotionV2_node_1.NotionV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Notion = Notion;
  //# sourceMappingURL=Notion.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NotionApi = void 0;
  class NotionApi {
      constructor() {
          this.name = 'notionApi';
          this.displayName = 'Notion API';
          this.documentationUrl = 'notion';
          this.properties = [
              {
                  displayName: 'Internal Integration Secret',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://api.notion.com/v1',
                  url: '/users/me',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              ...requestOptions.headers,
              Authorization: `Bearer ${credentials.apiKey} `,
          };
          if (!requestOptions.headers['Notion-Version']) {
              requestOptions.headers = {
                  ...requestOptions.headers,
                  'Notion-Version': '2022-02-22',
              };
          }
          return requestOptions;
      }
  }
  exports.NotionApi = NotionApi;
  //# sourceMappingURL=NotionApi.credentials.js.map

  // --- Next Credential File ---

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

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NotionApi = void 0;
  class NotionApi {
      constructor() {
          this.name = 'notionApi';
          this.displayName = 'Notion API';
          this.documentationUrl = 'notion';
          this.properties = [
              {
                  displayName: 'Internal Integration Secret',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://api.notion.com/v1',
                  url: '/users/me',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              ...requestOptions.headers,
              Authorization: `Bearer ${credentials.apiKey} `,
          };
          if (!requestOptions.headers['Notion-Version']) {
              requestOptions.headers = {
                  ...requestOptions.headers,
                  'Notion-Version': '2022-02-22',
              };
          }
          return requestOptions;
      }
  }
  exports.NotionApi = NotionApi;
  //# sourceMappingURL=NotionApi.credentials.js.map

  // --- Next Credential File ---

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

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


node_type: n8n-nodes-base.NextCloud
name: NextCloud
display_name: Nextcloud
description: Access data on Nextcloud
category: input
icon: file:nextcloud.svg
code_hash: c16a62145bd04153b769ec1f971038acce59dcb941fc062aed1ae114514924ea
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.NextCloud
documentation_title: Nextcloud node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"nextcloud","description":"Templates for nextcloud"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NextCloud = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const url_1 = require("url");
  const xml2js_1 = require("xml2js");
  const GenericFunctions_1 = require("./GenericFunctions");
  const utilities_1 = require("../../utils/utilities");
  class NextCloud {
      constructor() {
          this.description = {
              displayName: 'Nextcloud',
              name: 'nextCloud',
              icon: 'file:nextcloud.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Access data on Nextcloud',
              defaults: {
                  name: 'Nextcloud',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'nextCloudApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'nextCloudOAuth2Api',
                      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: 'File',
                              value: 'file',
                          },
                          {
                              name: 'Folder',
                              value: 'folder',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'file',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['file'],
                          },
                      },
                      options: [
                          {
                              name: 'Copy',
                              value: 'copy',
                              description: 'Copy a file',
                              action: 'Copy a file',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a file',
                              action: 'Delete a file',
                          },
                          {
                              name: 'Download',
                              value: 'download',
                              description: 'Download a file',
                              action: 'Download a file',
                          },
                          {
                              name: 'Move',
                              value: 'move',
                              description: 'Move a file',
                              action: 'Move a file',
                          },
                          {
                              name: 'Share',
                              value: 'share',
                              description: 'Share a file',
                              action: 'Share a file',
                          },
                          {
                              name: 'Upload',
                              value: 'upload',
                              description: 'Upload a file',
                              action: 'Upload a file',
                          },
                      ],
                      default: 'upload',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['folder'],
                          },
                      },
                      options: [
                          {
                              name: 'Copy',
                              value: 'copy',
                              description: 'Copy a folder',
                              action: 'Copy a folder',
                          },
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a folder',
                              action: 'Create a folder',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a folder',
                              action: 'Delete a folder',
                          },
                          {
                              name: 'List',
                              value: 'list',
                              description: 'Return the contents of a given folder',
                              action: 'List a folder',
                          },
                          {
                              name: 'Move',
                              value: 'move',
                              description: 'Move a folder',
                              action: 'Move a folder',
                          },
                          {
                              name: 'Share',
                              value: 'share',
                              description: 'Share a folder',
                              action: 'Share a folder',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['user'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Invite a user to a NextCloud organization',
                              action: 'Create a user',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a user',
                              action: 'Delete a user',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve information about a single user',
                              action: 'Get a user',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Retrieve a list of users',
                              action: 'Get many users',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Edit attributes related to a user',
                              action: 'Update a user',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'From Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['copy'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/original.txt',
                      description: 'The path of file or folder to copy. The path should start with "/".',
                  },
                  {
                      displayName: 'To Path',
                      name: 'toPath',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['copy'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/copy.txt',
                      description: 'The destination path of file or folder. The path should start with "/".',
                  },
                  {
                      displayName: 'Delete Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['delete'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The path to delete. Can be a single file or a whole folder. The path should start with "/".',
                  },
                  {
                      displayName: 'From Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/old_name.txt',
                      description: 'The path of file or folder to move. The path should start with "/".',
                  },
                  {
                      displayName: 'To Path',
                      name: 'toPath',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/new_name.txt',
                      description: 'The new path of file or folder. The path should start with "/".',
                  },
                  {
                      displayName: 'File Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['download'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The file path of the file to download. Has to contain the full path. The path should start with "/".',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['download'],
                              resource: ['file'],
                          },
                      },
                      description: 'Name of the binary property to which to write the data of the read file',
                  },
                  {
                      displayName: 'File Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The absolute file path of the file to upload. Has to contain the full path. The parent folder has to exist. Existing files get overwritten.',
                  },
                  {
                      displayName: 'Binary Data',
                      name: 'binaryDataUpload',
                      type: 'boolean',
                      default: false,
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                  },
                  {
                      displayName: 'File Content',
                      name: 'fileContent',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              binaryDataUpload: [false],
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '',
                      description: 'The text content of the file to upload',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryPropertyName',
                      type: 'string',
                      default: 'data',
                      required: true,
                      displayOptions: {
                          show: {
                              binaryDataUpload: [true],
                              operation: ['upload'],
                              resource: ['file'],
                          },
                      },
                      placeholder: '',
                      description: 'Name of the binary property which contains the data for the file to be uploaded',
                  },
                  {
                      displayName: 'File Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['share'],
                              resource: ['file', 'folder'],
                          },
                      },
                      placeholder: '/invoices/2019/invoice_1.pdf',
                      description: 'The file path of the file to share. Has to contain the full path. The path should start with "/".',
                  },
                  {
                      displayName: 'Share Type',
                      name: 'shareType',
                      type: 'options',
                      displayOptions: {
                          show: {
                              operation: ['share'],
                              resource: ['file', 'folder'],
                          },
                      },
                      options: [
                          {
                              name: 'Circle',
                              value: 7,
                          },
                          {
                              name: 'Email',
                              value: 4,
                          },
                          {
                              name: 'Group',
                              value: 1,
                          },
                          {
                              name: 'Public Link',
                              value: 3,
                          },
                          {
                              name: 'User',
                              value: 0,
                          },
                      ],
                      default: 0,
                      description: 'The share permissions to set',
                  },
                  {
                      displayName: 'Circle ID',
                      name: 'circleId',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['file', 'folder'],
                              operation: ['share'],
                              shareType: [7],
                          },
                      },
                      default: '',
                      description: 'The ID of the circle to share with',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      placeholder: 'name@email.com',
                      displayOptions: {
                          show: {
                              resource: ['file', 'folder'],
                              operation: ['share'],
                              shareType: [4],
                          },
                      },
                      default: '',
                      description: 'The Email address to share with',
                  },
                  {
                      displayName: 'Group ID',
                      name: 'groupId',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['file', 'folder'],
                              operation: ['share'],
                              shareType: [1],
                          },
                      },
                      default: '',
                      description: 'The ID of the group to share with',
                  },
                  {
                      displayName: 'User',
                      name: 'user',
                      type: 'string',
                      displayOptions: {
                          show: {
                              resource: ['file', 'folder'],
                              operation: ['share'],
                              shareType: [0],
                          },
                      },
                      default: '',
                      description: 'The user to share with',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['file', 'folder'],
                              operation: ['share'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Password',
                              name: 'password',
                              type: 'string',
                              typeOptions: { password: true },
                              displayOptions: {
                                  show: {
                                      '/resource': ['file', 'folder'],
                                      '/operation': ['share'],
                                      '/shareType': [3],
                                  },
                              },
                              default: '',
                              description: 'Optional search string',
                          },
                          {
                              displayName: 'Permissions',
                              name: 'permissions',
                              type: 'options',
                              options: [
                                  {
                                      name: 'All',
                                      value: 31,
                                  },
                                  {
                                      name: 'Create',
                                      value: 4,
                                  },
                                  {
                                      name: 'Delete',
                                      value: 8,
                                  },
                                  {
                                      name: 'Read',
                                      value: 1,
                                  },
                                  {
                                      name: 'Update',
                                      value: 2,
                                  },
                              ],
                              default: 1,
                              description: 'The share permissions to set',
                          },
                      ],
                  },
                  {
                      displayName: 'Folder',
                      name: 'path',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['folder'],
                          },
                      },
                      placeholder: '/invoices/2019',
                      description: 'The folder to create. The parent folder has to exist. The path should start with "/".',
                  },
                  {
                      displayName: 'Folder Path',
                      name: 'path',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['list'],
                              resource: ['folder'],
                          },
                      },
                      placeholder: '/invoices/2019/',
                      description: 'The path of which to list the content. The path should start with "/".',
                  },
                  {
                      displayName: 'Username',
                      name: 'userId',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['create'],
                          },
                      },
                      placeholder: 'john',
                      description: 'Username the user will have',
                  },
                  {
                      displayName: 'Email',
                      name: 'email',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['create'],
                          },
                      },
                      placeholder: 'john@email.com',
                      description: 'The email of the user to invite',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['create'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Display Name',
                              name: 'displayName',
                              type: 'string',
                              default: '',
                              description: 'The display name of the user to invite',
                          },
                      ],
                  },
                  {
                      displayName: 'Username',
                      name: 'userId',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['delete', 'get', 'update'],
                          },
                      },
                      placeholder: 'john',
                      description: 'Username the user will have',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['getAll'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['getAll'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 100,
                      },
                      default: 50,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['getAll'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Search',
                              name: 'search',
                              type: 'string',
                              default: '',
                              description: 'Optional search string',
                          },
                          {
                              displayName: 'Offset',
                              name: 'offset',
                              type: 'number',
                              default: '',
                              description: 'Optional offset value',
                          },
                      ],
                  },
                  {
                      displayName: 'Update Fields',
                      name: 'updateFields',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: false,
                      },
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['user'],
                              operation: ['update'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Fields',
                              name: 'field',
                              values: [
                                  {
                                      displayName: 'Key',
                                      name: 'key',
                                      type: 'options',
                                      default: 'email',
                                      options: [
                                          {
                                              name: 'Address',
                                              value: 'address',
                                              description: 'The new address for the user',
                                          },
                                          {
                                              name: 'Display Name',
                                              value: 'displayname',
                                              description: 'The new display name for the user',
                                          },
                                          {
                                              name: 'Email',
                                              value: 'email',
                                              description: 'The new email for the user',
                                          },
                                          {
                                              name: 'Password',
                                              value: 'password',
                                              description: 'The new password for the user',
                                          },
                                          {
                                              name: 'Twitter',
                                              value: 'twitter',
                                              description: 'The new twitter handle for the user',
                                          },
                                          {
                                              name: 'Website',
                                              value: 'website',
                                              description: 'The new website for the user',
                                          },
                                      ],
                                      description: 'Key of the updated attribute',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'string',
                                      default: '',
                                      description: 'Value of the updated attribute',
                                  },
                              ],
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData().slice();
          const returnData = [];
          const authenticationMethod = this.getNodeParameter('authentication', 0);
          let credentials;
          if (authenticationMethod === 'accessToken') {
              credentials = await this.getCredentials('nextCloudApi');
          }
          else {
              credentials = await this.getCredentials('nextCloudOAuth2Api');
          }
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let endpoint = '';
          let requestMethod = '';
          let responseData;
          let body = '';
          const headers = {};
          let qs;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'file') {
                      if (operation === 'download') {
                          requestMethod = 'GET';
                          endpoint = this.getNodeParameter('path', i);
                      }
                      else if (operation === 'upload') {
                          requestMethod = 'PUT';
                          endpoint = this.getNodeParameter('path', i);
                          if (this.getNodeParameter('binaryDataUpload', i) === true) {
                              const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                              this.helpers.assertBinaryData(i, binaryPropertyName);
                              body = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
                          }
                          else {
                              body = this.getNodeParameter('fileContent', i);
                          }
                      }
                  }
                  else if (resource === 'folder') {
                      if (operation === 'create') {
                          requestMethod = 'MKCOL';
                          endpoint = this.getNodeParameter('path', i);
                      }
                      else if (operation === 'list') {
                          requestMethod = 'PROPFIND';
                          endpoint = this.getNodeParameter('path', i);
                      }
                  }
                  if (['file', 'folder'].includes(resource)) {
                      if (operation === 'copy') {
                          requestMethod = 'COPY';
                          endpoint = this.getNodeParameter('path', i);
                          const toPath = this.getNodeParameter('toPath', i);
                          headers.Destination = `${credentials.webDavUrl}/${encodeURI(toPath)}`;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          endpoint = this.getNodeParameter('path', i);
                      }
                      else if (operation === 'move') {
                          requestMethod = 'MOVE';
                          endpoint = this.getNodeParameter('path', i);
                          const toPath = this.getNodeParameter('toPath', i);
                          headers.Destination = `${credentials.webDavUrl}/${encodeURI(toPath)}`;
                      }
                      else if (operation === 'share') {
                          requestMethod = 'POST';
                          endpoint = 'ocs/v2.php/apps/files_sharing/api/v1/shares';
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                          const bodyParameters = this.getNodeParameter('options', i);
                          bodyParameters.path = this.getNodeParameter('path', i);
                          bodyParameters.shareType = this.getNodeParameter('shareType', i);
                          if (bodyParameters.shareType === 0) {
                              bodyParameters.shareWith = this.getNodeParameter('user', i);
                          }
                          else if (bodyParameters.shareType === 7) {
                              bodyParameters.shareWith = this.getNodeParameter('circleId', i);
                          }
                          else if (bodyParameters.shareType === 4) {
                              bodyParameters.shareWith = this.getNodeParameter('email', i);
                          }
                          else if (bodyParameters.shareType === 1) {
                              bodyParameters.shareWith = this.getNodeParameter('groupId', i);
                          }
                          body = new url_1.URLSearchParams(bodyParameters).toString();
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = 'ocs/v1.php/cloud/users';
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                          const userid = this.getNodeParameter('userId', i);
                          const email = this.getNodeParameter('email', i);
                          body = `userid=${userid}&email=${email}`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.displayName) {
                              body += `&displayName=${additionalFields.displayName}`;
                          }
                      }
                      if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const userid = this.getNodeParameter('userId', i);
                          endpoint = `ocs/v1.php/cloud/users/${userid}`;
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                      }
                      if (operation === 'get') {
                          requestMethod = 'GET';
                          const userid = this.getNodeParameter('userId', i);
                          endpoint = `ocs/v1.php/cloud/users/${userid}`;
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                      }
                      if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          endpoint = 'ocs/v1.php/cloud/users';
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                      }
                      if (operation === 'update') {
                          requestMethod = 'PUT';
                          const userid = this.getNodeParameter('userId', i);
                          endpoint = `ocs/v1.php/cloud/users/${userid}`;
                          body = Object.entries(this.getNodeParameter('updateFields', i).field)
                              .map((entry) => {
                              const [key, value] = entry;
                              return `${key}=${value}`;
                          })
                              .join('&');
                          headers['OCS-APIRequest'] = true;
                          headers['Content-Type'] = 'application/x-www-form-urlencoded';
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
                  let webDavUrl = credentials.webDavUrl;
                  if (webDavUrl.slice(-1) === '/') {
                      webDavUrl = webDavUrl.slice(0, -1);
                  }
                  let encoding = undefined;
                  if (resource === 'file' && operation === 'download') {
                      encoding = null;
                  }
                  try {
                      responseData = await GenericFunctions_1.nextCloudApiRequest.call(this, requestMethod, endpoint, body, headers, encoding, qs);
                  }
                  catch (error) {
                      if (this.continueOnFail()) {
                          if (resource === 'file' && operation === 'download') {
                              items[i].json = { error: error.message };
                          }
                          else {
                              returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
                          }
                          continue;
                      }
                      throw error;
                  }
                  if (resource === 'file' && operation === 'download') {
                      const newItem = {
                          json: items[i].json,
                          pairedItem: { item: i },
                          binary: {},
                      };
                      if (items[i].binary !== undefined) {
                          Object.assign(newItem.binary, items[i].binary);
                      }
                      items[i] = newItem;
                      const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
                      items[i].binary[binaryPropertyName] = await this.helpers.prepareBinaryData(responseData, endpoint);
                  }
                  else if (['file', 'folder'].includes(resource) && operation === 'share') {
                      const jsonResponseData = await new Promise((resolve, reject) => {
                          (0, xml2js_1.parseString)(responseData, { explicitArray: false }, (err, data) => {
                              if (err) {
                                  return reject(err);
                              }
                              if (data.ocs.meta.status !== 'ok') {
                                  return reject(new n8n_workflow_1.NodeApiError(this.getNode(), data.ocs.meta.message || data.ocs.meta.status));
                              }
                              resolve(data.ocs.data);
                          });
                      });
                      const executionData = this.helpers.constructExecutionMetaData((0, utilities_1.wrapData)(jsonResponseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (resource === 'user') {
                      if (operation !== 'getAll') {
                          const jsonResponseData = await new Promise((resolve, reject) => {
                              (0, xml2js_1.parseString)(responseData, { explicitArray: false }, (err, data) => {
                                  if (err) {
                                      return reject(err);
                                  }
                                  if (data.ocs.meta.status !== 'ok') {
                                      return reject(new n8n_workflow_1.NodeApiError(this.getNode(), (data.ocs.meta.message || data.ocs.meta.status)));
                                  }
                                  if (operation === 'delete' || operation === 'update') {
                                      resolve(data.ocs.meta);
                                  }
                                  else {
                                      resolve(data.ocs.data);
                                  }
                              });
                          });
                          const executionData = this.helpers.constructExecutionMetaData((0, utilities_1.wrapData)(jsonResponseData), { itemData: { item: i } });
                          returnData.push(...executionData);
                      }
                      else {
                          const jsonResponseData = await new Promise((resolve, reject) => {
                              (0, xml2js_1.parseString)(responseData, { explicitArray: false }, (err, data) => {
                                  if (err) {
                                      return reject(err);
                                  }
                                  if (data.ocs.meta.status !== 'ok') {
                                      return reject(new n8n_workflow_1.NodeApiError(this.getNode(), data.ocs.meta.message));
                                  }
                                  if (typeof data.ocs.data.users.element === 'string') {
                                      resolve([data.ocs.data.users.element]);
                                  }
                                  else {
                                      resolve(data.ocs.data.users.element);
                                  }
                              });
                          });
                          jsonResponseData.forEach((value) => {
                              returnData.push({ json: { id: value }, pairedItem: { item: i } });
                          });
                      }
                  }
                  else if (resource === 'folder' && operation === 'list') {
                      const jsonResponseData = await new Promise((resolve, reject) => {
                          (0, xml2js_1.parseString)(responseData, { explicitArray: false }, (err, data) => {
                              if (err) {
                                  return reject(err);
                              }
                              resolve(data);
                          });
                      });
                      const propNames = {
                          'd:getlastmodified': 'lastModified',
                          'd:getcontentlength': 'contentLength',
                          'd:getcontenttype': 'contentType',
                      };
                      if (jsonResponseData['d:multistatus'] !== undefined &&
                          jsonResponseData['d:multistatus'] !== null &&
                          jsonResponseData['d:multistatus']['d:response'] !== undefined &&
                          jsonResponseData['d:multistatus']['d:response'] !== null) {
                          let skippedFirst = false;
                          if (Array.isArray(jsonResponseData['d:multistatus']['d:response'])) {
                              for (const item of jsonResponseData['d:multistatus']['d:response']) {
                                  if (!skippedFirst) {
                                      skippedFirst = true;
                                      continue;
                                  }
                                  const newItem = {};
                                  newItem.path = item['d:href'].slice(19);
                                  let props = {};
                                  if (Array.isArray(item['d:propstat'])) {
                                      props = item['d:propstat'][0]['d:prop'];
                                  }
                                  else {
                                      props = item['d:propstat']['d:prop'];
                                  }
                                  for (const propName of Object.keys(propNames)) {
                                      if (props[propName] !== undefined) {
                                          newItem[propNames[propName]] = props[propName];
                                      }
                                  }
                                  if (props['d:resourcetype'] === '') {
                                      newItem.type = 'file';
                                  }
                                  else {
                                      newItem.type = 'folder';
                                  }
                                  newItem.eTag = props['d:getetag'].slice(1, -1);
                                  returnData.push({ json: newItem, pairedItem: { item: i } });
                              }
                          }
                      }
                  }
                  else {
                      const executionData = this.helpers.constructExecutionMetaData((0, utilities_1.wrapData)(responseData), {
                          itemData: { item: i },
                      });
                      returnData.push(...executionData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      if (resource === 'file' && operation === 'download') {
                          items[i].json = { error: error.message };
                      }
                      else {
                          returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
                      }
                      continue;
                  }
                  throw error;
              }
          }
          if (resource === 'file' && operation === 'download') {
              return [items];
          }
          else {
              return [returnData];
          }
      }
  }
  exports.NextCloud = NextCloud;
  //# sourceMappingURL=NextCloud.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NextCloudApi = void 0;
  class NextCloudApi {
      constructor() {
          this.name = 'nextCloudApi';
          this.displayName = 'NextCloud API';
          this.documentationUrl = 'nextCloud';
          this.properties = [
              {
                  displayName: 'Web DAV URL',
                  name: 'webDavUrl',
                  type: 'string',
                  placeholder: 'https://nextcloud.example.com/remote.php/webdav',
                  default: '',
              },
              {
                  displayName: 'User',
                  name: 'user',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: "={{$credentials.webDavUrl.replace('/remote.php/webdav', '')}}",
                  url: '/ocs/v1.php/cloud/capabilities',
                  headers: { 'OCS-APIRequest': true },
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              username: credentials.user,
              password: credentials.password,
          };
          return requestOptions;
      }
  }
  exports.NextCloudApi = NextCloudApi;
  //# sourceMappingURL=NextCloudApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NextCloudOAuth2Api = void 0;
  class NextCloudOAuth2Api {
      constructor() {
          this.name = 'nextCloudOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'NextCloud OAuth2 API';
          this.documentationUrl = 'nextCloud';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Web DAV URL',
                  name: 'webDavUrl',
                  type: 'string',
                  placeholder: 'https://nextcloud.example.com/remote.php/webdav',
                  default: '',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'string',
                  default: 'https://nextcloud.example.com/apps/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'string',
                  default: 'https://nextcloud.example.com/apps/oauth2/api/v1/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.NextCloudOAuth2Api = NextCloudOAuth2Api;
  //# sourceMappingURL=NextCloudOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NextCloudApi = void 0;
  class NextCloudApi {
      constructor() {
          this.name = 'nextCloudApi';
          this.displayName = 'NextCloud API';
          this.documentationUrl = 'nextCloud';
          this.properties = [
              {
                  displayName: 'Web DAV URL',
                  name: 'webDavUrl',
                  type: 'string',
                  placeholder: 'https://nextcloud.example.com/remote.php/webdav',
                  default: '',
              },
              {
                  displayName: 'User',
                  name: 'user',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: "={{$credentials.webDavUrl.replace('/remote.php/webdav', '')}}",
                  url: '/ocs/v1.php/cloud/capabilities',
                  headers: { 'OCS-APIRequest': true },
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.auth = {
              username: credentials.user,
              password: credentials.password,
          };
          return requestOptions;
      }
  }
  exports.NextCloudApi = NextCloudApi;
  //# sourceMappingURL=NextCloudApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NextCloudOAuth2Api = void 0;
  class NextCloudOAuth2Api {
      constructor() {
          this.name = 'nextCloudOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'NextCloud OAuth2 API';
          this.documentationUrl = 'nextCloud';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Web DAV URL',
                  name: 'webDavUrl',
                  type: 'string',
                  placeholder: 'https://nextcloud.example.com/remote.php/webdav',
                  default: '',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'string',
                  default: 'https://nextcloud.example.com/apps/oauth2/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'string',
                  default: 'https://nextcloud.example.com/apps/oauth2/api/v1/token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.NextCloudOAuth2Api = NextCloudOAuth2Api;
  //# sourceMappingURL=NextCloudOAuth2Api.credentials.js.map

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

  # Nextcloud node

  Use the Nextcloud node to automate work in Nextcloud, and integrate Nextcloud with other applications. n8n has built-in support for a wide range of Nextcloud features, including creating, updating, deleting, and getting files, and folders as well as retrieving, and inviting users. 

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

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

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

  ## Operations

  * File
      * Copy a file
      * Delete a file
      * Download a file
      * Move a file
      * Share a file
      * Upload a file
  * Folder
      * Copy a folder
      * Create a folder
      * Delete a folder
      * Return the contents of a given folder
      * Move a folder
      * Share a folder
  * User
      * Invite a user to a Nextcloud organization
      * Delete a user.
      * Retrieve information about a single user.
      * Retrieve a list of users.
      * Edit attributes related to a user.

  ## Templates and examples

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

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

example_workflow:
  {"name":"Nextcloud Example Workflow","nodes":[{"parameters":{"authentication":"accessToken","resource":"file","operation":"create","path":"example-value","toPath":"example-value","binaryPropertyName":"Example Name","binaryDataUpload":false,"fileContent":"example-value","circleId":"example-value","email":"user@example.com","groupId":"example-value","user":"example-value","options":{},"userId":"example-value","additionalFields":{},"returnAll":false,"limit":50,"updateFields":{}},"id":"hhgyrbkttaemnxaz3vwzas","name":"Nextcloud","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"authentication":"accessToken","resource":"file","operation":"create","path":"example-value","toPath":"example-value","binaryPropertyName":"Example Name","binaryDataUpload":false,"fileContent":"example-value","circleId":"example-value","email":"user@example.com","groupId":"example-value","user":"example-value","options":{},"userId":"example-value","additionalFields":{},"returnAll":false,"limit":50,"updateFields":{}}

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":"file","options":[{"name":"File","value":"file"},{"name":"Folder","value":"folder"},{"name":"User","value":"user"}]},{"displayName":"Operation","name":"operation","type":"options","default":"upload","description":"Copy a file","options":[{"name":"Copy","value":"copy","description":"Copy a file"},{"name":"Delete","value":"delete","description":"Delete a file"},{"name":"Download","value":"download","description":"Download a file"},{"name":"Move","value":"move","description":"Move a file"},{"name":"Share","value":"share","description":"Share a file"},{"name":"Upload","value":"upload","description":"Upload a file"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","description":"Copy a folder","options":[{"name":"Copy","value":"copy","description":"Copy a folder"},{"name":"Create","value":"create","description":"Create a folder"},{"name":"Delete","value":"delete","description":"Delete a folder"},{"name":"List","value":"list","description":"Return the contents of a given folder"},{"name":"Move","value":"move","description":"Move a folder"},{"name":"Share","value":"share","description":"Share a folder"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","description":"Invite a user to a NextCloud organization","options":[{"name":"Create","value":"create","description":"Invite a user to a NextCloud organization"},{"name":"Delete","value":"delete","description":"Delete a user"},{"name":"Get","value":"get","description":"Retrieve information about a single user"},{"name":"Get Many","value":"getAll","description":"Retrieve a list of users"},{"name":"Update","value":"update","description":"Edit attributes related to a user"}]},{"displayName":"From Path","name":"path","type":"string","default":"","required":true,"description":"The path of file or folder to copy. The path should start with ","placeholder":"/invoices/original.txt"},{"displayName":"To Path","name":"toPath","type":"string","default":"","required":true,"description":"The destination path of file or folder. The path should start with ","placeholder":"/invoices/copy.txt"},{"displayName":"Delete Path","name":"path","type":"string","default":"","required":true,"description":"The path to delete. Can be a single file or a whole folder. The path should start with ","placeholder":"/invoices/2019/invoice_1.pdf"},{"displayName":"From Path","name":"path","type":"string","default":"","required":true,"description":"The path of file or folder to move. The path should start with ","placeholder":"/invoices/old_name.txt"},{"displayName":"To Path","name":"toPath","type":"string","default":"","required":true,"description":"The new path of file or folder. The path should start with ","placeholder":"/invoices/new_name.txt"},{"displayName":"File Path","name":"path","type":"string","default":"","required":true,"description":"The file path of the file to download. Has to contain the full path. The path should start with ","placeholder":"/invoices/2019/invoice_1.pdf"},{"displayName":"Binary Property","name":"binaryPropertyName","type":"string","default":"data","required":true,"description":"Name of the binary property to which to write the data of the read file"},{"displayName":"File Path","name":"path","type":"string","default":"","required":true,"description":"The absolute file path of the file to upload. Has to contain the full path. The parent folder has to exist. Existing files get overwritten.","placeholder":"/invoices/2019/invoice_1.pdf"},{"displayName":"Binary Data","name":"binaryDataUpload","type":"boolean","default":false,"required":true},{"displayName":"File Content","name":"fileContent","type":"string","default":"","description":"The text content of the file to upload"},{"displayName":"Binary Property","name":"binaryPropertyName","type":"string","default":"data","required":true,"description":"Name of the binary property which contains the data for the file to be uploaded"},{"displayName":"File Path","name":"path","type":"string","default":"","required":true,"description":"The file path of the file to share. Has to contain the full path. The path should start with ","placeholder":"/invoices/2019/invoice_1.pdf"},{"displayName":"Share Type","name":"shareType","type":"options","default":0,"description":"The share permissions to set","options":[{"name":"Circle"},{"name":"Email"},{"name":"Group"},{"name":"Public Link"},{"name":"User"}]},{"displayName":"Circle ID","name":"circleId","type":"string","default":"","description":"The ID of the circle to share with"},{"displayName":"Email","name":"email","type":"string","default":"","description":"The Email address to share with","placeholder":"name@email.com"},{"displayName":"Group ID","name":"groupId","type":"string","default":"","description":"The ID of the group to share with"},{"displayName":"User","name":"user","type":"string","default":"","description":"The user to share with"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Optional search string","placeholder":"Add Option"},{"displayName":"Folder","name":"path","type":"string","default":"","required":true,"description":"The folder to create. The parent folder has to exist. The path should start with ","placeholder":"/invoices/2019"},{"displayName":"Folder Path","name":"path","type":"string","default":"","description":"The path of which to list the content. The path should start with ","placeholder":"/invoices/2019/"},{"displayName":"Username","name":"userId","type":"string","default":"","required":true,"description":"Username the user will have","placeholder":"john"},{"displayName":"Email","name":"email","type":"string","default":"","required":true,"description":"The email of the user to invite","placeholder":"john@email.com"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"The display name of the user to invite","placeholder":"Add Field"},{"displayName":"Username","name":"userId","type":"string","default":"","required":true,"description":"Username the user will have","placeholder":"john"},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":50,"description":"Max number of results to return"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Optional search string","placeholder":"Add Option"},{"displayName":"Update Fields","name":"updateFields","type":"fixedCollection","default":"{","description":"The new address for the user","placeholder":"Add Option"}]


node_type: n8n-nodes-base.N8nTrainingCustomerDatastore
name: N8nTrainingCustomerDatastore
display_name: Customer Datastore (n8n training)
description: Dummy node used for n8n training
category: transform
icon: file:n8nTrainingCustomerDatastore.svg
code_hash: 1eace80e610dd97823a1e152f5ba5308299a1e2b8feaf724095e37ce1c7c92cc
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.N8nTrainingCustomerDatastore
documentation_title: Customer Datastore (n8n Training) node documentation
operations: []
api_methods: []
documentation_examples: []
templates: []
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"operation":"getOnePerson","returnAll":false,"limit":5}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8nTrainingCustomerDatastore = void 0;
  const data = [
      {
          id: '23423532',
          name: 'Jay Gatsby',
          email: 'gatsby@west-egg.com',
          notes: 'Keeps asking about a green light??',
          country: 'US',
          created: '1925-04-10',
      },
      {
          id: '23423533',
          name: 'José Arcadio Buendía',
          email: 'jab@macondo.co',
          notes: 'Lots of people named after him. Very confusing',
          country: 'CO',
          created: '1967-05-05',
      },
      {
          id: '23423534',
          name: 'Max Sendak',
          email: 'info@in-and-out-of-weeks.org',
          notes: 'Keeps rolling his terrible eyes',
          country: 'US',
          created: '1963-04-09',
      },
      {
          id: '23423535',
          name: 'Zaphod Beeblebrox',
          email: 'captain@heartofgold.com',
          notes: 'Felt like I was talking to more than one person',
          country: null,
          created: '1979-10-12',
      },
      {
          id: '23423536',
          name: 'Edmund Pevensie',
          email: 'edmund@narnia.gov',
          notes: 'Passionate sailor',
          country: 'UK',
          created: '1950-10-16',
      },
  ];
  class N8nTrainingCustomerDatastore {
      constructor() {
          this.description = {
              displayName: 'Customer Datastore (n8n training)',
              name: 'n8nTrainingCustomerDatastore',
              icon: 'file:n8nTrainingCustomerDatastore.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"]}}',
              description: 'Dummy node used for n8n training',
              defaults: {
                  name: 'Customer Datastore (n8n training)',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Get One Person',
                              value: 'getOnePerson',
                          },
                          {
                              name: 'Get All People',
                              value: 'getAllPeople',
                          },
                      ],
                      default: 'getOnePerson',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAllPeople'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAllPeople'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 10,
                      },
                      default: 5,
                      description: 'Max number of results to return',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < length; i++) {
              if (operation === 'getOnePerson') {
                  responseData = data[0];
              }
              if (operation === 'getAllPeople') {
                  const returnAll = this.getNodeParameter('returnAll', i);
                  if (returnAll) {
                      responseData = data;
                  }
                  else {
                      const limit = this.getNodeParameter('limit', i);
                      responseData = data.slice(0, limit);
                  }
              }
              if (Array.isArray(responseData)) {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push.apply(returnData, executionData);
              }
              else if (responseData !== undefined) {
                  returnData.push({ json: responseData });
              }
          }
          return [returnData];
      }
  }
  exports.N8nTrainingCustomerDatastore = N8nTrainingCustomerDatastore;
  //# sourceMappingURL=N8nTrainingCustomerDatastore.node.js.map

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

  # Customer Datastore (n8n Training) node

  Use this node only for the n8n new user onboarding tutorial. It provides dummy data for testing purposes and has no further functionality.

workflow_examples:
  [{"name":"very-quick-quickstart-workflow","workflow":{"nodes":[{"parameters":{"operation":"getAllPeople","returnAll":true},"id":"ed1fd9cd-cc4f-4e0e-ba73-9f842db382c3","name":"Customer Datastore","type":"n8n-nodes-base.n8nTrainingCustomerDatastore","position":[540,280],"typeVersion":1},{"parameters":{"content":"**Get fake sample data**","height":300,"width":220},"id":"5ddf393f-62b8-4240-adf8-f9a8f539df4b","name":"Note1","type":"n8n-nodes-base.stickyNote","position":[480,180],"typeVersion":1},{"parameters":{"content":"**Extract data and prepare it for use in the next node**","height":300,"width":220},"id":"6ad194ea-9821-40eb-ae2c-f50cc030300b","name":"Note2","type":"n8n-nodes-base.stickyNote","position":[760,180],"typeVersion":1},{"parameters":{},"id":"5af4b83b-31b6-4c29-aa55-3449f3851e2a","name":"When clicking \"Test Workflow\"","type":"n8n-nodes-base.manualTrigger","position":[300,280],"typeVersion":1},{"parameters":{"assignments":{"assignments":[{"id":"df041e3c-fc09-4ba2-8e6b-37f2c6a02526","name":"customer_id","type":"string","value":"={{ $json.id }}"},{"id":"bf288953-4fef-4f55-a45f-c223714919c0","name":"customer_name","type":"string","value":"={{ $json.name }}"},{"id":"1cff0b21-6740-4697-9d2c-9bcb045af0be","name":"customer_description","type":"string","value":"={{ $json.notes }}"}]},"options":{}},"id":"5dcd5776-5137-4f97-8b76-9f38e1d9ff9e","name":"Edit Fields1","type":"n8n-nodes-base.set","position":[820,280],"typeVersion":3.3},{"parameters":{"customerId":"={{ $json.customer_id }}","message":"=Hi {{ $json.customer_name }}. Your description is: {{  $json.customer_description }}"},"type":"n8n-nodes-base.n8nTrainingCustomerMessenger","typeVersion":1,"position":[1040,280],"id":"a726dcfd-f491-440f-ad64-6ba17472352f","name":"Customer Messenger (n8n training)"}],"connections":{"Customer Datastore":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"When clicking \"Test Workflow\"":{"main":[[{"node":"Customer Datastore","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Customer Messenger (n8n training)","type":"main","index":0}]]}},"pinData":{},"meta":{"instanceId":"cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.n8nTrainingCustomerDatastore","version":1,"parameters":{"operation":"getAllPeople","returnAll":true},"position":[540,280]}],"connections":{"Customer Datastore":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"When clicking \"Test Workflow\"":{"main":[[{"node":"Customer Datastore","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Customer Messenger (n8n training)","type":"main","index":0}]]}},"source":"docs/_workflows/try-it-out/quickstart/very-quick-quickstart-workflow.json","description":"Workflow example from docs/_workflows/try-it-out/quickstart/very-quick-quickstart-workflow.json"}]

node_connections:
  [{"fromNode":"Customer Datastore","toNode":"Edit Fields1","connectionType":"main"},{"fromNode":"When clicking \"Test Workflow\"","toNode":"Customer Datastore","connectionType":"main"},{"fromNode":"Edit Fields1","toNode":"Customer Messenger (n8n training)","connectionType":"main"}]

example_workflow:
  {"name":"Customer Datastore (n8n training) Example Workflow","nodes":[{"parameters":{"operation":"getOnePerson","returnAll":false,"limit":5},"id":"bo2zk4xvuwsf8z4z8a5zyp","name":"Customer Datastore (n8n training)","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"getOnePerson","options":[{"name":"Get One Person","value":"getOnePerson"},{"name":"Get All People","value":"getAllPeople"}]},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":5,"description":"Max number of results to return"}]


node_type: n8n-nodes-base.N8nTrainingCustomerMessenger
name: N8nTrainingCustomerMessenger
display_name: Customer Messenger (n8n training)
description: Dummy node used for n8n training
category: transform
icon: file:n8nTrainingCustomerMessenger.svg
code_hash: 9d9edad934e5d070c2f6c86b293bbc30e6ffe3836a7266c1abf0f68e9d89e0dc
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.N8nTrainingCustomerMessenger
documentation_title: Customer Messenger (n8n Training) node documentation
operations: []
api_methods: []
documentation_examples: []
templates: []
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"customerId":"example-value","message":"example-value"}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:59
updated_at: 2025-06-12 08:58:59
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.N8nTrainingCustomerMessenger = void 0;
  class N8nTrainingCustomerMessenger {
      constructor() {
          this.description = {
              displayName: 'Customer Messenger (n8n training)',
              name: 'n8nTrainingCustomerMessenger',
              icon: 'file:n8nTrainingCustomerMessenger.svg',
              group: ['transform'],
              version: 1,
              description: 'Dummy node used for n8n training',
              defaults: {
                  name: 'Customer Messenger (n8n training)',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Customer ID',
                      name: 'customerId',
                      type: 'string',
                      required: true,
                      default: '',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      required: true,
                      typeOptions: {
                          rows: 4,
                      },
                      default: '',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          for (let i = 0; i < length; i++) {
              const customerId = this.getNodeParameter('customerId', i);
              const message = this.getNodeParameter('message', i);
              responseData = { output: `Sent message to customer ${customerId}:  ${message}` };
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          return [returnData];
      }
  }
  exports.N8nTrainingCustomerMessenger = N8nTrainingCustomerMessenger;
  //# sourceMappingURL=N8nTrainingCustomerMessenger.node.js.map

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

  # Customer Messenger (n8n Training) node

  Use this node only for the n8n new user onboarding tutorial. It provides no further functionality.

workflow_examples:
  [{"name":"very-quick-quickstart-workflow","workflow":{"nodes":[{"parameters":{"operation":"getAllPeople","returnAll":true},"id":"ed1fd9cd-cc4f-4e0e-ba73-9f842db382c3","name":"Customer Datastore","type":"n8n-nodes-base.n8nTrainingCustomerDatastore","position":[540,280],"typeVersion":1},{"parameters":{"content":"**Get fake sample data**","height":300,"width":220},"id":"5ddf393f-62b8-4240-adf8-f9a8f539df4b","name":"Note1","type":"n8n-nodes-base.stickyNote","position":[480,180],"typeVersion":1},{"parameters":{"content":"**Extract data and prepare it for use in the next node**","height":300,"width":220},"id":"6ad194ea-9821-40eb-ae2c-f50cc030300b","name":"Note2","type":"n8n-nodes-base.stickyNote","position":[760,180],"typeVersion":1},{"parameters":{},"id":"5af4b83b-31b6-4c29-aa55-3449f3851e2a","name":"When clicking \"Test Workflow\"","type":"n8n-nodes-base.manualTrigger","position":[300,280],"typeVersion":1},{"parameters":{"assignments":{"assignments":[{"id":"df041e3c-fc09-4ba2-8e6b-37f2c6a02526","name":"customer_id","type":"string","value":"={{ $json.id }}"},{"id":"bf288953-4fef-4f55-a45f-c223714919c0","name":"customer_name","type":"string","value":"={{ $json.name }}"},{"id":"1cff0b21-6740-4697-9d2c-9bcb045af0be","name":"customer_description","type":"string","value":"={{ $json.notes }}"}]},"options":{}},"id":"5dcd5776-5137-4f97-8b76-9f38e1d9ff9e","name":"Edit Fields1","type":"n8n-nodes-base.set","position":[820,280],"typeVersion":3.3},{"parameters":{"customerId":"={{ $json.customer_id }}","message":"=Hi {{ $json.customer_name }}. Your description is: {{  $json.customer_description }}"},"type":"n8n-nodes-base.n8nTrainingCustomerMessenger","typeVersion":1,"position":[1040,280],"id":"a726dcfd-f491-440f-ad64-6ba17472352f","name":"Customer Messenger (n8n training)"}],"connections":{"Customer Datastore":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"When clicking \"Test Workflow\"":{"main":[[{"node":"Customer Datastore","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Customer Messenger (n8n training)","type":"main","index":0}]]}},"pinData":{},"meta":{"instanceId":"cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.n8nTrainingCustomerMessenger","version":1,"parameters":{"customerId":"={{ $json.customer_id }}","message":"=Hi {{ $json.customer_name }}. Your description is: {{  $json.customer_description }}"},"position":[1040,280]}],"connections":{"Customer Datastore":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"When clicking \"Test Workflow\"":{"main":[[{"node":"Customer Datastore","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Customer Messenger (n8n training)","type":"main","index":0}]]}},"source":"docs/_workflows/try-it-out/quickstart/very-quick-quickstart-workflow.json","description":"Workflow example from docs/_workflows/try-it-out/quickstart/very-quick-quickstart-workflow.json"}]

node_connections:
  [{"fromNode":"Customer Datastore","toNode":"Edit Fields1","connectionType":"main"},{"fromNode":"When clicking \"Test Workflow\"","toNode":"Customer Datastore","connectionType":"main"},{"fromNode":"Edit Fields1","toNode":"Customer Messenger (n8n training)","connectionType":"main"}]

example_workflow:
  {"name":"Customer Messenger (n8n training) Example Workflow","nodes":[{"parameters":{"customerId":"example-value","message":"example-value"},"id":"a4ai6v0zz2rufvhcn9x0l","name":"Customer Messenger (n8n training)","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Customer ID","name":"customerId","type":"string","default":"","required":true},{"displayName":"Message","name":"message","type":"string","default":"","required":true}]


node_type: n8n-nodes-base.OneSimpleApi
name: OneSimpleApi
display_name: One Simple API
description: A toolbox of no-code utilities
category: transform
icon: file:onesimpleapi.svg
code_hash: f12c32f96a4405d7edd7a8d6bb2f024daec690414b8b1d90cbecca1105d267c6
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.OneSimpleApi
documentation_title: One Simple API node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"one-simple-api","description":"Templates for one-simple-api"}]
related_resources: [{"title":"One Simple API's documentation","url":"https://onesimpleapi.com/docs","type":"api"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OneSimpleApi = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class OneSimpleApi {
      constructor() {
          this.description = {
              displayName: 'One Simple API',
              name: 'oneSimpleApi',
              icon: 'file:onesimpleapi.svg',
              group: ['transform'],
              version: 1,
              description: 'A toolbox of no-code utilities',
              defaults: {
                  name: 'One Simple API',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'oneSimpleApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Information',
                              value: 'information',
                          },
                          {
                              name: 'Social Profile',
                              value: 'socialProfile',
                          },
                          {
                              name: 'Utility',
                              value: 'utility',
                          },
                          {
                              name: 'Website',
                              value: 'website',
                          },
                      ],
                      default: 'website',
                      required: true,
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['website'],
                          },
                      },
                      options: [
                          {
                              name: 'Generate PDF',
                              value: 'pdf',
                              description: 'Generate a PDF from a webpage',
                              action: 'Generate PDF',
                          },
                          {
                              name: 'Get SEO Data',
                              value: 'seo',
                              description: 'Get SEO information from website',
                              action: 'Get SEO Data',
                          },
                          {
                              name: 'Take Screenshot',
                              value: 'screenshot',
                              description: 'Create a screenshot from a webpage',
                              action: 'Screenshot',
                          },
                      ],
                      default: 'pdf',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['socialProfile'],
                          },
                      },
                      options: [
                          {
                              name: 'Instagram',
                              value: 'instagramProfile',
                              description: 'Get details about an Instagram profile',
                              action: 'Get details about an Instagram profile',
                          },
                          {
                              name: 'Spotify',
                              value: 'spotifyArtistProfile',
                              description: 'Get details about a Spotify Artist',
                              action: 'Get details about a Spotify artist',
                          },
                      ],
                      default: 'instagramProfile',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['information'],
                          },
                      },
                      options: [
                          {
                              name: 'Exchange Rate',
                              value: 'exchangeRate',
                              description: 'Convert a value between currencies',
                              action: 'Convert a value between currencies',
                          },
                          {
                              name: 'Image Metadata',
                              value: 'imageMetadata',
                              description: 'Retrieve image metadata from a URL',
                              action: 'Get image metadata from a URL',
                          },
                      ],
                      default: 'exchangeRate',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['utility'],
                          },
                      },
                      options: [
                          {
                              name: 'Expand URL',
                              value: 'expandURL',
                              description: 'Expand a shortened URL',
                              action: 'Expand a shortened URL',
                          },
                          {
                              name: 'Generate QR Code',
                              value: 'qrCode',
                              description: 'Generate a QR Code',
                              action: 'Generate a QR code utility',
                          },
                          {
                              name: 'Validate Email',
                              value: 'validateEmail',
                              description: 'Validate an email address',
                              action: 'Validate an email address',
                          },
                      ],
                      default: 'validateEmail',
                  },
                  {
                      displayName: 'Webpage URL',
                      name: 'link',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['pdf'],
                              resource: ['website'],
                          },
                      },
                      default: '',
                      description: 'Link to webpage to convert',
                  },
                  {
                      displayName: 'Download PDF?',
                      name: 'download',
                      type: 'boolean',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['pdf'],
                              resource: ['website'],
                          },
                      },
                      default: false,
                      description: 'Whether to download the PDF or return a link to it',
                  },
                  {
                      displayName: 'Put Output In Field',
                      name: 'output',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['pdf'],
                              resource: ['website'],
                              download: [true],
                          },
                      },
                      default: 'data',
                      description: 'The name of the output field to put the binary file data in',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['website'],
                              operation: ['pdf'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Page Size',
                              name: 'page',
                              type: 'options',
                              options: [
                                  {
                                      name: 'A0',
                                      value: 'A0',
                                  },
                                  {
                                      name: 'A1',
                                      value: 'A1',
                                  },
                                  {
                                      name: 'A2',
                                      value: 'A2',
                                  },
                                  {
                                      name: 'A3',
                                      value: 'A3',
                                  },
                                  {
                                      name: 'A4',
                                      value: 'A4',
                                  },
                                  {
                                      name: 'A5',
                                      value: 'A5',
                                  },
                                  {
                                      name: 'A6',
                                      value: 'A6',
                                  },
                                  {
                                      name: 'Ledger',
                                      value: 'Ledger',
                                  },
                                  {
                                      name: 'Legal',
                                      value: 'Legal',
                                  },
                                  {
                                      name: 'Letter',
                                      value: 'Letter',
                                  },
                                  {
                                      name: 'Tabloid',
                                      value: 'Tabloid',
                                  },
                              ],
                              default: '',
                          },
                          {
                              displayName: 'Force Refresh',
                              name: 'force',
                              type: 'boolean',
                              default: false,
                              description: "Normally the API will reuse a previously taken screenshot of the URL to give a faster response. This option allows you to retake the screenshot at that exact time, for those times when it's necessary.",
                          },
                      ],
                  },
                  {
                      displayName: 'QR Content',
                      name: 'message',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['qrCode'],
                              resource: ['utility'],
                          },
                      },
                      default: '',
                      description: 'The text that should be turned into a QR code - like a website URL',
                  },
                  {
                      displayName: 'Download Image?',
                      name: 'download',
                      type: 'boolean',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['qrCode'],
                              resource: ['utility'],
                          },
                      },
                      default: false,
                      description: 'Whether to download the QR code or return a link to it',
                  },
                  {
                      displayName: 'Put Output In Field',
                      name: 'output',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['qrCode'],
                              resource: ['utility'],
                              download: [true],
                          },
                      },
                      default: 'data',
                      description: 'The name of the output field to put the binary file data in',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['utility'],
                              operation: ['qrCode'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Size',
                              name: 'size',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Small',
                                      value: 'Small',
                                  },
                                  {
                                      name: 'Medium',
                                      value: 'Medium',
                                  },
                                  {
                                      name: 'Large',
                                      value: 'Large',
                                  },
                              ],
                              default: 'Small',
                              description: 'The QR Code size',
                          },
                          {
                              displayName: 'Format',
                              name: 'format',
                              type: 'options',
                              options: [
                                  {
                                      name: 'PNG',
                                      value: 'PNG',
                                  },
                                  {
                                      name: 'SVG',
                                      value: 'SVG',
                                  },
                              ],
                              default: 'PNG',
                              description: 'The QR Code format',
                          },
                      ],
                  },
                  {
                      displayName: 'Webpage URL',
                      name: 'link',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['screenshot'],
                              resource: ['website'],
                          },
                      },
                      default: '',
                      description: 'Link to webpage to convert',
                  },
                  {
                      displayName: 'Download Screenshot?',
                      name: 'download',
                      type: 'boolean',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['screenshot'],
                              resource: ['website'],
                          },
                      },
                      default: false,
                      description: 'Whether to download the screenshot or return a link to it',
                  },
                  {
                      displayName: 'Put Output In Field',
                      name: 'output',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['screenshot'],
                              resource: ['website'],
                              download: [true],
                          },
                      },
                      default: 'data',
                      description: 'The name of the output field to put the binary file data in',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['website'],
                              operation: ['screenshot'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Screen Size',
                              name: 'screen',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Phone',
                                      value: 'phone',
                                  },
                                  {
                                      name: 'Phone Landscape',
                                      value: 'phone-landscape',
                                  },
                                  {
                                      name: 'Retina',
                                      value: 'retina',
                                  },
                                  {
                                      name: 'Tablet',
                                      value: 'tablet',
                                  },
                                  {
                                      name: 'Tablet Landscape',
                                      value: 'tablet-landscape',
                                  },
                              ],
                              default: '',
                          },
                          {
                              displayName: 'Force Refresh',
                              name: 'force',
                              type: 'boolean',
                              default: false,
                              description: "Normally the API will reuse a previously taken screenshot of the URL to give a faster response. This option allows you to retake the screenshot at that exact time, for those times when it's necessary.",
                          },
                          {
                              displayName: 'Full Page',
                              name: 'fullpage',
                              type: 'boolean',
                              default: false,
                              description: 'The API takes a screenshot of the viewable area for the desired screen size. If you need a screenshot of the whole length of the page, use this option.',
                          },
                      ],
                  },
                  {
                      displayName: 'Profile Name',
                      name: 'profileName',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['instagramProfile'],
                              resource: ['socialProfile'],
                          },
                      },
                      default: '',
                      description: 'Profile name to get details of',
                  },
                  {
                      displayName: 'Artist Name',
                      name: 'artistName',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['spotifyArtistProfile'],
                              resource: ['socialProfile'],
                          },
                      },
                      default: '',
                      description: 'Artist name to get details for',
                  },
                  {
                      displayName: 'Value',
                      name: 'value',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['exchangeRate'],
                              resource: ['information'],
                          },
                      },
                      default: '',
                      description: 'Value to convert',
                  },
                  {
                      displayName: 'From Currency',
                      name: 'fromCurrency',
                      type: 'string',
                      required: true,
                      placeholder: 'USD',
                      displayOptions: {
                          show: {
                              operation: ['exchangeRate'],
                              resource: ['information'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'To Currency',
                      name: 'toCurrency',
                      type: 'string',
                      placeholder: 'EUR',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['exchangeRate'],
                              resource: ['information'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'Link To Image',
                      name: 'link',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['imageMetadata'],
                              resource: ['information'],
                          },
                      },
                      default: '',
                      description: 'Image to get metadata from',
                  },
                  {
                      displayName: 'Webpage URL',
                      name: 'link',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['seo'],
                              resource: ['website'],
                          },
                      },
                      default: '',
                      description: 'Webpage to get SEO information for',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['website'],
                              operation: ['seo'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Include Headers?',
                              name: 'headers',
                              type: 'boolean',
                              default: false,
                          },
                      ],
                  },
                  {
                      displayName: 'Email Address',
                      name: 'emailAddress',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['validateEmail'],
                              resource: ['utility'],
                          },
                      },
                      default: '',
                  },
                  {
                      displayName: 'URL',
                      name: 'link',
                      type: 'string',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['expandURL'],
                              resource: ['utility'],
                          },
                      },
                      default: '',
                      description: 'URL to unshorten',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          let download;
          for (let i = 0; i < length; i++) {
              try {
                  const resource = this.getNodeParameter('resource', 0);
                  const operation = this.getNodeParameter('operation', 0);
                  if (resource === 'website') {
                      if (operation === 'pdf') {
                          const link = this.getNodeParameter('link', i);
                          const options = this.getNodeParameter('options', i);
                          download = this.getNodeParameter('download', i);
                          qs.url = link;
                          if (options.page) {
                              qs.page = options.page;
                          }
                          if (options.force) {
                              qs.force = 'yes';
                          }
                          else {
                              qs.force = 'no';
                          }
                          const response = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/pdf', {}, qs);
                          if (download) {
                              const output = this.getNodeParameter('output', i);
                              const buffer = (await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '', {}, {}, response.url, { json: false, encoding: null }));
                              responseData = {
                                  json: response,
                                  binary: {
                                      [output]: await this.helpers.prepareBinaryData(buffer),
                                  },
                              };
                          }
                          else {
                              responseData = response;
                          }
                      }
                      if (operation === 'screenshot') {
                          const link = this.getNodeParameter('link', i);
                          const options = this.getNodeParameter('options', i);
                          download = this.getNodeParameter('download', i);
                          qs.url = link;
                          if (options.screen) {
                              qs.screen = options.screen;
                          }
                          if (options.fullpage) {
                              qs.fullpage = 'yes';
                          }
                          else {
                              qs.fullpage = 'no';
                          }
                          if (options.force) {
                              qs.force = 'yes';
                          }
                          else {
                              qs.force = 'no';
                          }
                          const response = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/screenshot', {}, qs);
                          if (download) {
                              const output = this.getNodeParameter('output', i);
                              const buffer = (await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '', {}, {}, response.url, { json: false, encoding: null }));
                              responseData = {
                                  json: response,
                                  binary: {
                                      [output]: await this.helpers.prepareBinaryData(buffer),
                                  },
                              };
                          }
                          else {
                              responseData = response;
                          }
                      }
                      if (operation === 'seo') {
                          const link = this.getNodeParameter('link', i);
                          const options = this.getNodeParameter('options', i);
                          qs.url = link;
                          if (options.headers) {
                              qs.headers = 'yes';
                          }
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/page_info', {}, qs);
                      }
                  }
                  if (resource === 'socialProfile') {
                      if (operation === 'instagramProfile') {
                          const profileName = this.getNodeParameter('profileName', i);
                          qs.profile = profileName;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/instagram_profile', {}, qs);
                      }
                      if (operation === 'spotifyArtistProfile') {
                          const artistName = this.getNodeParameter('artistName', i);
                          qs.profile = artistName;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/spotify_profile', {}, qs);
                      }
                  }
                  if (resource === 'information') {
                      if (operation === 'exchangeRate') {
                          const value = this.getNodeParameter('value', i);
                          const fromCurrency = this.getNodeParameter('fromCurrency', i);
                          const toCurrency = this.getNodeParameter('toCurrency', i);
                          qs.from_currency = fromCurrency;
                          qs.to_currency = toCurrency;
                          qs.from_value = value;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/exchange_rate', {}, qs);
                      }
                      if (operation === 'imageMetadata') {
                          const link = this.getNodeParameter('link', i);
                          qs.url = link;
                          qs.raw = true;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/image_info', {}, qs);
                      }
                  }
                  if (resource === 'utility') {
                      if (operation === 'validateEmail') {
                          const emailAddress = this.getNodeParameter('emailAddress', i);
                          qs.email = emailAddress;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/email', {}, qs);
                      }
                      if (operation === 'expandURL') {
                          const url = this.getNodeParameter('link', i);
                          qs.url = url;
                          responseData = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/unshorten', {}, qs);
                      }
                      if (operation === 'qrCode') {
                          const message = this.getNodeParameter('message', i);
                          const options = this.getNodeParameter('options', i);
                          download = this.getNodeParameter('download', i);
                          qs.message = message;
                          if (options.size) {
                              qs.size = options.size;
                          }
                          if (options.format) {
                              qs.format = options.format;
                          }
                          const response = await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '/qr_code', {}, qs);
                          if (download) {
                              const output = this.getNodeParameter('output', i);
                              const buffer = (await GenericFunctions_1.oneSimpleApiRequest.call(this, 'GET', '', {}, {}, response.url, { json: false, encoding: null }));
                              responseData = {
                                  json: response,
                                  binary: {
                                      [output]: await this.helpers.prepareBinaryData(buffer),
                                  },
                              };
                          }
                          else {
                              responseData = response;
                          }
                      }
                  }
                  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;
              }
          }
          if (download) {
              return [returnData];
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.OneSimpleApi = OneSimpleApi;
  //# sourceMappingURL=OneSimpleApi.node.js.map

documentation_markdown:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: One Simple API node documentation
  description: Learn how to use the One Simple API node in n8n. Follow technical documentation to integrate One Simple API node into your workflows.
  contentType: [integration, reference]
  ---
  <!-- vale off -->
  <!-- linting off because 'simple' isn't something I want to add to accept.txt -->
  # One Simple API node

  Use the One Simple API node to automate work in One Simple API, and integrate One Simple API with other applications. n8n has built-in support for a wide range of One Simple API features, including getting profiles, retrieving information, and generating utilities. 

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

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

  ## Operations

  * Information
      * Convert a value between currencies
      * Retrieve image metadata from a URL
  * Social Profile
      * Get details about an Instagram profile
      * Get details about a Spotify Artist
  * Utility
      * Expand a shortened url
      * Generate a QR Code
      * Validate an email address
  * Website
      * Generate a PDF from a webpage
      * Get SEO information from website
      * Create a screenshot from a webpage

  ## Templates and examples

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

  ## Related resources

  Refer to [One Simple API's documentation](https://onesimpleapi.com/docs){:target=_blank .external-link} for more information about the service.

  <!-- vale on -->

example_workflow:
  {"name":"One Simple API Example Workflow","nodes":[{"parameters":{"resource":"information","operation":"expandURL","link":"example-value","download":false,"output":"data","options":{},"message":"example-value","profileName":"Example Name","artistName":"Example Name","value":"example-value","fromCurrency":"example-value","toCurrency":"example-value","emailAddress":"user@example.com"},"id":"drerbvn2ojm7m84cv4gjoc","name":"One Simple API","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"information","operation":"expandURL","link":"example-value","download":false,"output":"data","options":{},"message":"example-value","profileName":"Example Name","artistName":"Example Name","value":"example-value","fromCurrency":"example-value","toCurrency":"example-value","emailAddress":"user@example.com"}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"website","required":true,"options":[{"name":"Information","value":"information"},{"name":"Social Profile","value":"socialProfile"},{"name":"Utility","value":"utility"},{"name":"Website","value":"website"}]},{"displayName":"Operation","name":"operation","type":"options","default":"pdf","description":"Generate a PDF from a webpage","options":[{"name":"Generate PDF","value":"pdf","description":"Generate a PDF from a webpage"},{"name":"Get SEO Data","value":"seo","description":"Get SEO information from website"},{"name":"Take Screenshot","value":"screenshot","description":"Create a screenshot from a webpage"}]},{"displayName":"Operation","name":"operation","type":"options","default":"instagramProfile","description":"Get details about an Instagram profile","options":[{"name":"Instagram","value":"instagramProfile","description":"Get details about an Instagram profile"},{"name":"Spotify","value":"spotifyArtistProfile","description":"Get details about a Spotify Artist"}]},{"displayName":"Operation","name":"operation","type":"options","default":"exchangeRate","description":"Convert a value between currencies","options":[{"name":"Exchange Rate","value":"exchangeRate","description":"Convert a value between currencies"},{"name":"Image Metadata","value":"imageMetadata","description":"Retrieve image metadata from a URL"}]},{"displayName":"Operation","name":"operation","type":"options","default":"validateEmail","description":"Expand a shortened URL","options":[{"name":"Expand URL","value":"expandURL","description":"Expand a shortened URL"},{"name":"Generate QR Code","value":"qrCode","description":"Generate a QR Code"},{"name":"Validate Email","value":"validateEmail","description":"Validate an email address"}]},{"displayName":"Webpage URL","name":"link","type":"string","default":"","required":true,"description":"Link to webpage to convert"},{"displayName":"Download PDF?","name":"download","type":"boolean","default":false,"required":true,"description":"Whether to download the PDF or return a link to it"},{"displayName":"Put Output In Field","name":"output","type":"string","default":"data","required":true,"description":"The name of the output field to put the binary file data in"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Normally the API will reuse a previously taken screenshot of the URL to give a faster response. This option allows you to retake the screenshot at that exact time, for those times when it","placeholder":"Add Option"},{"displayName":"QR Content","name":"message","type":"string","default":"","required":true,"description":"The text that should be turned into a QR code - like a website URL"},{"displayName":"Download Image?","name":"download","type":"boolean","default":false,"required":true,"description":"Whether to download the QR code or return a link to it"},{"displayName":"Put Output In Field","name":"output","type":"string","default":"data","required":true,"description":"The name of the output field to put the binary file data in"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"The QR Code size","placeholder":"Add Option"},{"displayName":"Webpage URL","name":"link","type":"string","default":"","required":true,"description":"Link to webpage to convert"},{"displayName":"Download Screenshot?","name":"download","type":"boolean","default":false,"required":true,"description":"Whether to download the screenshot or return a link to it"},{"displayName":"Put Output In Field","name":"output","type":"string","default":"data","required":true,"description":"The name of the output field to put the binary file data in"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Normally the API will reuse a previously taken screenshot of the URL to give a faster response. This option allows you to retake the screenshot at that exact time, for those times when it","placeholder":"Add Option"},{"displayName":"Profile Name","name":"profileName","type":"string","default":"","required":true,"description":"Profile name to get details of"},{"displayName":"Artist Name","name":"artistName","type":"string","default":"","required":true,"description":"Artist name to get details for"},{"displayName":"Value","name":"value","type":"string","default":"","required":true,"description":"Value to convert"},{"displayName":"From Currency","name":"fromCurrency","type":"string","default":"","required":true,"placeholder":"USD"},{"displayName":"To Currency","name":"toCurrency","type":"string","default":"","required":true,"placeholder":"EUR"},{"displayName":"Link To Image","name":"link","type":"string","default":"","required":true,"description":"Image to get metadata from"},{"displayName":"Webpage URL","name":"link","type":"string","default":"","required":true,"description":"Webpage to get SEO information for"},{"displayName":"Options","name":"options","type":"collection","default":"{","placeholder":"Add Option"},{"displayName":"Email Address","name":"emailAddress","type":"string","default":"","required":true},{"displayName":"URL","name":"link","type":"string","default":"","required":true,"description":"URL to unshorten"}]


node_type: n8n-nodes-base.Npm
name: Npm
display_name: Npm
description: Consume NPM registry API
category: input
icon: file:npm.svg
code_hash: 89679c6261436e1c5088d99d5aa7ab0d04d15aff72f28f314d46904bc381601a
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Npm
documentation_title: npm node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"npm","description":"Templates for npm"}]
related_resources: [{"title":"npm's documentation","url":"https://docs.npmjs.com/","type":"external"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"package","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Npm = void 0;
  const PackageDescription_1 = require("./PackageDescription");
  const DistTagDescription_1 = require("./DistTagDescription");
  class Npm {
      constructor() {
          this.description = {
              displayName: 'Npm',
              name: 'npm',
              icon: 'file:npm.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
              description: 'Consume NPM registry API',
              defaults: {
                  name: 'npm',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'npmApi',
                      required: false,
                  },
              ],
              requestDefaults: {
                  baseURL: '={{ $credentials.registryUrl }}',
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Package',
                              value: 'package',
                          },
                          {
                              name: 'Distribution Tag',
                              value: 'distTag',
                          },
                      ],
                      default: 'package',
                  },
                  ...PackageDescription_1.packageOperations,
                  ...PackageDescription_1.packageFields,
                  ...DistTagDescription_1.distTagOperations,
                  ...DistTagDescription_1.distTagFields,
              ],
          };
      }
  }
  exports.Npm = Npm;
  //# sourceMappingURL=Npm.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NpmApi = void 0;
  class NpmApi {
      constructor() {
          this.name = 'npmApi';
          this.displayName = 'Npm API';
          this.documentationUrl = 'npm';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Registry Url',
                  name: 'registryUrl',
                  type: 'string',
                  default: 'https://registry.npmjs.org',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.registryUrl}}',
                  url: '/-/whoami',
              },
          };
      }
  }
  exports.NpmApi = NpmApi;
  //# sourceMappingURL=NpmApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.NpmApi = void 0;
  class NpmApi {
      constructor() {
          this.name = 'npmApi';
          this.displayName = 'Npm API';
          this.documentationUrl = 'npm';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Registry Url',
                  name: 'registryUrl',
                  type: 'string',
                  default: 'https://registry.npmjs.org',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.registryUrl}}',
                  url: '/-/whoami',
              },
          };
      }
  }
  exports.NpmApi = NpmApi;
  //# sourceMappingURL=NpmApi.credentials.js.map

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

  # npm node

  Use the npm node to automate work in npm, and integrate npm with other applications.

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

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

  ## Operations

  * Package
  	* Get Package Metadata
  	* Get Package Versions
  	* Search for Packages
  * Distribution Tag
  	* Get All Tags
  	* Update a Tag

  ## Templates and examples

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

  ## Related resources

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

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

example_workflow:
  {"name":"Npm Example Workflow","nodes":[{"parameters":{"resource":"package","dynamic_property":null},"id":"b917gdym7xv2ll1opbpb4i","name":"Npm","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":"package","options":[{"name":"Package","value":"package"},{"name":"Distribution Tag","value":"distTag"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PackageDescription_1.packageOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PackageDescription_1.packageFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DistTagDescription_1.distTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DistTagDescription_1.distTagFields"}]


node_type: n8n-nodes-base.OpenWeatherMap
name: OpenWeatherMap
display_name: OpenWeatherMap
description: Gets current and future weather information
category: input
icon: fa:sun
code_hash: 030deaa4964a0c1de6ebf4f3ab30894d4cecb9d9867ba38910083cda34889b9c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.OpenWeatherMap
documentation_title: OpenWeatherMap node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"openweathermap","description":"Templates for openweathermap"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OpenWeatherMap = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class OpenWeatherMap {
      constructor() {
          this.description = {
              displayName: 'OpenWeatherMap',
              name: 'openWeatherMap',
              icon: 'fa:sun',
              group: ['input'],
              version: 1,
              description: 'Gets current and future weather information',
              defaults: {
                  name: 'OpenWeatherMap',
                  color: '#554455',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'openWeatherMapApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Current Weather',
                              value: 'currentWeather',
                              description: 'Returns the current weather data',
                              action: 'Return current weather data',
                          },
                          {
                              name: '5 Day Forecast',
                              value: '5DayForecast',
                              description: 'Returns the weather data for the next 5 days',
                              action: 'Return weather data for the next 5 days',
                          },
                      ],
                      default: 'currentWeather',
                  },
                  {
                      displayName: 'Format',
                      name: 'format',
                      type: 'options',
                      options: [
                          {
                              name: 'Imperial',
                              value: 'imperial',
                              description: 'Fahrenheit | miles/hour',
                          },
                          {
                              name: 'Metric',
                              value: 'metric',
                              description: 'Celsius | meter/sec',
                          },
                          {
                              name: 'Scientific',
                              value: 'standard',
                              description: 'Kelvin | meter/sec',
                          },
                      ],
                      default: 'metric',
                      description: 'The format in which format the data should be returned',
                  },
                  {
                      displayName: 'Location Selection',
                      name: 'locationSelection',
                      type: 'options',
                      options: [
                          {
                              name: 'City Name',
                              value: 'cityName',
                          },
                          {
                              name: 'City ID',
                              value: 'cityId',
                          },
                          {
                              name: 'Coordinates',
                              value: 'coordinates',
                          },
                          {
                              name: 'Zip Code',
                              value: 'zipCode',
                          },
                      ],
                      default: 'cityName',
                      description: 'How to define the location for which to return the weather',
                  },
                  {
                      displayName: 'City',
                      name: 'cityName',
                      type: 'string',
                      default: '',
                      placeholder: 'berlin,de',
                      required: true,
                      displayOptions: {
                          show: {
                              locationSelection: ['cityName'],
                          },
                      },
                      description: 'The name of the city to return the weather of',
                  },
                  {
                      displayName: 'City ID',
                      name: 'cityId',
                      type: 'number',
                      default: 160001123,
                      required: true,
                      displayOptions: {
                          show: {
                              locationSelection: ['cityId'],
                          },
                      },
                      description: 'The ID of city to return the weather of. List can be downloaded here: http://bulk.openweathermap.org/sample/.',
                  },
                  {
                      displayName: 'Latitude',
                      name: 'latitude',
                      type: 'string',
                      default: '',
                      placeholder: '13.39',
                      required: true,
                      displayOptions: {
                          show: {
                              locationSelection: ['coordinates'],
                          },
                      },
                      description: 'The latitude of the location to return the weather of',
                  },
                  {
                      displayName: 'Longitude',
                      name: 'longitude',
                      type: 'string',
                      default: '',
                      placeholder: '52.52',
                      required: true,
                      displayOptions: {
                          show: {
                              locationSelection: ['coordinates'],
                          },
                      },
                      description: 'The longitude of the location to return the weather of',
                  },
                  {
                      displayName: 'Zip Code',
                      name: 'zipCode',
                      type: 'string',
                      default: '',
                      placeholder: '10115,de',
                      required: true,
                      displayOptions: {
                          show: {
                              locationSelection: ['zipCode'],
                          },
                      },
                      description: 'The ID of city to return the weather of. List can be downloaded here: http://bulk.openweathermap.org/sample/.',
                  },
                  {
                      displayName: 'Language',
                      name: 'language',
                      type: 'string',
                      default: '',
                      placeholder: 'en',
                      description: 'The two letter language code to get your output in (eg. en, de, ...).',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const credentials = await this.getCredentials('openWeatherMapApi');
          const operation = this.getNodeParameter('operation', 0);
          let endpoint = '';
          let locationSelection;
          let language;
          let qs;
          for (let i = 0; i < items.length; i++) {
              try {
                  qs = {
                      APPID: credentials.accessToken,
                      units: this.getNodeParameter('format', i),
                  };
                  locationSelection = this.getNodeParameter('locationSelection', i);
                  if (locationSelection === 'cityName') {
                      qs.q = this.getNodeParameter('cityName', i);
                  }
                  else if (locationSelection === 'cityId') {
                      qs.id = this.getNodeParameter('cityId', i);
                  }
                  else if (locationSelection === 'coordinates') {
                      qs.lat = this.getNodeParameter('latitude', i);
                      qs.lon = this.getNodeParameter('longitude', i);
                  }
                  else if (locationSelection === 'zipCode') {
                      qs.zip = this.getNodeParameter('zipCode', i);
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The locationSelection "${locationSelection}" is not known!`, { itemIndex: i });
                  }
                  language = this.getNodeParameter('language', i);
                  if (language) {
                      qs.lang = language;
                  }
                  if (operation === 'currentWeather') {
                      endpoint = 'weather';
                  }
                  else if (operation === '5DayForecast') {
                      endpoint = 'forecast';
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                  }
                  const options = {
                      method: 'GET',
                      qs,
                      uri: `https://api.openweathermap.org/data/2.5/${endpoint}`,
                      json: true,
                  };
                  let responseData;
                  try {
                      responseData = await this.helpers.request(options);
                  }
                  catch (error) {
                      throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
                  }
                  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.OpenWeatherMap = OpenWeatherMap;
  //# sourceMappingURL=OpenWeatherMap.node.js.map

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

  // --- Next Credential File ---

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

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

  # OpenWeatherMap node

  Use the OpenWeatherMap node to automate work in OpenWeatherMap, and integrate OpenWeatherMap with other applications. n8n supports retrieving current and upcoming weather data with OpenWeatherMap.

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

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

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

  ## Operations

  * Returns the current weather data
  * Returns the weather data for the next 5 days

  ## Templates and examples

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

example_workflow:
  {"name":"OpenWeatherMap Example Workflow","nodes":[{"parameters":{"operation":"currentWeather","format":"imperial","locationSelection":"cityName","cityName":"Example Name","cityId":160001123,"latitude":"example-value","longitude":"example-value","zipCode":"example-value","language":"example-value"},"id":"wtxflbpbq2nk2an3b3m1cg","name":"OpenWeatherMap","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"operation":"currentWeather","format":"imperial","locationSelection":"cityName","cityName":"Example Name","cityId":160001123,"latitude":"example-value","longitude":"example-value","zipCode":"example-value","language":"example-value"}

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"currentWeather","description":"Returns the current weather data","options":[{"name":"Current Weather","value":"currentWeather","description":"Returns the current weather data"},{"name":"5 Day Forecast","value":"5DayForecast","description":"Returns the weather data for the next 5 days"}]},{"displayName":"Format","name":"format","type":"options","default":"metric","description":"Fahrenheit | miles/hour","options":[{"name":"Imperial","value":"imperial","description":"Fahrenheit | miles/hour"},{"name":"Metric","value":"metric","description":"Celsius | meter/sec"},{"name":"Scientific","value":"standard","description":"Kelvin | meter/sec"}]},{"displayName":"Location Selection","name":"locationSelection","type":"options","default":"cityName","description":"How to define the location for which to return the weather","options":[{"name":"City Name","value":"cityName"},{"name":"City ID","value":"cityId"},{"name":"Coordinates","value":"coordinates"},{"name":"Zip Code","value":"zipCode"}]},{"displayName":"City","name":"cityName","type":"string","default":"","required":true,"description":"The name of the city to return the weather of","placeholder":"berlin,de"},{"displayName":"City ID","name":"cityId","type":"number","default":160001123,"required":true,"description":"The ID of city to return the weather of. List can be downloaded here: http://bulk.openweathermap.org/sample/."},{"displayName":"Latitude","name":"latitude","type":"string","default":"","required":true,"description":"The latitude of the location to return the weather of","placeholder":"13.39"},{"displayName":"Longitude","name":"longitude","type":"string","default":"","required":true,"description":"The longitude of the location to return the weather of","placeholder":"52.52"},{"displayName":"Zip Code","name":"zipCode","type":"string","default":"","required":true,"description":"The ID of city to return the weather of. List can be downloaded here: http://bulk.openweathermap.org/sample/.","placeholder":"10115,de"},{"displayName":"Language","name":"language","type":"string","default":"","description":"The two letter language code to get your output in (eg. en, de, ...).","placeholder":"en"}]


node_type: n8n-nodes-base.Odoo
name: Odoo
display_name: Odoo
description: Consume Odoo API
category: transform
icon: file:odoo.svg
code_hash: 2e1601049a43d1b157fc57aa76bb1f2fb632da84656f0641b0555435371afe55
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Odoo
documentation_title: Odoo node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"odoo","description":"Templates for odoo"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"contact","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Odoo = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const descriptions_1 = require("./descriptions");
  const GenericFunctions_1 = require("./GenericFunctions");
  const change_case_1 = require("change-case");
  class Odoo {
      constructor() {
          this.description = {
              displayName: 'Odoo',
              name: 'odoo',
              icon: 'file:odoo.svg',
              group: ['transform'],
              version: 1,
              description: 'Consume Odoo API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'Odoo',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'odooApi',
                      required: true,
                      testedBy: 'odooApiTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      default: 'contact',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Custom Resource',
                              value: 'custom',
                          },
                          {
                              name: 'Note',
                              value: 'note',
                          },
                          {
                              name: 'Opportunity',
                              value: 'opportunity',
                          },
                      ],
                  },
                  ...descriptions_1.customResourceOperations,
                  ...descriptions_1.customResourceDescription,
                  ...descriptions_1.opportunityOperations,
                  ...descriptions_1.opportunityDescription,
                  ...descriptions_1.contactOperations,
                  ...descriptions_1.contactDescription,
                  ...descriptions_1.noteOperations,
                  ...descriptions_1.noteDescription,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getModelFields() {
                      let resource;
                      resource = this.getCurrentNodeParameter('resource');
                      if (resource === 'custom') {
                          resource = this.getCurrentNodeParameter('customResource');
                          if (!resource)
                              return [];
                      }
                      const credentials = await this.getCredentials('odooApi');
                      const url = credentials.url;
                      const username = credentials.username;
                      const password = credentials.password;
                      const db = (0, GenericFunctions_1.odooGetDBName)(credentials.db, url);
                      const userID = await GenericFunctions_1.odooGetUserID.call(this, db, username, password, url);
                      const responce = await GenericFunctions_1.odooGetModelFields.call(this, db, userID, password, resource, url);
                      const options = Object.values(responce).map((field) => {
                          const optionField = field;
                          let name = '';
                          try {
                              name = (0, change_case_1.capitalCase)(optionField.name);
                          }
                          catch (error) {
                              name = optionField.name;
                          }
                          return {
                              name,
                              value: optionField.name,
                              description: `name: ${optionField === null || optionField === void 0 ? void 0 : optionField.name}, type: ${optionField === null || optionField === void 0 ? void 0 : optionField.type} required: ${optionField === null || optionField === void 0 ? void 0 : optionField.required}`,
                          };
                      });
                      return options.sort((a, b) => { var _a; return ((_a = a.name) === null || _a === void 0 ? void 0 : _a.localeCompare(b.name)) || 0; });
                  },
                  async getModels() {
                      const credentials = await this.getCredentials('odooApi');
                      const url = credentials.url;
                      const username = credentials.username;
                      const password = credentials.password;
                      const db = (0, GenericFunctions_1.odooGetDBName)(credentials.db, url);
                      const userID = await GenericFunctions_1.odooGetUserID.call(this, db, username, password, url);
                      const body = {
                          jsonrpc: '2.0',
                          method: 'call',
                          params: {
                              service: 'object',
                              method: 'execute',
                              args: [
                                  db,
                                  userID,
                                  password,
                                  'ir.model',
                                  'search_read',
                                  [],
                                  ['name', 'model', 'modules'],
                              ],
                          },
                          id: Math.floor(Math.random() * 100),
                      };
                      const responce = (await GenericFunctions_1.odooJSONRPCRequest.call(this, body, url));
                      const options = responce.map((model) => {
                          return {
                              name: model.name,
                              value: model.model,
                              description: `model: ${model.model}<br> modules: ${model.modules}`,
                          };
                      });
                      return options;
                  },
                  async getStates() {
                      const credentials = await this.getCredentials('odooApi');
                      const url = credentials.url;
                      const username = credentials.username;
                      const password = credentials.password;
                      const db = (0, GenericFunctions_1.odooGetDBName)(credentials.db, url);
                      const userID = await GenericFunctions_1.odooGetUserID.call(this, db, username, password, url);
                      const body = {
                          jsonrpc: '2.0',
                          method: 'call',
                          params: {
                              service: 'object',
                              method: 'execute',
                              args: [db, userID, password, 'res.country.state', 'search_read', [], ['id', 'name']],
                          },
                          id: Math.floor(Math.random() * 100),
                      };
                      const responce = (await GenericFunctions_1.odooJSONRPCRequest.call(this, body, url));
                      const options = responce.map((state) => {
                          return {
                              name: state.name,
                              value: state.id,
                          };
                      });
                      return options.sort((a, b) => { var _a; return ((_a = a.name) === null || _a === void 0 ? void 0 : _a.localeCompare(b.name)) || 0; });
                  },
                  async getCountries() {
                      const credentials = await this.getCredentials('odooApi');
                      const url = credentials.url;
                      const username = credentials.username;
                      const password = credentials.password;
                      const db = (0, GenericFunctions_1.odooGetDBName)(credentials.db, url);
                      const userID = await GenericFunctions_1.odooGetUserID.call(this, db, username, password, url);
                      const body = {
                          jsonrpc: '2.0',
                          method: 'call',
                          params: {
                              service: 'object',
                              method: 'execute',
                              args: [db, userID, password, 'res.country', 'search_read', [], ['id', 'name']],
                          },
                          id: Math.floor(Math.random() * 100),
                      };
                      const responce = (await GenericFunctions_1.odooJSONRPCRequest.call(this, body, url));
                      const options = responce.map((country) => {
                          return {
                              name: country.name,
                              value: country.id,
                          };
                      });
                      return options.sort((a, b) => { var _a; return ((_a = a.name) === null || _a === void 0 ? void 0 : _a.localeCompare(b.name)) || 0; });
                  },
              },
              credentialTest: {
                  async odooApiTest(credential) {
                      const credentials = credential.data;
                      try {
                          const body = {
                              jsonrpc: '2.0',
                              method: 'call',
                              params: {
                                  service: 'common',
                                  method: 'login',
                                  args: [
                                      (0, GenericFunctions_1.odooGetDBName)(credentials === null || credentials === void 0 ? void 0 : credentials.db, credentials === null || credentials === void 0 ? void 0 : credentials.url),
                                      credentials === null || credentials === void 0 ? void 0 : credentials.username,
                                      credentials === null || credentials === void 0 ? void 0 : credentials.password,
                                  ],
                              },
                              id: Math.floor(Math.random() * 100),
                          };
                          const options = {
                              headers: {
                                  'User-Agent': 'n8n',
                                  Connection: 'keep-alive',
                                  Accept: '*/*',
                                  'Content-Type': 'application/json',
                              },
                              method: 'POST',
                              body,
                              uri: `${(credentials === null || credentials === void 0 ? void 0 : credentials.url).replace(/\/$/, '')}/jsonrpc`,
                              json: true,
                          };
                          const result = await this.helpers.request(options);
                          if (result.error || !result.result) {
                              return {
                                  status: 'Error',
                                  message: 'Credentials are not valid',
                              };
                          }
                          else if (result.error) {
                              return {
                                  status: 'Error',
                                  message: `Credentials are not valid: ${result.error.data.message}`,
                              };
                          }
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: `Settings are not valid: ${error}`,
                          };
                      }
                      return {
                          status: 'OK',
                          message: 'Authentication successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          let items = this.getInputData();
          items = (0, n8n_workflow_1.deepCopy)(items);
          const returnData = [];
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const credentials = await this.getCredentials('odooApi');
          const url = credentials.url.replace(/\/$/, '');
          const username = credentials.username;
          const password = credentials.password;
          const db = (0, GenericFunctions_1.odooGetDBName)(credentials.db, url);
          const userID = await GenericFunctions_1.odooGetUserID.call(this, db, username, password, url);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'contact') {
                      if (operation === 'create') {
                          let additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.address) {
                              const addressFields = additionalFields.address.value;
                              if (addressFields) {
                                  additionalFields = {
                                      ...additionalFields,
                                      ...addressFields,
                                  };
                              }
                              delete additionalFields.address;
                          }
                          const name = this.getNodeParameter('contactName', i);
                          const fields = {
                              name,
                              ...additionalFields,
                          };
                          responseData = await GenericFunctions_1.odooCreate.call(this, db, userID, password, resource, operation, url, fields);
                      }
                      if (operation === 'delete') {
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.odooDelete.call(this, db, userID, password, resource, operation, url, contactId);
                      }
                      if (operation === 'get') {
                          const contactId = this.getNodeParameter('contactId', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          responseData = await GenericFunctions_1.odooGet.call(this, db, userID, password, resource, operation, url, contactId, fields);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          if (returnAll) {
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields, limit);
                          }
                      }
                      if (operation === 'update') {
                          const contactId = this.getNodeParameter('contactId', i);
                          let updateFields = this.getNodeParameter('updateFields', i);
                          if (updateFields.address) {
                              const addressFields = updateFields.address.value;
                              if (addressFields) {
                                  updateFields = {
                                      ...updateFields,
                                      ...addressFields,
                                  };
                              }
                              delete updateFields.address;
                          }
                          responseData = await GenericFunctions_1.odooUpdate.call(this, db, userID, password, resource, operation, url, contactId, updateFields);
                      }
                  }
                  if (resource === 'custom') {
                      const customResource = this.getNodeParameter('customResource', i);
                      if (operation === 'create') {
                          const fields = this.getNodeParameter('fieldsToCreateOrUpdate', i);
                          responseData = await GenericFunctions_1.odooCreate.call(this, db, userID, password, customResource, operation, url, (0, GenericFunctions_1.processNameValueFields)(fields));
                      }
                      if (operation === 'delete') {
                          const customResourceId = this.getNodeParameter('customResourceId', i);
                          responseData = await GenericFunctions_1.odooDelete.call(this, db, userID, password, customResource, operation, url, customResourceId);
                      }
                      if (operation === 'get') {
                          const customResourceId = this.getNodeParameter('customResourceId', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          responseData = await GenericFunctions_1.odooGet.call(this, db, userID, password, customResource, operation, url, customResourceId, fields);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          const filter = this.getNodeParameter('filterRequest', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, customResource, operation, url, filter, fields);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, customResource, operation, url, filter, fields, limit);
                          }
                      }
                      if (operation === 'update') {
                          const customResourceId = this.getNodeParameter('customResourceId', i);
                          const fields = this.getNodeParameter('fieldsToCreateOrUpdate', i);
                          responseData = await GenericFunctions_1.odooUpdate.call(this, db, userID, password, customResource, operation, url, customResourceId, (0, GenericFunctions_1.processNameValueFields)(fields));
                      }
                  }
                  if (resource === 'note') {
                      if (operation === 'create') {
                          const memo = this.getNodeParameter('memo', i);
                          const fields = {
                              memo,
                          };
                          responseData = await GenericFunctions_1.odooCreate.call(this, db, userID, password, resource, operation, url, fields);
                      }
                      if (operation === 'delete') {
                          const noteId = this.getNodeParameter('noteId', i);
                          responseData = await GenericFunctions_1.odooDelete.call(this, db, userID, password, resource, operation, url, noteId);
                      }
                      if (operation === 'get') {
                          const noteId = this.getNodeParameter('noteId', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          responseData = await GenericFunctions_1.odooGet.call(this, db, userID, password, resource, operation, url, noteId, fields);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          if (returnAll) {
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields, limit);
                          }
                      }
                      if (operation === 'update') {
                          const noteId = this.getNodeParameter('noteId', i);
                          const memo = this.getNodeParameter('memo', i);
                          const fields = {
                              memo,
                          };
                          responseData = await GenericFunctions_1.odooUpdate.call(this, db, userID, password, resource, operation, url, noteId, fields);
                      }
                  }
                  if (resource === 'opportunity') {
                      if (operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const name = this.getNodeParameter('opportunityName', i);
                          const fields = {
                              name,
                              ...additionalFields,
                          };
                          responseData = await GenericFunctions_1.odooCreate.call(this, db, userID, password, resource, operation, url, fields);
                      }
                      if (operation === 'delete') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          responseData = await GenericFunctions_1.odooDelete.call(this, db, userID, password, resource, operation, url, opportunityId);
                      }
                      if (operation === 'get') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          responseData = await GenericFunctions_1.odooGet.call(this, db, userID, password, resource, operation, url, opportunityId, fields);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          const fields = options.fieldsList || [];
                          if (returnAll) {
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields);
                          }
                          else {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.odooGetAll.call(this, db, userID, password, resource, operation, url, undefined, fields, limit);
                          }
                      }
                      if (operation === 'update') {
                          const opportunityId = this.getNodeParameter('opportunityId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          responseData = await GenericFunctions_1.odooUpdate.call(this, db, userID, password, resource, operation, url, opportunityId, updateFields);
                      }
                  }
                  if (responseData !== undefined) {
                      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.Odoo = Odoo;
  //# sourceMappingURL=Odoo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OdooApi = void 0;
  class OdooApi {
      constructor() {
          this.name = 'odooApi';
          this.displayName = 'Odoo API';
          this.documentationUrl = 'odoo';
          this.properties = [
              {
                  displayName: 'Site URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://my-organization.odoo.com',
                  required: true,
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
                  placeholder: 'user@email.com',
                  required: true,
              },
              {
                  displayName: 'Password or API Key',
                  name: 'password',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
                  required: true,
              },
              {
                  displayName: 'Database Name',
                  name: 'db',
                  type: 'string',
                  default: '',
              },
          ];
      }
  }
  exports.OdooApi = OdooApi;
  //# sourceMappingURL=OdooApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OdooApi = void 0;
  class OdooApi {
      constructor() {
          this.name = 'odooApi';
          this.displayName = 'Odoo API';
          this.documentationUrl = 'odoo';
          this.properties = [
              {
                  displayName: 'Site URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://my-organization.odoo.com',
                  required: true,
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
                  placeholder: 'user@email.com',
                  required: true,
              },
              {
                  displayName: 'Password or API Key',
                  name: 'password',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
                  required: true,
              },
              {
                  displayName: 'Database Name',
                  name: 'db',
                  type: 'string',
                  default: '',
              },
          ];
      }
  }
  exports.OdooApi = OdooApi;
  //# sourceMappingURL=OdooApi.credentials.js.map

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

  # Odoo node

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

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

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

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

  ## Operations

  * Contact
      * Create a new contact
      * Delete a contact
      * Get a contact
      * Get all contacts
      * Update a contact
  * Custom Resource
      * Create a new item
      * Delete an item
      * Get an item
      * Get all items
      * Update an item
  * Note
      * Create a new note
      * Delete a note
      * Get a note
      * Get all notes
      * Update a note
  * Opportunity
      * Create a new opportunity
      * Delete an opportunity
      * Get an opportunity
      * Get all opportunities
      * Update an opportunity

  ## Templates and examples

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

example_workflow:
  {"name":"Odoo Example Workflow","nodes":[{"parameters":{"resource":"contact","dynamic_property":null},"id":"39lb2gdzfn9czmb22r3r7","name":"Odoo","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":"contact","options":[{"name":"Contact","value":"contact"},{"name":"Custom Resource","value":"custom"},{"name":"Note","value":"note"},{"name":"Opportunity","value":"opportunity"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.customResourceOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.customResourceDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.opportunityOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.opportunityDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.contactDescription"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.noteOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.noteDescription"}]


node_type: n8n-nodes-base.Onfleet
name: Onfleet
display_name: Onfleet
description: Consume Onfleet API
category: input
icon: file:Onfleet.svg
code_hash: 38b9adce484581a415e2163aa3d1f339eca8901c9bf4f36996647abb90d58f75
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Onfleet
documentation_title: Onfleet node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"onfleet","description":"Templates for onfleet"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"admin","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Onfleet = void 0;
  const TaskDescription_1 = require("./descriptions/TaskDescription");
  const DestinationDescription_1 = require("./descriptions/DestinationDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  const RecipientDescription_1 = require("./descriptions/RecipientDescription");
  const OrganizationDescription_1 = require("./descriptions/OrganizationDescription");
  const AdministratorDescription_1 = require("./descriptions/AdministratorDescription");
  const HubDescription_1 = require("./descriptions/HubDescription");
  const WorkerDescription_1 = require("./descriptions/WorkerDescription");
  const ContainerDescription_1 = require("./descriptions/ContainerDescription");
  const TeamDescription_1 = require("./descriptions/TeamDescription");
  const Onfleet_1 = require("./Onfleet");
  class Onfleet {
      constructor() {
          this.description = {
              displayName: 'Onfleet',
              name: 'onfleet',
              icon: 'file:Onfleet.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Onfleet API',
              defaults: {
                  name: 'Onfleet',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'onfleetApi',
                      required: true,
                      testedBy: 'onfleetApiTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Admin',
                              value: 'admin',
                          },
                          {
                              name: 'Container',
                              value: 'container',
                          },
                          {
                              name: 'Destination',
                              value: 'destination',
                          },
                          {
                              name: 'Hub',
                              value: 'hub',
                          },
                          {
                              name: 'Organization',
                              value: 'organization',
                          },
                          {
                              name: 'Recipient',
                              value: 'recipient',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'Team',
                              value: 'team',
                          },
                          {
                              name: 'Worker',
                              value: 'worker',
                          },
                      ],
                      default: 'task',
                      description: 'The resource to perform operations on',
                  },
                  ...AdministratorDescription_1.adminOperations,
                  ...AdministratorDescription_1.adminFields,
                  ...ContainerDescription_1.containerOperations,
                  ...ContainerDescription_1.containerFields,
                  ...DestinationDescription_1.destinationOperations,
                  ...DestinationDescription_1.destinationFields,
                  ...HubDescription_1.hubOperations,
                  ...HubDescription_1.hubFields,
                  ...OrganizationDescription_1.organizationOperations,
                  ...OrganizationDescription_1.organizationFields,
                  ...RecipientDescription_1.recipientOperations,
                  ...RecipientDescription_1.recipientFields,
                  ...TaskDescription_1.taskOperations,
                  ...TaskDescription_1.taskFields,
                  ...TeamDescription_1.teamOperations,
                  ...TeamDescription_1.teamFields,
                  ...WorkerDescription_1.workerOperations,
                  ...WorkerDescription_1.workerFields,
              ],
          };
          this.methods = {
              credentialTest: {
                  async onfleetApiTest(credential) {
                      const credentials = credential.data;
                      const options = {
                          headers: {
                              'Content-Type': 'application/json',
                              'User-Agent': 'n8n-onfleet',
                          },
                          auth: {
                              user: credentials.apiKey,
                              pass: '',
                          },
                          method: 'GET',
                          uri: 'https://onfleet.com/api/v2/auth/test',
                          json: true,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: `Auth settings are not valid: ${error}`,
                          };
                      }
                  },
              },
              loadOptions: GenericFunctions_1.resourceLoaders,
          };
      }
      async execute() {
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          const items = this.getInputData();
          const operations = {
              task: Onfleet_1.Onfleet.executeTaskOperations,
              destination: Onfleet_1.Onfleet.executeDestinationOperations,
              organization: Onfleet_1.Onfleet.executeOrganizationOperations,
              admin: Onfleet_1.Onfleet.executeAdministratorOperations,
              recipient: Onfleet_1.Onfleet.executeRecipientOperations,
              hub: Onfleet_1.Onfleet.executeHubOperations,
              worker: Onfleet_1.Onfleet.executeWorkerOperations,
              webhook: Onfleet_1.Onfleet.executeWebhookOperations,
              container: Onfleet_1.Onfleet.executeContainerOperations,
              team: Onfleet_1.Onfleet.executeTeamOperations,
          };
          const responseData = await operations[resource].call(this, `${resource}s`, operation, items);
          return [this.helpers.returnJsonArray(responseData)];
      }
  }
  exports.Onfleet = Onfleet;
  //# sourceMappingURL=Onfleet.node.js.map

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

  // --- Next Credential File ---

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

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

  # Onfleet node

  Use the Onfleet node to automate work in Onfleet, and integrate Onfleet with other applications. n8n has built-in support for a wide range of Onfleet features, including creating and deleting tasks in Onfleet as well as retrieving organizations' details. 

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

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

  ## Operations

  * Admin
      * Create a new Onfleet admin
      * Delete an Onfleet admin
      * Get all Onfleet admins
      * Update an Onfleet admin
  * Container
      * Add task at index (or append)
      * Get container information
      * Fully replace a container's tasks
  * Destination
      * Create a new destination
      * Get a specific destination
  * Hub
      * Create a new Onfleet hub
      * Get all Onfleet hubs
      * Update an Onfleet hub
  * Organization
      * Retrieve your own organization's details
      * Retrieve the details of an organization with which you are connected
  * Recipient
      * Create a new Onfleet recipient
      * Get a specific Onfleet recipient
      * Update an Onfleet recipient
  * Task
      * Create a new Onfleet task
      * Clone an Onfleet task
      * Force-complete a started Onfleet task
      * Delete an Onfleet task
      * Get all Onfleet tasks
      * Get a specific Onfleet task
      * Update an Onfleet task
  * Team
      * Automatically dispatch tasks assigned to a team to on-duty drivers
      * Create a new Onfleet team
      * Delete an Onfleet team
      * Get a specific Onfleet team
      * Get all Onfleet teams
      * Get estimated times for upcoming tasks for a team, returns a selected driver
      * Update an Onfleet team
  * Worker
      * Create a new Onfleet worker
      * Delete an Onfleet worker
      * Get a specific Onfleet worker
      * Get all Onfleet workers
      * Get a specific Onfleet worker schedule
      * Update an Onfleet worker

  ## Templates and examples

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

example_workflow:
  {"name":"Onfleet Example Workflow","nodes":[{"parameters":{"resource":"admin","dynamic_property":null},"id":"wrqd6b38rsbzc9f5u1fza","name":"Onfleet","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":"task","description":"The resource to perform operations on","options":[{"name":"Admin","value":"admin"},{"name":"Container","value":"container"},{"name":"Destination","value":"destination"},{"name":"Hub","value":"hub"},{"name":"Organization","value":"organization"},{"name":"Recipient","value":"recipient"},{"name":"Task","value":"task"},{"name":"Team","value":"team"},{"name":"Worker","value":"worker"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AdministratorDescription_1.adminOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AdministratorDescription_1.adminFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContainerDescription_1.containerOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContainerDescription_1.containerFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DestinationDescription_1.destinationOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DestinationDescription_1.destinationFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...HubDescription_1.hubOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...HubDescription_1.hubFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrganizationDescription_1.organizationOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrganizationDescription_1.organizationFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...RecipientDescription_1.recipientOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...RecipientDescription_1.recipientFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TaskDescription_1.taskFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TeamDescription_1.teamOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TeamDescription_1.teamFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...WorkerDescription_1.workerOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...WorkerDescription_1.workerFields"}]


node_type: n8n-nodes-base.OpenAi
name: OpenAi
display_name: OpenAI
description: Consume Open AI
category: transform
icon: file:openAi.svg
code_hash: ab879a65a91c06570e906c166bce961a1f614a01acb649d549a4467e09dfc807
documentation_title: Embeddings OpenAI node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"embeddings-openai","description":"Templates for embeddings-openai"}]
required_scopes: []
parameter_schemas: []
example_parameters: {"resource":"chat","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OpenAi = void 0;
  const ImageDescription_1 = require("./ImageDescription");
  const TextDescription_1 = require("./TextDescription");
  const ChatDescription_1 = require("./ChatDescription");
  class OpenAi {
      constructor() {
          this.description = {
              displayName: 'OpenAI',
              name: 'openAi',
              icon: 'file:openAi.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Open AI',
              defaults: {
                  name: 'OpenAI',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'openAiApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  ignoreHttpStatusErrors: true,
                  baseURL: 'https://api.openai.com',
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Chat',
                              value: 'chat',
                          },
                          {
                              name: 'Image',
                              value: 'image',
                          },
                          {
                              name: 'Text',
                              value: 'text',
                          },
                      ],
                      default: 'text',
                  },
                  ...ChatDescription_1.chatOperations,
                  ...ChatDescription_1.chatFields,
                  ...ImageDescription_1.imageOperations,
                  ...ImageDescription_1.imageFields,
                  ...TextDescription_1.textOperations,
                  ...TextDescription_1.textFields,
              ],
          };
      }
  }
  exports.OpenAi = OpenAi;
  //# sourceMappingURL=OpenAi.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OpenAiApi = void 0;
  class OpenAiApi {
      constructor() {
          this.name = 'openAiApi';
          this.displayName = 'OpenAi';
          this.documentationUrl = 'openAi';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  required: true,
                  default: '',
              },
              {
                  displayName: 'Organization ID',
                  name: 'organizationId',
                  type: 'string',
                  default: '',
                  description: "For users who belong to multiple organizations, you can set which organization is used for an API request. Usage from these API requests will count against the specified organization's subscription quota.",
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiKey}}',
                      'OpenAI-Organization': '={{$credentials.organizationId}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.openai.com',
                  url: '/v1/models',
              },
          };
      }
  }
  exports.OpenAiApi = OpenAiApi;
  //# sourceMappingURL=OpenAiApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OpenAiApi = void 0;
  class OpenAiApi {
      constructor() {
          this.name = 'openAiApi';
          this.displayName = 'OpenAi';
          this.documentationUrl = 'openAi';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  required: true,
                  default: '',
              },
              {
                  displayName: 'Organization ID',
                  name: 'organizationId',
                  type: 'string',
                  default: '',
                  description: "For users who belong to multiple organizations, you can set which organization is used for an API request. Usage from these API requests will count against the specified organization's subscription quota.",
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiKey}}',
                      'OpenAI-Organization': '={{$credentials.organizationId}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://api.openai.com',
                  url: '/v1/models',
              },
          };
      }
  }
  exports.OpenAiApi = OpenAiApi;
  //# sourceMappingURL=OpenAiApi.credentials.js.map

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

  # Embeddings OpenAI node

  Use the Embeddings OpenAI node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings OpenAI node, and links to more resources.

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

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"


  ## Node options

  * **Model**: Select the model to use for generating embeddings.
  * **Base URL**: Enter the URL to send the request to. Use this if you are using a self-hosted OpenAI-like model. 
  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.
  * **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/openai/){:target=_blank .external-link} for more information about the service.

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

documentation_url:
  https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsopenai

related_resources:
  [{"title":"LangChains's OpenAI embeddings documentation","url":"https://js.langchain.com/docs/integrations/text_embedding/openai/","type":"external"}]

workflow_examples:
  [{"name":"agents_vs_chains","workflow":{"name":"Agents vs chains","nodes":[{"parameters":{},"id":"9e1d8f35-e1ba-4600-977d-e54a919c2c62","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1,"position":[520,420],"webhookId":"84bfdbd0-e2ce-4bfa-b746-985e64a14484"},{"parameters":{"options":{}},"id":"4b89df4b-4f78-4f52-a51d-eeb66a7948e5","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[1020,420],"credentials":{"openAiApi":{"id":"tW3bkXa0SAK0OzvR","name":"OpenAi account Debs"}}},{"parameters":{"options":{}},"id":"a0045df2-d212-4e6a-a2d4-722136dcb8b5","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[980,880],"credentials":{"openAiApi":{"id":"tW3bkXa0SAK0OzvR","name":"OpenAi account Debs"}}},{"parameters":{},"id":"d702f647-1fa7-4b4f-91b1-e0152326ea11","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","typeVersion":1.2,"position":[1280,460]},{"parameters":{},"id":"76cc359a-5ec8-446a-a8e0-9035d18247cb","name":"Wikipedia","type":"@n8n/n8n-nodes-langchain.toolWikipedia","typeVersion":1,"position":[1540,340]},{"parameters":{"options":{}},"id":"01d1785f-f7c4-47d2-97b7-76eeff68002d","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","typeVersion":1.5,"position":[1060,140]},{"parameters":{"messages":{"messageValues":[{"message":"Every time you respond, start your response with the sentence: \"This message came from the chain\"."}]}},"id":"bcdcd704-13f5-4906-b337-7ec4629b9781","name":"Basic LLM Chain","type":"@n8n/n8n-nodes-langchain.chainLlm","typeVersion":1.4,"position":[1040,680]},{"parameters":{"content":"## Try it out\n\nSelect **Chat**, and try out these queries:\n\n- Please show me a Wikipedia article about cats (agent)\n- Please show me a Wikipedia article about cats (chain)\n- What was my last question? (chain)\n- What was my last question? (agent)\n","height":343.8587887368956,"color":4},"id":"f08e231b-739a-4b9d-b738-139b7e3bd60b","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[240,420]},{"parameters":{"content":"**Set your credentials**","height":193,"width":167,"color":2},"id":"5421fd4d-c82f-483a-8238-869b9a10000d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[980,360]},{"parameters":{"content":"**Set your credentials**","height":193,"width":167,"color":2},"id":"23fac3a8-a220-40a5-8d3d-4a3013b0f1da","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[940,820]},{"parameters":{"content":"**Memory allows the agent to access previous parts of the chat**\n","height":244,"color":5},"id":"08397bde-06e4-4bff-b130-cbc4408a0ecc","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1200,360]},{"parameters":{"content":"**The agent can use the Wikipedia tool to access articles from Wikipedia**","height":238,"color":5},"id":"a53ff4f2-9d06-4166-9ad6-760cd8fe4a54","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1460,240]},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":false,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $json.chatInput }}","rightValue":"agent","operator":{"type":"string","operation":"contains"}}],"combinator":"and"}},{"conditions":{"options":{"caseSensitive":false,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"248f4a34-89c1-4d1e-867a-daa024c8635a","leftValue":"={{ $json.chatInput }}","rightValue":"chain","operator":{"type":"string","operation":"contains"}}],"combinator":"and"}}]},"options":{"ignoreCase":true}},"id":"ab2bff8d-e914-421d-9aa3-9d0ad815cea6","name":"Check user input for \"chain\" or \"agent\"","type":"n8n-nodes-base.switch","typeVersion":3,"position":[740,420]},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)"},"id":"f077f8e6-789a-4db1-8402-fb173c296017","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1560,840]}],"pinData":{},"connections":{"Chat Trigger":{"main":[[{"node":"Check user input for \"chain\" or \"agent\"","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"Basic LLM Chain","type":"ai_languageModel","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Wikipedia":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Check user input for \"chain\" or \"agent\"":{"main":[[{"node":"AI Agent","type":"main","index":0}],[{"node":"Basic LLM Chain","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"versionId":"59784a0f-0601-4456-b48d-9a191e203461","meta":{"templateCredsSetupCompleted":true,"instanceId":"cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"},"id":"qK43vJw6dRZkXo6h","tags":[{"createdAt":"2021-06-25T07:47:07.640Z","updatedAt":"2021-06-25T07:47:07.640Z","id":"1","name":"docs"},{"createdAt":"2023-02-22T12:06:03.372Z","updatedAt":"2023-02-22T12:06:03.372Z","id":"63","name":"createdBy:Debs"}]},"nodeConfigurations":[{"nodeType":"@n8n/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"options":{}},"position":[1020,420]},{"nodeType":"@n8n/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"options":{}},"position":[980,880]}],"connections":{"Chat Trigger":{"main":[[{"node":"Check user input for \"chain\" or \"agent\"","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"Basic LLM Chain","type":"ai_languageModel","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Wikipedia":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Check user input for \"chain\" or \"agent\"":{"main":[[{"node":"AI Agent","type":"main","index":0}],[{"node":"Basic LLM Chain","type":"main","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/agents_vs_chains.json","description":"Workflow example from docs/_workflows/advanced-ai/examples/agents_vs_chains.json"},{"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/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"model":"gpt-4","options":{"temperature":0.2}},"position":[740,740]}],"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/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"model":"gpt-4","options":{"temperature":0}},"position":[660,780]}],"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/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"model":"gpt-4","options":{}},"position":[660,780]},{"nodeType":"@n8n/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"model":"gpt-4","options":{}},"position":[700,1420]},{"nodeType":"@n8n/n8n-nodes-langchain.lmChatOpenAi","version":1,"parameters":{"model":"gpt-4","options":{}},"position":[920,1600]}],"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"},{"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/n8n-nodes-langchain.embeddingsOpenAi","version":1,"parameters":{"model":"text-embedding-3-large","options":{},"requestOptions":{}},"position":[80,1040]},{"nodeType":"@n8n/n8n-nodes-langchain.lmOpenAi","version":1,"parameters":{"model":{"__rl":true,"value":"gpt-4o","mode":"list","cachedResultName":"gpt-4o"},"options":{},"requestOptions":{}},"position":[-1320,1680]},{"nodeType":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","version":1,"parameters":{"model":"text-embedding-3-large","options":{},"requestOptions":{}},"position":[-780,2040]}],"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"},{"name":"chat_complete","workflow":{"name":"AI tutorial","nodes":[{"parameters":{"options":{}},"type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1.1,"position":[-300,-40],"id":"a2d42e1f-36df-4a6a-a3b4-99a162074d11","name":"When chat message received","webhookId":"97c1a41f-8ef0-4d63-a924-92eb634384d3"},{"parameters":{"options":{}},"type":"@n8n/n8n-nodes-langchain.agent","typeVersion":1.7,"position":[-80,-40],"id":"0f61a10f-668f-42f7-b835-cf3efb60082a","name":"AI Agent"},{"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1.2,"position":[-100,160],"id":"b8129c6d-f201-4378-8f66-ce9a6cfd5f3b","name":"OpenAI Chat Model","credentials":{"openAiApi":{"id":"jiPPcYV9I70iKapN","name":"OpenAi account 37"}}},{"parameters":{},"type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","typeVersion":1.3,"position":[20,180],"id":"afbab05c-1e87-4f7a-9d66-c86f9db1ec64","name":"Simple Memory"}],"pinData":{},"connections":{"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"versionId":"b1641385-c6b0-48a8-8e26-20d1f6bd7fda","meta":{"templateCredsSetupCompleted":true,"instanceId":"cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"},"id":"l05TkWXXYbOiuL4o","tags":[]},"nodeConfigurations":[{"nodeType":"@n8n/n8n-nodes-langchain.lmChatOpenAi","version":1.2,"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"position":[-100,160]}],"connections":{"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]}},"source":"docs/_workflows/advanced-ai/tutorials/chat_complete.json","description":"Workflow example from docs/_workflows/advanced-ai/tutorials/chat_complete.json"}]

troubleshooting_info:
  [{"issue":"Node options","solution":"* **Model**: Select the model to use for generating embeddings.\n* **Base URL**: Enter the URL to send the request to. Use this if you are using a self-hosted OpenAI-like model. \n* **Batch Size**: Enter the maximum number of documents to send in each request.\n* **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.\n* **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout."}]

node_connections:
  [{"fromNode":"Chat Trigger","toNode":"Check user input for \"chain\" or \"agent\"","connectionType":"main"},{"fromNode":"OpenAI Chat Model","toNode":"AI Agent","connectionType":"ai_languageModel"},{"fromNode":"OpenAI Chat Model1","toNode":"Basic LLM Chain","connectionType":"ai_languageModel"},{"fromNode":"Simple Memory","toNode":"AI Agent","connectionType":"ai_memory"},{"fromNode":"Wikipedia","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"Check user input for \"chain\" or \"agent\"","toNode":"AI Agent","connectionType":"main"},{"fromNode":"Check user input for \"chain\" or \"agent\"","toNode":"Basic LLM Chain","connectionType":"main"},{"fromNode":"Not sure?","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"Execute Workflow Trigger","toNode":"Check if user has provided email","connectionType":"main"},{"fromNode":"Chat Trigger","toNode":"AI Agent","connectionType":"main"},{"fromNode":"Check if user has provided email","toNode":"Message Slack for help","connectionType":"main"},{"fromNode":"Check if user has provided email","toNode":"Prompt the user to provide an email","connectionType":"main"},{"fromNode":"Message Slack for help","toNode":"Confirm that we've messaged a human","connectionType":"main"},{"fromNode":"GPT4","toNode":"AI Agent","connectionType":"ai_languageModel"},{"fromNode":"GPT4 Model","toNode":"AI Agent","connectionType":"ai_languageModel"},{"fromNode":"Get column names","toNode":"Prepare output","connectionType":"main"},{"fromNode":"Get customer tool","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"List columns tool","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"Set Google Sheet URL","toNode":"Get Google sheet contents","connectionType":"main"},{"fromNode":"Get column values tool","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"Execute Workflow Trigger","toNode":"Set Google Sheet URL","connectionType":"main"},{"fromNode":"Get Google sheet contents","toNode":"Check operations","connectionType":"main"},{"fromNode":"Check operations","toNode":"Get column names","connectionType":"main"},{"fromNode":"Check operations","toNode":"Prepare column data","connectionType":"main"},{"fromNode":"Check operations","toNode":"Filter out other rows","connectionType":"main"},{"fromNode":"Prepare column data","toNode":"Prepare output","connectionType":"main"},{"fromNode":"Filter out other rows","toNode":"Prepare output","connectionType":"main"},{"fromNode":"Execute Workflow Trigger","toNode":"Work out activity type and number of people","connectionType":"main"},{"fromNode":"Activity tool","toNode":"AI Agent","connectionType":"ai_tool"},{"fromNode":"Auto-fixing Output Parser","toNode":"Work out activity type and number of people","connectionType":"ai_outputParser"},{"fromNode":"GPT4 Model 1","toNode":"AI Agent","connectionType":"ai_languageModel"},{"fromNode":"GPT4 Model 2","toNode":"Work out activity type and number of people","connectionType":"ai_languageModel"},{"fromNode":"GPT4 Model 3","toNode":"Auto-fixing Output Parser","connectionType":"ai_languageModel"},{"fromNode":"Structure as JSON","toNode":"Auto-fixing Output Parser","connectionType":"ai_outputParser"},{"fromNode":"Call the API","toNode":"Set 'response' value","connectionType":"main"},{"fromNode":"Work out activity type and number of people","toNode":"Call the API","connectionType":"main"},{"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"},{"fromNode":"When chat message received","toNode":"AI Agent","connectionType":"main"}]

example_workflow:
  {"name":"OpenAI Example Workflow","nodes":[{"parameters":{"resource":"chat","dynamic_property":null},"id":"d4x8jp717a51mq1ruohjms","name":"OpenAI","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":"text","options":[{"name":"Chat","value":"chat"},{"name":"Image","value":"image"},{"name":"Text","value":"text"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChatDescription_1.chatOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ChatDescription_1.chatFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ImageDescription_1.imageOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ImageDescription_1.imageFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TextDescription_1.textOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TextDescription_1.textFields"}]


node_type: n8n-nodes-base.OpenThesaurus
name: OpenThesaurus
display_name: OpenThesaurus
description: Get synonmns for German words using the OpenThesaurus API
category: output
icon: file:openthesaurus.png
code_hash: 2677b6788bc843f9af85a4a31778333f3cf8e2aa1ae5bf09d7610abb8494981e
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.OpenThesaurus
documentation_title: OpenThesaurus node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"openthesaurus","description":"Templates for openthesaurus"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"operation":"getSynonyms","text":"example-value","options":{}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:01
updated_at: 2025-06-12 08:59:01
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.OpenThesaurus = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class OpenThesaurus {
      constructor() {
          this.description = {
              displayName: 'OpenThesaurus',
              name: 'openThesaurus',
              icon: 'file:openthesaurus.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Get synonmns for German words using the OpenThesaurus API',
              defaults: {
                  name: 'OpenThesaurus',
              },
              inputs: ['main'],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Get Synonyms',
                              value: 'getSynonyms',
                              description: 'Get synonyms for a German word in German',
                              action: 'Get synonyms',
                          },
                      ],
                      default: 'getSynonyms',
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      default: '',
                      description: 'The word to get synonyms for',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getSynonyms'],
                          },
                      },
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Options',
                      displayOptions: {
                          show: {
                              operation: ['getSynonyms'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Baseform',
                              name: 'baseform',
                              type: 'boolean',
                              default: false,
                              description: 'Specifies the basic form for the search term if it is not already a basic form',
                          },
                          {
                              displayName: 'Similar',
                              name: 'similar',
                              type: 'boolean',
                              default: false,
                              description: 'This also returns up to five similarly written words for each answer. This is useful to be able to make a suggestion to the user in the event of a possible typing error.',
                          },
                          {
                              displayName: 'Starts With',
                              name: 'startswith',
                              type: 'boolean',
                              default: false,
                              description: 'Like substring = true, but only finds words that begin with the specified search term',
                          },
                          {
                              displayName: 'Substring',
                              name: 'substring',
                              type: 'boolean',
                              default: false,
                              description: 'Whether up to ten words are returned for each answer that only contain the search term as a partial word',
                          },
                          {
                              displayName: 'Substring From Results',
                              name: 'substringFromResults',
                              type: 'number',
                              default: 0,
                              description: 'Specifies from which entry the partial word hits are to be returned. Only works together with substring = true.',
                          },
                          {
                              displayName: 'Substring Max Results',
                              name: 'substringMaxResults',
                              type: 'number',
                              typeOptions: {
                                  maxValue: 250,
                              },
                              default: 10,
                              description: 'Specifies how many partial word hits should be returned in total. Only works together with substring = true.',
                          },
                          {
                              displayName: 'Subsynsets',
                              name: 'subsynsets',
                              type: 'boolean',
                              default: false,
                              description: 'Whether each synonym group has its (optional) sub-terms supplied',
                          },
                          {
                              displayName: 'Supersynsets',
                              name: 'supersynsets',
                              type: 'boolean',
                              default: false,
                              description: 'Whether each synonym group is supplied with its (optional) generic terms',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (operation === 'getSynonyms') {
                      const text = this.getNodeParameter('text', i);
                      const options = this.getNodeParameter('options', i);
                      qs.q = text;
                      Object.assign(qs, options);
                      responseData = await GenericFunctions_1.openThesaurusApiRequest.call(this, 'GET', '/synonyme/search', {}, qs);
                      responseData = responseData.synsets;
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.OpenThesaurus = OpenThesaurus;
  //# sourceMappingURL=OpenThesaurus.node.js.map

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

  # OpenThesaurus node

  Use the OpenThesaurus node to automate work in OpenThesaurus, and integrate OpenThesaurus with other applications. n8n supports synonym look-up for German words. 

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

  /// note | Credentials
  OpenThesaurus node doesn't require authentication. 
  ///

  ## Operations

  * Get synonyms for a German word in German

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"getSynonyms","description":"Get synonyms for a German word in German","options":[{"name":"Get Synonyms","value":"getSynonyms","description":"Get synonyms for a German word in German"}]},{"displayName":"Text","name":"text","type":"string","default":"","required":true,"description":"The word to get synonyms for"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Specifies the basic form for the search term if it is not already a basic form","placeholder":"Add Options"}]


