# nodes

node_type: n8n-nodes-base.Signl4
name: Signl4
display_name: SIGNL4
description: Consume SIGNL4 API
category: transform
icon: file:signl4.png
code_hash: ecc751791e5a3ffc499f7d9a5a93314a13ff96290453d6af4f1d3438f6f0bf80
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Signl4
documentation_title: SIGNL4 node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"signl4","description":"Templates for signl4"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Signl4 = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class Signl4 {
      constructor() {
          this.description = {
              displayName: 'SIGNL4',
              name: 'signl4',
              icon: 'file:signl4.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume SIGNL4 API',
              defaults: {
                  name: 'SIGNL4',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'signl4Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Alert',
                              value: 'alert',
                          },
                      ],
                      default: 'alert',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['alert'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send an alert',
                              action: 'Send an alert',
                          },
                          {
                              name: 'Resolve',
                              value: 'resolve',
                              description: 'Resolve an alert',
                              action: 'Resolve an alert',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['alert'],
                          },
                      },
                      description: 'A more detailed description for the alert',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['alert'],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'Alerting Scenario',
                              name: 'alertingScenario',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Single ACK',
                                      value: 'single_ack',
                                      description: 'In case only one person needs to confirm this Signl',
                                  },
                                  {
                                      name: 'Multi ACK',
                                      value: 'multi_ack',
                                      description: 'In case this alert must be confirmed by the number of people who are on duty at the time this Singl is raised',
                                  },
                              ],
                              default: 'single_ack',
                          },
                          {
                              displayName: 'Attachments',
                              name: 'attachmentsUi',
                              placeholder: 'Add Attachments',
                              type: 'fixedCollection',
                              typeOptions: {
                                  multipleValues: false,
                              },
                              options: [
                                  {
                                      name: 'attachmentsBinary',
                                      displayName: 'Attachments Binary',
                                      values: [
                                          {
                                              displayName: 'Property Name',
                                              name: 'property',
                                              type: 'string',
                                              placeholder: 'data',
                                              default: '',
                                              description: 'Name of the binary properties which contain data which should be added as attachment',
                                          },
                                      ],
                                  },
                              ],
                              default: {},
                          },
                          {
                              displayName: 'External ID',
                              name: 'externalId',
                              type: 'string',
                              default: '',
                              description: 'If the event originates from a record in a 3rd party system, use this parameter to pass the unique ID of that record. That ID will be communicated in outbound webhook notifications from SIGNL4, which is great for correlation/synchronization of that record with the alert. If you resolve / close an alert you must use the same External ID as in the original alert.',
                          },
                          {
                              displayName: 'Filtering',
                              name: 'filtering',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to apply event filtering for this event, or not. If set to true, the event will only trigger a notification to the team, if it contains at least one keyword from one of your services and system categories (i.e. it is whitelisted)',
                          },
                          {
                              displayName: 'Location',
                              name: 'locationFieldsUi',
                              type: 'fixedCollection',
                              placeholder: 'Add Location',
                              default: {},
                              description: "Transmit location information ('latitude, longitude') with your event and display a map in the mobile app",
                              options: [
                                  {
                                      name: 'locationFieldsValues',
                                      displayName: 'Location',
                                      values: [
                                          {
                                              displayName: 'Latitude',
                                              name: 'latitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location latitude',
                                              default: '',
                                          },
                                          {
                                              displayName: 'Longitude',
                                              name: 'longitude',
                                              type: 'string',
                                              required: true,
                                              description: 'The location longitude',
                                              default: '',
                                          },
                                      ],
                                  },
                              ],
                          },
                          {
                              displayName: 'Service',
                              name: 'service',
                              type: 'string',
                              default: '',
                              description: 'Assigns the alert to the service/system category with the specified name',
                          },
                          {
                              displayName: 'Title',
                              name: 'title',
                              type: 'string',
                              default: '',
                              description: 'The title or subject of this alert',
                          },
                      ],
                  },
                  {
                      displayName: 'External ID',
                      name: 'externalId',
                      type: 'string',
                      default: '',
                      displayOptions: {
                          show: {
                              operation: ['resolve'],
                              resource: ['alert'],
                          },
                      },
                      description: 'If the event originates from a record in a 3rd party system, use this parameter to pass the unique ID of that record. That ID will be communicated in outbound webhook notifications from SIGNL4, which is great for correlation/synchronization of that record with the alert. If you resolve / close an alert you must use the same External ID as in the original alert.',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'alert') {
                      if (operation === 'send') {
                          const message = this.getNodeParameter('message', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const data = {
                              message,
                          };
                          if (additionalFields.title) {
                              data.title = additionalFields.title;
                          }
                          if (additionalFields.service) {
                              data.service = additionalFields.service;
                          }
                          if (additionalFields.locationFieldsUi) {
                              const locationUi = additionalFields.locationFieldsUi
                                  .locationFieldsValues;
                              if (locationUi) {
                                  data['X-S4-Location'] = `${locationUi.latitude},${locationUi.longitude}`;
                              }
                          }
                          if (additionalFields.alertingScenario) {
                              data['X-S4-AlertingScenario'] = additionalFields.alertingScenario;
                          }
                          if (additionalFields.filtering) {
                              data['X-S4-Filtering'] = additionalFields.filtering.toString();
                          }
                          if (additionalFields.externalId) {
                              data['X-S4-ExternalID'] = additionalFields.externalId;
                          }
                          data['X-S4-Status'] = 'new';
                          data['X-S4-SourceSystem'] = 'n8n';
                          const attachments = additionalFields.attachmentsUi;
                          if (attachments === null || attachments === void 0 ? void 0 : attachments.attachmentsBinary) {
                              const propertyName = attachments.attachmentsBinary
                                  .property;
                              const binaryData = this.helpers.assertBinaryData(i, propertyName);
                              if (binaryData) {
                                  const supportedFileExtension = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'mp3', 'wav'];
                                  if (!supportedFileExtension.includes(binaryData.fileExtension)) {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid extension, just ${supportedFileExtension.join(',')} are supported}`, { itemIndex: i });
                                  }
                                  const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, propertyName);
                                  data.attachment = {
                                      value: binaryDataBuffer,
                                      options: {
                                          filename: binaryData.fileName,
                                          contentType: binaryData.mimeType,
                                      },
                                  };
                              }
                          }
                          responseData = await GenericFunctions_1.SIGNL4ApiRequest.call(this, 'POST', '', {}, {
                              formData: data,
                          });
                      }
                      if (operation === 'resolve') {
                          const data = {};
                          data['X-S4-ExternalID'] = this.getNodeParameter('externalId', i);
                          data['X-S4-Status'] = 'resolved';
                          data['X-S4-SourceSystem'] = 'n8n';
                          responseData = await GenericFunctions_1.SIGNL4ApiRequest.call(this, 'POST', '', {}, {
                              formData: data,
                          });
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Signl4 = Signl4;
  //# sourceMappingURL=Signl4.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Signl4Api = void 0;
  class Signl4Api {
      constructor() {
          this.name = 'signl4Api';
          this.displayName = 'SIGNL4 Webhook';
          this.documentationUrl = 'signl4';
          this.properties = [
              {
                  displayName: 'Team Secret',
                  name: 'teamSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The team secret is the last part of your SIGNL4 webhook URL',
              },
          ];
      }
  }
  exports.Signl4Api = Signl4Api;
  //# sourceMappingURL=Signl4Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Signl4Api = void 0;
  class Signl4Api {
      constructor() {
          this.name = 'signl4Api';
          this.displayName = 'SIGNL4 Webhook';
          this.documentationUrl = 'signl4';
          this.properties = [
              {
                  displayName: 'Team Secret',
                  name: 'teamSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The team secret is the last part of your SIGNL4 webhook URL',
              },
          ];
      }
  }
  exports.Signl4Api = Signl4Api;
  //# sourceMappingURL=Signl4Api.credentials.js.map

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

  # SIGNL4 node

  Use the SIGNL4 node to automate work in SIGNL4, and integrate SIGNL4 with other applications. n8n supports sending and resolving alerts with SIGNL4.

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

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

  ## Operations

  * Alert
      * Send an alert
      * Resolve an alert

  ## Templates and examples

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

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

example_parameters:
  {"resource":"alert","operation":"send","message":"example-value","additionalFields":{},"externalId":"example-value"}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"alert","options":[{"name":"Alert","value":"alert"}]},{"displayName":"Operation","name":"operation","type":"options","default":"send","description":"Send an alert","options":[{"name":"Send","value":"send","description":"Send an alert"},{"name":"Resolve","value":"resolve","description":"Resolve an alert"}]},{"displayName":"Message","name":"message","type":"string","default":"","description":"A more detailed description for the alert"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","required":true,"description":"In case only one person needs to confirm this Signl","placeholder":"Add Field"},{"displayName":"External ID","name":"externalId","type":"string","default":"","description":"If the event originates from a record in a 3rd party system, use this parameter to pass the unique ID of that record. That ID will be communicated in outbound webhook notifications from SIGNL4, which is great for correlation/synchronization of that record with the alert. If you resolve / close an alert you must use the same External ID as in the original alert."}]


node_type: n8n-nodes-base.Sendy
name: Sendy
display_name: Sendy
description: Consume Sendy API
category: input
icon: file:sendy.png
code_hash: 8f1551f664c318139782631bc2298a5dc48d279198dcc99bfff803806441c8ab
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Sendy
documentation_title: Sendy node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"sendy","description":"Templates for sendy"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"campaign","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Sendy = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const CampaignDescription_1 = require("./CampaignDescription");
  const SubscriberDescription_1 = require("./SubscriberDescription");
  class Sendy {
      constructor() {
          this.description = {
              displayName: 'Sendy',
              name: 'sendy',
              icon: 'file:sendy.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Sendy API',
              defaults: {
                  name: 'Sendy',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sendyApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Campaign',
                              value: 'campaign',
                          },
                          {
                              name: 'Subscriber',
                              value: 'subscriber',
                          },
                      ],
                      default: 'subscriber',
                  },
                  ...CampaignDescription_1.campaignOperations,
                  ...CampaignDescription_1.campaignFields,
                  ...SubscriberDescription_1.subscriberOperations,
                  ...SubscriberDescription_1.subscriberFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'campaign') {
                  if (operation === 'create') {
                      const fromName = this.getNodeParameter('fromName', i);
                      const fromEmail = this.getNodeParameter('fromEmail', i);
                      const replyTo = this.getNodeParameter('replyTo', i);
                      const title = this.getNodeParameter('title', i);
                      const subject = this.getNodeParameter('subject', i);
                      const htmlText = this.getNodeParameter('htmlText', i);
                      const sendCampaign = this.getNodeParameter('sendCampaign', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      let brandId = null;
                      if (!sendCampaign) {
                          brandId = this.getNodeParameter('brandId', i);
                      }
                      const body = {
                          from_name: fromName,
                          from_email: fromEmail,
                          reply_to: replyTo,
                          title,
                          subject,
                          send_campaign: sendCampaign ? 1 : 0,
                          html_text: htmlText,
                      };
                      if (brandId) {
                          body.brand_id = brandId;
                      }
                      if (additionalFields.plainText) {
                          body.plain_text = additionalFields.plainText;
                      }
                      if (additionalFields.listIds) {
                          body.list_ids = additionalFields.listIds;
                      }
                      if (additionalFields.segmentIds) {
                          body.segment_ids = additionalFields.segmentIds;
                      }
                      if (additionalFields.excludeListIds) {
                          body.exclude_list_ids = additionalFields.excludeListIds;
                      }
                      if (additionalFields.excludeSegmentIds) {
                          body.exclude_segments_ids = additionalFields.excludeSegmentIds;
                      }
                      if (additionalFields.queryString) {
                          body.query_string = additionalFields.queryString;
                      }
                      if (additionalFields.trackOpens) {
                          body.track_opens = additionalFields.trackOpens ? 1 : 0;
                      }
                      if (additionalFields.trackClicks) {
                          body.track_clicks = additionalFields.trackClicks ? 1 : 0;
                      }
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/api/campaigns/create.php', body);
                      const success = ['Campaign created', 'Campaign created and now sending'];
                      if (success.includes(responseData)) {
                          responseData = { message: responseData };
                      }
                      else {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, { httpCode: '400' });
                      }
                  }
              }
              if (resource === 'subscriber') {
                  if (operation === 'add') {
                      const email = this.getNodeParameter('email', i);
                      const listId = this.getNodeParameter('listId', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          email,
                          list: listId,
                      };
                      Object.assign(body, additionalFields);
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/subscribe', body);
                      if (responseData === '1') {
                          responseData = { success: true };
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Sendy error response [${400}]: ${responseData}`, { itemIndex: i });
                      }
                  }
                  if (operation === 'count') {
                      const listId = this.getNodeParameter('listId', i);
                      const body = {
                          list_id: listId,
                      };
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/api/subscribers/active-subscriber-count.php', body);
                      const errors = [
                          'No data passed',
                          'API key not passed',
                          'Invalid API key',
                          'List ID not passed',
                          'List does not exist',
                      ];
                      if (!errors.includes(responseData)) {
                          responseData = { count: responseData };
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Sendy error response [${400}]: ${responseData}`, { itemIndex: i });
                      }
                  }
                  if (operation === 'delete') {
                      const email = this.getNodeParameter('email', i);
                      const listId = this.getNodeParameter('listId', i);
                      const body = {
                          email,
                          list_id: listId,
                      };
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/api/subscribers/delete.php', body);
                      if (responseData === '1') {
                          responseData = { success: true };
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Sendy error response [${400}]: ${responseData}`, { itemIndex: i });
                      }
                  }
                  if (operation === 'remove') {
                      const email = this.getNodeParameter('email', i);
                      const listId = this.getNodeParameter('listId', i);
                      const body = {
                          email,
                          list: listId,
                      };
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/unsubscribe', body);
                      if (responseData === '1') {
                          responseData = { success: true };
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Sendy error response [${400}]: ${responseData}`, { itemIndex: i });
                      }
                  }
                  if (operation === 'status') {
                      const email = this.getNodeParameter('email', i);
                      const listId = this.getNodeParameter('listId', i);
                      const body = {
                          email,
                          list_id: listId,
                      };
                      responseData = await GenericFunctions_1.sendyApiRequest.call(this, 'POST', '/api/subscribers/subscription-status.php', body);
                      const status = [
                          'Subscribed',
                          'Unsubscribed',
                          'Unconfirmed',
                          'Bounced',
                          'Soft bounced',
                          'Complained',
                      ];
                      if (status.includes(responseData)) {
                          responseData = { status: responseData };
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Sendy error response [${400}]: ${responseData}`, { itemIndex: i });
                      }
                  }
              }
          }
          if (Array.isArray(responseData)) {
              returnData.push.apply(returnData, responseData);
          }
          else if (responseData !== undefined) {
              returnData.push(responseData);
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Sendy = Sendy;
  //# sourceMappingURL=Sendy.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SendyApi = void 0;
  class SendyApi {
      constructor() {
          this.name = 'sendyApi';
          this.displayName = 'Sendy API';
          this.documentationUrl = 'sendy';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://yourdomain.com',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.SendyApi = SendyApi;
  //# sourceMappingURL=SendyApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SendyApi = void 0;
  class SendyApi {
      constructor() {
          this.name = 'sendyApi';
          this.displayName = 'Sendy API';
          this.documentationUrl = 'sendy';
          this.properties = [
              {
                  displayName: 'URL',
                  name: 'url',
                  type: 'string',
                  default: '',
                  placeholder: 'https://yourdomain.com',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.SendyApi = SendyApi;
  //# sourceMappingURL=SendyApi.credentials.js.map

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

  # Sendy node

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

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

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

  ## Operations

  * Campaign
      * Create a campaign
  * Subscriber
      * Add a subscriber to a list
      * Count subscribers
      * Delete a subscriber from a list
      * Unsubscribe user from a list
      * Get the status of subscriber

  ## Templates and examples

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

example_workflow:
  {"name":"Sendy Example Workflow","nodes":[{"parameters":{"resource":"campaign","dynamic_property":null},"id":"mfqecm23omettwg40ggpo","name":"Sendy","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":"subscriber","options":[{"name":"Campaign","value":"campaign"},{"name":"Subscriber","value":"subscriber"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CampaignDescription_1.campaignOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CampaignDescription_1.campaignFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SubscriberDescription_1.subscriberOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...SubscriberDescription_1.subscriberFields"}]


node_type: n8n-nodes-base.ServiceNow
name: ServiceNow
display_name: ServiceNow
description: Consume ServiceNow API
category: output
icon: file:servicenow.svg
code_hash: ff46288455e6d2f1a7f7f9bd7f3b80f839079d11a53c14846d3bf88f7f162af2
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ServiceNow
documentation_title: ServiceNow node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"servicenow","description":"Templates for servicenow"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"basicAuth","resource":"attachment","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ServiceNow = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const AttachmentDescription_1 = require("./AttachmentDescription");
  const BusinessServiceDescription_1 = require("./BusinessServiceDescription");
  const ConfigurationItemsDescription_1 = require("./ConfigurationItemsDescription");
  const DepartmentDescription_1 = require("./DepartmentDescription");
  const DictionaryDescription_1 = require("./DictionaryDescription");
  const IncidentDescription_1 = require("./IncidentDescription");
  const TableRecordDescription_1 = require("./TableRecordDescription");
  const UserDescription_1 = require("./UserDescription");
  const UserGroupDescription_1 = require("./UserGroupDescription");
  const UserRoleDescription_1 = require("./UserRoleDescription");
  class ServiceNow {
      constructor() {
          this.description = {
              displayName: 'ServiceNow',
              name: 'serviceNow',
              icon: 'file:servicenow.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume ServiceNow API',
              defaults: {
                  name: 'ServiceNow',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'serviceNowOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
                  {
                      name: 'serviceNowBasicApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['basicAuth'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Basic Auth',
                              value: 'basicAuth',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'oAuth2',
                      description: 'Authentication method to use',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Attachment',
                              value: 'attachment',
                          },
                          {
                              name: 'Business Service',
                              value: 'businessService',
                          },
                          {
                              name: 'Configuration Item',
                              value: 'configurationItems',
                          },
                          {
                              name: 'Department',
                              value: 'department',
                          },
                          {
                              name: 'Dictionary',
                              value: 'dictionary',
                          },
                          {
                              name: 'Incident',
                              value: 'incident',
                          },
                          {
                              name: 'Table Record',
                              value: 'tableRecord',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                          {
                              name: 'User Group',
                              value: 'userGroup',
                          },
                          {
                              name: 'User Role',
                              value: 'userRole',
                          },
                      ],
                      default: 'user',
                  },
                  ...AttachmentDescription_1.attachmentOperations,
                  ...AttachmentDescription_1.attachmentFields,
                  ...BusinessServiceDescription_1.businessServiceOperations,
                  ...BusinessServiceDescription_1.businessServiceFields,
                  ...ConfigurationItemsDescription_1.configurationItemsOperations,
                  ...ConfigurationItemsDescription_1.configurationItemsFields,
                  ...DepartmentDescription_1.departmentOperations,
                  ...DepartmentDescription_1.departmentFields,
                  ...DictionaryDescription_1.dictionaryOperations,
                  ...DictionaryDescription_1.dictionaryFields,
                  ...IncidentDescription_1.incidentOperations,
                  ...IncidentDescription_1.incidentFields,
                  ...TableRecordDescription_1.tableRecordOperations,
                  ...TableRecordDescription_1.tableRecordFields,
                  ...UserDescription_1.userOperations,
                  ...UserDescription_1.userFields,
                  ...UserGroupDescription_1.userGroupOperations,
                  ...UserGroupDescription_1.userGroupFields,
                  ...UserRoleDescription_1.userRoleOperations,
                  ...UserRoleDescription_1.userRoleFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getTables() {
                      const returnData = [];
                      const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/doc/table/schema', {}, {});
                      for (const table of response.result) {
                          returnData.push({
                              name: table.label,
                              value: table.value,
                              description: table.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getColumns() {
                      const resource = this.getNodeParameter('resource', 0);
                      const operation = this.getNodeParameter('operation', 0);
                      const returnData = [];
                      let tableName;
                      if (resource === 'tableRecord') {
                          tableName = this.getNodeParameter('tableName');
                      }
                      else {
                          tableName = (0, GenericFunctions_1.mapEndpoint)(resource, operation);
                      }
                      const qs = {
                          sysparm_query: `name=${tableName}`,
                          sysparm_fields: 'column_label,element',
                      };
                      const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_dictionary', {}, qs);
                      for (const column of response.result) {
                          if (column.element) {
                              returnData.push({
                                  name: column.column_label,
                                  value: column.element,
                              });
                          }
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getBusinessServices() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'name,sys_id',
                      };
                      const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/cmdb_ci_service', {}, qs);
                      for (const column of response.result) {
                          returnData.push({
                              name: column.name,
                              value: column.sys_id,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getUsers() {
                      const returnData = [];
                      const resource = this.getNodeParameter('resource', 0);
                      const operation = this.getNodeParameter('operation', 0);
                      const qs = {
                          sysparm_fields: 'sys_id,user_name',
                      };
                      if (resource === 'incident' && operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields');
                          const group = additionalFields.assignment_group;
                          const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user_grmember', {}, {
                              sysparm_query: `group=${group}^`,
                          });
                          for (const column of response) {
                              if (column.user) {
                                  const responseData = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', `/now/table/sys_user/${column.user.value}`, {}, {});
                                  const user = responseData.result;
                                  returnData.push({
                                      name: user.user_name,
                                      value: user.sys_id,
                                  });
                              }
                          }
                      }
                      else {
                          const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user', {}, qs);
                          for (const column of response) {
                              if (column.user_name) {
                                  returnData.push({
                                      name: column.user_name,
                                      value: column.sys_id,
                                  });
                              }
                          }
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getAssignmentGroups() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'sys_id,name',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user_group', {}, qs);
                      for (const column of response) {
                          if (column.name) {
                              returnData.push({
                                  name: column.name,
                                  value: column.sys_id,
                              });
                          }
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getUserRoles() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'sys_id,name',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user_role', {}, qs);
                      for (const column of response) {
                          if (column.name) {
                              returnData.push({
                                  name: column.name,
                                  value: column.sys_id,
                              });
                          }
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getConfigurationItems() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'sys_id,name,sys_class_name',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/cmdb_ci', {}, qs);
                      for (const column of response) {
                          if (column.name) {
                              returnData.push({
                                  name: column.name,
                                  value: column.sys_id,
                                  description: column.sys_class_name,
                              });
                          }
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getIncidentCategories() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'label,value',
                          sysparm_query: 'element=category^name=incident',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_choice', {}, qs);
                      for (const column of response) {
                          returnData.push({
                              name: column.label,
                              value: column.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getIncidentSubcategories() {
                      const returnData = [];
                      const operation = this.getNodeParameter('operation');
                      let category;
                      if (operation === 'update') {
                          const updateFields = this.getNodeParameter('updateFields');
                          category = updateFields.category;
                      }
                      else {
                          const additionalFields = this.getNodeParameter('additionalFields');
                          category = additionalFields.category;
                      }
                      const qs = {
                          sysparm_fields: 'label,value',
                          sysparm_query: `name=incident^element=subcategory^dependent_value=${category}`,
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_choice', {}, qs);
                      for (const column of response) {
                          returnData.push({
                              name: column.label,
                              value: column.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getIncidentStates() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'label,value',
                          sysparm_query: 'element=state^name=incident',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_choice', {}, qs);
                      for (const column of response) {
                          returnData.push({
                              name: column.label,
                              value: column.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getIncidentResolutionCodes() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'label,value',
                          sysparm_query: 'element=close_code^name=incident',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_choice', {}, qs);
                      for (const column of response) {
                          returnData.push({
                              name: column.label,
                              value: column.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
                  async getIncidentHoldReasons() {
                      const returnData = [];
                      const qs = {
                          sysparm_fields: 'label,value',
                          sysparm_query: 'element=hold_reason^name=incident',
                      };
                      const response = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_choice', {}, qs);
                      for (const column of response) {
                          returnData.push({
                              name: column.label,
                              value: column.value,
                          });
                      }
                      return (0, GenericFunctions_1.sortData)(returnData);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData = {};
          let qs;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'attachment') {
                      if (operation === 'get') {
                          const attachmentsSysId = this.getNodeParameter('attachmentId', i);
                          const download = this.getNodeParameter('download', i);
                          const endpoint = `/now/attachment/${attachmentsSysId}`;
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', endpoint, {});
                          const fileMetadata = response.result;
                          responseData = {
                              json: fileMetadata,
                          };
                          if (download) {
                              const outputField = this.getNodeParameter('outputField', i);
                              responseData = {
                                  ...responseData,
                                  binary: {
                                      [outputField]: await GenericFunctions_1.serviceNowDownloadAttachment.call(this, endpoint, fileMetadata.file_name, fileMetadata.content_type),
                                  },
                              };
                          }
                      }
                      else if (operation === 'getAll') {
                          const download = this.getNodeParameter('download', i);
                          const tableName = this.getNodeParameter('tableName', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          qs = {};
                          qs.sysparm_query = `table_name=${tableName}`;
                          if (options.queryFilter) {
                              qs.sysparm_query = `${qs.sysparm_query}^${options.queryFilter}`;
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/attachment', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/attachment', {}, qs);
                          }
                          if (download) {
                              const outputField = this.getNodeParameter('outputField', i);
                              const responseDataWithAttachments = [];
                              for (const data of responseData) {
                                  responseDataWithAttachments.push({
                                      json: data,
                                      binary: {
                                          [outputField]: await GenericFunctions_1.serviceNowDownloadAttachment.call(this, `/now/attachment/${data.sys_id}`, data.file_name, data.content_type),
                                      },
                                  });
                              }
                              responseData = responseDataWithAttachments;
                          }
                          else {
                              responseData = responseData.map((data) => ({ json: data }));
                          }
                      }
                      else if (operation === 'upload') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const recordId = this.getNodeParameter('id', i);
                          const inputDataFieldName = this.getNodeParameter('inputDataFieldName', i);
                          const options = this.getNodeParameter('options', i);
                          const binaryData = this.helpers.assertBinaryData(i, inputDataFieldName);
                          const headers = {
                              'Content-Type': binaryData.mimeType,
                          };
                          const query = {
                              table_name: tableName,
                              table_sys_id: recordId,
                              file_name: binaryData.fileName
                                  ? binaryData.fileName
                                  : `${inputDataFieldName}.${binaryData.fileExtension}`,
                              ...options,
                          };
                          const body = await this.helpers.getBinaryDataBuffer(i, inputDataFieldName);
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'POST', '/now/attachment/file', body, query, '', { headers });
                          responseData = response.result;
                      }
                      else if (operation === 'delete') {
                          const attachmentsSysId = this.getNodeParameter('attachmentId', i);
                          await GenericFunctions_1.serviceNowApiRequest.call(this, 'DELETE', `/now/attachment/${attachmentsSysId}`);
                          responseData = { success: true };
                      }
                  }
                  else if (resource === 'businessService') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/cmdb_ci_service', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/cmdb_ci_service', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'configurationItems') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/cmdb_ci', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/cmdb_ci', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'department') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/cmn_department', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/cmn_department', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'dictionary') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_dictionary', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_dictionary', {}, qs);
                          }
                      }
                  }
                  else if (resource === 'incident') {
                      if (operation === 'create') {
                          const shortDescription = this.getNodeParameter('short_description', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              short_description: shortDescription,
                              ...additionalFields,
                          };
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'POST', '/now/table/incident', body);
                          responseData = response.result;
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.serviceNowApiRequest.call(this, 'DELETE', `/now/table/incident/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const id = this.getNodeParameter('id', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', `/now/table/incident/${id}`, {}, qs);
                          responseData = response.result;
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/incident', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/incident', {}, qs);
                          }
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = this.getNodeParameter('updateFields', i);
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'PATCH', `/now/table/incident/${id}`, body);
                          responseData = response.result;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'tableRecord') {
                      if (operation === 'create') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const dataToSend = this.getNodeParameter('dataToSend', i);
                          let body = {};
                          if (dataToSend === 'mapInput') {
                              const inputsToIgnore = this.getNodeParameter('inputsToIgnore', i)
                                  .split(',')
                                  .map((field) => field.trim());
                              body = Object.entries(items[i].json)
                                  .filter(([key]) => !inputsToIgnore.includes(key))
                                  .reduce((obj, [key, val]) => Object.assign(obj, { [key]: val }), {});
                          }
                          else if (dataToSend === 'columns') {
                              const fieldsToSend = this.getNodeParameter('fieldsToSend', i);
                              body = fieldsToSend.field.reduce((obj, field) => {
                                  obj[field.column] = field.value;
                                  return obj;
                              }, {});
                          }
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'POST', `/now/table/${tableName}`, body);
                          responseData = response.result;
                      }
                      else if (operation === 'delete') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.serviceNowApiRequest.call(this, 'DELETE', `/now/table/${tableName}/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const id = this.getNodeParameter('id', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', `/now/table/${tableName}/${id}`, {}, qs);
                          responseData = response.result;
                      }
                      else if (operation === 'getAll') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', `/now/table/${tableName}`, {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', `/now/table/${tableName}`, {}, qs);
                          }
                      }
                      else if (operation === 'update') {
                          const tableName = this.getNodeParameter('tableName', i);
                          const id = this.getNodeParameter('id', i);
                          const dataToSend = this.getNodeParameter('dataToSend', i);
                          let body = {};
                          if (dataToSend === 'mapInput') {
                              const inputsToIgnore = this.getNodeParameter('inputsToIgnore', i)
                                  .split(',')
                                  .map((field) => field.trim());
                              body = Object.entries(items[i].json)
                                  .filter(([key]) => !inputsToIgnore.includes(key))
                                  .reduce((obj, [key, val]) => Object.assign(obj, { [key]: val }), {});
                          }
                          else if (dataToSend === 'columns') {
                              const fieldsToSend = this.getNodeParameter('fieldsToSend', i);
                              body = fieldsToSend.field.reduce((obj, field) => {
                                  obj[field.column] = field.value;
                                  return obj;
                              }, {});
                          }
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'PATCH', `/now/table/${tableName}/${id}`, body);
                          responseData = response.result;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'create') {
                          const body = this.getNodeParameter('additionalFields', i);
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'POST', '/now/table/sys_user', body);
                          responseData = response.result;
                      }
                      else if (operation === 'delete') {
                          const id = this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.serviceNowApiRequest.call(this, 'DELETE', `/now/table/sys_user/${id}`);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const getOption = this.getNodeParameter('getOption', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (getOption === 'id') {
                              const id = this.getNodeParameter('id', i);
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', `/now/table/sys_user/${id}`, {}, qs);
                              responseData = response.result;
                          }
                          else {
                              const userName = this.getNodeParameter('user_name', i);
                              qs.sysparm_query = `user_name=${userName}`;
                              qs.sysparm_limit = 1;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_user', {}, qs);
                              responseData = response.result;
                          }
                      }
                      else if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_user', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user', {}, qs);
                          }
                      }
                      else if (operation === 'update') {
                          const id = this.getNodeParameter('id', i);
                          const body = this.getNodeParameter('updateFields', i);
                          const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'PATCH', `/now/table/sys_user/${id}`, body);
                          responseData = response.result;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'userGroup') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_user_group', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user_group', {}, qs);
                          }
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'userRole') {
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          qs = this.getNodeParameter('options', i);
                          if (qs.sysparm_fields && typeof qs.sysparm_fields !== 'string') {
                              qs.sysparm_fields = qs.sysparm_fields.join(',');
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.sysparm_limit = limit;
                              const response = await GenericFunctions_1.serviceNowApiRequest.call(this, 'GET', '/now/table/sys_user_role', {}, qs);
                              responseData = response.result;
                          }
                          else {
                              responseData = await GenericFunctions_1.serviceNowRequestAllItems.call(this, 'GET', '/now/table/sys_user_role', {}, qs);
                          }
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
                      }
                  }
                  else {
                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, {
                          itemIndex: i,
                      });
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
                      returnData.push(...executionErrorData);
                      continue;
                  }
                  throw error;
              }
              const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
              returnData.push(...executionData);
          }
          if (resource === 'attachment') {
              if (operation === 'get' || operation === 'getAll') {
                  return [returnData];
              }
          }
          return [returnData];
      }
  }
  exports.ServiceNow = ServiceNow;
  //# sourceMappingURL=ServiceNow.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ServiceNowOAuth2Api = void 0;
  class ServiceNowOAuth2Api {
      constructor() {
          this.name = 'serviceNowOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'ServiceNow OAuth2 API';
          this.documentationUrl = 'serviceNow';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  hint: 'The subdomain can be extracted from the URL. If the URL is: https://dev99890.service-now.com the subdomain is dev99890',
                  required: true,
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_auth.do',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_token.do',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'useraccount',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'response_type=code',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'grant_type=authorization_code',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.ServiceNowOAuth2Api = ServiceNowOAuth2Api;
  //# sourceMappingURL=ServiceNowOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ServiceNowOAuth2Api = void 0;
  class ServiceNowOAuth2Api {
      constructor() {
          this.name = 'serviceNowOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'ServiceNow OAuth2 API';
          this.documentationUrl = 'serviceNow';
          this.properties = [
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  hint: 'The subdomain can be extracted from the URL. If the URL is: https://dev99890.service-now.com the subdomain is dev99890',
                  required: true,
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_auth.do',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["subdomain"]}}.service-now.com/oauth_token.do',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'useraccount',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'response_type=code',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'grant_type=authorization_code',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.ServiceNowOAuth2Api = ServiceNowOAuth2Api;
  //# sourceMappingURL=ServiceNowOAuth2Api.credentials.js.map

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

  # ServiceNow node

  Use the ServiceNow node to automate work in ServiceNow, and integrate ServiceNow with other applications. n8n has built-in support for a wide range of ServiceNow features, including getting business services, departments, configuration items, and dictionary as well as creating, updating, and deleting incidents, users, and table records. 

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

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

  ## Operations

  * Business Service
      * Get All
  * Configuration Items
      * Get All
  * Department
      * Get All
  * Dictionary
      * Get All
  * Incident
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * Table Record
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * User
      * Create
      * Delete
      * Get
      * Get All
      * Update
  * User Group
      * Get All
  * User Role
      * Get All

  ## Templates and examples

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

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

example_workflow:
  {"name":"ServiceNow Example Workflow","nodes":[{"parameters":{"authentication":"basicAuth","resource":"attachment","dynamic_property":null},"id":"mvejz497mm8drs242mgd6j","name":"ServiceNow","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":"oAuth2","description":"Authentication method to use","options":[{"name":"Basic Auth","value":"basicAuth"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"user","options":[{"name":"Attachment","value":"attachment"},{"name":"Business Service","value":"businessService"},{"name":"Configuration Item","value":"configurationItems"},{"name":"Department","value":"department"},{"name":"Dictionary","value":"dictionary"},{"name":"Incident","value":"incident"},{"name":"Table Record","value":"tableRecord"},{"name":"User","value":"user"},{"name":"User Group","value":"userGroup"},{"name":"User Role","value":"userRole"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AttachmentDescription_1.attachmentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AttachmentDescription_1.attachmentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...BusinessServiceDescription_1.businessServiceOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...BusinessServiceDescription_1.businessServiceFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ConfigurationItemsDescription_1.configurationItemsOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ConfigurationItemsDescription_1.configurationItemsFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DepartmentDescription_1.departmentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DepartmentDescription_1.departmentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DictionaryDescription_1.dictionaryOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DictionaryDescription_1.dictionaryFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...IncidentDescription_1.incidentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...IncidentDescription_1.incidentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TableRecordDescription_1.tableRecordOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TableRecordDescription_1.tableRecordFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserDescription_1.userFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserGroupDescription_1.userGroupOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserGroupDescription_1.userGroupFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserRoleDescription_1.userRoleOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...UserRoleDescription_1.userRoleFields"}]


node_type: n8n-nodes-base.Shopify
name: Shopify
display_name: Shopify
description: Consume Shopify API
category: output
icon: file:shopify.svg
code_hash: c9006b14af5d35b4e773b5812c0f324f95620663fb6b23c928b1c58ccc43a99c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Shopify
documentation_title: Shopify node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"shopify","description":"Templates for shopify"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"authentication":"accessToken","resource":"order","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Shopify = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const OrderDescription_1 = require("./OrderDescription");
  const ProductDescription_1 = require("./ProductDescription");
  class Shopify {
      constructor() {
          this.description = {
              displayName: 'Shopify',
              name: 'shopify',
              icon: 'file:shopify.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Shopify API',
              defaults: {
                  name: 'Shopify',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'shopifyApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['apiKey'],
                          },
                      },
                  },
                  {
                      name: 'shopifyAccessTokenApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                  },
                  {
                      name: 'shopifyOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                          {
                              name: 'API Key',
                              value: 'apiKey',
                          },
                      ],
                      default: 'apiKey',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Order',
                              value: 'order',
                          },
                          {
                              name: 'Product',
                              value: 'product',
                          },
                      ],
                      default: 'order',
                  },
                  ...OrderDescription_1.orderOperations,
                  ...OrderDescription_1.orderFields,
                  ...ProductDescription_1.productOperations,
                  ...ProductDescription_1.productFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getProducts() {
                      const returnData = [];
                      const products = await GenericFunctions_1.shopifyApiRequestAllItems.call(this, 'products', 'GET', '/products.json', {}, { fields: 'id,title' });
                      for (const product of products) {
                          const productName = product.title;
                          const productId = product.id;
                          returnData.push({
                              name: productName,
                              value: productId,
                          });
                      }
                      return returnData;
                  },
                  async getLocations() {
                      const returnData = [];
                      const locations = await GenericFunctions_1.shopifyApiRequestAllItems.call(this, 'locations', 'GET', '/locations.json', {}, { fields: 'id,name' });
                      for (const location of locations) {
                          const locationName = location.name;
                          const locationId = location.id;
                          returnData.push({
                              name: locationName,
                              value: locationId,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'order') {
                      if (operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const discount = additionalFields.discountCodesUi;
                          const billing = additionalFields.billingAddressUi;
                          const shipping = additionalFields.shippingAddressUi;
                          const lineItem = this.getNodeParameter('limeItemsUi', i)
                              .lineItemValues;
                          if (lineItem === undefined) {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one line item has to be added', { itemIndex: i });
                          }
                          const body = {
                              test: true,
                              line_items: (0, GenericFunctions_1.keysToSnakeCase)(lineItem),
                          };
                          if (additionalFields.fulfillmentStatus) {
                              body.fulfillment_status = additionalFields.fulfillmentStatus;
                          }
                          if (additionalFields.inventoryBehaviour) {
                              body.inventory_behaviour = additionalFields.inventoryBehaviour;
                          }
                          if (additionalFields.locationId) {
                              body.location_id = additionalFields.locationId;
                          }
                          if (additionalFields.note) {
                              body.note = additionalFields.note;
                          }
                          if (additionalFields.sendFulfillmentReceipt) {
                              body.send_fulfillment_receipt = additionalFields.sendFulfillmentReceipt;
                          }
                          if (additionalFields.sendReceipt) {
                              body.send_receipt = additionalFields.sendReceipt;
                          }
                          if (additionalFields.sendReceipt) {
                              body.send_receipt = additionalFields.sendReceipt;
                          }
                          if (additionalFields.sourceName) {
                              body.source_name = additionalFields.sourceName;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (additionalFields.test) {
                              body.test = additionalFields.test;
                          }
                          if (additionalFields.email) {
                              body.email = additionalFields.email;
                          }
                          if (discount) {
                              body.discount_codes = discount.discountCodesValues;
                          }
                          if (billing) {
                              body.billing_address = (0, GenericFunctions_1.keysToSnakeCase)(billing.billingAddressValues)[0];
                          }
                          if (shipping) {
                              body.shipping_address = (0, GenericFunctions_1.keysToSnakeCase)(shipping.shippingAddressValues)[0];
                          }
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'POST', '/orders.json', {
                              order: body,
                          });
                          responseData = responseData.order;
                      }
                      if (operation === 'delete') {
                          const orderId = this.getNodeParameter('orderId', i);
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'DELETE', `/orders/${orderId}.json`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const orderId = this.getNodeParameter('orderId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.fields) {
                              qs.fields = options.fields;
                          }
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'GET', `/orders/${orderId}.json`, {}, qs);
                          responseData = responseData.order;
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.fields) {
                              qs.fields = options.fields;
                          }
                          if (options.attributionAppId) {
                              qs.attribution_app_id = options.attributionAppId;
                          }
                          if (options.createdAtMin) {
                              qs.created_at_min = options.createdAtMin;
                          }
                          if (options.createdAtMax) {
                              qs.created_at_max = options.createdAtMax;
                          }
                          if (options.updatedAtMax) {
                              qs.updated_at_max = options.updatedAtMax;
                          }
                          if (options.updatedAtMin) {
                              qs.updated_at_min = options.updatedAtMin;
                          }
                          if (options.processedAtMin) {
                              qs.processed_at_min = options.processedAtMin;
                          }
                          if (options.processedAtMax) {
                              qs.processed_at_max = options.processedAtMax;
                          }
                          if (options.sinceId) {
                              qs.since_id = options.sinceId;
                          }
                          if (options.ids) {
                              qs.ids = options.ids;
                          }
                          if (options.status) {
                              qs.status = options.status;
                          }
                          if (options.financialStatus) {
                              qs.financial_status = options.financialStatus;
                          }
                          if (options.fulfillmentStatus) {
                              qs.fulfillment_status = options.fulfillmentStatus;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.shopifyApiRequestAllItems.call(this, 'orders', 'GET', '/orders.json', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'GET', '/orders.json', {}, qs);
                              responseData = responseData.orders;
                          }
                      }
                      if (operation === 'update') {
                          const orderId = this.getNodeParameter('orderId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const shipping = updateFields.shippingAddressUi;
                          const body = {};
                          if (updateFields.locationId) {
                              body.location_id = updateFields.locationId;
                          }
                          if (updateFields.note) {
                              body.note = updateFields.note;
                          }
                          if (updateFields.sourceName) {
                              body.source_name = updateFields.sourceName;
                          }
                          if (updateFields.tags) {
                              body.tags = updateFields.tags;
                          }
                          if (updateFields.email) {
                              body.email = updateFields.email;
                          }
                          if (shipping) {
                              body.shipping_address = (0, GenericFunctions_1.keysToSnakeCase)(shipping.shippingAddressValues)[0];
                          }
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'PUT', `/orders/${orderId}.json`, {
                              order: body,
                          });
                          responseData = responseData.order;
                      }
                  }
                  else if (resource === 'product') {
                      const productId = this.getNodeParameter('productId', i, '');
                      let body = {};
                      if (operation === 'create') {
                          const title = this.getNodeParameter('title', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i, {});
                          if (additionalFields.productOptions) {
                              const metadata = additionalFields.productOptions
                                  .option;
                              additionalFields.options = {};
                              for (const data of metadata) {
                                  additionalFields.options[data.name] = data.value;
                              }
                              delete additionalFields.productOptions;
                          }
                          body = additionalFields;
                          body.title = title;
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'POST', '/products.json', {
                              product: body,
                          });
                          responseData = responseData.product;
                      }
                      if (operation === 'delete') {
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'DELETE', `/products/${productId}.json`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const additionalFields = this.getNodeParameter('additionalFields', i, {});
                          Object.assign(qs, additionalFields);
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'GET', `/products/${productId}.json`, {}, qs);
                          responseData = responseData.product;
                      }
                      if (operation === 'getAll') {
                          const additionalFields = this.getNodeParameter('additionalFields', i, {});
                          const returnAll = this.getNodeParameter('returnAll', i);
                          Object.assign(qs, additionalFields);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.shopifyApiRequestAllItems.call(this, 'products', 'GET', '/products.json', {}, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'GET', '/products.json', {}, qs);
                              responseData = responseData.products;
                          }
                      }
                      if (operation === 'update') {
                          const updateFields = this.getNodeParameter('updateFields', i, {});
                          if (updateFields.productOptions) {
                              const metadata = updateFields.productOptions.option;
                              updateFields.options = {};
                              for (const data of metadata) {
                                  updateFields.options[data.name] = data.value;
                              }
                              delete updateFields.productOptions;
                          }
                          body = updateFields;
                          responseData = await GenericFunctions_1.shopifyApiRequest.call(this, 'PUT', `/products/${productId}.json`, { product: body });
                          responseData = responseData.product;
                      }
                  }
                  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.Shopify = Shopify;
  //# sourceMappingURL=Shopify.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ShopifyApi = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class ShopifyApi {
      constructor() {
          this.name = 'shopifyApi';
          this.displayName = 'Shopify API';
          this.documentationUrl = 'shopify';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Shop Subdomain',
                  name: 'shopSubdomain',
                  required: true,
                  type: 'string',
                  default: '',
                  description: 'Only the subdomain without .myshopify.com',
              },
              {
                  displayName: 'Shared Secret',
                  name: 'sharedSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2019-10',
                  url: '/products.json',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              ...requestOptions.headers,
              Authorization: `Basic ${Buffer.from(`${credentials.apiKey}:${credentials.password}`).toString(n8n_workflow_1.BINARY_ENCODING)}`,
          };
          return requestOptions;
      }
  }
  exports.ShopifyApi = ShopifyApi;
  //# sourceMappingURL=ShopifyApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ShopifyOAuth2Api = void 0;
  class ShopifyOAuth2Api {
      constructor() {
          this.name = 'shopifyOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Shopify OAuth2 API';
          this.documentationUrl = 'shopify';
          this.properties = [
              {
                  displayName: 'Shop Subdomain',
                  name: 'shopSubdomain',
                  required: true,
                  type: 'string',
                  default: '',
                  description: 'Only the subdomain without .myshopify.com',
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
                  hint: 'Be aware that Shopify refers to the Client ID as API Key',
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
                  required: true,
                  hint: 'Be aware that Shopify refers to the Client Secret as API Secret Key',
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/access_token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'write_orders read_orders write_products read_products',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'access_mode=value',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ShopifyOAuth2Api = ShopifyOAuth2Api;
  //# sourceMappingURL=ShopifyOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ShopifyApi = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  class ShopifyApi {
      constructor() {
          this.name = 'shopifyApi';
          this.displayName = 'Shopify API';
          this.documentationUrl = 'shopify';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  required: true,
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Shop Subdomain',
                  name: 'shopSubdomain',
                  required: true,
                  type: 'string',
                  default: '',
                  description: 'Only the subdomain without .myshopify.com',
              },
              {
                  displayName: 'Shared Secret',
                  name: 'sharedSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2019-10',
                  url: '/products.json',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = {
              ...requestOptions.headers,
              Authorization: `Basic ${Buffer.from(`${credentials.apiKey}:${credentials.password}`).toString(n8n_workflow_1.BINARY_ENCODING)}`,
          };
          return requestOptions;
      }
  }
  exports.ShopifyApi = ShopifyApi;
  //# sourceMappingURL=ShopifyApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ShopifyOAuth2Api = void 0;
  class ShopifyOAuth2Api {
      constructor() {
          this.name = 'shopifyOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Shopify OAuth2 API';
          this.documentationUrl = 'shopify';
          this.properties = [
              {
                  displayName: 'Shop Subdomain',
                  name: 'shopSubdomain',
                  required: true,
                  type: 'string',
                  default: '',
                  description: 'Only the subdomain without .myshopify.com',
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
                  required: true,
                  hint: 'Be aware that Shopify refers to the Client ID as API Key',
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: {
                      password: true,
                  },
                  default: '',
                  required: true,
                  hint: 'Be aware that Shopify refers to the Client Secret as API Secret Key',
              },
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: '=https://{{$self["shopSubdomain"]}}.myshopify.com/admin/oauth/access_token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'write_orders read_orders write_products read_products',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: 'access_mode=value',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.ShopifyOAuth2Api = ShopifyOAuth2Api;
  //# sourceMappingURL=ShopifyOAuth2Api.credentials.js.map

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

  # Shopify node

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

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

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

  ## Operations

  * Order
      * Create an order
      * Delete an order
      * Get an order
      * Get all orders
      * Update an order
  * Product
      * Create a product
      * Delete a product
      * Get a product
      * Get all products
      * Update a product

  ## Templates and examples

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

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

example_workflow:
  {"name":"Shopify Example Workflow","nodes":[{"parameters":{"authentication":"accessToken","resource":"order","dynamic_property":null},"id":"nhwc5gw0zfphy3prst0ohw","name":"Shopify","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":"apiKey","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"},{"name":"API Key","value":"apiKey"}]},{"displayName":"Resource","name":"resource","type":"options","default":"order","options":[{"name":"Order","value":"order"},{"name":"Product","value":"product"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrderDescription_1.orderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OrderDescription_1.orderFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProductDescription_1.productOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProductDescription_1.productFields"}]


node_type: n8n-nodes-base.SentryIo
name: SentryIo
display_name: Sentry.io
description: Consume Sentry.io API
category: output
icon: file:sentryio.svg
code_hash: 12e647ea8cb08abfa06aba35b9341919467decb8126ef162439de5714292bc31
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.SentryIo
documentation_title: Sentry.io node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"sentryio","description":"Templates for sentryio"}]
related_resources: [{"title":"Sentry.io's documentation","url":"https://docs.sentry.io/api/","type":"external"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"sentryVersion":"cloud","authentication":"accessToken","resource":"event","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SentryIo = void 0;
  const EventDescription_1 = require("./EventDescription");
  const IssueDescription_1 = require("./IssueDescription");
  const OrganizationDescription_1 = require("./OrganizationDescription");
  const ProjectDescription_1 = require("./ProjectDescription");
  const ReleaseDescription_1 = require("./ReleaseDescription");
  const TeamDescription_1 = require("./TeamDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class SentryIo {
      constructor() {
          this.description = {
              displayName: 'Sentry.io',
              name: 'sentryIo',
              icon: 'file:sentryio.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Sentry.io API',
              defaults: {
                  name: 'Sentry.io',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sentryIoOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                              sentryVersion: ['cloud'],
                          },
                      },
                  },
                  {
                      name: 'sentryIoApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                              sentryVersion: ['cloud'],
                          },
                      },
                  },
                  {
                      name: 'sentryIoServerApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                              sentryVersion: ['server'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Sentry Version',
                      name: 'sentryVersion',
                      type: 'options',
                      options: [
                          {
                              name: 'Cloud',
                              value: 'cloud',
                          },
                          {
                              name: 'Server (Self Hosted)',
                              value: 'server',
                          },
                      ],
                      default: 'cloud',
                  },
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      displayOptions: {
                          show: {
                              sentryVersion: ['cloud'],
                          },
                      },
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      displayOptions: {
                          show: {
                              sentryVersion: ['server'],
                          },
                      },
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Issue',
                              value: 'issue',
                          },
                          {
                              name: 'Organization',
                              value: 'organization',
                          },
                          {
                              name: 'Project',
                              value: 'project',
                          },
                          {
                              name: 'Release',
                              value: 'release',
                          },
                          {
                              name: 'Team',
                              value: 'team',
                          },
                      ],
                      default: 'event',
                  },
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...IssueDescription_1.issueOperations,
                  ...IssueDescription_1.issueFields,
                  ...OrganizationDescription_1.organizationOperations,
                  ...OrganizationDescription_1.organizationFields,
                  ...ProjectDescription_1.projectOperations,
                  ...ProjectDescription_1.projectFields,
                  ...ReleaseDescription_1.releaseOperations,
                  ...ReleaseDescription_1.releaseFields,
                  ...TeamDescription_1.teamOperations,
                  ...TeamDescription_1.teamFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getOrganizations() {
                      const returnData = [];
                      const organizations = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', '/api/0/organizations/', {});
                      for (const organization of organizations) {
                          returnData.push({
                              name: organization.slug,
                              value: organization.slug,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getProjects() {
                      const returnData = [];
                      const projects = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', '/api/0/projects/', {});
                      const organizationSlug = this.getNodeParameter('organizationSlug');
                      for (const project of projects) {
                          if (organizationSlug !== project.organization.slug) {
                              continue;
                          }
                          returnData.push({
                              name: project.slug,
                              value: project.slug,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getTeams() {
                      const returnData = [];
                      const organizationSlug = this.getNodeParameter('organizationSlug');
                      const teams = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', `/api/0/organizations/${organizationSlug}/teams/`, {});
                      for (const team of teams) {
                          returnData.push({
                              name: team.slug,
                              value: team.slug,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const qs = {};
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'event') {
                      if (operation === 'getAll') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const full = this.getNodeParameter('full', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/events/`;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          qs.full = full;
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'get') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/events/${eventId}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                  }
                  if (resource === 'issue') {
                      if (operation === 'getAll') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/issues/`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.statsPeriod) {
                              qs.statsPeriod = additionalFields.statsPeriod;
                          }
                          if (additionalFields.shortIdLookup) {
                              qs.shortIdLookup = additionalFields.shortIdLookup;
                          }
                          if (additionalFields.query) {
                              qs.query = additionalFields.query;
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'get') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const endpoint = `/api/0/issues/${issueId}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                      if (operation === 'delete') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const endpoint = `/api/0/issues/${issueId}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'DELETE', endpoint, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'update') {
                          const issueId = this.getNodeParameter('issueId', i);
                          const endpoint = `/api/0/issues/${issueId}/`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.status) {
                              qs.status = additionalFields.status;
                          }
                          if (additionalFields.assignedTo) {
                              qs.assignedTo = additionalFields.assignedTo;
                          }
                          if (additionalFields.hasSeen) {
                              qs.hasSeen = additionalFields.hasSeen;
                          }
                          if (additionalFields.isBookmarked) {
                              qs.isBookmarked = additionalFields.isBookmarked;
                          }
                          if (additionalFields.isSubscribed) {
                              qs.isSubscribed = additionalFields.isSubscribed;
                          }
                          if (additionalFields.isPublic) {
                              qs.isPublic = additionalFields.isPublic;
                          }
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'PUT', endpoint, qs);
                      }
                  }
                  if (resource === 'organization') {
                      if (operation === 'get') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const endpoint = '/api/0/organizations/';
                          if (additionalFields.member) {
                              qs.member = additionalFields.member;
                          }
                          if (additionalFields.owner) {
                              qs.owner = additionalFields.owner;
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (responseData === undefined) {
                              responseData = [];
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const agreeTerms = this.getNodeParameter('agreeTerms', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const endpoint = '/api/0/organizations/';
                          qs.name = name;
                          qs.agreeTerms = agreeTerms;
                          if (additionalFields.slug) {
                              qs.slug = additionalFields.slug;
                          }
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'POST', endpoint, qs);
                      }
                      if (operation === 'update') {
                          const organizationSlug = this.getNodeParameter('organization_slug', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/`;
                          const body = this.getNodeParameter('updateFields', i);
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'PUT', endpoint, body, qs);
                      }
                  }
                  if (resource === 'project') {
                      if (operation === 'create') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const teamSlug = this.getNodeParameter('teamSlug', i);
                          const name = this.getNodeParameter('name', i);
                          const endpoint = `/api/0/teams/${organizationSlug}/${teamSlug}/projects/`;
                          const body = {
                              name,
                              ...this.getNodeParameter('additionalFields', i),
                          };
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'POST', endpoint, body, qs);
                      }
                      if (operation === 'get') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const endpoint = '/api/0/projects/';
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'update') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/`;
                          const body = this.getNodeParameter('updateFields', i);
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'PUT', endpoint, body, qs);
                      }
                      if (operation === 'delete') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const projectSlug = this.getNodeParameter('projectSlug', i);
                          const endpoint = `/api/0/projects/${organizationSlug}/${projectSlug}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'DELETE', endpoint, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'release') {
                      if (operation === 'get') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const version = this.getNodeParameter('version', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/releases/${version}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                      if (operation === 'getAll') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/releases/`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (additionalFields.query) {
                              qs.query = additionalFields.query;
                          }
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'delete') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const version = this.getNodeParameter('version', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/releases/${version}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'DELETE', endpoint, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'create') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/releases/`;
                          const version = this.getNodeParameter('version', i);
                          const url = this.getNodeParameter('url', i);
                          const projects = this.getNodeParameter('projects', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.dateReleased) {
                              qs.dateReleased = additionalFields.dateReleased;
                          }
                          qs.version = version;
                          qs.url = url;
                          qs.projects = projects;
                          if (additionalFields.commits) {
                              const commits = [];
                              additionalFields.commits.commitProperties.map((commit) => {
                                  const commitObject = { id: commit.id };
                                  if (commit.repository) {
                                      commitObject.repository = commit.repository;
                                  }
                                  if (commit.message) {
                                      commitObject.message = commit.message;
                                  }
                                  if (commit.patchSet && Array.isArray(commit.patchSet)) {
                                      commit.patchSet.patchSetProperties.map((patchSet) => {
                                          var _a;
                                          (_a = commitObject.patch_set) === null || _a === void 0 ? void 0 : _a.push(patchSet);
                                      });
                                  }
                                  if (commit.authorName) {
                                      commitObject.author_name = commit.authorName;
                                  }
                                  if (commit.authorEmail) {
                                      commitObject.author_email = commit.authorEmail;
                                  }
                                  if (commit.timestamp) {
                                      commitObject.timestamp = commit.timestamp;
                                  }
                                  commits.push(commitObject);
                              });
                              qs.commits = commits;
                          }
                          if (additionalFields.refs) {
                              const refs = [];
                              additionalFields.refs.refProperties.map((ref) => {
                                  refs.push(ref);
                              });
                              qs.refs = refs;
                          }
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'POST', endpoint, qs);
                      }
                      if (operation === 'update') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const version = this.getNodeParameter('version', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/releases/${version}/`;
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = { ...updateFields };
                          if (updateFields.commits) {
                              const commits = [];
                              updateFields.commits.commitProperties.map((commit) => {
                                  const commitObject = { id: commit.id };
                                  if (commit.repository) {
                                      commitObject.repository = commit.repository;
                                  }
                                  if (commit.message) {
                                      commitObject.message = commit.message;
                                  }
                                  if (commit.patchSet && Array.isArray(commit.patchSet)) {
                                      commit.patchSet.patchSetProperties.map((patchSet) => {
                                          var _a;
                                          (_a = commitObject.patch_set) === null || _a === void 0 ? void 0 : _a.push(patchSet);
                                      });
                                  }
                                  if (commit.authorName) {
                                      commitObject.author_name = commit.authorName;
                                  }
                                  if (commit.authorEmail) {
                                      commitObject.author_email = commit.authorEmail;
                                  }
                                  if (commit.timestamp) {
                                      commitObject.timestamp = commit.timestamp;
                                  }
                                  commits.push(commitObject);
                              });
                              body.commits = commits;
                          }
                          if (updateFields.refs) {
                              const refs = [];
                              updateFields.refs.refProperties.map((ref) => {
                                  refs.push(ref);
                              });
                              body.refs = refs;
                          }
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'PUT', endpoint, body, qs);
                      }
                  }
                  if (resource === 'team') {
                      if (operation === 'get') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const teamSlug = this.getNodeParameter('teamSlug', i);
                          const endpoint = `/api/0/teams/${organizationSlug}/${teamSlug}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'GET', endpoint, qs);
                      }
                      if (operation === 'getAll') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/teams/`;
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              qs.limit = limit;
                          }
                          responseData = await GenericFunctions_1.sentryApiRequestAllItems.call(this, 'GET', endpoint, {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                      if (operation === 'create') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const name = this.getNodeParameter('name', i);
                          const endpoint = `/api/0/organizations/${organizationSlug}/teams/`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          qs.name = name;
                          if (additionalFields.slug) {
                              qs.slug = additionalFields.slug;
                          }
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'POST', endpoint, qs);
                      }
                      if (operation === 'update') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const teamSlug = this.getNodeParameter('teamSlug', i);
                          const endpoint = `/api/0/teams/${organizationSlug}/${teamSlug}/`;
                          const body = this.getNodeParameter('updateFields', i);
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'PUT', endpoint, body, qs);
                      }
                      if (operation === 'delete') {
                          const organizationSlug = this.getNodeParameter('organizationSlug', i);
                          const teamSlug = this.getNodeParameter('teamSlug', i);
                          const endpoint = `/api/0/teams/${organizationSlug}/${teamSlug}/`;
                          responseData = await GenericFunctions_1.sentryIoApiRequest.call(this, 'DELETE', endpoint, qs);
                          responseData = { success: true };
                      }
                  }
                  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.SentryIo = SentryIo;
  //# sourceMappingURL=SentryIo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SentryIoApi = void 0;
  class SentryIoApi {
      constructor() {
          this.name = 'sentryIoApi';
          this.displayName = 'Sentry.io API';
          this.documentationUrl = 'sentryIo';
          this.properties = [
              {
                  displayName: 'Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.SentryIoApi = SentryIoApi;
  //# sourceMappingURL=SentryIoApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SentryIoOAuth2Api = void 0;
  class SentryIoOAuth2Api {
      constructor() {
          this.name = 'sentryIoOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Sentry.io OAuth2 API';
          this.documentationUrl = 'sentryIo';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://sentry.io/oauth/authorize/',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://sentry.io/oauth/token/',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'event:admin event:read org:read project:read project:releases team:read event:write org:admin project:write team:write project:admin team:admin',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.SentryIoOAuth2Api = SentryIoOAuth2Api;
  //# sourceMappingURL=SentryIoOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SentryIoApi = void 0;
  class SentryIoApi {
      constructor() {
          this.name = 'sentryIoApi';
          this.displayName = 'Sentry.io API';
          this.documentationUrl = 'sentryIo';
          this.properties = [
              {
                  displayName: 'Token',
                  name: 'token',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
      }
  }
  exports.SentryIoApi = SentryIoApi;
  //# sourceMappingURL=SentryIoApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SentryIoOAuth2Api = void 0;
  class SentryIoOAuth2Api {
      constructor() {
          this.name = 'sentryIoOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Sentry.io OAuth2 API';
          this.documentationUrl = 'sentryIo';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://sentry.io/oauth/authorize/',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://sentry.io/oauth/token/',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'event:admin event:read org:read project:read project:releases team:read event:write org:admin project:write team:write project:admin team:admin',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.SentryIoOAuth2Api = SentryIoOAuth2Api;
  //# sourceMappingURL=SentryIoOAuth2Api.credentials.js.map

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

  # Sentry.io node

  Use the Sentry.io node to automate work in Sentry.io, and integrate Sentry.io with other applications. n8n has built-in support for a wide range of Sentry.io features, including creating, updating, deleting, and getting, issues, projects, and releases, as well as getting all events.

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

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

  ## Operations

  * Event
      * Get event by ID
      * Get all events
  * Issue
      * Delete an issue
      * Get issue by ID
      * Get all issues
      * Update an issue
  * Project
      * Create a new project
      * Delete a project
      * Get project by ID
      * Get all projects
      * Update a project
  * Release
      * Create a release
      * Delete a release
      * Get release by version identifier
      * Get all releases
      * Update a release
  * Organization
      * Create an organization
      * Get organization by slug
      * Get all organizations
      * Update an organization
  * Team
      * Create a new team
      * Delete a team
      * Get team by slug
      * Get all teams
      * Update a team

  ## Templates and examples

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

  ## Related resources

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

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

example_workflow:
  {"name":"Sentry.io Example Workflow","nodes":[{"parameters":{"sentryVersion":"cloud","authentication":"accessToken","resource":"event","dynamic_property":null},"id":"lvzuos4zibi5arst3slkuf","name":"Sentry.io","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Sentry Version","name":"sentryVersion","type":"options","default":"cloud","options":[{"name":"Cloud","value":"cloud"},{"name":"Server (Self Hosted)","value":"server"}]},{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"}]},{"displayName":"Resource","name":"resource","type":"options","default":"event","options":[{"name":"Event","value":"event"},{"name":"Issue","value":"issue"},{"name":"Organization","value":"organization"},{"name":"Project","value":"project"},{"name":"Release","value":"release"},{"name":"Team","value":"team"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescription_1.eventOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EventDescription_1.eventFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...IssueDescription_1.issueOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...IssueDescription_1.issueFields"},{"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":"...ProjectDescription_1.projectOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ProjectDescription_1.projectFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ReleaseDescription_1.releaseOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ReleaseDescription_1.releaseFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TeamDescription_1.teamOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TeamDescription_1.teamFields"}]


node_type: n8n-nodes-base.Slack
name: Slack
display_name: Slack
description: Consume Slack API
category: output
icon: file:slack.svg
code_hash: 0ed10d0646f3c595406359edfa2c293dac41991cee59ad4fb3ccf2bb70eca6fc
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Slack
documentation_title: Slack node documentation
documentation_examples: []
templates: [{"name":"slack","description":"Templates for slack"}]
related_resources: [{"title":"Slack's documentation","url":"https://api.slack.com/","type":"api"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-12 08:59:13
updated_at: 2025-06-12 08:59:13
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Slack = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SlackV1_node_1 = require("./V1/SlackV1.node");
  const SlackV2_node_1 = require("./V2/SlackV2.node");
  class Slack extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Slack',
              name: 'slack',
              icon: 'file:slack.svg',
              group: ['output'],
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Slack API',
              defaultVersion: 2.1,
          };
          const nodeVersions = {
              1: new SlackV1_node_1.SlackV1(baseDescription),
              2: new SlackV2_node_1.SlackV2(baseDescription),
              2.1: new SlackV2_node_1.SlackV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Slack = Slack;
  //# sourceMappingURL=Slack.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SlackApi = void 0;
  class SlackApi {
      constructor() {
          this.name = 'slackApi';
          this.displayName = 'Slack API';
          this.documentationUrl = 'slack';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://slack.com',
                  url: '/api/users.profile.get',
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'error',
                          value: 'invalid_auth',
                          message: 'Invalid access token',
                      },
                  },
              ],
          };
      }
  }
  exports.SlackApi = SlackApi;
  //# sourceMappingURL=SlackApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SlackOAuth2Api = void 0;
  const userScopes = [
      'channels:read',
      'channels:write',
      'chat:write',
      'files:read',
      'files:write',
      'groups:read',
      'im:read',
      'mpim:read',
      'reactions:read',
      'reactions:write',
      'stars:read',
      'stars:write',
      'usergroups:write',
      'usergroups:read',
      'users.profile:read',
      'users.profile:write',
      'users:read',
  ];
  class SlackOAuth2Api {
      constructor() {
          this.name = 'slackOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Slack OAuth2 API';
          this.documentationUrl = 'slack';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://slack.com/oauth/v2/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://slack.com/api/oauth.v2.access',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'chat:write',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: `user_scope=${userScopes.join(' ')}`,
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
              {
                  displayName: 'If you get an Invalid Scopes error, make sure you add the correct one <a target="_blank" href="https://docs.n8n.io/integrations/builtin/credentials/slack/#using-oauth">here</a> to your Slack integration',
                  name: 'notice',
                  type: 'notice',
                  default: '',
              },
          ];
      }
  }
  exports.SlackOAuth2Api = SlackOAuth2Api;
  //# sourceMappingURL=SlackOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SlackApi = void 0;
  class SlackApi {
      constructor() {
          this.name = 'slackApi';
          this.displayName = 'Slack API';
          this.documentationUrl = 'slack';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  required: true,
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://slack.com',
                  url: '/api/users.profile.get',
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'error',
                          value: 'invalid_auth',
                          message: 'Invalid access token',
                      },
                  },
              ],
          };
      }
  }
  exports.SlackApi = SlackApi;
  //# sourceMappingURL=SlackApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SlackOAuth2Api = void 0;
  const userScopes = [
      'channels:read',
      'channels:write',
      'chat:write',
      'files:read',
      'files:write',
      'groups:read',
      'im:read',
      'mpim:read',
      'reactions:read',
      'reactions:write',
      'stars:read',
      'stars:write',
      'usergroups:write',
      'usergroups:read',
      'users.profile:read',
      'users.profile:write',
      'users:read',
  ];
  class SlackOAuth2Api {
      constructor() {
          this.name = 'slackOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Slack OAuth2 API';
          this.documentationUrl = 'slack';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://slack.com/oauth/v2/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://slack.com/api/oauth.v2.access',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: 'chat:write',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: `user_scope=${userScopes.join(' ')}`,
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
              {
                  displayName: 'If you get an Invalid Scopes error, make sure you add the correct one <a target="_blank" href="https://docs.n8n.io/integrations/builtin/credentials/slack/#using-oauth">here</a> to your Slack integration',
                  name: 'notice',
                  type: 'notice',
                  default: '',
              },
          ];
      }
  }
  exports.SlackOAuth2Api = SlackOAuth2Api;
  //# sourceMappingURL=SlackOAuth2Api.credentials.js.map

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

  # Slack node

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

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

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

  ## Operations

  * **Channel**
      * **Archive** a channel.
      * **Close** a direct message or multi-person direct message.
      * **Create** a public or private channel-based conversation.
      * **Get** information about a channel.
      * **Get Many**: Get a list of channels in Slack.
      * **History**: Get a channel's history of messages and events.
      * **Invite** a user to a channel.
      * **Join** an existing channel.
      * **Kick**: Remove a user from a channel.
      * **Leave** a channel.
      * **Member**: List the members of a channel.
      * **Open** or resume a direct message or multi-person direct message.
      * **Rename** a channel.
      * **Replies**: Get a thread of messages posted to a channel.
      * **Sets purpose** of a channel.
      * **Sets topic** of a channel.
      * **Unarchive** a channel.
  * **File**
      * **Get** a file.
      * **Get Many**: Get and filter team files.
      * **Upload**: Create or upload an existing file.
  * **Message**
      * **Delete** a message
      * **Get permalink**: Get a message's permalink.
      * **Search** for messages
      * **Send** a message
      * **Send and Wait for Approval**: Send a message and wait for approval from the recipient before continuing.
      * **Update** a message
  * **Reaction**
      * **Add** a reaction to a message.
      * **Get** a message's reactions.
      * **Remove** a reaction from a message.
  * **Star**
      * **Add** a star to an item.
      * **Delete** a star from an item.
      * **Get Many**: Get a list of an authenticated user's stars.
  * **User**
      * **Get** information about a user.
  	* **Get Many**: Get a list of users.
      * **Get User's Profile**.
      * **Get User's Status**.
  	* **Update User's Profile**.
  * **User Group**
      * **Create** a user group.
      * **Disable** a user group.
      * **Enable** a user group.
      * **Get Many**: Get a list of user groups.
      * **Update** a user group.

  ## Templates and examples

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

  ## Related resources

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

  ## Required scopes

  Once you create a Slack app for your [Slack credentials](/integrations/builtin/credentials/slack.md), you must add the appropriate scopes to your Slack app for this node to work. Start with the scopes listed in the [Scopes | Slack credentials](/integrations/builtin/credentials/slack.md#scopes) page.

  If those aren't enough, use the table below to look up the resource and operation you want to use, then follow the link to Slack's API documentation to find the correct scopes.

  <!-- vale off -->

  | **Resource** | **Operation** | **Slack API method** |
  | --- | --- | --- |
  | Channel | Archive | [conversations.archive](https://api.slack.com/methods/conversations.archive){:target=blank .external-link} |
  | Channel | Close | [conversations.close](https://api.slack.com/methods/conversations.close){:target=blank .external-link} |
  | Channel | Create | [conversations.create](https://api.slack.com/methods/conversations.create){:target=blank .external-link} |
  | Channel | Get | [conversations.info](https://api.slack.com/methods/conversations.info){:target=blank .external-link} |
  | Channel | Get Many | [conversations.list](https://api.slack.com/methods/conversations.list){:target=blank .external-link} |
  | Channel | History | [conversations.history](https://api.slack.com/methods/conversations.history){:target=blank .external-link} |
  | Channel | Invite | [conversations.invite](https://api.slack.com/methods/conversations.invite){:target=blank .external-link} |
  | Channel | Join | [conversations.join](https://api.slack.com/methods/conversations.join){:target=blank .external-link} |
  | Channel | Kick | [conversations.kick](https://api.slack.com/methods/conversations.kick){:target=blank .external-link} |
  | Channel | Leave | [conversations.leave](https://api.slack.com/methods/conversations.leave){:target=blank .external-link} |
  | Channel | Member | [conversations.members](https://api.slack.com/methods/conversations.members){:target=blank .external-link} |
  | Channel | Open | [conversations.open](https://api.slack.com/methods/conversations.open){:target=blank .external-link} |
  | Channel | Rename | [conversations.rename](https://api.slack.com/methods/conversations.rename){:target=blank .external-link} |
  | Channel | Replies | [conversations.replies](https://api.slack.com/methods/conversations.replies){:target=blank .external-link} |
  | Channel | Set Purpose | [conversations.setPurpose](https://api.slack.com/methods/conversations.setPurpose){:target=blank .external-link} |
  | Channel | Set Topic | [conversations.setTopic](https://api.slack.com/methods/conversations.setTopic){:target=blank .external-link} |
  | Channel | Unarchive | [conversations.unarchive](https://api.slack.com/methods/conversations.unarchive){:target=blank .external-link} |
  | File | Get | [files.info](https://api.slack.com/methods/files.info){:target=blank .external-link} |
  | File | Get Many | [files.list](https://api.slack.com/methods/files.list){:target=blank .external-link} |
  | File | Upload | [files.upload](https://api.slack.com/methods/files.upload){:target=blank .external-link} |
  | Message | Delete | [chat.delete](https://api.slack.com/methods/chat.delete){:target=blank .external-link} |
  | Message | Get Permalink | [chat.getPermalink](https://api.slack.com/methods/chat.getPermalink){:target=blank .external-link} |
  | Message | Search | [search.messages](https://api.slack.com/methods/search.messages){:target=blank .external-link} |
  | Message | Send | [chat.postMessage](https://api.slack.com/methods/chat.postMessage){:target=blank .external-link} |
  | Message | Send and Wait for Approval | [chat.postMessage](https://api.slack.com/methods/chat.postMessage){:target=blank .external-link} |
  | Message | Update | [chat.update](https://api.slack.com/methods/chat.update){:target=blank .external-link} |
  | Reaction | Add | [reactions.add](https://api.slack.com/methods/reactions.add){:target=blank .external-link} |
  | Reaction | Get | [reactions.get](https://api.slack.com/methods/reactions.get){:target=blank .external-link} |
  | Reaction | Remove | [reactions.remove](https://api.slack.com/methods/reactions.remove){:target=blank .external-link} |
  | Star | Add | [stars.add](https://api.slack.com/methods/stars.add){:target=blank .external-link} |
  | Star | Delete | [stars.remove](https://api.slack.com/methods/stars.remove){:target=blank .external-link} |
  | Star | Get Many | [stars.list](https://api.slack.com/methods/stars.list){:target=blank .external-link} |
  | User | Get | [users.info](https://api.slack.com/methods/users.info){:target=blank .external-link} |
  | User | Get Many | [users.list](https://api.slack.com/methods/users.list){:target=blank .external-link} |
  | User | Get User's Profile | [users.profile.get](https://api.slack.com/methods/users.profile.get){:target=blank .external-link} |
  | User | Get User's Status | [users.getPresence](https://api.slack.com/methods/users.getPresence){:target=blank .external-link} |
  | User | Update User's Profile | [users.profile.set](https://api.slack.com/methods/users.profile.set){:target=blank .external-link} |
  | User Group | Create | [usergroups.create](https://api.slack.com/methods/usergroups.create){:target=blank .external-link} |
  | User Group | Disable | [usergroups.disable](https://api.slack.com/methods/usergroups.disable){:target=blank .external-link} |
  | User Group | Enable | [usergroups.enable](https://api.slack.com/methods/usergroups.enable){:target=blank .external-link} |
  | User Group | Get Many | [usergroups.list](https://api.slack.com/methods/usergroups.list){:target=blank .external-link} |
  | User Group | Update | [usergroups.update](https://api.slack.com/methods/usergroups.update){:target=blank .external-link} |

  <!-- vale on -->

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

operations:
  [{"resource":"Channel","operation":"Archive","description":"a channel"},{"resource":"Channel","operation":"Close","description":"a direct message or multi-person direct message"},{"resource":"Channel","operation":"Create","description":"a public or private channel-based conversation"},{"resource":"Channel","operation":"Get","description":"information about a channel"},{"resource":"Channel","operation":"Get Many","description":"Get a list of channels in Slack"},{"resource":"Channel","operation":"History","description":"Get a channel's history of messages and events"},{"resource":"Channel","operation":"Invite","description":"a user to a channel"},{"resource":"Channel","operation":"Join","description":"an existing channel"},{"resource":"Channel","operation":"Kick","description":"Remove a user from a channel"},{"resource":"Channel","operation":"Leave","description":"a channel"},{"resource":"Channel","operation":"Member","description":"List the members of a channel"},{"resource":"Channel","operation":"Open","description":"or resume a direct message or multi-person direct message"},{"resource":"Channel","operation":"Rename","description":"a channel"},{"resource":"Channel","operation":"Replies","description":"Get a thread of messages posted to a channel"},{"resource":"Channel","operation":"Sets purpose","description":"of a channel"},{"resource":"Channel","operation":"Sets topic","description":"of a channel"},{"resource":"Channel","operation":"Unarchive","description":"a channel"},{"resource":"File","operation":"Get","description":"a file"},{"resource":"File","operation":"Get Many","description":"Get and filter team files"},{"resource":"File","operation":"Upload","description":"Create or upload an existing file"},{"resource":"Message","operation":"Delete","description":"a message"},{"resource":"Message","operation":"Get permalink","description":"Get a message's permalink"},{"resource":"Message","operation":"Search","description":"for messages"},{"resource":"Message","operation":"Send","description":"a message"},{"resource":"Message","operation":"Send and Wait for Approval","description":"Send a message and wait for approval from the recipient before continuing"},{"resource":"Message","operation":"Update","description":"a message"},{"resource":"Reaction","operation":"Add","description":"a reaction to a message"},{"resource":"Reaction","operation":"Get","description":"a message's reactions"},{"resource":"Reaction","operation":"Remove","description":"a reaction from a message"},{"resource":"Star","operation":"Add","description":"a star to an item"},{"resource":"Star","operation":"Delete","description":"a star from an item"},{"resource":"Star","operation":"Get Many","description":"Get a list of an authenticated user's stars"},{"resource":"User","operation":"Get","description":"information about a user"},{"resource":"User","operation":"Get Many","description":"Get a list of users"},{"resource":"User","operation":"Get User's Profile","description":"Get User's Profile"},{"resource":"User","operation":"Get User's Status","description":"Get User's Status"},{"resource":"User","operation":"Update User's Profile","description":"Update User's Profile"},{"resource":"User Group","operation":"Create","description":"a user group"},{"resource":"User Group","operation":"Disable","description":"a user group"},{"resource":"User Group","operation":"Enable","description":"a user group"},{"resource":"User Group","operation":"Get Many","description":"Get a list of user groups"},{"resource":"User Group","operation":"Update","description":"a user group"}]

api_methods:
  [{"resource":"Channel","operation":"Archive","apiMethod":"conversations.archive","apiUrl":"https://api.slack.com/methods/conversations.archive"},{"resource":"Channel","operation":"Close","apiMethod":"conversations.close","apiUrl":"https://api.slack.com/methods/conversations.close"},{"resource":"Channel","operation":"Create","apiMethod":"conversations.create","apiUrl":"https://api.slack.com/methods/conversations.create"},{"resource":"Channel","operation":"Get","apiMethod":"conversations.info","apiUrl":"https://api.slack.com/methods/conversations.info"},{"resource":"Channel","operation":"Get Many","apiMethod":"conversations.list","apiUrl":"https://api.slack.com/methods/conversations.list"},{"resource":"Channel","operation":"History","apiMethod":"conversations.history","apiUrl":"https://api.slack.com/methods/conversations.history"},{"resource":"Channel","operation":"Invite","apiMethod":"conversations.invite","apiUrl":"https://api.slack.com/methods/conversations.invite"},{"resource":"Channel","operation":"Join","apiMethod":"conversations.join","apiUrl":"https://api.slack.com/methods/conversations.join"},{"resource":"Channel","operation":"Kick","apiMethod":"conversations.kick","apiUrl":"https://api.slack.com/methods/conversations.kick"},{"resource":"Channel","operation":"Leave","apiMethod":"conversations.leave","apiUrl":"https://api.slack.com/methods/conversations.leave"},{"resource":"Channel","operation":"Member","apiMethod":"conversations.members","apiUrl":"https://api.slack.com/methods/conversations.members"},{"resource":"Channel","operation":"Open","apiMethod":"conversations.open","apiUrl":"https://api.slack.com/methods/conversations.open"},{"resource":"Channel","operation":"Rename","apiMethod":"conversations.rename","apiUrl":"https://api.slack.com/methods/conversations.rename"},{"resource":"Channel","operation":"Replies","apiMethod":"conversations.replies","apiUrl":"https://api.slack.com/methods/conversations.replies"},{"resource":"Channel","operation":"Set Purpose","apiMethod":"conversations.setPurpose","apiUrl":"https://api.slack.com/methods/conversations.setPurpose"},{"resource":"Channel","operation":"Set Topic","apiMethod":"conversations.setTopic","apiUrl":"https://api.slack.com/methods/conversations.setTopic"},{"resource":"Channel","operation":"Unarchive","apiMethod":"conversations.unarchive","apiUrl":"https://api.slack.com/methods/conversations.unarchive"},{"resource":"File","operation":"Get","apiMethod":"files.info","apiUrl":"https://api.slack.com/methods/files.info"},{"resource":"File","operation":"Get Many","apiMethod":"files.list","apiUrl":"https://api.slack.com/methods/files.list"},{"resource":"File","operation":"Upload","apiMethod":"files.upload","apiUrl":"https://api.slack.com/methods/files.upload"},{"resource":"Message","operation":"Delete","apiMethod":"chat.delete","apiUrl":"https://api.slack.com/methods/chat.delete"},{"resource":"Message","operation":"Get Permalink","apiMethod":"chat.getPermalink","apiUrl":"https://api.slack.com/methods/chat.getPermalink"},{"resource":"Message","operation":"Search","apiMethod":"search.messages","apiUrl":"https://api.slack.com/methods/search.messages"},{"resource":"Message","operation":"Send","apiMethod":"chat.postMessage","apiUrl":"https://api.slack.com/methods/chat.postMessage"},{"resource":"Message","operation":"Send and Wait for Approval","apiMethod":"chat.postMessage","apiUrl":"https://api.slack.com/methods/chat.postMessage"},{"resource":"Message","operation":"Update","apiMethod":"chat.update","apiUrl":"https://api.slack.com/methods/chat.update"},{"resource":"Reaction","operation":"Add","apiMethod":"reactions.add","apiUrl":"https://api.slack.com/methods/reactions.add"},{"resource":"Reaction","operation":"Get","apiMethod":"reactions.get","apiUrl":"https://api.slack.com/methods/reactions.get"},{"resource":"Reaction","operation":"Remove","apiMethod":"reactions.remove","apiUrl":"https://api.slack.com/methods/reactions.remove"},{"resource":"Star","operation":"Add","apiMethod":"stars.add","apiUrl":"https://api.slack.com/methods/stars.add"},{"resource":"Star","operation":"Delete","apiMethod":"stars.remove","apiUrl":"https://api.slack.com/methods/stars.remove"},{"resource":"Star","operation":"Get Many","apiMethod":"stars.list","apiUrl":"https://api.slack.com/methods/stars.list"},{"resource":"User","operation":"Get","apiMethod":"users.info","apiUrl":"https://api.slack.com/methods/users.info"},{"resource":"User","operation":"Get Many","apiMethod":"users.list","apiUrl":"https://api.slack.com/methods/users.list"},{"resource":"User","operation":"Get User's Profile","apiMethod":"users.profile.get","apiUrl":"https://api.slack.com/methods/users.profile.get"},{"resource":"User","operation":"Get User's Status","apiMethod":"users.getPresence","apiUrl":"https://api.slack.com/methods/users.getPresence"},{"resource":"User","operation":"Update User's Profile","apiMethod":"users.profile.set","apiUrl":"https://api.slack.com/methods/users.profile.set"},{"resource":"User Group","operation":"Create","apiMethod":"usergroups.create","apiUrl":"https://api.slack.com/methods/usergroups.create"},{"resource":"User Group","operation":"Disable","apiMethod":"usergroups.disable","apiUrl":"https://api.slack.com/methods/usergroups.disable"},{"resource":"User Group","operation":"Enable","apiMethod":"usergroups.enable","apiUrl":"https://api.slack.com/methods/usergroups.enable"},{"resource":"User Group","operation":"Get Many","apiMethod":"usergroups.list","apiUrl":"https://api.slack.com/methods/usergroups.list"},{"resource":"User Group","operation":"Update","apiMethod":"usergroups.update","apiUrl":"https://api.slack.com/methods/usergroups.update"}]

workflow_examples:
  [{"name":"ask_a_human","workflow":{"name":"Ask a human","nodes":[{"parameters":{},"id":"a60c8572-56c1-4bf3-8352-a6419a475887","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","typeVersion":1.1,"position":[900,760]},{"parameters":{"name":"dont_know_tool","description":"Use this tool if you don't know the answer to the user's question, or if you're not very confident about your answer.","workflowId":"={{ $workflow.id}}","fields":{"values":[{"name":"chatInput","stringValue":"={{ $('Chat Trigger').item.json.chatInput }}"}]}},"id":"b4f2e26c-903b-46b8-bd8b-110fd64de9e4","name":"Not sure?","type":"@n8n/n8n-nodes-langchain.toolWorkflow","typeVersion":1,"position":[1120,760]},{"parameters":{},"id":"951cc691-b422-4ce6-901f-b7feb3afd1ad","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","typeVersion":1,"position":[540,1360]},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It checks if the user has supplied an email address. If they haven't it prompts them to provide one. If they have, it messages a customer support channel for help.","height":775.3931210698682,"width":1118.3459011229047,"color":7},"id":"194ba9c0-e256-449a-8da7-ac5339123a99","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[500,1020],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"38c6b363-45a7-4e72-9e40-8c0df3cc480f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[500,460],"typeVersion":1},{"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"id":"0389315b-e48d-4b00-b9a1-899302b1b094","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1060,700],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":213.44323866265472,"width":150,"color":2},"id":"fb11064a-4cf5-4110-9e39-af24a3225164","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[700,680]},{"parameters":{"content":"**Set your credentials and Slack details**","height":250.57252651663197,"width":178.0499248677781,"color":2},"id":"d689021d-0a46-4dff-a01a-0b01ecdd198b","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1020,1180]},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Hi! Please respond to this as if you don't know the answer to my query._","height":214.8397420554627,"width":185.9375,"color":4},"id":"0926cd61-c0b8-4bae-ae65-9afd130d17cd","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[340,520],"typeVersion":1},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"id":"cde69dfe-252e-4a05-8d56-fa79431df5d8","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1580,1600]},{"parameters":{},"id":"927b775a-47f6-4067-a1a5-5f13dea28e45","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1,"position":[600,520],"webhookId":"785e0c0c-12e5-4249-9abe-47bb131975cb"},{"parameters":{"jsCode":"response = {\"response\":\"I'm sorry I don't know the answer. Please repeat your question and include your email address so I can request help.\"};\nreturn response;"},"id":"971e7b90-c2d8-4292-9da8-732d7d399f04","name":"Prompt the user to provide an email","type":"n8n-nodes-base.code","typeVersion":2,"position":[1060,1520]},{"parameters":{"jsCode":"response = {\"response\": \"Thank you for getting in touch. I've messaged a human to help.\"}\nreturn response;"},"id":"6f5a21b3-c145-46c8-8e69-660100c4a6fc","name":"Confirm that we've messaged a human","type":"n8n-nodes-base.code","typeVersion":2,"position":[1300,1260]},{"parameters":{"options":{"systemMessage":"Try to answer the user's question. When you can't answer, or you're not confident of the answer, use the appropriate tool. When you use the dont_know_tool, respond with the message from the tool."}},"id":"8b17da5e-e392-4028-91b0-bc02d34e46ed","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","typeVersion":1.2,"position":[820,520]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"5e21e7c5-db60-4111-bb17-c289ae0fc159","leftValue":"={{ $('Execute Workflow Trigger').item.json.chatInput }}","rightValue":"/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/gi","operator":{"type":"string","operation":"regex"}}],"combinator":"and"},"options":{}},"id":"990ecd3b-6aa0-4b17-8d01-d606b9164fa8","name":"Check if user has provided email","type":"n8n-nodes-base.if","typeVersion":2,"position":[760,1360]},{"parameters":{"select":"channel","channelId":{"__rl":true,"value":"","mode":"name"},"text":"={{ \"A user had a question the bot couldn't answer. Here's their message: \" + $('Execute Workflow Trigger').item.json.chatInput }}","otherOptions":{}},"id":"d14da0ae-06ca-422b-b5b6-e7759e74c787","name":"Message Slack for help","type":"n8n-nodes-base.slack","typeVersion":2.1,"position":[1060,1260]},{"parameters":{"model":"gpt-4","options":{"temperature":0.2}},"id":"278391c7-6945-495e-a4f1-74fb8fcc3549","name":"GPT4","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[740,740]}],"pinData":{},"connections":{"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Not sure?":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Check if user has provided email","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Check if user has provided email":{"main":[[{"node":"Message Slack for help","type":"main","index":0}],[{"node":"Prompt the user to provide an email","type":"main","index":0}]]},"Message Slack for help":{"main":[[{"node":"Confirm that we've messaged a human","type":"main","index":0}]]},"GPT4":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.slack","version":2.1,"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":{}},"position":[1060,1260]}],"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"}]

node_connections:
  [{"fromNode":"Simple Memory","toNode":"AI Agent","connectionType":"ai_memory"},{"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"}]

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


node_type: n8n-nodes-base.Snowflake
name: Snowflake
display_name: Snowflake
description: Get, add and update data in Snowflake
category: input
icon: file:snowflake.svg
code_hash: 500143dab0de2d112b6848ed3cc32c7b191fca0b0aa4323cb3c8b7da66b93cc4
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Snowflake
documentation_title: Snowflake node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"snowflake","description":"Templates for snowflake"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:14
updated_at: 2025-06-12 08:59:14
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Snowflake = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const snowflake_sdk_1 = __importDefault(require("snowflake-sdk"));
  const utilities_1 = require("../../utils/utilities");
  class Snowflake {
      constructor() {
          this.description = {
              displayName: 'Snowflake',
              name: 'snowflake',
              icon: 'file:snowflake.svg',
              group: ['input'],
              version: 1,
              description: 'Get, add and update data in Snowflake',
              defaults: {
                  name: 'Snowflake',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'snowflake',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Execute Query',
                              value: 'executeQuery',
                              description: 'Execute an SQL query',
                              action: 'Execute a SQL query',
                          },
                          {
                              name: 'Insert',
                              value: 'insert',
                              description: 'Insert rows in database',
                              action: 'Insert rows in database',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update rows in database',
                              action: 'Update rows in database',
                          },
                      ],
                      default: 'insert',
                  },
                  {
                      displayName: 'Query',
                      name: 'query',
                      type: 'string',
                      noDataExpression: true,
                      typeOptions: {
                          editor: 'sqlEditor',
                          rows: 5,
                      },
                      displayOptions: {
                          show: {
                              operation: ['executeQuery'],
                          },
                      },
                      default: '',
                      placeholder: 'SELECT id, name FROM product WHERE id < 40',
                      required: true,
                      description: 'The SQL query to execute',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to insert data to',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['insert'],
                          },
                      },
                      default: '',
                      placeholder: 'id,name,description',
                      description: 'Comma-separated list of the properties which should used as columns for the new rows',
                  },
                  {
                      displayName: 'Table',
                      name: 'table',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      required: true,
                      description: 'Name of the table in which to update data in',
                  },
                  {
                      displayName: 'Update Key',
                      name: 'updateKey',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: 'id',
                      required: true,
                      description: 'Name of the property which decides which rows in the database should be updated. Normally that would be "id".',
                  },
                  {
                      displayName: 'Columns',
                      name: 'columns',
                      type: 'string',
                      displayOptions: {
                          show: {
                              operation: ['update'],
                          },
                      },
                      default: '',
                      placeholder: 'name,description',
                      description: 'Comma-separated list of the properties which should used as columns for rows to update',
                  },
              ],
          };
      }
      async execute() {
          const credentials = (await this.getCredentials('snowflake'));
          const returnData = [];
          let responseData;
          const connection = snowflake_sdk_1.default.createConnection(credentials);
          await (0, GenericFunctions_1.connect)(connection);
          const items = this.getInputData();
          const operation = this.getNodeParameter('operation', 0);
          if (operation === 'executeQuery') {
              for (let i = 0; i < items.length; i++) {
                  let query = this.getNodeParameter('query', i);
                  for (const resolvable of (0, utilities_1.getResolvables)(query)) {
                      query = query.replace(resolvable, this.evaluateExpression(resolvable, i));
                  }
                  responseData = await (0, GenericFunctions_1.execute)(connection, query, []);
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
          }
          if (operation === 'insert') {
              const table = this.getNodeParameter('table', 0);
              const columnString = this.getNodeParameter('columns', 0);
              const columns = columnString.split(',').map((column) => column.trim());
              const query = `INSERT INTO ${table}(${columns.join(',')}) VALUES (${columns
                  .map((_column) => '?')
                  .join(',')})`;
              const data = this.helpers.copyInputItems(items, columns);
              const binds = data.map((element) => Object.values(element));
              await (0, GenericFunctions_1.execute)(connection, query, binds);
              data.forEach((d, i) => {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(d), { itemData: { item: i } });
                  returnData.push(...executionData);
              });
          }
          if (operation === 'update') {
              const table = this.getNodeParameter('table', 0);
              const updateKey = this.getNodeParameter('updateKey', 0);
              const columnString = this.getNodeParameter('columns', 0);
              const columns = columnString.split(',').map((column) => column.trim());
              if (!columns.includes(updateKey)) {
                  columns.unshift(updateKey);
              }
              const query = `UPDATE ${table} SET ${columns
                  .map((column) => `${column} = ?`)
                  .join(',')} WHERE ${updateKey} = ?;`;
              const data = this.helpers.copyInputItems(items, columns);
              const binds = data.map((element) => Object.values(element).concat(element[updateKey]));
              for (let i = 0; i < binds.length; i++) {
                  await (0, GenericFunctions_1.execute)(connection, query, binds[i]);
              }
              data.forEach((d, i) => {
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(d), { itemData: { item: i } });
                  returnData.push(...executionData);
              });
          }
          await (0, GenericFunctions_1.destroy)(connection);
          return [returnData];
      }
  }
  exports.Snowflake = Snowflake;
  //# sourceMappingURL=Snowflake.node.js.map

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

  # Snowflake node

  Use the Snowflake node to automate work in Snowflake, and integrate Snowflake with other applications. n8n has built-in support for a wide range of Snowflake features, including executing SQL queries, and inserting rows in a database. 

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

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

  ## Operations

  * Execute an SQL query.
  * Insert rows in database.
  * Update rows in database.

  ## Templates and examples

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

example_workflow:
  {"name":"Snowflake Example Workflow","nodes":[{"parameters":{"operation":"executeQuery","query":"example-value","table":"example-value","columns":"example-value","updateKey":"id"},"id":"4hqhp52ro5a4kj05eem9pi","name":"Snowflake","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"operation":"executeQuery","query":"example-value","table":"example-value","columns":"example-value","updateKey":"id"}

properties_schema:
  [{"displayName":"Operation","name":"operation","type":"options","default":"insert","description":"Execute an SQL query","options":[{"name":"Execute Query","value":"executeQuery","description":"Execute an SQL query"},{"name":"Insert","value":"insert","description":"Insert rows in database"},{"name":"Update","value":"update","description":"Update rows in database"}]},{"displayName":"Query","name":"query","type":"string","default":"","required":true,"description":"The SQL query to execute","placeholder":"SELECT id, name FROM product WHERE id < 40"},{"displayName":"Table","name":"table","type":"string","default":"","required":true,"description":"Name of the table in which to insert data to"},{"displayName":"Columns","name":"columns","type":"string","default":"","description":"Comma-separated list of the properties which should used as columns for the new rows","placeholder":"id,name,description"},{"displayName":"Table","name":"table","type":"string","default":"","required":true,"description":"Name of the table in which to update data in"},{"displayName":"Update Key","name":"updateKey","type":"string","default":"id","required":true,"description":"Name of the property which decides which rows in the database should be updated. Normally that would be "},{"displayName":"Columns","name":"columns","type":"string","default":"","description":"Comma-separated list of the properties which should used as columns for rows to update","placeholder":"name,description"}]


node_type: n8n-nodes-base.Spontit
name: Spontit
display_name: Spontit
description: Consume Spontit API
category: output
icon: file:spontit.png
code_hash: 33769d94fd78408d188102c331b5795082646047dcc5544e182e4f3a11529f4d
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Spontit
documentation_title: Spontit node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"spontit","description":"Templates for spontit"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"push","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:14
updated_at: 2025-06-12 08:59:14
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Spontit = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const PushDescription_1 = require("./PushDescription");
  const moment_1 = __importDefault(require("moment"));
  class Spontit {
      constructor() {
          this.description = {
              displayName: 'Spontit',
              name: 'spontit',
              icon: 'file:spontit.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Spontit API',
              defaults: {
                  name: 'Spontit',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'spontitApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Push',
                              value: 'push',
                          },
                      ],
                      default: 'push',
                  },
                  ...PushDescription_1.pushOperations,
                  ...PushDescription_1.pushFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const timezone = this.getTimezone();
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'push') {
                      if (operation === 'create') {
                          const content = this.getNodeParameter('content', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              content,
                          };
                          Object.assign(body, additionalFields);
                          if (body.pushToFollowers) {
                              body.pushToFollowers = body.pushToFollowers.split(',');
                          }
                          if (body.pushToPhoneNumbers) {
                              body.pushToPhoneNumbers = body.pushToPhoneNumbers.split(',');
                          }
                          if (body.pushToEmails) {
                              body.pushToEmails = body.pushToEmails.split(',');
                          }
                          if (body.schedule) {
                              body.scheduled = moment_1.default.tz(body.schedule, timezone).unix();
                          }
                          if (body.expirationStamp) {
                              body.expirationStamp = moment_1.default.tz(body.expirationStamp, timezone).unix();
                          }
                          responseData = await GenericFunctions_1.spontitApiRequest.call(this, 'POST', '/push', body);
                          responseData = responseData.data;
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Spontit = Spontit;
  //# sourceMappingURL=Spontit.node.js.map

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

  // --- Next Credential File ---

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

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

  # Spontit node

  Use the Spontit node to automate work in Spontit, and integrate Spontit with other applications. n8n supports creating push notifications with Spontit. 

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

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

  ## Operations

  * Push
      * Create a push notification

  ## Templates and examples

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

example_workflow:
  {"name":"Spontit Example Workflow","nodes":[{"parameters":{"resource":"push","dynamic_property":null},"id":"g4npmis7xnw0hry1pp1u6xl","name":"Spontit","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":"push","options":[{"name":"Push","value":"push"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PushDescription_1.pushOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PushDescription_1.pushFields"}]


node_type: n8n-nodes-base.Splunk
name: Splunk
display_name: Splunk
description: Consume the Splunk Enterprise API
category: transform
icon: file:splunk.svg
code_hash: 8970779a0ac1a63e37de3d5c596afa6149c66570fc8fc6f0f3a952c70a600f74
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Splunk
documentation_title: Splunk node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"splunk","description":"Templates for splunk"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"firedAlert","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:14
updated_at: 2025-06-12 08:59:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Splunk = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class Splunk {
      constructor() {
          this.description = {
              displayName: 'Splunk',
              name: 'splunk',
              icon: 'file:splunk.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Splunk Enterprise API',
              defaults: {
                  name: 'Splunk',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'splunkApi',
                      required: true,
                      testedBy: 'splunkApiTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Fired Alert',
                              value: 'firedAlert',
                          },
                          {
                              name: 'Search Configuration',
                              value: 'searchConfiguration',
                          },
                          {
                              name: 'Search Job',
                              value: 'searchJob',
                          },
                          {
                              name: 'Search Result',
                              value: 'searchResult',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'searchJob',
                  },
                  ...descriptions_1.firedAlertOperations,
                  ...descriptions_1.searchConfigurationOperations,
                  ...descriptions_1.searchConfigurationFields,
                  ...descriptions_1.searchJobOperations,
                  ...descriptions_1.searchJobFields,
                  ...descriptions_1.searchResultOperations,
                  ...descriptions_1.searchResultFields,
                  ...descriptions_1.userOperations,
                  ...descriptions_1.userFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getRoles() {
                      const endpoint = '/services/authorization/roles';
                      const responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint));
                      const { entry: entries } = responseData.feed;
                      return Array.isArray(entries)
                          ? entries.map((entry) => ({ name: entry.title, value: entry.title }))
                          : [{ name: entries.title, value: entries.title }];
                  },
              },
              credentialTest: {
                  async splunkApiTest(credential) {
                      const { authToken, baseUrl, allowUnauthorizedCerts } = credential.data;
                      const endpoint = '/services/alerts/fired_alerts';
                      const options = {
                          headers: {
                              Authorization: `Bearer ${authToken}`,
                              'Content-Type': 'application/x-www-form-urlencoded',
                          },
                          method: 'GET',
                          form: {},
                          qs: {},
                          uri: `${baseUrl}${endpoint}`,
                          json: true,
                          rejectUnauthorized: !allowUnauthorizedCerts,
                      };
                      try {
                          await this.helpers.request(options);
                          return {
                              status: 'OK',
                              message: 'Authentication successful',
                          };
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                  },
              },
          };
      }
      async execute() {
          var _a;
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'firedAlert') {
                      if (operation === 'getReport') {
                          const endpoint = '/services/alerts/fired_alerts';
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                  }
                  else if (resource === 'searchConfiguration') {
                      if (operation === 'delete') {
                          const partialEndpoint = '/services/saved/searches/';
                          const searchConfigurationId = GenericFunctions_1.getId.call(this, i, 'searchConfigurationId', '/search/saved/searches/');
                          const endpoint = `${partialEndpoint}/${searchConfigurationId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/saved/searches/';
                          const searchConfigurationId = GenericFunctions_1.getId.call(this, i, 'searchConfigurationId', '/search/saved/searches/');
                          const endpoint = `${partialEndpoint}/${searchConfigurationId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const options = this.getNodeParameter('options', i);
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/saved/searches';
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatFeed);
                      }
                  }
                  else if (resource === 'searchJob') {
                      if (operation === 'create') {
                          const body = {
                              search: this.getNodeParameter('search', i),
                          };
                          const { earliest_time, latest_time, index_earliest, index_latest, ...rest } = this.getNodeParameter('additionalFields', i);
                          (0, GenericFunctions_1.populate)({
                              ...(earliest_time && { earliest_time: (0, GenericFunctions_1.toUnixEpoch)(earliest_time) }),
                              ...(latest_time && { latest_time: (0, GenericFunctions_1.toUnixEpoch)(latest_time) }),
                              ...(index_earliest && { index_earliest: (0, GenericFunctions_1.toUnixEpoch)(index_earliest) }),
                              ...(index_latest && { index_latest: (0, GenericFunctions_1.toUnixEpoch)(index_latest) }),
                              ...rest,
                          }, body);
                          const endpoint = '/services/search/jobs';
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'POST', endpoint, body);
                          const getEndpoint = `/services/search/jobs/${responseData.response.sid}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', getEndpoint).then(GenericFunctions_1.formatSearch);
                      }
                      else if (operation === 'delete') {
                          const partialEndpoint = '/services/search/jobs/';
                          const searchJobId = GenericFunctions_1.getId.call(this, i, 'searchJobId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${searchJobId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/search/jobs/';
                          const searchJobId = GenericFunctions_1.getId.call(this, i, 'searchJobId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${searchJobId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatSearch);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          const options = this.getNodeParameter('options', i);
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/search/jobs';
                          responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint, {}, qs));
                          responseData = (0, GenericFunctions_1.formatFeed)(responseData);
                      }
                  }
                  else if (resource === 'searchResult') {
                      if (operation === 'getAll') {
                          const searchJobId = this.getNodeParameter('searchJobId', i);
                          const qs = {};
                          const filters = this.getNodeParameter('filters', i);
                          const options = this.getNodeParameter('options', i);
                          const keyValuePair = (_a = filters === null || filters === void 0 ? void 0 : filters.keyValueMatch) === null || _a === void 0 ? void 0 : _a.keyValuePair;
                          if ((keyValuePair === null || keyValuePair === void 0 ? void 0 : keyValuePair.key) && (keyValuePair === null || keyValuePair === void 0 ? void 0 : keyValuePair.value)) {
                              qs.search = `search ${keyValuePair.key}=${keyValuePair.value}`;
                          }
                          (0, GenericFunctions_1.populate)(options, qs);
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = `/services/search/jobs/${searchJobId}/results`;
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatResults);
                      }
                  }
                  else if (resource === 'user') {
                      if (operation === 'create') {
                          const roles = this.getNodeParameter('roles', i);
                          const body = {
                              name: this.getNodeParameter('name', i),
                              roles,
                              password: this.getNodeParameter('password', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          (0, GenericFunctions_1.populate)(additionalFields, body);
                          const endpoint = '/services/authentication/users';
                          responseData = (await GenericFunctions_1.splunkApiRequest.call(this, 'POST', endpoint, body));
                          responseData = (0, GenericFunctions_1.formatFeed)(responseData);
                      }
                      else if (operation === 'delete') {
                          const partialEndpoint = '/services/authentication/users';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${userId}`;
                          await GenericFunctions_1.splunkApiRequest.call(this, 'DELETE', endpoint);
                          responseData = { success: true };
                      }
                      else if (operation === 'get') {
                          const partialEndpoint = '/services/authentication/users/';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', '/services/authentication/users/');
                          const endpoint = `${partialEndpoint}/${userId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest.call(this, 'GET', endpoint).then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'getAll') {
                          const qs = {};
                          GenericFunctions_1.setCount.call(this, qs);
                          const endpoint = '/services/authentication/users';
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'GET', endpoint, {}, qs)
                              .then(GenericFunctions_1.formatFeed);
                      }
                      else if (operation === 'update') {
                          const body = {};
                          const { roles, ...rest } = this.getNodeParameter('updateFields', i);
                          (0, GenericFunctions_1.populate)({
                              ...(roles && { roles }),
                              ...rest,
                          }, body);
                          const partialEndpoint = '/services/authentication/users/';
                          const userId = GenericFunctions_1.getId.call(this, i, 'userId', partialEndpoint);
                          const endpoint = `${partialEndpoint}/${userId}`;
                          responseData = await GenericFunctions_1.splunkApiRequest
                              .call(this, 'POST', endpoint, body)
                              .then(GenericFunctions_1.formatFeed);
                      }
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.cause.error });
                      continue;
                  }
                  throw error;
              }
              Array.isArray(responseData)
                  ? returnData.push(...responseData)
                  : returnData.push(responseData);
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Splunk = Splunk;
  //# sourceMappingURL=Splunk.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SplunkApi = void 0;
  class SplunkApi {
      constructor() {
          this.name = 'splunkApi';
          this.displayName = 'Splunk API';
          this.documentationUrl = 'splunk';
          this.properties = [
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  description: 'Protocol, domain and port',
                  placeholder: 'e.g. https://localhost:8089',
                  default: '',
              },
              {
                  displayName: 'Allow Self-Signed Certificates',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
      }
  }
  exports.SplunkApi = SplunkApi;
  //# sourceMappingURL=SplunkApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SplunkApi = void 0;
  class SplunkApi {
      constructor() {
          this.name = 'splunkApi';
          this.displayName = 'Splunk API';
          this.documentationUrl = 'splunk';
          this.properties = [
              {
                  displayName: 'Auth Token',
                  name: 'authToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Base URL',
                  name: 'baseUrl',
                  type: 'string',
                  description: 'Protocol, domain and port',
                  placeholder: 'e.g. https://localhost:8089',
                  default: '',
              },
              {
                  displayName: 'Allow Self-Signed Certificates',
                  name: 'allowUnauthorizedCerts',
                  type: 'boolean',
                  description: 'Whether to connect even if SSL certificate validation is not possible',
                  default: false,
              },
          ];
      }
  }
  exports.SplunkApi = SplunkApi;
  //# sourceMappingURL=SplunkApi.credentials.js.map

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

  # Splunk node

  Use the Splunk node to automate work in Splunk, and integrate Splunk with other applications. n8n has built-in support for a wide range of Splunk features, including getting fired alerts reports, as well as deleting and getting search configuration. 

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

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

  ## Operations

  * Fired Alert
      * Get a fired alerts report
  * Search Configuration
      * Delete a search configuration
      * Get a search configuration
      * Get many search configurations
  * Search Job
      * Create a search job
      * Delete a search job
      * Get a search job
      * Get many search jobs
  * Search Result
      * Get many search results
  * User
      * Create a user
      * Delete a user
      * Get a user
      * Get many users
      * Update a user

  ## Templates and examples

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

example_workflow:
  {"name":"Splunk Example Workflow","nodes":[{"parameters":{"resource":"firedAlert","dynamic_property":null},"id":"sexb6o2k1hpfjrky8jno","name":"Splunk","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":"searchJob","options":[{"name":"Fired Alert","value":"firedAlert"},{"name":"Search Configuration","value":"searchConfiguration"},{"name":"Search Job","value":"searchJob"},{"name":"Search Result","value":"searchResult"},{"name":"User","value":"user"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.firedAlertOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchConfigurationOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchConfigurationFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchJobOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchJobFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchResultOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.searchResultFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.userOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.userFields"}]


node_type: n8n-nodes-base.Sms77
name: Sms77
display_name: seven
description: Send SMS and make text-to-speech calls
category: transform
icon: file:seven.svg
code_hash: aa9de8dde48b46654d68fcb68dc969e66a6ebb93af370b08a8c8919f7d65d0fd
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Sms77
documentation_title: seven node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"sms77","description":"Templates for sms77"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:14
updated_at: 2025-06-12 08:59:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Sms77 = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  class Sms77 {
      constructor() {
          this.description = {
              displayName: 'seven',
              name: 'sms77',
              icon: 'file:seven.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Send SMS and make text-to-speech calls',
              defaults: {
                  name: 'seven',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'sms77Api',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'SMS',
                              value: 'sms',
                          },
                          {
                              name: 'Voice Call',
                              value: 'voice',
                          },
                      ],
                      default: 'sms',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Send SMS',
                              action: 'Send an SMS',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['voice'],
                          },
                      },
                      options: [
                          {
                              name: 'Send',
                              value: 'send',
                              description: 'Converts text to voice and calls a given number',
                              action: 'Convert text to voice',
                          },
                      ],
                      default: 'send',
                  },
                  {
                      displayName: 'From',
                      name: 'from',
                      type: 'string',
                      default: '',
                      placeholder: '+4901234567890',
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      description: 'The caller ID displayed in the receivers display. Max 16 numeric or 11 alphanumeric characters.',
                  },
                  {
                      displayName: 'To',
                      name: 'to',
                      type: 'string',
                      default: '',
                      placeholder: '+49876543210, MyGroup',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from seven.',
                  },
                  {
                      displayName: 'Message',
                      name: 'message',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms', 'voice'],
                          },
                      },
                      description: 'The message to send. Max. 1520 characters',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Opton',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['sms'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Debug',
                              name: 'debug',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the API returns fake responses like in a sandbox',
                          },
                          {
                              displayName: 'Delay',
                              name: 'delay',
                              type: 'dateTime',
                              default: '',
                              description: 'Pick a date for time delayed dispatch',
                          },
                          {
                              displayName: 'Foreign ID',
                              name: 'foreign_id',
                              type: 'string',
                              default: '',
                              placeholder: 'MyCustomForeignID',
                              description: 'Custom foreign ID returned in DLR callbacks',
                          },
                          {
                              displayName: 'Flash',
                              name: 'flash',
                              type: 'boolean',
                              default: false,
                              description: "Send as flash message being displayed directly the receiver's display",
                          },
                          {
                              displayName: 'Label',
                              name: 'label',
                              type: 'string',
                              default: '',
                              placeholder: 'MyCustomLabel',
                              description: 'Custom label used to group analytics',
                          },
                          {
                              displayName: 'No Reload',
                              name: 'no_reload',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to disable reload lock to allow sending duplicate messages',
                          },
                          {
                              displayName: 'Performance Tracking',
                              name: 'performance_tracking',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to enable performance tracking for URLs found in the message text',
                          },
                          {
                              displayName: 'TTL',
                              name: 'ttl',
                              type: 'number',
                              default: 2880,
                              typeOptions: {
                                  minValue: 1,
                              },
                              description: 'Custom time to live specifying the validity period of a message in minutes',
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Opton',
                      default: {},
                      displayOptions: {
                          show: {
                              operation: ['send'],
                              resource: ['voice'],
                          },
                      },
                      options: [
                          {
                              displayName: 'Debug',
                              name: 'debug',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the API returns fake responses like in a sandbox',
                          },
                          {
                              displayName: 'From',
                              name: 'from',
                              type: 'string',
                              default: '',
                              placeholder: '+4901234567890',
                              description: 'The caller ID. Please use only verified sender IDs, one of your virtual inbound numbers or one of our shared virtual numbers.',
                          },
                          {
                              displayName: 'XML',
                              name: 'xml',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the text is in XML format',
                          },
                      ],
                  },
              ],
          };
      }
      async execute() {
          const returnData = [];
          for (let i = 0; i < this.getInputData().length; i++) {
              const resource = this.getNodeParameter('resource', i);
              const operation = this.getNodeParameter('operation', i);
              let responseData;
              try {
                  if (resource === 'sms') {
                      if (operation === 'send') {
                          const from = this.getNodeParameter('from', i);
                          const to = this.getNodeParameter('to', i);
                          const text = this.getNodeParameter('message', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              from,
                              to,
                              text,
                              ...options,
                          };
                          responseData = await GenericFunctions_1.sms77ApiRequest.call(this, 'POST', '/sms', body);
                      }
                  }
                  if (resource === 'voice') {
                      if (operation === 'send') {
                          const to = this.getNodeParameter('to', i);
                          const text = this.getNodeParameter('message', i);
                          const options = this.getNodeParameter('options', i);
                          const body = {
                              to,
                              text,
                              ...options,
                          };
                          responseData = await GenericFunctions_1.sms77ApiRequest.call(this, 'POST', '/voice', body);
                      }
                  }
                  if (Array.isArray(responseData)) {
                      returnData.push.apply(returnData, responseData);
                  }
                  else if (responseData !== undefined) {
                      returnData.push(responseData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.Sms77 = Sms77;
  //# sourceMappingURL=Sms77.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Sms77Api = void 0;
  class Sms77Api {
      constructor() {
          this.name = 'sms77Api';
          this.displayName = 'seven API';
          this.documentationUrl = 'sms77';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Api-Key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://gateway.seven.io/api',
                  url: '/hooks',
                  qs: {
                      action: 'read',
                  },
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'success',
                          message: 'Invalid API Key',
                          value: undefined,
                      },
                  },
              ],
          };
      }
  }
  exports.Sms77Api = Sms77Api;
  //# sourceMappingURL=Sms77Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Sms77Api = void 0;
  class Sms77Api {
      constructor() {
          this.name = 'sms77Api';
          this.displayName = 'seven API';
          this.documentationUrl = 'sms77';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'X-Api-Key': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: 'https://gateway.seven.io/api',
                  url: '/hooks',
                  qs: {
                      action: 'read',
                  },
              },
              rules: [
                  {
                      type: 'responseSuccessBody',
                      properties: {
                          key: 'success',
                          message: 'Invalid API Key',
                          value: undefined,
                      },
                  },
              ],
          };
      }
  }
  exports.Sms77Api = Sms77Api;
  //# sourceMappingURL=Sms77Api.credentials.js.map

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

  # seven node

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

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

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

  ## Operations

  * SMS
      * Send SMS
  * Voice Call
      * Converts text to voice and calls a given number

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"sms","options":[{"name":"SMS","value":"sms"},{"name":"Voice Call","value":"voice"}]},{"displayName":"Operation","name":"operation","type":"options","default":"send","description":"Send SMS","options":[{"name":"Send","value":"send","description":"Send SMS"}]},{"displayName":"Operation","name":"operation","type":"options","default":"send","description":"Converts text to voice and calls a given number","options":[{"name":"Send","value":"send","description":"Converts text to voice and calls a given number"}]},{"displayName":"From","name":"from","type":"string","default":"","description":"The caller ID displayed in the receivers display. Max 16 numeric or 11 alphanumeric characters.","placeholder":"+4901234567890"},{"displayName":"To","name":"to","type":"string","default":"","required":true,"description":"The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from seven.","placeholder":"+49876543210, MyGroup"},{"displayName":"Message","name":"message","type":"string","default":"","required":true,"description":"The message to send. Max. 1520 characters"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Whether the API returns fake responses like in a sandbox","placeholder":"Add Opton"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Whether the API returns fake responses like in a sandbox","placeholder":"Add Opton"}]


node_type: n8n-nodes-base.SplitInBatches
name: SplitInBatches
display_name: Split In Batches
description: Split data into batches and iterate over each batch
category: organization
icon: fa:th-large
code_hash: c751422a11e30bf361a6c4803376289740a40434aeb77f90e18cd4dd7ba5c019
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.SplitInBatches
documentation_title: Loop Over Items (Split in Batches)
operations: []
api_methods: []
templates: [{"name":"split-in-batches","description":"Templates for split-in-batches"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-12 08:59:14
updated_at: 2025-06-12 08:59:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SplitInBatches = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const SplitInBatchesV1_node_1 = require("./v1/SplitInBatchesV1.node");
  const SplitInBatchesV2_node_1 = require("./v2/SplitInBatchesV2.node");
  const SplitInBatchesV3_node_1 = require("./v3/SplitInBatchesV3.node");
  class SplitInBatches extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Split In Batches',
              name: 'splitInBatches',
              icon: 'fa:th-large',
              group: ['organization'],
              description: 'Split data into batches and iterate over each batch',
              defaultVersion: 3,
          };
          const nodeVersions = {
              1: new SplitInBatchesV1_node_1.SplitInBatchesV1(),
              2: new SplitInBatchesV2_node_1.SplitInBatchesV2(),
              3: new SplitInBatchesV3_node_1.SplitInBatchesV3(),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.SplitInBatches = SplitInBatches;
  //# sourceMappingURL=SplitInBatches.node.js.map

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

  # Loop Over Items

  The Loop Over Items node helps you loop through data when needed.

  The node saves the original incoming data, and with each iteration, returns a predefined amount of data through the **loop** output.

  When the node execution completes, it combines all of the processed data and returns it through the **done** output.

  ## When to use the Loop Over Items node

  By default, n8n nodes are designed to process a list of input items (with some exceptions, detailed below). Depending on what you're trying to achieve, you often don't need the Loop Over Items node in your workflow. You can learn more about how n8n processes multiple items on the [looping in n8n](/flow-logic/looping.md) page.

  These links highlight some of the cases where the Loop Over Items node can be useful:

  * [Loop until all items are processed](/flow-logic/looping.md#loop-until-all-items-are-processed): describes how the Loop Over Items node differs from normal item processing and when you might want to incorporate this node.
  * [Node exceptions](/flow-logic/looping.md#node-exceptions): outlines specific cases and nodes where you may need to use the Loop Over Items node to manually build looping logic.
  * [Avoiding rate limiting](/integrations/builtin/rate-limits.md): demonstrates how to batch API requests to avoid rate limits from other services.

  ## Node parameters

  ### Batch Size

  Enter the number of items to return with each call.

  ## Node options

  ### Reset

  If turned on, the node will reset with the current input-data newly initialized with each loop. Use this when you want the Loop Over Items node to treat incoming data as a new set of data instead of a continuation of previous items.

  For example, you can use the Loop Over Items node with the reset option and an [If node](/integrations/builtin/core-nodes/n8n-nodes-base.if.md) to query a paginated service when you don't know how many pages you need in advance. The loop queries pages one at a time, performs any processing, and increments the page number. The loop reset ensures the loop recognizes each iteration as a new set of data. The If node evaluates an exit condition to decide whether to perform another iteration or not.

  /// warning | Include a valid termination condition
  For workflows like the example described above, it's critical to include a valid termination condition for the loop. If your termination condition never matches, your workflow execution will get stuck in an infinite loop.
  ///

  When enabled, you can adjust the reset conditions by switching the parameter representation from **Fixed** to **Expression**. The results of your expression evaluation determine when the node will reset item processing.

  ## Templates and examples

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

  ### Read RSS feed from two different sources

  This workflow allows you to read an RSS feed from two different sources using the Loop Over Items node. You need the Loop Over Items node in the workflow as the RSS Feed Read node only processes the first item it receives. You can also find the [workflow](https://n8n.io/workflows/687-read-rss-feed-from-two-different-sources/){:target=_blank .external-link} on n8n.io.

  The example walks through building the workflow, but assumes you are already familiar with n8n. To build your first workflow, including learning how to add nodes to a workflow, refer to [Try it out](/try-it-out/index.md).

  The final workflow looks like this:

  [[ workflowDemo("file:///integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/rss-feed-example.json") ]]

  Copy the workflow file above and paste into your instance, or manually build it by following these steps:

  1. Add the manual trigger.
  2. Add the Code node.
  3. Copy this code into the Code node:
  	```js
  	return [
  		{
  			json: {
  				url: 'https://medium.com/feed/n8n-io',
  			}
  		},
  		{
  			json: {
  				url: 'https://dev.to/feed/n8n',
  			}
  		}
  	];
  	```
  4. Add the Loop Over Items node.
  5. Configure Loop Over Items: set the batch size to `1` in the **Batch Size** field.
  6. Add the RSS Feed Read node.
  7. Select **Test Workflow**. This runs the workflow to load data into the RSS Feed Read node.
  8. Configure RSS Feed Read: map `url` from the input to the **URL** field. You can do this by dragging and dropping from the **INPUT** panel, or using this expression: `{{ $json.url }}`.
  9. Select **Test Workflow** to run the workflow and see the resulting data.

  ### Check that the node has processed all items

  To check if the node still has items to process, use the following expression: `{{$node["Loop Over Items"].context["noItemsLeft"]}}`. This expression returns a boolean value. If the node still has data to process, the expression returns `false`, otherwise it returns `true`.

  ### Get the current running index of the node

  To get the current running index of the node, use the following expression: `{{$node["Loop Over Items"].context["currentRunIndex"];}}`.

documentation_examples:
  [{"type":"javascript","language":"js","code":"return [\n\t\t{\n\t\t\tjson: {\n\t\t\t\turl: 'https://medium.com/feed/n8n-io',\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tjson: {\n\t\t\t\turl: 'https://dev.to/feed/n8n',\n\t\t\t}\n\t\t}\n\t];","title":"Copy the workflow file above and paste into your instance, or manually build it by following these steps","description":"3. Copy this code into the Code node:"}]

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

troubleshooting_info:
  [{"issue":"When to use the Loop Over Items node","solution":"By default, n8n nodes are designed to process a list of input items (with some exceptions, detailed below). Depending on what you're trying to achieve, you often don't need the Loop Over Items node in your workflow. You can learn more about how n8n processes multiple items on the [looping in n8n](/flow-logic/looping.md) page."},{"issue":"Batch Size","solution":"Enter the number of items to return with each call."},{"issue":"Reset","solution":"If turned on, the node will reset with the current input-data newly initialized with each loop. Use this when you want the Loop Over Items node to treat incoming data as a new set of data instead of a continuation of previous items."},{"issue":"Read RSS feed from two different sources","solution":"This workflow allows you to read an RSS feed from two different sources using the Loop Over Items node. You need the Loop Over Items node in the workflow as the RSS Feed Read node only processes the first item it receives. You can also find the [workflow](https://n8n.io/workflows/687-read-rss-feed-from-two-different-sources/){:target=_blank .external-link} on n8n.io."},{"issue":"Check that the node has processed all items","solution":"To check if the node still has items to process, use the following expression: `{{$node[\"Loop Over Items\"].context[\"noItemsLeft\"]}}`. This expression returns a boolean value. If the node still has data to process, the expression returns `false`, otherwise it returns `true`."},{"issue":"Get the current running index of the node","solution":"To get the current running index of the node, use the following expression: `{{$node[\"Loop Over Items\"].context[\"currentRunIndex\"];}}`."}]

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

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


node_type: n8n-nodes-base.StopAndError
name: StopAndError
display_name: Stop and Error
description: Throw an error in the workflow
category: input
icon: fa:exclamation-triangle
code_hash: 79f3b665f4ccdb01a1faacf08233e29fbd6878e69d5d611b5dd2bf0bf9b25308
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.StopAndError
documentation_title: Stop And Error
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"stop-and-error","description":"Templates for stop-and-error"}]
required_scopes: []
parameter_schemas: []
example_parameters: {"errorType":"errorMessage","errorMessage":"example-value","errorObject":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:16
updated_at: 2025-06-12 08:59:16
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.StopAndError = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const errorObjectPlaceholder = `{
  	"code": "404",
  	"description": "The resource could not be fetched"
  }`;
  class StopAndError {
      constructor() {
          this.description = {
              displayName: 'Stop and Error',
              name: 'stopAndError',
              icon: 'fa:exclamation-triangle',
              group: ['input'],
              version: 1,
              description: 'Throw an error in the workflow',
              defaults: {
                  name: 'Stop and Error',
                  color: '#ff0000',
              },
              inputs: ['main'],
              outputs: [],
              properties: [
                  {
                      displayName: 'Error Type',
                      name: 'errorType',
                      type: 'options',
                      options: [
                          {
                              name: 'Error Message',
                              value: 'errorMessage',
                          },
                          {
                              name: 'Error Object',
                              value: 'errorObject',
                          },
                      ],
                      default: 'errorMessage',
                      description: 'Type of error to throw',
                  },
                  {
                      displayName: 'Error Message',
                      name: 'errorMessage',
                      type: 'string',
                      placeholder: 'An error occurred!',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              errorType: ['errorMessage'],
                          },
                      },
                  },
                  {
                      displayName: 'Error Object',
                      name: 'errorObject',
                      type: 'json',
                      description: 'Object containing error properties',
                      default: '',
                      typeOptions: {
                          alwaysOpenEditWindow: true,
                      },
                      placeholder: errorObjectPlaceholder,
                      required: true,
                      displayOptions: {
                          show: {
                              errorType: ['errorObject'],
                          },
                      },
                  },
              ],
          };
      }
      async execute() {
          const errorType = this.getNodeParameter('errorType', 0);
          const { id: workflowId, name: workflowName } = this.getWorkflow();
          let toThrow;
          if (errorType === 'errorMessage') {
              toThrow = this.getNodeParameter('errorMessage', 0);
          }
          else {
              const json = this.getNodeParameter('errorObject', 0);
              const errorObject = (0, n8n_workflow_1.jsonParse)(json);
              toThrow = {
                  name: 'User-thrown error',
                  message: `Workflow ID ${workflowId} "${workflowName}" has failed`,
                  ...errorObject,
              };
          }
          throw new n8n_workflow_1.NodeOperationError(this.getNode(), toThrow);
      }
  }
  exports.StopAndError = StopAndError;
  //# sourceMappingURL=StopAndError.node.js.map

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

  # Stop And Error

  Use the Stop And Error node to display custom error messages, cause executions to fail under certain conditions, and send custom error information to error workflows.

  ## Operations

  * Error Message
  * Error Object

  ## Node parameters

  Both operations include one node parameter, the **Error Type**. Use this parameter to select the type of error to throw. Choose between the two operations: **Error Message** and **Error Object**.

  The other parameters depend on which operation you select.

  ### Error Message parameters

  The Error Message Error Type adds one parameter, the **Error Message** field. Enter the message you'd like to throw.

  ### Error Object parameters

  The Error Object Error Type adds one parameter, the **Error Object**. Enter a JSON object that contains the error properties you'd like to throw.

  ## Templates and examples

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

  ## Related resources

  You can use the Stop And Error node with the [Error trigger](/integrations/builtin/core-nodes/n8n-nodes-base.errortrigger.md) node.

  Read more about [Error workflows](/flow-logic/error-handling.md) in n8n workflows.

related_resources:
  [{"title":"Error trigger","url":"/integrations/builtin/core-nodes/n8n-nodes-base.errortrigger.md","type":"documentation"},{"title":"Error workflows","url":"/flow-logic/error-handling.md","type":"documentation"}]

troubleshooting_info:
  [{"issue":"Node parameters","solution":"Both operations include one node parameter, the **Error Type**. Use this parameter to select the type of error to throw. Choose between the two operations: **Error Message** and **Error Object**."},{"issue":"Error Message parameters","solution":"The Error Message Error Type adds one parameter, the **Error Message** field. Enter the message you'd like to throw."},{"issue":"Error Object parameters","solution":"The Error Object Error Type adds one parameter, the **Error Object**. Enter a JSON object that contains the error properties you'd like to throw."}]

example_workflow:
  {"name":"Stop and Error Example Workflow","nodes":[{"parameters":{"errorType":"errorMessage","errorMessage":"example-value","errorObject":null},"id":"hl3m03ur2ifc6wli16nglu","name":"Stop and Error","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Error Type","name":"errorType","type":"options","default":"errorMessage","description":"Type of error to throw","options":[{"name":"Error Message","value":"errorMessage"},{"name":"Error Object","value":"errorObject"}]},{"displayName":"Error Message","name":"errorMessage","type":"string","default":"","required":true,"placeholder":"An error occurred!"},{"displayName":"Error Object","name":"errorObject","type":"json","default":"","required":true,"description":"Object containing error properties"}]


node_type: n8n-nodes-base.SseTrigger
name: SseTrigger
display_name: SSE Trigger
description: Triggers the workflow when Server-Sent Events occur
category: trigger
icon: fa:cloud-download-alt
code_hash: 05f0871eb011af3c8b264d9249c442aca37fbbc12533aca5e843312cf67942fb
documentation_url: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.SseTrigger
documentation_title: SSE Trigger node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"sse-trigger","description":"Templates for sse-trigger"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"url":"https://example.com","pollTimes":{"item":[{"mode":"everyMinute"}]}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:16
updated_at: 2025-06-12 08:59:16
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.SseTrigger = void 0;
  const eventsource_1 = __importDefault(require("eventsource"));
  const n8n_workflow_1 = require("n8n-workflow");
  class SseTrigger {
      constructor() {
          this.description = {
              displayName: 'SSE Trigger',
              name: 'sseTrigger',
              icon: 'fa:cloud-download-alt',
              group: ['trigger'],
              version: 1,
              description: 'Triggers the workflow when Server-Sent Events occur',
              eventTriggerDescription: '',
              activationMessage: 'You can now make calls to your SSE URL to trigger executions.',
              defaults: {
                  name: 'SSE Trigger',
                  color: '#225577',
              },
              triggerPanel: {
                  header: '',
                  executionsHelp: {
                      inactive: "<b>While building your workflow</b>, click the 'listen' button, then trigger an SSE event. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a change is detected, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                      active: "<b>While building your workflow</b>, click the 'listen' button, then trigger an SSE event. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a change is detected, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.",
                  },
                  activationHint: "Once you’ve finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously (you just won’t see those executions here).",
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'URL',
                      name: 'url',
                      type: 'string',
                      default: '',
                      placeholder: 'http://example.com',
                      description: 'The URL to receive the SSE from',
                      required: true,
                  },
              ],
          };
      }
      async trigger() {
          const url = this.getNodeParameter('url');
          const eventSource = new eventsource_1.default(url);
          eventSource.onmessage = (event) => {
              const eventData = (0, n8n_workflow_1.jsonParse)(event.data, {
                  errorMessage: 'Invalid JSON for event data',
              });
              this.emit([this.helpers.returnJsonArray([eventData])]);
          };
          async function closeFunction() {
              eventSource.close();
          }
          return {
              closeFunction,
          };
      }
  }
  exports.SseTrigger = SseTrigger;
  //# sourceMappingURL=SseTrigger.node.js.map

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

  # SSE Trigger node

  Server-Sent Events (SSE) is a server push technology enabling a client to receive automatic updates from a server using HTTP connection. The SSE Trigger node is used to receive server-sent events.

  ## Node parameters

  The SSE Trigger node has one parameter, the **URL**. Enter the URL from which to receive the server-sent events (SSE).


  ## Templates and examples

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

troubleshooting_info:
  [{"issue":"Node parameters","solution":"The SSE Trigger node has one parameter, the **URL**. Enter the URL from which to receive the server-sent events (SSE)."}]

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

properties_schema:
  [{"displayName":"URL","name":"url","type":"string","default":"","required":true,"description":"The URL to receive the SSE from","placeholder":"http://example.com"}]


node_type: n8n-nodes-base.Storyblok
name: Storyblok
display_name: Storyblok
description: Consume Storyblok API
category: output
icon: file:storyblok.svg
code_hash: 883eea1ccd320f86c2501929a0fa7ef6e0721ae17abc05a8e5c65d7b16983f24
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Storyblok
documentation_title: Storyblok node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"storyblok","description":"Templates for storyblok"}]
related_resources: []
required_scopes: []
parameter_schemas: []
example_parameters: {"source":"contentApi","resource":"story","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:16
updated_at: 2025-06-12 08:59:16
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Storyblok = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const StoryContentDescription_1 = require("./StoryContentDescription");
  const StoryManagementDescription_1 = require("./StoryManagementDescription");
  class Storyblok {
      constructor() {
          this.description = {
              displayName: 'Storyblok',
              name: 'storyblok',
              icon: 'file:storyblok.svg',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Storyblok API',
              defaults: {
                  name: 'Storyblok',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'storyblokContentApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      name: 'storyblokManagementApi',
                      required: true,
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
              ],
              properties: [
                  {
                      displayName: 'Source',
                      name: 'source',
                      type: 'options',
                      default: 'contentApi',
                      description: 'Pick where your data comes from, Content or Management API',
                      options: [
                          {
                              name: 'Content API',
                              value: 'contentApi',
                          },
                          {
                              name: 'Management API',
                              value: 'managementApi',
                          },
                      ],
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['contentApi'],
                          },
                      },
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Story',
                              value: 'story',
                          },
                      ],
                      default: 'story',
                      displayOptions: {
                          show: {
                              source: ['managementApi'],
                          },
                      },
                  },
                  ...StoryContentDescription_1.storyContentOperations,
                  ...StoryContentDescription_1.storyContentFields,
                  ...StoryManagementDescription_1.storyManagementOperations,
                  ...StoryManagementDescription_1.storyManagementFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getSpaces() {
                      const returnData = [];
                      const { spaces } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/spaces');
                      for (const space of spaces) {
                          returnData.push({
                              name: space.name,
                              value: space.id,
                          });
                      }
                      return returnData;
                  },
                  async getComponents() {
                      const returnData = [];
                      const space = this.getCurrentNodeParameter('space');
                      const { components } = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/components`);
                      for (const component of components) {
                          returnData.push({
                              name: `${component.name} ${component.is_root ? '(root)' : ''}`,
                              value: component.name,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const source = this.getNodeParameter('source', 0);
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (source === 'contentApi') {
                      if (resource === 'story') {
                          if (operation === 'get') {
                              const identifier = this.getNodeParameter('identifier', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/cdn/stories/${identifier}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', '/v1/cdn/stories', {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', '/v1/cdn/stories', {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                      }
                  }
                  if (source === 'managementApi') {
                      if (resource === 'story') {
                          if (operation === 'delete') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'DELETE', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'get') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}`);
                              responseData = responseData.story;
                          }
                          if (operation === 'getAll') {
                              const space = this.getNodeParameter('space', i);
                              const filters = this.getNodeParameter('filters', i);
                              const returnAll = this.getNodeParameter('returnAll', i);
                              Object.assign(qs, filters);
                              if (returnAll) {
                                  responseData = await GenericFunctions_1.storyblokApiRequestAllItems.call(this, 'stories', 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                              }
                              else {
                                  const limit = this.getNodeParameter('limit', i);
                                  qs.per_page = limit;
                                  responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories`, {}, qs);
                                  responseData = responseData.stories;
                              }
                          }
                          if (operation === 'publish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              const options = this.getNodeParameter('options', i);
                              const query = {};
                              if (options.releaseId) {
                                  query.release_id = options.releaseId;
                              }
                              if (options.language) {
                                  query.lang = options.language;
                              }
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/publish`, {}, query);
                              responseData = responseData.story;
                          }
                          if (operation === 'unpublish') {
                              const space = this.getNodeParameter('space', i);
                              const storyId = this.getNodeParameter('storyId', i);
                              responseData = await GenericFunctions_1.storyblokApiRequest.call(this, 'GET', `/v1/spaces/${space}/stories/${storyId}/unpublish`);
                              responseData = responseData.story;
                          }
                      }
                  }
                  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.Storyblok = Storyblok;
  //# sourceMappingURL=Storyblok.node.js.map

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

  # Storyblok node

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

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

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

  ## Operations

  ### Content API

  - **Story**
      - Get a story
      - Get all stories


  ### Management API

  - **Story**
      - Delete a story
      - Get a story
      - Get all stories
      - Publish a story
      - Unpublish a story

  ## Templates and examples

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

troubleshooting_info:
  [{"issue":"Content API","solution":"- **Story**\n    - Get a story\n    - Get all stories"},{"issue":"Management API","solution":"- **Story**\n    - Delete a story\n    - Get a story\n    - Get all stories\n    - Publish a story\n    - Unpublish a story"}]

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

properties_schema:
  [{"displayName":"Source","name":"source","type":"options","default":"contentApi","description":"Pick where your data comes from, Content or Management API","options":[{"name":"Content API","value":"contentApi"},{"name":"Management API","value":"managementApi"}]},{"displayName":"Resource","name":"resource","type":"options","default":"story","options":[{"name":"Story","value":"story"}]},{"displayName":"Resource","name":"resource","type":"options","default":"story","options":[{"name":"Story","value":"story"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StoryContentDescription_1.storyContentOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StoryContentDescription_1.storyContentFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StoryManagementDescription_1.storyManagementOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...StoryManagementDescription_1.storyManagementFields"}]


node_type: n8n-nodes-base.Start
name: Start
display_name: Start
description: Starts the workflow execution from this node
category: input
icon: fa:play
code_hash: 327ac4d08639ec3324f54dd7f64f0b4df659eb5c371c63fa6ce8c346517717e8
example_parameters: {"notice":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:16
updated_at: 2025-06-12 08:59:16
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Start = void 0;
  class Start {
      constructor() {
          this.description = {
              displayName: 'Start',
              name: 'start',
              icon: 'fa:play',
              group: ['input'],
              version: 1,
              description: 'Starts the workflow execution from this node',
              maxNodes: 1,
              hidden: true,
              defaults: {
                  name: 'Start',
                  color: '#00e000',
              },
              inputs: [],
              outputs: ['main'],
              properties: [
                  {
                      displayName: 'This node is where a manual workflow execution starts. To make one, go back to the canvas and click ‘execute workflow’',
                      name: 'notice',
                      type: 'notice',
                      default: '',
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          return [items];
      }
  }
  exports.Start = Start;
  //# sourceMappingURL=Start.node.js.map

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

properties_schema:
  [{"displayName":"This node is where a manual workflow execution starts. To make one, go back to the canvas and click ‘execute workflow’","name":"notice","type":"notice","default":""}]


node_type: n8n-nodes-base.StickyNote
name: StickyNote
display_name: Sticky Note
description: Make your workflow easier to understand
category: input
icon: fa:sticky-note
code_hash: 71536993abcfd47e981e96d368c60bcc43b74fc57c1cb59cf8688071356f8bf0
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:59:16
updated_at: 2025-06-12 08:59:16
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.StickyNote = void 0;
  class StickyNote {
      constructor() {
          this.description = {
              displayName: 'Sticky Note',
              name: 'stickyNote',
              icon: 'fa:sticky-note',
              group: ['input'],
              version: 1,
              description: 'Make your workflow easier to understand',
              defaults: {
                  name: 'Sticky Note',
                  color: '#FFD233',
              },
              inputs: [],
              outputs: [],
              properties: [
                  {
                      displayName: 'Content',
                      name: 'content',
                      type: 'string',
                      required: true,
                      default: "## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
                  },
                  {
                      displayName: 'Height',
                      name: 'height',
                      type: 'number',
                      required: true,
                      default: 160,
                  },
                  {
                      displayName: 'Width',
                      name: 'width',
                      type: 'number',
                      required: true,
                      default: 240,
                  },
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          return [items];
      }
  }
  exports.StickyNote = StickyNote;
  //# sourceMappingURL=StickyNote.node.js.map

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-nodes-base.stickyNote","version":1,"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},"position":[240,420]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":193,"width":167,"color":2},"position":[980,360]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":193,"width":167,"color":2},"position":[940,820]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Memory allows the agent to access previous parts of the chat**\n","height":244,"color":5},"position":[1200,360]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**The agent can use the Wikipedia tool to access articles from Wikipedia**","height":238,"color":5},"position":[1460,240]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)"},"position":[1560,840]}],"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-nodes-base.stickyNote","version":1,"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},"position":[500,1020]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"position":[500,460]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"position":[1060,700]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":213.44323866265472,"width":150,"color":2},"position":[700,680]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials and Slack details**","height":250.57252651663197,"width":178.0499248677781,"color":2},"position":[1020,1180]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[340,520]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"position":[1580,1600]}],"connections":{"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Not sure?":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Check if user has provided email","type":"main","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Check if user has provided email":{"main":[[{"node":"Message Slack for help","type":"main","index":0}],[{"node":"Prompt the user to provide an email","type":"main","index":0}]]},"Message Slack for help":{"main":[[{"node":"Confirm that we've messaged a human","type":"main","index":0}]]},"GPT4":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/ask_a_human.json"},{"name":"chat_with_google_sheets_docs_version","workflow":{"name":"Chat with Google Sheets (docs version)","nodes":[{"parameters":{},"id":"e96a5e41-f0d6-49c1-977e-ff724a857212","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","position":[540,1240],"typeVersion":1},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It returns three different types of data from the Google Sheet, which can be used together for more complex queries without returning the whole sheet (which might be too big for GPT to handle).","height":612.0936015224503,"width":1449.2963504228514,"color":7},"id":"67facef0-e9c6-4280-8232-78f654b420d5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[461.9740563285368,970.616715060075],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"bc448102-954b-451e-9bf7-bcadbc53bdbc","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[460,460],"typeVersion":1},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Which is our biggest customer?_","height":183.85014518022527,"width":185.9375,"color":4},"id":"afb2da2f-8da2-4ee8-bff9-55a99eeecc5c","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[300,540],"typeVersion":1},{"parameters":{},"id":"5d56d128-9a83-45ee-a34c-bc1190d59322","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[600,560],"webhookId":"e3f23177-c7c1-417b-a513-1c1090dda0a2","typeVersion":1},{"parameters":{"authentication":"serviceAccount","documentId":{"__rl":true,"mode":"url","value":"={{ $json.sheetUrl }}"},"sheetName":{"__rl":true,"mode":"url","value":"={{ $json.sheetUrl }}"},"options":{}},"id":"3c0e4b48-a27b-472f-948e-9aa001c49149","name":"Get Google sheet contents","type":"n8n-nodes-base.googleSheets","position":[980,1240],"typeVersion":4.2},{"parameters":{"fields":{"values":[{"name":"sheetUrl"}]},"options":{}},"id":"67f9c172-e70f-4a0f-afd3-513cfeae09db","name":"Set Google Sheet URL","type":"n8n-nodes-base.set","position":[760,1240],"typeVersion":3.2},{"parameters":{"fields":{"values":[{"name":"response","stringValue":"={{ Object.keys($json) }}"}]},"include":"none","options":{}},"id":"d49223eb-2927-4ddd-bd2c-cd439f927341","name":"Get column names","type":"n8n-nodes-base.set","position":[1440,1060],"executeOnce":true,"typeVersion":3.2},{"parameters":{"jsCode":"return {\n  'response': JSON.stringify($input.all().map(x => x.json))\n}"},"id":"37ceba7a-1f0b-4de7-ae4a-d29a18dabaf6","name":"Prepare output","type":"n8n-nodes-base.code","position":[1720,1240],"typeVersion":2},{"parameters":{"name":"list_columns_tool","description":"=### List all column names in customer data\nThis is useful to find out what data is available for each customer. Returns a JSON array containing all the column names.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"column_names"}]}},"id":"94516eb1-89fc-4d3f-8000-d0fa43cd71cd","name":"List columns tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[940,780],"typeVersion":1},{"parameters":{"name":"get_customer_tool","description":"=### Get all columns for a given customer\nTo use this mode, pass the row number of the customer. Returns a JSON object with all the column names and their values.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"row"}]}},"id":"006745a1-3df7-4de9-9483-c6e133272c55","name":"Get customer tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1220,780],"typeVersion":1},{"parameters":{},"id":"c3d20569-1374-4f8d-8779-23b98952d124","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[800,780],"typeVersion":1.1},{"parameters":{"name":"column_values_tool","description":"=### Get the specified column value for all customers\nThis is useful if you want to find out which customers have a certain value for a given column. Returns an array of JSON objects, one per customer. Each JSON object includes the column being requested, plus the row_number column. (The row_number column can be used to request the full customer data in a second step.). To use this mode, pass the name of the column to fetch.\n\nYou may want to call the 'list columns' tool first to find out which columns you could be fetching.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"operation","stringValue":"column_values"}]}},"id":"3a370ae9-eaf8-4e84-948b-848c461ac9eb","name":"Get column values tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1080,780],"typeVersion":1},{"parameters":{"text":"={{ $json.chatInput }}","options":{"maxIterations":10}},"id":"8f2a4854-2177-4ac8-9501-fa36cf2a3d73","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[820,560],"typeVersion":1.1},{"parameters":{"content":"**These tools all call the sub-workflow below**","height":179.21380662202682,"width":432.3271051132649,"color":5},"id":"2576563b-a104-4d99-b3c8-b53bff4c740c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[900,740.8693557231958],"typeVersion":1},{"parameters":{"content":"**Change the URL of the Google Sheet**","height":226.64416053838073,"width":179.99762227826224,"color":2},"id":"5b623d9e-e188-403d-a702-9ece6172a487","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[723,1172],"typeVersion":1},{"parameters":{"model":"gpt-4","options":{"temperature":0}},"id":"2b8c8a67-a4df-4f5c-8c13-3cb2d25d2c5f","name":"GPT4 Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[660,780],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"id":"f39d0c9b-4055-4331-83c8-3dbffb43478e","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[620,720]},{"parameters":{"content":"**Set your credentials**","height":237,"width":176,"color":2},"id":"a8e09ef8-4dc6-4918-9194-047de402a8fa","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[940,1172]},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":126.0084096222716,"width":291.1204551358572},"id":"a391dfb1-f408-4498-99cd-d35a258d6c9a","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1740,1540]},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"column_names","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"col names"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"9fe58592-72e2-4379-9bdb-10da19c8218b","leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"column_values","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"col values"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"c1836f93-7874-43a4-98ff-cc487b276600","leftValue":"={{ $('Execute Workflow Trigger').item.json.operation }}","rightValue":"row","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"rows"}]},"options":{}},"id":"907deea9-26cc-427e-93fc-52ce6b67e5e1","name":"Check operations","type":"n8n-nodes-base.switch","typeVersion":3,"position":[1220,1240]},{"parameters":{"fields":{"values":[{"name":"={{ $('Execute Workflow Trigger').item.json.query }}","stringValue":"={{ $json[$('Execute Workflow Trigger').item.json.query] }}"},{"name":"row_number","stringValue":"={{ $json.row_number }}"}]},"include":"none","options":{}},"id":"f2ebcae6-3cfb-4862-a927-dc66bd24f197","name":"Prepare column data","type":"n8n-nodes-base.set","position":[1440,1240],"typeVersion":3.2},{"parameters":{"conditions":{"options":{"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"bf712098-97e4-42cb-8e08-2ee32d19d3e7","operator":{"type":"number","operation":"equals"},"leftValue":"={{ $json.row_number }}","rightValue":"={{ $('Execute Workflow Trigger').item.json.query }}"}]},"options":{"looseTypeValidation":true}},"id":"f40acb04-ef06-4670-b8b1-86b04f066af8","name":"Filter out other rows","type":"n8n-nodes-base.filter","position":[1440,1420],"typeVersion":2}],"pinData":{},"connections":{"GPT4 Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Get column names":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Get customer tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"List columns tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Set Google Sheet URL":{"main":[[{"node":"Get Google sheet contents","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Get column values tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Set Google Sheet URL","type":"main","index":0}]]},"Get Google sheet contents":{"main":[[{"node":"Check operations","type":"main","index":0}]]},"Check operations":{"main":[[{"node":"Get column names","type":"main","index":0}],[{"node":"Prepare column data","type":"main","index":0}],[{"node":"Filter out other rows","type":"main","index":0}]]},"Prepare column data":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Filter out other rows":{"main":[[{"node":"Prepare output","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.stickyNote","version":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},"position":[461.9740563285368,970.616715060075]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"position":[460,460]},{"nodeType":"n8n-nodes-base.stickyNote","version":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},"position":[300,540]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**These tools all call the sub-workflow below**","height":179.21380662202682,"width":432.3271051132649,"color":5},"position":[900,740.8693557231958]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Change the URL of the Google Sheet**","height":226.64416053838073,"width":179.99762227826224,"color":2},"position":[723,1172]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"position":[620,720]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":237,"width":176,"color":2},"position":[940,1172]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":126.0084096222716,"width":291.1204551358572},"position":[1740,1540]}],"connections":{"GPT4 Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Get column names":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Get customer tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"List columns tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Set Google Sheet URL":{"main":[[{"node":"Get Google sheet contents","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Get column values tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Set Google Sheet URL","type":"main","index":0}]]},"Get Google sheet contents":{"main":[[{"node":"Check operations","type":"main","index":0}]]},"Check operations":{"main":[[{"node":"Get column names","type":"main","index":0}],[{"node":"Prepare column data","type":"main","index":0}],[{"node":"Filter out other rows","type":"main","index":0}]]},"Prepare column data":{"main":[[{"node":"Prepare output","type":"main","index":0}]]},"Filter out other rows":{"main":[[{"node":"Prepare output","type":"main","index":0}]]}},"source":"docs/_workflows/advanced-ai/examples/chat_with_google_sheets_docs_version.json"},{"name":"let_your_ai_call_an_api","workflow":{"name":"Let your AI call an API","nodes":[{"parameters":{},"id":"35ce49a9-eda1-4da5-a6cb-39a39680111b","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","position":[520,1140],"typeVersion":1},{"parameters":{"content":"### Sub-workflow: Custom tool\nThe agent above can call this workflow. It calls an example API called \"Bored API\" and returns a string with an activity idea.","height":775.3931210698682,"width":1180.0825159534493,"color":7},"id":"ec6e261b-922f-401c-9392-12ff73488a5f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[460,960],"typeVersion":1},{"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"id":"25780e87-0ae0-4bee-9582-75f98bf66635","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[460,460],"typeVersion":1},{"parameters":{},"id":"f262f04b-964c-47c0-b7dc-a86b82b0184b","name":"Chat Trigger","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[600,560],"webhookId":"e3f23177-c7c1-417b-a513-1c1090dda0a2","typeVersion":1},{"parameters":{},"id":"29678c05-9a48-41ec-9c5c-af36ee0d7fc6","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[860,780],"typeVersion":1.1},{"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"id":"e078f88b-489c-42ea-9544-6bdaeae213a0","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1020,720],"typeVersion":1},{"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"id":"1d1d1a4e-0d1d-4094-81c7-e01f2674df0d","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[620,720]},{"parameters":{"content":"**Set your credentials**","height":170.10898979087855,"width":152.85917676941358,"color":2},"id":"8c83d554-bf1f-4b3c-abb9-a6bb76846698","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[880,1540.2624287261167]},{"parameters":{"name":"activity_tool","description":"=Suggest an activity for a person to do. Use this tool if someone is bored, or asking for ideas of things to do.","workflowId":"={{ $workflow.id }}","fields":{"values":[{"name":"chatInput","stringValue":"={{ $('Chat Trigger').item.json.chatInput }}"}]}},"id":"82a3c606-0d7a-4b45-aae7-df35525615f7","name":"Activity tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1080,780],"typeVersion":1},{"parameters":{"text":"={{ $json.chatInput }}","options":{"maxIterations":10}},"id":"716dea0d-a987-4cf7-ae4a-bf0f7c7d7da9","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[820,560],"typeVersion":1.1},{"parameters":{},"id":"f469fba8-07ae-4c79-a79c-2c49946d94e2","name":"Auto-fixing Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserAutofixing","typeVersion":1,"position":[920,1380]},{"parameters":{"content":"**Set your credentials**","height":189.79768930311286,"width":150,"color":2},"id":"e6d252d3-d78e-4827-b911-0528c3b80794","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[648.9502850955331,1340]},{"parameters":{"model":"gpt-4","options":{}},"id":"f65054a9-771c-47f8-94cc-4ed766f89d19","name":"GPT4 Model 1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[660,780],"typeVersion":1},{"parameters":{"model":"gpt-4","options":{}},"id":"94c2a6d8-cab9-48c2-8801-4306f0957f50","name":"GPT4 Model 2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[700,1420]},{"parameters":{"model":"gpt-4","options":{}},"id":"5f423800-2eaf-43f5-bd59-dc1212cb55ad","name":"GPT4 Model 3","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","typeVersion":1,"position":[920,1600]},{"parameters":{"content":"## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Hi! Please suggest something to do. I feel like learning something new._","height":214.8397420554627,"width":185.9375,"color":4},"id":"8ba60ef6-c375-41d9-bf79-1f19f1495adb","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[300,540],"typeVersion":1},{"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"id":"4bbd5942-4f2a-4a9a-a26c-61f95ad57549","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[1500,1540]},{"parameters":{"jsonSchema":"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"type\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"data\": {\n          \"enum\": [\"education\", \"recreational\",\"social\",\"diy\",\"charity\",\"cooking\",\"relaxation\",\"music\",\"busywork\"]\n        }\n      }\n    },\n    \"participants\": {\n      \"type\": \"number\"\n    }\n  }\n}"},"id":"a50c7858-b0fd-44d6-898d-452ffc5cbd72","name":"Structure as JSON","type":"@n8n/n8n-nodes-langchain.outputParserStructured","typeVersion":1,"position":[1120,1520]},{"parameters":{"url":"http://www.boredapi.com/api/activity/","sendQuery":true,"queryParameters":{"parameters":[{"name":"type","value":"={{ $json.output.type.data }}"},{"name":"participants","value":"={{ $json.output.participants }}"}]},"options":{}},"id":"340c2536-6e79-4af6-9cd0-5cbf6eae1983","name":"Call the API","type":"n8n-nodes-base.httpRequest","typeVersion":4.1,"position":[1120,1140]},{"parameters":{"prompt":"={{ $('Execute Workflow Trigger').item.json.chatInput }}"},"id":"d7d5455c-2e46-4896-853c-6b527e9403e4","name":"Work out activity type and number of people","type":"@n8n/n8n-nodes-langchain.chainLlm","typeVersion":1.3,"position":[740,1140]},{"parameters":{"assignments":{"assignments":[{"id":"e37e64f6-64e7-4fbd-9ea1-e9d3ef99b39c","name":"response","value":"={{ $json.activity }}","type":"string"}]},"options":{}},"id":"83f9ac05-4583-4cc4-bcc8-29ae450c95cb","name":"Set 'response' value","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[1340,1140]}],"pinData":{},"connections":{"Chat Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Work out activity type and number of people","type":"main","index":0}]]},"Activity tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Auto-fixing Output Parser":{"ai_outputParser":[[{"node":"Work out activity type and number of people","type":"ai_outputParser","index":0}]]},"GPT4 Model 1":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"GPT4 Model 2":{"ai_languageModel":[[{"node":"Work out activity type and number of people","type":"ai_languageModel","index":0}]]},"GPT4 Model 3":{"ai_languageModel":[[{"node":"Auto-fixing Output Parser","type":"ai_languageModel","index":0}]]},"Structure as JSON":{"ai_outputParser":[[{"node":"Auto-fixing Output Parser","type":"ai_outputParser","index":0}]]},"Call the API":{"main":[[{"node":"Set 'response' value","type":"main","index":0}]]},"Work out activity type and number of people":{"main":[[{"node":"Call the API","type":"main","index":0}]]}}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.stickyNote","version":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},"position":[460,960]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"### Main workflow: AI agent using custom tool","height":486.5625,"width":927.5,"color":7},"position":[460,460]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**This tool calls the sub-workflow below**","height":179.21380662202682,"width":197.45572294791873,"color":5},"position":[1020,720]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":171,"width":150,"color":2},"position":[620,720]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":170.10898979087855,"width":152.85917676941358,"color":2},"position":[880,1540.2624287261167]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":189.79768930311286,"width":150,"color":2},"position":[648.9502850955331,1340]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[300,540]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","height":144.50520156238127},"position":[1500,1540]}],"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-nodes-base.stickyNote","version":1,"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},"position":[-160,520]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"### Workflow to scrape data and send it to Pinecone","height":878.8927796727229,"width":2382.6739342193496,"color":7},"position":[-1856.703373323493,480]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"### Workflow to chat and get answers from the Pinecone vector database","height":825.9872504327399,"width":1181.407211476183,"color":7},"position":[-1680,1380]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[-2040,560]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[140,520]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)","width":331.8066536811489},"position":[460,1280]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":206.68134932939768,"width":182.42633582707612,"color":2},"position":[20,1000]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":184.89671964234537,"width":173.09006596119673,"color":2},"position":[-1369.107685156473,1620.2285847094058]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**","height":192.67694453057842,"width":221.3274602682409,"color":2},"position":[-860,1980]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Set your credentials**\n\n**Select your Pinecone index***","width":367.59568816702017,"color":2},"position":[-1080,1760]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[-1220,1020]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[-2040,960]}],"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":"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.stickyNote","version":1,"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},"position":[120,140]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"User submits an API key using the form","height":319},"position":[500,380]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"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},"position":[820,380]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"The Respond to Webhook node controls the form response (in this example, redirecting the user to an image)","height":319},"position":[1140,380]}],"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":"multiple-branch-execution","workflow":{"name":"Form that can execute multiple branches","nodes":[{"parameters":{"formTitle":"Form that may execute multiple branches","formDescription":"This form contains multiple branches. Depending on the user's responses, more than one branch may execute sequentially.","formFields":{"values":[{"fieldLabel":"What are your favorite film genres","fieldType":"dropdown","fieldOptions":{"values":[{"option":"Documentary"},{"option":"Action"},{"option":"Romance"},{"option":"Comedy"},{"option":"Drama"}]},"multiselect":true,"requiredField":true}]},"options":{}},"type":"n8n-nodes-base.formTrigger","typeVersion":2.2,"position":[-300,60],"id":"ad3f0e0a-a1e9-4504-8711-508bd29bd745","name":"On form submission","webhookId":"b3e1c86f-ae45-421e-9045-f19873b7a73e"},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"e3d995dd-d555-4e7a-b744-a3434ed602ad","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":"Documentary","operator":{"type":"array","operation":"contains","rightType":"any"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Documentary"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"ae94981b-1273-4830-ac2a-991bb25f41d8","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":"Action","operator":{"type":"array","operation":"contains","rightType":"any"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Action"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"b9545089-4054-484d-9e6c-98f4872e7e9e","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":"Romance","operator":{"type":"array","operation":"contains","rightType":"any"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Romance"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"71ae5a41-0927-40e3-a583-e569bcebfd1f","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":"Comedy","operator":{"type":"array","operation":"contains","rightType":"any"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Comedy"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"5bfe5981-203a-457a-bfaa-36846d7b79a8","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":"Drama","operator":{"type":"array","operation":"contains","rightType":"any"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Drama"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"adb1bfc5-08fd-4653-abe0-6f12aedda16a","leftValue":"={{ $json['What are your favorite film genres'] }}","rightValue":1,"operator":{"type":"array","operation":"lengthGt","rightType":"number"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Final page"}]},"options":{"allMatchingOutputs":true}},"type":"n8n-nodes-base.switch","typeVersion":3.2,"position":[100,0],"id":"df96da7b-c7dc-43c6-8941-973842603e0c","name":"Switch"},{"parameters":{"content":"## Form that may execute multiple branches\nThis form contains branching where more than one path may execute, depending on the user's selections.","width":380},"type":"n8n-nodes-base.stickyNote","position":[-160,-260],"typeVersion":1,"id":"c51af5ad-8f6c-4f2a-8974-65c4abc4fcbf","name":"Sticky Note"},{"parameters":{"content":"This Switch node determines which branches will execute.\n\nMultiple conditions may be true, resulting in more than one branch being executed. When this happens, n8n executes the first branch completely before returning to execute the next branch.","height":220,"width":260,"color":5},"type":"n8n-nodes-base.stickyNote","position":[20,320],"typeVersion":1,"id":"eab3ff17-5030-4556-a0c7-2571345e8cdf","name":"Sticky Note1"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What is your favorite documentary?"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,-500],"id":"dc55c82f-7d4f-4368-8ab5-69a673e92027","name":"Documentary questions","webhookId":"0c72f06e-4cc0-41eb-931c-7bf82bb1927e"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What is your favorite action film?"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,-280],"id":"3f76b5df-561b-4159-9e14-33a43d8c45a8","name":"Action questions","webhookId":"bea04786-25cc-477e-aaf1-ab68159cbe28"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our documentary questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[920,-500],"id":"16660e2e-a047-45d2-ba54-12d573633ece","name":"Documentary thanks","webhookId":"0238f2c2-8984-4adc-aade-308bb458c16e"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our action film questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[920,-280],"id":"1853276a-3ba6-4315-b772-fbeb0c68a477","name":"Action thanks","webhookId":"2e47b563-bd17-466c-86b7-9237be55d226"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What is your favorite romance film?"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,-20],"id":"cd7bc8d0-a143-4733-be84-320c88ef241b","name":"Romance questions","webhookId":"3f77a665-fc03-46ba-a58f-6d9bd7099028"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our romance film questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[920,-20],"id":"42d7c8b5-f66f-4b34-821c-0df91bbaa9ea","name":"Romance thanks","webhookId":"eee896c5-d116-4586-972d-3fe02073ed11"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What is your favorite comedy film?"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,220],"id":"b9422abf-1ad5-44e4-941d-692f72bc2fef","name":"Comedy questions","webhookId":"97b56894-28fb-47d1-b729-754e43f1ac09"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our comedy film questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[920,220],"id":"1db70bda-0752-41b7-a930-b90f6e64b3e7","name":"Comedy thanks","webhookId":"b021494a-5a35-4ade-b7c0-ca43a309268d"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What is your favorite drama film?"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,480],"id":"2bef931a-12d2-4873-ad19-9bdb0b5fe78f","name":"Drama questions","webhookId":"8d801d97-1103-42ee-a0c1-c1f1153727d9"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our drama film questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[920,480],"id":"1fd7fa2f-d1be-430a-bb98-ded89ad8fca0","name":"Drama thanks","webhookId":"46a782bc-21b2-4fcd-9c52-82a7bb20ec2c"},{"parameters":{"operation":"completion","completionTitle":"Thank you for answering our film questions!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[700,720],"id":"7b0aeed0-0e13-4fcb-a3e9-c5ff4d6a77ca","name":"Multi-selection thank you","webhookId":"67fcd1f3-e5a6-4bf6-b17e-37b2a87f4c3d"},{"parameters":{"content":"n8n Form nodes using the **Form Ending** page type are only executed if they are the last node in the execution path.\n\nThese endings specific to a genre are only executed if this is the only valid branch.","height":1400,"width":280,"color":5},"type":"n8n-nodes-base.stickyNote","position":[840,-740],"typeVersion":1,"id":"7bda913a-d75c-4b20-8be6-a767c008a8f6","name":"Sticky Note2"},{"parameters":{"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe switch includes this **Form Ending** node whenever more than one branch is executed.\n\nBecause this is the [final branch](https://docs.n8n.io/flow-logic/execution-order/) that will be executed, this is the final display whenever multiple branches are executed.","height":400,"width":300,"color":5},"type":"n8n-nodes-base.stickyNote","position":[740,800],"typeVersion":1,"id":"9c3f93a5-5248-4ba1-99b5-9df6d21416c2","name":"Sticky Note3"}],"pinData":{},"connections":{"On form submission":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Documentary questions","type":"main","index":0}],[{"node":"Action questions","type":"main","index":0}],[{"node":"Romance questions","type":"main","index":0}],[{"node":"Comedy questions","type":"main","index":0}],[{"node":"Drama questions","type":"main","index":0}],[{"node":"Multi-selection thank you","type":"main","index":0}]]},"Documentary questions":{"main":[[{"node":"Documentary thanks","type":"main","index":0}]]},"Action questions":{"main":[[{"node":"Action thanks","type":"main","index":0}]]},"Romance questions":{"main":[[{"node":"Romance thanks","type":"main","index":0}]]},"Comedy questions":{"main":[[{"node":"Comedy thanks","type":"main","index":0}]]},"Drama questions":{"main":[[{"node":"Drama thanks","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"versionId":"b1d38757-38ea-4ee8-a352-990185b17e31","meta":{"instanceId":"1f94e052868811125a74dc63385a38f60e7a14ab6e00497af83e8b68412ec251"},"id":"kl3goXzWrfrWHpYv","tags":[]},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Form that may execute multiple branches\nThis form contains branching where more than one path may execute, depending on the user's selections.","width":380},"position":[-160,-260]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"This Switch node determines which branches will execute.\n\nMultiple conditions may be true, resulting in more than one branch being executed. When this happens, n8n executes the first branch completely before returning to execute the next branch.","height":220,"width":260,"color":5},"position":[20,320]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"n8n Form nodes using the **Form Ending** page type are only executed if they are the last node in the execution path.\n\nThese endings specific to a genre are only executed if this is the only valid branch.","height":1400,"width":280,"color":5},"position":[840,-740]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe switch includes this **Form Ending** node whenever more than one branch is executed.\n\nBecause this is the [final branch](https://docs.n8n.io/flow-logic/execution-order/) that will be executed, this is the final display whenever multiple branches are executed.","height":400,"width":300,"color":5},"position":[740,800]}],"connections":{"On form submission":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Documentary questions","type":"main","index":0}],[{"node":"Action questions","type":"main","index":0}],[{"node":"Romance questions","type":"main","index":0}],[{"node":"Comedy questions","type":"main","index":0}],[{"node":"Drama questions","type":"main","index":0}],[{"node":"Multi-selection thank you","type":"main","index":0}]]},"Documentary questions":{"main":[[{"node":"Documentary thanks","type":"main","index":0}]]},"Action questions":{"main":[[{"node":"Action thanks","type":"main","index":0}]]},"Romance questions":{"main":[[{"node":"Romance thanks","type":"main","index":0}]]},"Comedy questions":{"main":[[{"node":"Comedy thanks","type":"main","index":0}]]},"Drama questions":{"main":[[{"node":"Drama thanks","type":"main","index":0}]]}},"source":"docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.form/multiple-branch-execution.json","description":"Workflow example from docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.form/multiple-branch-execution.json"},{"name":"mutually-exclusive-branching","workflow":{"name":"Form with mutually exclusive branching","nodes":[{"parameters":{"formTitle":"Form with mutually exclusive branching","formDescription":"This form contains branches, but only one branch will ever be executed.","formFields":{"values":[{"fieldLabel":"Would you recommend this site?","fieldType":"dropdown","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true}]},"options":{}},"type":"n8n-nodes-base.formTrigger","typeVersion":2.2,"position":[0,0],"id":"1adce353-28c9-48b8-8326-c1f41d9311fd","name":"On form submission","webhookId":"d869b846-111d-4f53-96e4-2c4a533d9ed6"},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"leftValue":"={{ $json['Would you recommend this site?'] }}","rightValue":"Yes","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"Yes"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"1dd9b1f5-6f48-4182-ae04-f47c37e3fa98","leftValue":"={{ $json['Would you recommend this site?'] }}","rightValue":"No","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"renameOutput":true,"outputKey":"No"}]},"options":{}},"type":"n8n-nodes-base.switch","typeVersion":3.2,"position":[220,0],"id":"c0d3e3f1-76c5-4bac-8382-c3d70a57ee8a","name":"Switch"},{"parameters":{"formFields":{"values":[{"fieldLabel":"What can we do to improve?","fieldType":"textarea"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[440,200],"id":"615cf27a-658c-43be-aff9-c5fda8a04c51","name":"If not recommended","webhookId":"3579ba77-7ba2-4a97-8a29-a228aac297d5"},{"parameters":{"operation":"completion","completionTitle":"Thank you for your review!","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[660,-200],"id":"13423b3f-0380-429d-92bf-460cc8b409a3","name":"Thanks for the review","webhookId":"bce3f77b-3005-4989-bd61-b9c5ff19e59e"},{"parameters":{"operation":"completion","completionTitle":"Thank you for your feedback","options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[660,200],"id":"0848a392-41f2-47e8-be17-124fef3d9a63","name":"Thanks for the feedback","webhookId":"8b1a34e2-aa24-4c12-841c-79f6491cb779"},{"parameters":{"content":"## Form with mutually exclusive branching\nThis form contains a branch where only one of the two paths will execute, depending on your selections.","width":380},"type":"n8n-nodes-base.stickyNote","position":[-160,-260],"typeVersion":1,"id":"57c5e1cd-7dda-4bfb-8bfa-8c9f91110249","name":"Sticky Note"},{"parameters":{"content":"This Switch node determines which branch will execute.\n\nThe switch uses data from a dropdown field with single selection enforced, so only one path will execute.","color":5},"type":"n8n-nodes-base.stickyNote","position":[440,0],"typeVersion":1,"id":"9bde0398-7021-4ec6-b950-d836979c973b","name":"Sticky Note1"},{"parameters":{"formFields":{"values":[{"fieldLabel":"Leave your review below","fieldType":"textarea"}]},"options":{}},"type":"n8n-nodes-base.form","typeVersion":1,"position":[440,-200],"id":"9956a49e-964d-4269-910f-28ad8393548e","name":"If recommended","webhookId":"f8298b40-1f61-465b-b228-30a659075f30"}],"pinData":{},"connections":{"On form submission":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Switch":{"main":[[{"node":"If recommended","type":"main","index":0}],[{"node":"If not recommended","type":"main","index":0}]]},"If not recommended":{"main":[[{"node":"Thanks for the feedback","type":"main","index":0}]]},"If recommended":{"main":[[{"node":"Thanks for the review","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"versionId":"6797e22c-1b2b-421a-b16d-869f636d0790","meta":{"instanceId":"1f94e052868811125a74dc63385a38f60e7a14ab6e00497af83e8b68412ec251"},"id":"DCotkGqkv0VfT6QT","tags":[]},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"## Form with mutually exclusive branching\nThis form contains a branch where only one of the two paths will execute, depending on your selections.","width":380},"position":[-160,-260]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"This Switch node determines which branch will execute.\n\nThe switch uses data from a dropdown field with single selection enforced, so only one path will execute.","color":5},"position":[440,0]}],"connections":{"On form submission":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Switch":{"main":[[{"node":"If recommended","type":"main","index":0}],[{"node":"If not recommended","type":"main","index":0}]]},"If not recommended":{"main":[[{"node":"Thanks for the feedback","type":"main","index":0}]]},"If recommended":{"main":[[{"node":"Thanks for the review","type":"main","index":0}]]}},"source":"docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.form/mutually-exclusive-branching.json","description":"Workflow example from docs/_workflows/integrations/builtin/core-nodes/n8n-nodes-base.form/mutually-exclusive-branching.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.stickyNote","version":1,"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},"position":[-720,-60]}],"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"},{"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.stickyNote","version":1,"parameters":{"content":"**Get fake sample data**","height":300,"width":220},"position":[480,180]},{"nodeType":"n8n-nodes-base.stickyNote","version":1,"parameters":{"content":"**Extract data and prepare it for use in the next node**","height":300,"width":220},"position":[760,180]}],"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":"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":"n8n Form Trigger","toNode":"NASA","connectionType":"main"},{"fromNode":"NASA","toNode":"Respond to Webhook","connectionType":"main"},{"fromNode":"On form submission","toNode":"Switch","connectionType":"main"},{"fromNode":"Switch","toNode":"Documentary questions","connectionType":"main"},{"fromNode":"Switch","toNode":"Action questions","connectionType":"main"},{"fromNode":"Switch","toNode":"Romance questions","connectionType":"main"},{"fromNode":"Switch","toNode":"Comedy questions","connectionType":"main"},{"fromNode":"Switch","toNode":"Drama questions","connectionType":"main"},{"fromNode":"Switch","toNode":"Multi-selection thank you","connectionType":"main"},{"fromNode":"Documentary questions","toNode":"Documentary thanks","connectionType":"main"},{"fromNode":"Action questions","toNode":"Action thanks","connectionType":"main"},{"fromNode":"Romance questions","toNode":"Romance thanks","connectionType":"main"},{"fromNode":"Comedy questions","toNode":"Comedy thanks","connectionType":"main"},{"fromNode":"Drama questions","toNode":"Drama thanks","connectionType":"main"},{"fromNode":"Switch","toNode":"If recommended","connectionType":"main"},{"fromNode":"Switch","toNode":"If not recommended","connectionType":"main"},{"fromNode":"If not recommended","toNode":"Thanks for the feedback","connectionType":"main"},{"fromNode":"If recommended","toNode":"Thanks for the review","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"},{"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":"Sticky Note Example Workflow","nodes":[{"parameters":{"content":"## I'm a note \\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)","height":160,"width":240},"id":"d6in2c8356voeg06osj3vs","name":"Sticky Note","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"content":"## I'm a note \\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)","height":160,"width":240}

properties_schema:
  [{"displayName":"Content","name":"content","type":"string","default":"## I'm a note \\n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)","required":true},{"displayName":"Height","name":"height","type":"number","default":160,"required":true},{"displayName":"Width","name":"width","type":"number","default":240,"required":true}]


