# nodes

node_type: n8n-nodes-base.Affinity
name: Affinity
display_name: Affinity
description: Consume Affinity API
category: output
icon: file:affinity.png
code_hash: e605ea187767403dfa55cd374690f7df563a0baa7ca6991d86d522dc101a2846
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Affinity
documentation_title: Affinity node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"affinity","description":"Templates for affinity"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"list","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Affinity = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const OrganizationDescription_1 = require("./OrganizationDescription");
  const PersonDescription_1 = require("./PersonDescription");
  const ListDescription_1 = require("./ListDescription");
  const ListEntryDescription_1 = require("./ListEntryDescription");
  class Affinity {
      constructor() {
          this.description = {
              displayName: 'Affinity',
              name: 'affinity',
              icon: 'file:affinity.png',
              group: ['output'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Affinity API',
              defaults: {
                  name: 'Affinity',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'affinityApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'List',
                              value: 'list',
                          },
                          {
                              name: 'List Entry',
                              value: 'listEntry',
                          },
                          {
                              name: 'Organization',
                              value: 'organization',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                          },
                      ],
                      default: 'organization',
                  },
                  ...ListDescription_1.listOperations,
                  ...ListDescription_1.listFields,
                  ...ListEntryDescription_1.listEntryOperations,
                  ...ListEntryDescription_1.listEntryFields,
                  ...OrganizationDescription_1.organizationOperations,
                  ...OrganizationDescription_1.organizationFields,
                  ...PersonDescription_1.personOperations,
                  ...PersonDescription_1.personFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getOrganizations() {
                      const returnData = [];
                      const organizations = await GenericFunctions_1.affinityApiRequestAllItems.call(this, 'organizations', 'GET', '/organizations', {});
                      for (const organization of organizations) {
                          const organizationName = organization.name;
                          const organizationId = organization.id;
                          returnData.push({
                              name: organizationName,
                              value: organizationId,
                          });
                      }
                      return returnData;
                  },
                  async getPersons() {
                      const returnData = [];
                      const persons = await GenericFunctions_1.affinityApiRequestAllItems.call(this, 'persons', 'GET', '/persons', {});
                      for (const person of persons) {
                          let personName = `${person.first_name} ${person.last_name}`;
                          if (person.primary_email !== null) {
                              personName += ` (${person.primary_email})`;
                          }
                          const personId = person.id;
                          returnData.push({
                              name: personName,
                              value: personId,
                          });
                      }
                      return returnData;
                  },
                  async getLists() {
                      const returnData = [];
                      const lists = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', '/lists');
                      for (const list of lists) {
                          returnData.push({
                              name: list.name,
                              value: list.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          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 === 'list') {
                      if (operation === 'get') {
                          const listId = this.getNodeParameter('listId', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', `/lists/${listId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', '/lists', {}, qs);
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'listEntry') {
                      if (operation === 'create') {
                          const listId = this.getNodeParameter('listId', i);
                          const entityId = this.getNodeParameter('entityId', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              entity_id: parseInt(entityId, 10),
                          };
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'POST', `/lists/${listId}/list-entries`, body);
                      }
                      if (operation === 'get') {
                          const listId = this.getNodeParameter('listId', i);
                          const listEntryId = this.getNodeParameter('listEntryId', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', `/lists/${listId}/list-entries/${listEntryId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const listId = this.getNodeParameter('listId', i);
                          if (returnAll) {
                              responseData = await GenericFunctions_1.affinityApiRequestAllItems.call(this, 'list_entries', 'GET', `/lists/${listId}/list-entries`, {}, qs);
                          }
                          else {
                              qs.page_size = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', `/lists/${listId}/list-entries`, {}, qs);
                              responseData = responseData.list_entries;
                          }
                      }
                      if (operation === 'delete') {
                          const listId = this.getNodeParameter('listId', i);
                          const listEntryId = this.getNodeParameter('listEntryId', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'DELETE', `/lists/${listId}/list-entries/${listEntryId}`, {}, qs);
                      }
                  }
                  if (resource === 'person') {
                      if (operation === 'create') {
                          const firstName = this.getNodeParameter('firstName', i);
                          const lastName = this.getNodeParameter('lastName', i);
                          const emails = this.getNodeParameter('emails', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              first_name: firstName,
                              last_name: lastName,
                              emails,
                          };
                          if (additionalFields.organizations) {
                              body.organization_ids = additionalFields.organizations;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'POST', '/persons', body);
                      }
                      if (operation === 'update') {
                          const personId = this.getNodeParameter('personId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const emails = this.getNodeParameter('emails', i);
                          const body = {
                              emails,
                          };
                          if (updateFields.firstName) {
                              body.first_name = updateFields.firstName;
                          }
                          if (updateFields.lastName) {
                              body.last_name = updateFields.lastName;
                          }
                          if (updateFields.organizations) {
                              body.organization_ids = updateFields.organizations;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'PUT', `/persons/${personId}`, body);
                      }
                      if (operation === 'get') {
                          const personId = this.getNodeParameter('personId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.withInteractionDates) {
                              qs.with_interaction_dates = options.withInteractionDates;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', `/persons/${personId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.term) {
                              qs.term = options.term;
                          }
                          if (options.withInteractionDates) {
                              qs.with_interaction_dates = options.withInteractionDates;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.affinityApiRequestAllItems.call(this, 'persons', 'GET', '/persons', {}, qs);
                          }
                          else {
                              qs.page_size = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', '/persons', {}, qs);
                              responseData = responseData.persons;
                          }
                      }
                      if (operation === 'delete') {
                          const personId = this.getNodeParameter('personId', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'DELETE', `/persons/${personId}`, {}, qs);
                      }
                  }
                  if (resource === 'organization') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const domain = this.getNodeParameter('domain', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              name,
                              domain,
                          };
                          if (additionalFields.persons) {
                              body.person_ids = additionalFields.persons;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'POST', '/organizations', body);
                      }
                      if (operation === 'update') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          const body = {};
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.domain) {
                              body.domain = updateFields.domain;
                          }
                          if (updateFields.persons) {
                              body.person_ids = updateFields.persons;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'PUT', `/organizations/${organizationId}`, body);
                      }
                      if (operation === 'get') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.withInteractionDates) {
                              qs.with_interaction_dates = options.withInteractionDates;
                          }
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', `/organizations/${organizationId}`, {}, qs);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          if (options.term) {
                              qs.term = options.term;
                          }
                          if (options.withInteractionDates) {
                              qs.with_interaction_dates = options.withInteractionDates;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.affinityApiRequestAllItems.call(this, 'organizations', 'GET', '/organizations', {}, qs);
                          }
                          else {
                              qs.page_size = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'GET', '/organizations', {}, qs);
                              responseData = responseData.organizations;
                          }
                      }
                      if (operation === 'delete') {
                          const organizationId = this.getNodeParameter('organizationId', i);
                          responseData = await GenericFunctions_1.affinityApiRequest.call(this, 'DELETE', `/organizations/${organizationId}`, {}, qs);
                      }
                  }
                  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.Affinity = Affinity;
  //# sourceMappingURL=Affinity.node.js.map

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

  // --- Next Credential File ---

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

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

  # Affinity node

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

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

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

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

  ## Operations

  * List
      * Get a list
      * Get all lists
  * List Entry
      * Create a list entry
      * Delete a list entry
      * Get a list entry
      * Get all list entries
  * Organization
      * Create an organization
      * Delete an organization
      * Get an organization
      * Get all organizations
      * Update an organization
  * Person
      * Create a person
      * Delete a person
      * Get a person
      * Get all persons
      * Update a person

  ## Templates and examples

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

example_workflow:
  {"name":"Affinity Example Workflow","nodes":[{"parameters":{"resource":"list","dynamic_property":null},"id":"zvrb057cpkl7sr3u46mv8e","name":"Affinity","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":"organization","options":[{"name":"List","value":"list"},{"name":"List Entry","value":"listEntry"},{"name":"Organization","value":"organization"},{"name":"Person","value":"person"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListEntryDescription_1.listEntryOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListEntryDescription_1.listEntryFields"},{"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":"...PersonDescription_1.personOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...PersonDescription_1.personFields"}]


node_type: n8n-nodes-base.AgileCrm
name: AgileCrm
display_name: Agile CRM
description: Consume Agile CRM API
category: transform
icon: file:agilecrm.png
code_hash: ce71c3b5dec23a48d24c5775e9bb79006ce395bed62b306c56340b5c772379c2
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.AgileCrm
documentation_title: Agile CRM node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"agile-crm","description":"Templates for agile-crm"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"company","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AgileCrm = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const ContactDescription_1 = require("./ContactDescription");
  const CompanyDescription_1 = require("./CompanyDescription");
  const DealDescription_1 = require("./DealDescription");
  const GenericFunctions_1 = require("./GenericFunctions");
  class AgileCrm {
      constructor() {
          this.description = {
              displayName: 'Agile CRM',
              name: 'agileCrm',
              icon: 'file:agilecrm.png',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              group: ['transform'],
              version: 1,
              description: 'Consume Agile CRM API',
              defaults: {
                  name: 'Agile CRM',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'agileCrmApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Company',
                              value: 'company',
                          },
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Deal',
                              value: 'deal',
                          },
                      ],
                      default: 'contact',
                  },
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...CompanyDescription_1.companyOperations,
                  ...CompanyDescription_1.companyFields,
                  ...DealDescription_1.dealOperations,
                  ...DealDescription_1.dealFields,
              ],
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < items.length; i++) {
              if (resource === 'contact' || resource === 'company') {
                  const idGetter = resource === 'contact' ? 'contactId' : 'companyId';
                  if (operation === 'get') {
                      const contactId = this.getNodeParameter(idGetter, i);
                      const endpoint = `api/contacts/${contactId}`;
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'GET', endpoint, {});
                  }
                  else if (operation === 'delete') {
                      const contactId = this.getNodeParameter(idGetter, i);
                      const endpoint = `api/contacts/${contactId}`;
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'DELETE', endpoint, {});
                  }
                  else if (operation === 'getAll') {
                      const simple = this.getNodeParameter('simple', 0);
                      const returnAll = this.getNodeParameter('returnAll', 0);
                      const filterType = this.getNodeParameter('filterType', i);
                      const sort = this.getNodeParameter('options.sort.sort', i, {});
                      const body = {};
                      const filterJson = {};
                      let contactType = '';
                      if (resource === 'contact') {
                          contactType = 'PERSON';
                      }
                      else {
                          contactType = 'COMPANY';
                      }
                      filterJson.contact_type = contactType;
                      if (filterType === 'manual') {
                          const conditions = this.getNodeParameter('filters.conditions', i, []);
                          const matchType = this.getNodeParameter('matchType', i);
                          let rules;
                          if (conditions.length !== 0) {
                              rules = (0, GenericFunctions_1.getFilterRules)(conditions, matchType);
                              Object.assign(filterJson, rules);
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one condition must be added.', { itemIndex: i });
                          }
                      }
                      else if (filterType === 'json') {
                          const filterJsonRules = this.getNodeParameter('filterJson', i);
                          if ((0, GenericFunctions_1.validateJSON)(filterJsonRules) !== undefined) {
                              Object.assign(filterJson, (0, n8n_workflow_1.jsonParse)(filterJsonRules));
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Filter (JSON) must be a valid json', {
                                  itemIndex: i,
                              });
                          }
                      }
                      body.filterJson = JSON.stringify(filterJson);
                      if (sort) {
                          if (sort.direction === 'ASC') {
                              body.global_sort_key = sort.field;
                          }
                          else if (sort.direction === 'DESC') {
                              body.global_sort_key = `-${sort.field}`;
                          }
                      }
                      if (returnAll) {
                          body.page_size = 100;
                          responseData = await GenericFunctions_1.agileCrmApiRequestAllItems.call(this, 'POST', 'api/filters/filter/dynamic-filter', body, undefined, undefined, true);
                      }
                      else {
                          body.page_size = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'POST', 'api/filters/filter/dynamic-filter', body, undefined, undefined, true);
                      }
                      if (simple) {
                          responseData = (0, GenericFunctions_1.simplifyResponse)(responseData);
                      }
                  }
                  else if (operation === 'create') {
                      const jsonParameters = this.getNodeParameter('jsonParameters', i);
                      const body = {};
                      const properties = [];
                      if (jsonParameters) {
                          const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                          if (additionalFieldsJson !== '') {
                              if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                  Object.assign(body, (0, n8n_workflow_1.jsonParse)(additionalFieldsJson));
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                              }
                          }
                      }
                      else {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (resource === 'company') {
                              body.type = 'COMPANY';
                          }
                          if (additionalFields.starValue) {
                              body.star_value = additionalFields.starValue;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (resource === 'contact') {
                              if (additionalFields.firstName) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'first_name',
                                      value: additionalFields.firstName,
                                  });
                              }
                              if (additionalFields.lastName) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'last_name',
                                      value: additionalFields.lastName,
                                  });
                              }
                              if (additionalFields.company) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'company',
                                      value: additionalFields.company,
                                  });
                              }
                              if (additionalFields.title) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'title',
                                      value: additionalFields.title,
                                  });
                              }
                              if (additionalFields.emailOptions) {
                                  additionalFields.emailOptions.emailProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'email',
                                          value: property.email,
                                      });
                                  });
                              }
                              if (additionalFields.addressOptions) {
                                  additionalFields.addressOptions.addressProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'address',
                                          value: property.address,
                                      });
                                  });
                              }
                              if (additionalFields.phoneOptions) {
                                  additionalFields.phoneOptions.phoneProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'phone',
                                          value: property.number,
                                      });
                                  });
                              }
                          }
                          else if (resource === 'company') {
                              if (additionalFields.email) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'email',
                                      value: additionalFields.email,
                                  });
                              }
                              if (additionalFields.addressOptions) {
                                  additionalFields.addressOptions.addressProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'address',
                                          value: property.address,
                                      });
                                  });
                              }
                              if (additionalFields.phone) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'phone',
                                      value: additionalFields.phone,
                                  });
                              }
                              if (additionalFields.name) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'name',
                                      value: additionalFields.name,
                                  });
                              }
                          }
                          if (additionalFields.websiteOptions) {
                              additionalFields.websiteOptions.websiteProperties.map((property) => {
                                  properties.push({
                                      type: 'SYSTEM',
                                      subtype: property.subtype,
                                      name: 'website',
                                      value: property.url,
                                  });
                              });
                          }
                          if (additionalFields.customProperties) {
                              additionalFields.customProperties.customProperty.map((property) => {
                                  properties.push({
                                      type: 'CUSTOM',
                                      subtype: property.subtype,
                                      name: property.name,
                                      value: property.value,
                                  });
                              });
                          }
                          body.properties = properties;
                      }
                      const endpoint = 'api/contacts';
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'POST', endpoint, body);
                  }
                  else if (operation === 'update') {
                      const contactId = this.getNodeParameter(idGetter, i);
                      const contactUpdatePayload = { id: contactId };
                      const jsonParameters = this.getNodeParameter('jsonParameters', i);
                      const body = {};
                      const properties = [];
                      if (jsonParameters) {
                          const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                          if (additionalFieldsJson !== '') {
                              if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                  Object.assign(body, (0, n8n_workflow_1.jsonParse)(additionalFieldsJson));
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                              }
                          }
                      }
                      else {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.starValue) {
                              body.star_value = additionalFields.starValue;
                          }
                          if (additionalFields.tags) {
                              body.tags = additionalFields.tags;
                          }
                          if (resource === 'contact') {
                              if (additionalFields.leadScore) {
                                  body.lead_score = additionalFields.leadScore;
                              }
                              if (additionalFields.firstName) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'first_name',
                                      value: additionalFields.firstName,
                                  });
                              }
                              if (additionalFields.lastName) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'last_name',
                                      value: additionalFields.lastName,
                                  });
                              }
                              if (additionalFields.company) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'company',
                                      value: additionalFields.company,
                                  });
                              }
                              if (additionalFields.title) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'title',
                                      value: additionalFields.title,
                                  });
                              }
                              if (additionalFields.emailOptions) {
                                  additionalFields.emailOptions.emailProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'email',
                                          value: property.email,
                                      });
                                  });
                              }
                              if (additionalFields.addressOptions) {
                                  additionalFields.addressOptions.addressProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'address',
                                          value: property.address,
                                      });
                                  });
                              }
                              if (additionalFields.phoneOptions) {
                                  additionalFields.phoneOptions.phoneProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'phone',
                                          value: property.number,
                                      });
                                  });
                              }
                          }
                          else if (resource === 'company') {
                              if (additionalFields.email) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'email',
                                      value: additionalFields.email,
                                  });
                              }
                              if (additionalFields.addressOptions) {
                                  additionalFields.addressOptions.addressProperties.map((property) => {
                                      properties.push({
                                          type: 'SYSTEM',
                                          subtype: property.subtype,
                                          name: 'address',
                                          value: property.address,
                                      });
                                  });
                              }
                              if (additionalFields.phone) {
                                  properties.push({
                                      type: 'SYSTEM',
                                      name: 'phone',
                                      value: additionalFields.phone,
                                  });
                              }
                          }
                          if (additionalFields.websiteOptions) {
                              additionalFields.websiteOptions.websiteProperties.map((property) => {
                                  properties.push({
                                      type: 'SYSTEM',
                                      subtype: property.subtype,
                                      name: 'website',
                                      value: property.url,
                                  });
                              });
                          }
                          if (additionalFields.name) {
                              properties.push({
                                  type: 'SYSTEM',
                                  name: 'name',
                                  value: additionalFields.name,
                              });
                          }
                          if (additionalFields.customProperties) {
                              additionalFields.customProperties.customProperty.map((property) => {
                                  properties.push({
                                      type: 'CUSTOM',
                                      subtype: property.subtype,
                                      name: property.name,
                                      value: property.value,
                                  });
                              });
                          }
                          body.properties = properties;
                      }
                      Object.assign(contactUpdatePayload, body);
                      responseData = await GenericFunctions_1.agileCrmApiRequestUpdate.call(this, 'PUT', '', contactUpdatePayload);
                  }
              }
              else if (resource === 'deal') {
                  if (operation === 'get') {
                      const dealId = this.getNodeParameter('dealId', i);
                      const endpoint = `api/opportunity/${dealId}`;
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'GET', endpoint, {});
                  }
                  else if (operation === 'delete') {
                      const contactId = this.getNodeParameter('dealId', i);
                      const endpoint = `api/opportunity/${contactId}`;
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'DELETE', endpoint, {});
                  }
                  else if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', 0);
                      const endpoint = 'api/opportunity';
                      if (returnAll) {
                          const limit = 100;
                          responseData = await GenericFunctions_1.agileCrmApiRequestAllItems.call(this, 'GET', endpoint, undefined, {
                              page_size: limit,
                          });
                      }
                      else {
                          const limit = this.getNodeParameter('limit', 0);
                          responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'GET', endpoint, undefined, {
                              page_size: limit,
                          });
                      }
                  }
                  else if (operation === 'create') {
                      const jsonParameters = this.getNodeParameter('jsonParameters', i);
                      const body = {};
                      if (jsonParameters) {
                          const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                          if (additionalFieldsJson !== '') {
                              if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                  Object.assign(body, (0, n8n_workflow_1.jsonParse)(additionalFieldsJson));
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be a valid JSON', { itemIndex: i });
                              }
                          }
                      }
                      else {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          body.close_date = new Date(this.getNodeParameter('closeDate', i)).getTime();
                          body.expected_value = this.getNodeParameter('expectedValue', i);
                          body.milestone = this.getNodeParameter('milestone', i);
                          body.probability = this.getNodeParameter('probability', i);
                          body.name = this.getNodeParameter('name', i);
                          if (additionalFields.contactIds) {
                              body.contactIds = additionalFields.contactIds;
                          }
                          if (additionalFields.customData) {
                              body.customData = additionalFields.customData.customProperty;
                          }
                      }
                      const endpoint = 'api/opportunity';
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'POST', endpoint, body);
                  }
                  else if (operation === 'update') {
                      const jsonParameters = this.getNodeParameter('jsonParameters', i);
                      const body = {};
                      if (jsonParameters) {
                          const additionalFieldsJson = this.getNodeParameter('additionalFieldsJson', i);
                          if (additionalFieldsJson !== '') {
                              if ((0, GenericFunctions_1.validateJSON)(additionalFieldsJson) !== undefined) {
                                  Object.assign(body, (0, n8n_workflow_1.jsonParse)(additionalFieldsJson));
                              }
                              else {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Additional fields must be valid JSON', { itemIndex: i });
                              }
                          }
                      }
                      else {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          body.id = this.getNodeParameter('dealId', i);
                          if (additionalFields.expectedValue) {
                              body.expected_value = additionalFields.expectedValue;
                          }
                          if (additionalFields.name) {
                              body.name = additionalFields.name;
                          }
                          if (additionalFields.probability) {
                              body.probability = additionalFields.probability;
                          }
                          if (additionalFields.contactIds) {
                              body.contactIds = additionalFields.contactIds;
                          }
                          if (additionalFields.customData) {
                              body.customData = additionalFields.customData.customProperty;
                          }
                      }
                      const endpoint = 'api/opportunity/partial-update';
                      responseData = await GenericFunctions_1.agileCrmApiRequest.call(this, 'PUT', endpoint, body);
                  }
              }
              if (Array.isArray(responseData)) {
                  returnData.push.apply(returnData, responseData);
              }
              else {
                  returnData.push(responseData);
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.AgileCrm = AgileCrm;
  //# sourceMappingURL=AgileCrm.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AgileCrmApi = void 0;
  class AgileCrmApi {
      constructor() {
          this.name = 'agileCrmApi';
          this.displayName = 'AgileCRM API';
          this.documentationUrl = 'agileCrm';
          this.properties = [
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'example',
                  description: 'If the domain is https://example.agilecrm.com "example" would have to be entered',
              },
          ];
      }
  }
  exports.AgileCrmApi = AgileCrmApi;
  //# sourceMappingURL=AgileCrmApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AgileCrmApi = void 0;
  class AgileCrmApi {
      constructor() {
          this.name = 'agileCrmApi';
          this.displayName = 'AgileCRM API';
          this.documentationUrl = 'agileCrm';
          this.properties = [
              {
                  displayName: 'Email',
                  name: 'email',
                  type: 'string',
                  placeholder: 'name@email.com',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Subdomain',
                  name: 'subdomain',
                  type: 'string',
                  default: '',
                  placeholder: 'example',
                  description: 'If the domain is https://example.agilecrm.com "example" would have to be entered',
              },
          ];
      }
  }
  exports.AgileCrmApi = AgileCrmApi;
  //# sourceMappingURL=AgileCrmApi.credentials.js.map

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

  # Agile CRM node

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

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

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

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

  ## Operations

  * Company
      * Create a new company
      * Delete a company
      * Get a company
      * Get all companies
      * Update company properties
  * Contact
      * Create a new contact
      * Delete a contact
      * Get a contact
      * Get all contacts
      * Update contact properties
  * Deal
      * Create a new deal
      * Delete a deal
      * Get a deal
      * Get all deals
      * Update deal properties

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"contact","options":[{"name":"Company","value":"company"},{"name":"Contact","value":"contact"},{"name":"Deal","value":"deal"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CompanyDescription_1.companyOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CompanyDescription_1.companyFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DealDescription_1.dealOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DealDescription_1.dealFields"}]


node_type: n8n-nodes-base.ActionNetwork
name: ActionNetwork
display_name: Action Network
description: Consume the Action Network API
category: transform
icon: file:actionNetwork.svg
code_hash: c0a880f5754b6b532ff787bdb253dc49ffd7f470f28aeddda5be0c73f9f9935f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ActionNetwork
documentation_title: Action Network node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"action-network","description":"Templates for action-network"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"attendance","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActionNetwork = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const descriptions_1 = require("./descriptions");
  class ActionNetwork {
      constructor() {
          this.description = {
              displayName: 'Action Network',
              name: 'actionNetwork',
              icon: 'file:actionNetwork.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
              description: 'Consume the Action Network API',
              defaults: {
                  name: 'Action Network',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'actionNetworkApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Attendance',
                              value: 'attendance',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Person',
                              value: 'person',
                          },
                          {
                              name: 'Person Tag',
                              value: 'personTag',
                          },
                          {
                              name: 'Petition',
                              value: 'petition',
                          },
                          {
                              name: 'Signature',
                              value: 'signature',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                      ],
                      default: 'attendance',
                  },
                  ...descriptions_1.attendanceOperations,
                  ...descriptions_1.attendanceFields,
                  ...descriptions_1.eventOperations,
                  ...descriptions_1.eventFields,
                  ...descriptions_1.personOperations,
                  ...descriptions_1.personFields,
                  ...descriptions_1.petitionOperations,
                  ...descriptions_1.petitionFields,
                  ...descriptions_1.signatureOperations,
                  ...descriptions_1.signatureFields,
                  ...descriptions_1.tagOperations,
                  ...descriptions_1.tagFields,
                  ...descriptions_1.personTagOperations,
                  ...descriptions_1.personTagFields,
              ],
          };
          this.methods = {
              loadOptions: GenericFunctions_1.resourceLoaders,
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let response;
          for (let i = 0; i < items.length; i++) {
              try {
                  if (resource === 'attendance') {
                      if (operation === 'create') {
                          const personId = this.getNodeParameter('personId', i);
                          const eventId = this.getNodeParameter('eventId', i);
                          const body = (0, GenericFunctions_1.makeOsdiLink)(personId);
                          const endpoint = `/events/${eventId}/attendances`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'get') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const attendanceId = this.getNodeParameter('attendanceId', i);
                          const endpoint = `/events/${eventId}/attendances/${attendanceId}`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const eventId = this.getNodeParameter('eventId', i);
                          const endpoint = `/events/${eventId}/attendances`;
                          response = await GenericFunctions_1.handleListing.call(this, 'GET', endpoint);
                      }
                  }
                  else if (resource === 'event') {
                      if (operation === 'create') {
                          const body = {
                              origin_system: this.getNodeParameter('originSystem', i),
                              title: this.getNodeParameter('title', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustEventPayload)(additionalFields));
                          }
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', '/events', body);
                      }
                      else if (operation === 'get') {
                          const eventId = this.getNodeParameter('eventId', i);
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', `/events/${eventId}`);
                      }
                      else if (operation === 'getAll') {
                          response = await GenericFunctions_1.handleListing.call(this, 'GET', '/events');
                      }
                  }
                  else if (resource === 'person') {
                      if (operation === 'create') {
                          const emailAddresses = this.getNodeParameter('email_addresses', i);
                          const body = {
                              person: {
                                  email_addresses: [emailAddresses.email_addresses_fields],
                              },
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length && body.person) {
                              Object.assign(body.person, (0, GenericFunctions_1.adjustPersonPayload)(additionalFields));
                          }
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', '/people', body);
                      }
                      else if (operation === 'get') {
                          const personId = this.getNodeParameter('personId', i);
                          response = (await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', `/people/${personId}`));
                      }
                      else if (operation === 'getAll') {
                          response = (await GenericFunctions_1.handleListing.call(this, 'GET', '/people'));
                      }
                      else if (operation === 'update') {
                          const personId = this.getNodeParameter('personId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustPersonPayload)(updateFields));
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'PUT', `/people/${personId}`, body);
                      }
                  }
                  else if (resource === 'petition') {
                      if (operation === 'create') {
                          const body = {
                              origin_system: this.getNodeParameter('originSystem', i),
                              title: this.getNodeParameter('title', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustPetitionPayload)(additionalFields));
                          }
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', '/petitions', body);
                      }
                      else if (operation === 'get') {
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const endpoint = `/petitions/${petitionId}`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          response = await GenericFunctions_1.handleListing.call(this, 'GET', '/petitions');
                      }
                      else if (operation === 'update') {
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, (0, GenericFunctions_1.adjustPetitionPayload)(updateFields));
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'PUT', `/petitions/${petitionId}`, body);
                      }
                  }
                  else if (resource === 'signature') {
                      if (operation === 'create') {
                          const personId = this.getNodeParameter('personId', i);
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const body = (0, GenericFunctions_1.makeOsdiLink)(personId);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (Object.keys(additionalFields).length) {
                              Object.assign(body, additionalFields);
                          }
                          const endpoint = `/petitions/${petitionId}/signatures`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'get') {
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const signatureId = this.getNodeParameter('signatureId', i);
                          const endpoint = `/petitions/${petitionId}/signatures/${signatureId}`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'getAll') {
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const endpoint = `/petitions/${petitionId}/signatures`;
                          response = await GenericFunctions_1.handleListing.call(this, 'GET', endpoint);
                      }
                      else if (operation === 'update') {
                          const petitionId = this.getNodeParameter('petitionId', i);
                          const signatureId = this.getNodeParameter('signatureId', i);
                          const body = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (Object.keys(updateFields).length) {
                              Object.assign(body, updateFields);
                          }
                          else {
                              throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                          }
                          const endpoint = `/petitions/${petitionId}/signatures/${signatureId}`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'PUT', endpoint, body);
                      }
                  }
                  else if (resource === 'tag') {
                      if (operation === 'create') {
                          const body = {
                              name: this.getNodeParameter('name', i),
                          };
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', '/tags', body);
                      }
                      else if (operation === 'get') {
                          const tagId = this.getNodeParameter('tagId', i);
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'GET', `/tags/${tagId}`);
                      }
                      else if (operation === 'getAll') {
                          response = await GenericFunctions_1.handleListing.call(this, 'GET', '/tags');
                      }
                  }
                  else if (resource === 'personTag') {
                      if (operation === 'add') {
                          const personId = this.getNodeParameter('personId', i);
                          const tagId = this.getNodeParameter('tagId', i);
                          const body = (0, GenericFunctions_1.makeOsdiLink)(personId);
                          const endpoint = `/tags/${tagId}/taggings`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'POST', endpoint, body);
                      }
                      else if (operation === 'remove') {
                          const tagId = this.getNodeParameter('tagId', i);
                          const taggingId = this.getNodeParameter('taggingId', i);
                          const endpoint = `/tags/${tagId}/taggings/${taggingId}`;
                          response = await GenericFunctions_1.actionNetworkApiRequest.call(this, 'DELETE', endpoint);
                      }
                  }
                  const simplify = this.getNodeParameter('simple', i, false);
                  if (simplify) {
                      response =
                          operation === 'getAll'
                              ? response.map((entry) => (0, GenericFunctions_1.simplifyResponse)(entry, resource))
                              : (0, GenericFunctions_1.simplifyResponse)(response, resource);
                  }
                  Array.isArray(response)
                      ? returnData.push(...response)
                      : returnData.push(response);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.ActionNetwork = ActionNetwork;
  //# sourceMappingURL=ActionNetwork.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActionNetworkApi = void 0;
  class ActionNetworkApi {
      constructor() {
          this.name = 'actionNetworkApi';
          this.displayName = 'Action Network API';
          this.documentationUrl = 'actionNetwork';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://actionnetwork.org/api/v2',
                  url: '/events?per_page=1',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = { 'OSDI-API-Token': credentials.apiKey };
          return requestOptions;
      }
  }
  exports.ActionNetworkApi = ActionNetworkApi;
  //# sourceMappingURL=ActionNetworkApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActionNetworkApi = void 0;
  class ActionNetworkApi {
      constructor() {
          this.name = 'actionNetworkApi';
          this.displayName = 'Action Network API';
          this.documentationUrl = 'actionNetwork';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.test = {
              request: {
                  baseURL: 'https://actionnetwork.org/api/v2',
                  url: '/events?per_page=1',
              },
          };
      }
      async authenticate(credentials, requestOptions) {
          requestOptions.headers = { 'OSDI-API-Token': credentials.apiKey };
          return requestOptions;
      }
  }
  exports.ActionNetworkApi = ActionNetworkApi;
  //# sourceMappingURL=ActionNetworkApi.credentials.js.map

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

  # Action Network node

  Use the Action Network node to automate work in Action Network, and integrate Action Network with other applications. n8n has built-in support for a wide range of Action Network features, including creating, updating, and deleting events, people, tags, and signatures. 

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

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

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

  ## Operations

  * Attendance
      * Create
      * Get
      * Get All
  * Event
      * Create
      * Get
      * Get All
  * Person
      * Create
      * Get
      * Get All
      * Update
  * Person Tag
      * Add
      * Remove
  * Petition
      * Create
      * Get
      * Get All
      * Update
  * Signature
      * Create
      * Get
      * Get All
      * Update
  * Tag
      * Create
      * Get
      * Get All

  ## Templates and examples

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

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

example_workflow:
  {"name":"Action Network Example Workflow","nodes":[{"parameters":{"resource":"attendance","dynamic_property":null},"id":"7fmu6gk2hy7es5izw25tzs","name":"Action Network","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":"attendance","options":[{"name":"Attendance","value":"attendance"},{"name":"Event","value":"event"},{"name":"Person","value":"person"},{"name":"Person Tag","value":"personTag"},{"name":"Petition","value":"petition"},{"name":"Signature","value":"signature"},{"name":"Tag","value":"tag"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.attendanceOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.attendanceFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.eventOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.eventFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.personOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.personFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.petitionOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.petitionFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.signatureOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.signatureFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.tagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.tagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.personTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...descriptions_1.personTagFields"}]


node_type: n8n-nodes-base.ActiveCampaign
name: ActiveCampaign
display_name: ActiveCampaign
description: Create and edit data in ActiveCampaign
category: transform
icon: file:activeCampaign.png
code_hash: 5ea90671718d20eecb6cddae2e21c91470fdb778e8be97106ee2539303422ad2
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ActiveCampaign
documentation_title: ActiveCampaign node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"activecampaign","description":"Templates for activecampaign"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"account","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActiveCampaign = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  const DealDescription_1 = require("./DealDescription");
  const EcomOrderDescription_1 = require("./EcomOrderDescription");
  const EcomCustomerDescription_1 = require("./EcomCustomerDescription");
  const EcomOrderProductsDescription_1 = require("./EcomOrderProductsDescription");
  const ConnectionDescription_1 = require("./ConnectionDescription");
  const AccountDescription_1 = require("./AccountDescription");
  const TagDescription_1 = require("./TagDescription");
  const AccountContactDescription_1 = require("./AccountContactDescription");
  const ContactListDescription_1 = require("./ContactListDescription");
  const ContactTagDescription_1 = require("./ContactTagDescription");
  const ListDescription_1 = require("./ListDescription");
  function addAdditionalFields(body, additionalFields) {
      for (const key of Object.keys(additionalFields)) {
          if (key === 'customProperties' &&
              additionalFields.customProperties.property !== undefined) {
              for (const customProperty of additionalFields.customProperties
                  .property) {
                  body[customProperty.name] = customProperty.value;
              }
          }
          else if (key === 'fieldValues' &&
              additionalFields.fieldValues.property !== undefined) {
              body.fieldValues = additionalFields.fieldValues.property;
          }
          else if (key === 'fields' &&
              additionalFields.fields.property !== undefined) {
              body.fields = additionalFields.fields.property;
          }
          else {
              body[key] = additionalFields[key];
          }
      }
  }
  class ActiveCampaign {
      constructor() {
          this.description = {
              displayName: 'ActiveCampaign',
              name: 'activeCampaign',
              icon: 'file:activeCampaign.png',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Create and edit data in ActiveCampaign',
              defaults: {
                  name: 'ActiveCampaign',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'activeCampaignApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Account Contact',
                              value: 'accountContact',
                          },
                          {
                              name: 'Connection',
                              value: 'connection',
                          },
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Contact List',
                              value: 'contactList',
                          },
                          {
                              name: 'Contact Tag',
                              value: 'contactTag',
                          },
                          {
                              name: 'Deal',
                              value: 'deal',
                          },
                          {
                              name: 'E-Commerce Customer',
                              value: 'ecommerceCustomer',
                          },
                          {
                              name: 'E-Commerce Order',
                              value: 'ecommerceOrder',
                          },
                          {
                              name: 'E-Commerce Order Product',
                              value: 'ecommerceOrderProducts',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                          {
                              name: 'Tag',
                              value: 'tag',
                          },
                      ],
                      default: 'contact',
                  },
                  ...AccountDescription_1.accountOperations,
                  ...ContactDescription_1.contactOperations,
                  ...AccountContactDescription_1.accountContactOperations,
                  ...ContactListDescription_1.contactListOperations,
                  ...ContactTagDescription_1.contactTagOperations,
                  ...ListDescription_1.listOperations,
                  ...TagDescription_1.tagOperations,
                  ...DealDescription_1.dealOperations,
                  ...ConnectionDescription_1.connectionOperations,
                  ...EcomOrderDescription_1.ecomOrderOperations,
                  ...EcomCustomerDescription_1.ecomCustomerOperations,
                  ...EcomOrderProductsDescription_1.ecomOrderProductsOperations,
                  ...TagDescription_1.tagFields,
                  ...ListDescription_1.listFields,
                  ...ContactTagDescription_1.contactTagFields,
                  ...ContactListDescription_1.contactListFields,
                  ...AccountDescription_1.accountFields,
                  ...AccountContactDescription_1.accountContactFields,
                  ...ContactDescription_1.contactFields,
                  ...DealDescription_1.dealFields,
                  ...ConnectionDescription_1.connectionFields,
                  ...EcomOrderDescription_1.ecomOrderFields,
                  ...EcomCustomerDescription_1.ecomCustomerFields,
                  ...EcomOrderProductsDescription_1.ecomOrderProductsFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getContactCustomFields() {
                      const returnData = [];
                      const { fields } = await GenericFunctions_1.activeCampaignApiRequest.call(this, 'GET', '/api/3/fields', {}, { limit: 100 });
                      for (const field of fields) {
                          const fieldName = field.title;
                          const fieldId = field.id;
                          returnData.push({
                              name: fieldName,
                              value: fieldId,
                          });
                      }
                      return returnData;
                  },
                  async getAccountCustomFields() {
                      const returnData = [];
                      const { accountCustomFieldMeta: fields } = await GenericFunctions_1.activeCampaignApiRequest.call(this, 'GET', '/api/3/accountCustomFieldMeta', {}, { limit: 100 });
                      for (const field of fields) {
                          const fieldName = field.fieldLabel;
                          const fieldId = field.id;
                          returnData.push({
                              name: fieldName,
                              value: fieldId,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const { tags } = await GenericFunctions_1.activeCampaignApiRequest.call(this, 'GET', '/api/3/tags', {}, { limit: 100 });
                      for (const tag of tags) {
                          returnData.push({
                              name: tag.tag,
                              value: tag.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          let resource;
          let operation;
          let body;
          let qs;
          let requestMethod;
          let endpoint;
          let returnAll = false;
          let dataKey;
          for (let i = 0; i < items.length; i++) {
              try {
                  dataKey = undefined;
                  resource = this.getNodeParameter('resource', 0);
                  operation = this.getNodeParameter('operation', 0);
                  requestMethod = 'GET';
                  endpoint = '';
                  body = {};
                  qs = {};
                  if (resource === 'contact') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          const updateIfExists = this.getNodeParameter('updateIfExists', i);
                          if (updateIfExists) {
                              endpoint = '/api/3/contact/sync';
                          }
                          else {
                              endpoint = '/api/3/contacts';
                          }
                          dataKey = 'contact';
                          body.contact = {
                              email: this.getNodeParameter('email', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.contact, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const contactId = this.getNodeParameter('contactId', i);
                          endpoint = `/api/3/contacts/${contactId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const contactId = this.getNodeParameter('contactId', i);
                          endpoint = `/api/3/contacts/${contactId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const simple = this.getNodeParameter('simple', i, true);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          Object.assign(qs, additionalFields);
                          if (qs.orderBy) {
                              qs[qs.orderBy] = true;
                              delete qs.orderBy;
                          }
                          if (simple) {
                              dataKey = 'contacts';
                          }
                          endpoint = '/api/3/contacts';
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const contactId = this.getNodeParameter('contactId', i);
                          endpoint = `/api/3/contacts/${contactId}`;
                          dataKey = 'contact';
                          body.contact = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.contact, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'account') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/accounts';
                          dataKey = 'account';
                          body.account = {
                              name: this.getNodeParameter('name', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.account, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const accountId = this.getNodeParameter('accountId', i);
                          endpoint = `/api/3/accounts/${accountId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const accountId = this.getNodeParameter('accountId', i);
                          endpoint = `/api/3/accounts/${accountId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'accounts';
                          }
                          endpoint = '/api/3/accounts';
                          const filters = this.getNodeParameter('filters', i);
                          Object.assign(qs, filters);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const accountId = this.getNodeParameter('accountId', i);
                          endpoint = `/api/3/accounts/${accountId}`;
                          dataKey = 'account';
                          body.account = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.account, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'accountContact') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/accountContacts';
                          dataKey = 'accountContact';
                          body.accountContact = {
                              contact: this.getNodeParameter('contact', i),
                              account: this.getNodeParameter('account', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.accountContact, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const accountContactId = this.getNodeParameter('accountContactId', i);
                          endpoint = `/api/3/accountContacts/${accountContactId}`;
                          dataKey = 'accountContact';
                          body.accountContact = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.accountContact, updateFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const accountContactId = this.getNodeParameter('accountContactId', i);
                          endpoint = `/api/3/accountContacts/${accountContactId}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'contactTag') {
                      if (operation === 'add') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/contactTags';
                          dataKey = 'contactTag';
                          body.contactTag = {
                              contact: this.getNodeParameter('contactId', i),
                              tag: this.getNodeParameter('tagId', i),
                          };
                      }
                      else if (operation === 'remove') {
                          requestMethod = 'DELETE';
                          const contactTagId = this.getNodeParameter('contactTagId', i);
                          endpoint = `/api/3/contactTags/${contactTagId}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'contactList') {
                      if (operation === 'add') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/contactLists';
                          dataKey = 'contactTag';
                          body.contactList = {
                              list: this.getNodeParameter('listId', i),
                              contact: this.getNodeParameter('contactId', i),
                              status: 1,
                          };
                      }
                      else if (operation === 'remove') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/contactLists';
                          body.contactList = {
                              list: this.getNodeParameter('listId', i),
                              contact: this.getNodeParameter('contactId', i),
                              status: 2,
                          };
                          dataKey = 'contacts';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'list') {
                      if (operation === 'getAll') {
                          requestMethod = 'GET';
                          returnAll = this.getNodeParameter('returnAll', i);
                          const simple = this.getNodeParameter('simple', i, true);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'lists';
                          }
                          endpoint = '/api/3/lists';
                      }
                  }
                  else if (resource === 'tag') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/tags';
                          dataKey = 'tag';
                          body.tag = {
                              tag: this.getNodeParameter('name', i),
                              tagType: this.getNodeParameter('tagType', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.tag, additionalFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const tagId = this.getNodeParameter('tagId', i);
                          endpoint = `/api/3/tags/${tagId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const tagId = this.getNodeParameter('tagId', i);
                          endpoint = `/api/3/tags/${tagId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'tags';
                          }
                          endpoint = '/api/3/tags';
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const tagId = this.getNodeParameter('tagId', i);
                          endpoint = `/api/3/tags/${tagId}`;
                          dataKey = 'tag';
                          body.tag = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.tag, updateFields);
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'deal') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/deals';
                          body.deal = {
                              title: this.getNodeParameter('title', i),
                              contact: this.getNodeParameter('contact', i),
                              value: this.getNodeParameter('value', i),
                              currency: this.getNodeParameter('currency', i),
                          };
                          const group = this.getNodeParameter('group', i);
                          if (group !== '') {
                              addAdditionalFields(body.deal, { group });
                          }
                          const owner = this.getNodeParameter('owner', i);
                          if (owner !== '') {
                              addAdditionalFields(body.deal, { owner });
                          }
                          const stage = this.getNodeParameter('stage', i);
                          if (stage !== '') {
                              addAdditionalFields(body.deal, { stage });
                          }
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.deal, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const dealId = this.getNodeParameter('dealId', i);
                          endpoint = `/api/3/deals/${dealId}`;
                          body.deal = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.deal, updateFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const dealId = this.getNodeParameter('dealId', i);
                          endpoint = `/api/3/deals/${dealId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const dealId = this.getNodeParameter('dealId', i);
                          endpoint = `/api/3/deals/${dealId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'deals';
                          }
                          endpoint = '/api/3/deals';
                      }
                      else if (operation === 'createNote') {
                          requestMethod = 'POST';
                          body.note = {
                              note: this.getNodeParameter('dealNote', i),
                          };
                          const dealId = this.getNodeParameter('dealId', i);
                          endpoint = `/api/3/deals/${dealId}/notes`;
                      }
                      else if (operation === 'updateNote') {
                          requestMethod = 'PUT';
                          body.note = {
                              note: this.getNodeParameter('dealNote', i),
                          };
                          const dealId = this.getNodeParameter('dealId', i);
                          const dealNoteId = this.getNodeParameter('dealNoteId', i);
                          endpoint = `/api/3/deals/${dealId}/notes/${dealNoteId}`;
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'connection') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/connections';
                          body.connection = {
                              service: this.getNodeParameter('service', i),
                              externalid: this.getNodeParameter('externalid', i),
                              name: this.getNodeParameter('name', i),
                              logoUrl: this.getNodeParameter('logoUrl', i),
                              linkUrl: this.getNodeParameter('linkUrl', i),
                          };
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const connectionId = this.getNodeParameter('connectionId', i);
                          endpoint = `/api/3/connections/${connectionId}`;
                          body.connection = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.connection, updateFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const connectionId = this.getNodeParameter('connectionId', i);
                          endpoint = `/api/3/connections/${connectionId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const connectionId = this.getNodeParameter('connectionId', i);
                          endpoint = `/api/3/connections/${connectionId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'connections';
                          }
                          endpoint = '/api/3/connections';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'ecommerceOrder') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/ecomOrders';
                          body.ecomOrder = {
                              source: this.getNodeParameter('source', i),
                              email: this.getNodeParameter('email', i),
                              totalPrice: this.getNodeParameter('totalPrice', i),
                              currency: this.getNodeParameter('currency', i).toString().toUpperCase(),
                              externalCreatedDate: this.getNodeParameter('externalCreatedDate', i),
                              connectionid: this.getNodeParameter('connectionid', i),
                              customerid: this.getNodeParameter('customerid', i),
                          };
                          const externalid = this.getNodeParameter('externalid', i);
                          if (externalid !== '') {
                              addAdditionalFields(body.ecomOrder, { externalid });
                          }
                          const externalcheckoutid = this.getNodeParameter('externalcheckoutid', i);
                          if (externalcheckoutid !== '') {
                              addAdditionalFields(body.ecomOrder, { externalcheckoutid });
                          }
                          const abandonedDate = this.getNodeParameter('abandonedDate', i);
                          if (abandonedDate !== '') {
                              addAdditionalFields(body.ecomOrder, { abandonedDate });
                          }
                          const orderProducts = this.getNodeParameter('orderProducts', i);
                          addAdditionalFields(body.ecomOrder, { orderProducts });
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          addAdditionalFields(body.ecomOrder, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const orderId = this.getNodeParameter('orderId', i);
                          endpoint = `/api/3/ecomOrders/${orderId}`;
                          body.ecomOrder = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          addAdditionalFields(body.ecomOrder, updateFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const orderId = this.getNodeParameter('orderId', i);
                          endpoint = `/api/3/ecomOrders/${orderId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const orderId = this.getNodeParameter('orderId', i);
                          endpoint = `/api/3/ecomOrders/${orderId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'ecomOrders';
                          }
                          endpoint = '/api/3/ecomOrders';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'ecommerceCustomer') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/api/3/ecomCustomers';
                          body.ecomCustomer = {
                              connectionid: this.getNodeParameter('connectionid', i),
                              externalid: this.getNodeParameter('externalid', i),
                              email: this.getNodeParameter('email', i),
                          };
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          if (additionalFields.acceptsMarketing !== undefined) {
                              if (additionalFields.acceptsMarketing === true) {
                                  additionalFields.acceptsMarketing = '1';
                              }
                              else {
                                  additionalFields.acceptsMarketing = '0';
                              }
                          }
                          addAdditionalFields(body.ecomCustomer, additionalFields);
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          const ecommerceCustomerId = this.getNodeParameter('ecommerceCustomerId', i);
                          endpoint = `/api/3/ecomCustomers/${ecommerceCustomerId}`;
                          body.ecomCustomer = {};
                          const updateFields = this.getNodeParameter('updateFields', i);
                          if (updateFields.acceptsMarketing !== undefined) {
                              if (updateFields.acceptsMarketing === true) {
                                  updateFields.acceptsMarketing = '1';
                              }
                              else {
                                  updateFields.acceptsMarketing = '0';
                              }
                          }
                          addAdditionalFields(body.ecomCustomer, updateFields);
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          const ecommerceCustomerId = this.getNodeParameter('ecommerceCustomerId', i);
                          endpoint = `/api/3/ecomCustomers/${ecommerceCustomerId}`;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          const ecommerceCustomerId = this.getNodeParameter('ecommerceCustomerId', i);
                          endpoint = `/api/3/ecomCustomers/${ecommerceCustomerId}`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'ecomCustomers';
                          }
                          endpoint = '/api/3/ecomCustomers';
                      }
                      else {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known`, { itemIndex: i });
                      }
                  }
                  else if (resource === 'ecommerceOrderProducts') {
                      if (operation === 'getByProductId') {
                          requestMethod = 'GET';
                          const procuctId = this.getNodeParameter('procuctId', i);
                          endpoint = `/api/3/ecomOrderProducts/${procuctId}`;
                      }
                      else if (operation === 'getByOrderId') {
                          requestMethod = 'GET';
                          const orderId = this.getNodeParameter('orderId', i);
                          endpoint = `/api/3/ecomOrders/${orderId}/orderProducts`;
                      }
                      else if (operation === 'getAll') {
                          requestMethod = 'GET';
                          const simple = this.getNodeParameter('simple', i, true);
                          returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          if (simple) {
                              dataKey = 'ecomOrderProducts';
                          }
                          endpoint = '/api/3/ecomOrderProducts';
                      }
                      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,
                      });
                  }
                  let responseData;
                  if (returnAll) {
                      responseData = await GenericFunctions_1.activeCampaignApiRequestAllItems.call(this, requestMethod, endpoint, body, qs, dataKey);
                  }
                  else {
                      responseData = await GenericFunctions_1.activeCampaignApiRequest.call(this, requestMethod, endpoint, body, qs, dataKey);
                  }
                  if (resource === 'contactList' && operation === 'add' && responseData === undefined) {
                      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.ActiveCampaign = ActiveCampaign;
  //# sourceMappingURL=ActiveCampaign.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActiveCampaignApi = void 0;
  class ActiveCampaignApi {
      constructor() {
          this.name = 'activeCampaignApi';
          this.displayName = 'ActiveCampaign API';
          this.documentationUrl = 'activeCampaign';
          this.properties = [
              {
                  displayName: 'API URL',
                  name: 'apiUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'Api-Token': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.apiUrl}}',
                  url: '/api/3/fields',
              },
          };
      }
  }
  exports.ActiveCampaignApi = ActiveCampaignApi;
  //# sourceMappingURL=ActiveCampaignApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ActiveCampaignApi = void 0;
  class ActiveCampaignApi {
      constructor() {
          this.name = 'activeCampaignApi';
          this.displayName = 'ActiveCampaign API';
          this.documentationUrl = 'activeCampaign';
          this.properties = [
              {
                  displayName: 'API URL',
                  name: 'apiUrl',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      'Api-Token': '={{$credentials.apiKey}}',
                  },
              },
          };
          this.test = {
              request: {
                  baseURL: '={{$credentials.apiUrl}}',
                  url: '/api/3/fields',
              },
          };
      }
  }
  exports.ActiveCampaignApi = ActiveCampaignApi;
  //# sourceMappingURL=ActiveCampaignApi.credentials.js.map

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

  # ActiveCampaign node

  Use the ActiveCampaign node to automate work in ActiveCampaign, and integrate ActiveCampaign with other applications. n8n has built-in support for a wide range of ActiveCampaign features, including creating, getting, updating, and deleting accounts, contact, orders, e-commerce customers, connections, lists, tags, and deals.

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

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

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

  ## Operations

  * Account
      * Create an account
      * Delete an account
      * Get data of an account
      * Get data of all accounts
      * Update an account
  * Account Contact
      * Create an association
      * Delete an association
      * Update an association
  * Contact
      * Create a contact
      * Delete a contact
      * Get data of a contact
      * Get data of all contact
      * Update a contact
  * Contact List
      * Add contact to a list
      * Remove contact from a list
  * Contact Tag
      * Add a tag to a contact
      * Remove a tag from a contact
  * Connection
      * Create a connection
      * Delete a connection
      * Get data of a connection
      * Get data of all connections
      * Update a connection
  * Deal
      * Create a deal
      * Delete a deal
      * Get data of a deal
      * Get data of all deals
      * Update a deal
      * Create a deal note
      * Update a deal note
  * E-commerce Order
      * Create a order
      * Delete a order
      * Get data of a order
      * Get data of all orders
      * Update a order
  * E-Commerce Customer
      * Create a E-commerce Customer
      * Delete a E-commerce Customer
      * Get data of a E-commerce Customer
      * Get data of all E-commerce Customer
      * Update a E-commerce Customer
  * E-commerce Order Products
      * Get data of all order products
      * Get data of a ordered product
      * Get data of an order's products
  * List
      * Get all lists
  * Tag
      * Create a tag
      * Delete a tag
      * Get data of a tag
      * Get data of all tags
      * Update a tag

  ## Templates and examples

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

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"contact","options":[{"name":"Account","value":"account"},{"name":"Account Contact","value":"accountContact"},{"name":"Connection","value":"connection"},{"name":"Contact","value":"contact"},{"name":"Contact List","value":"contactList"},{"name":"Contact Tag","value":"contactTag"},{"name":"Deal","value":"deal"},{"name":"E-Commerce Customer","value":"ecommerceCustomer"},{"name":"E-Commerce Order","value":"ecommerceOrder"},{"name":"E-Commerce Order Product","value":"ecommerceOrderProducts"},{"name":"List","value":"list"},{"name":"Tag","value":"tag"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AccountDescription_1.accountOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AccountContactDescription_1.accountContactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactListDescription_1.contactListOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactTagDescription_1.contactTagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TagDescription_1.tagOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DealDescription_1.dealOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ConnectionDescription_1.connectionOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomOrderDescription_1.ecomOrderOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomCustomerDescription_1.ecomCustomerOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomOrderProductsDescription_1.ecomOrderProductsOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...TagDescription_1.tagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactTagDescription_1.contactTagFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactListDescription_1.contactListFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AccountDescription_1.accountFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...AccountContactDescription_1.accountContactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...DealDescription_1.dealFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ConnectionDescription_1.connectionFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomOrderDescription_1.ecomOrderFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomCustomerDescription_1.ecomCustomerFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...EcomOrderProductsDescription_1.ecomOrderProductsFields"}]


node_type: n8n-nodes-base.Adalo
name: Adalo
display_name: Adalo
description: Consume Adalo API
category: transform
icon: file:adalo.svg
code_hash: 0fbcb0b60141307fdc3394154af1b2c3133fa6181aac336249c6c211fd24846f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Adalo
documentation_title: Adalo node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"adalo","description":"Templates for adalo"}]
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Adalo = void 0;
  const CollectionDescription_1 = require("./CollectionDescription");
  class Adalo {
      constructor() {
          this.description = {
              displayName: 'Adalo',
              name: 'adalo',
              icon: 'file:adalo.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["collectionId"]}}',
              description: 'Consume Adalo API',
              defaults: {
                  name: 'Adalo',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'adaloApi',
                      required: true,
                  },
              ],
              requestDefaults: {
                  baseURL: '=https://api.adalo.com/v0/apps/{{$credentials.appId}}',
              },
              requestOperations: {
                  pagination: {
                      type: 'offset',
                      properties: {
                          limitParameter: 'limit',
                          offsetParameter: 'offset',
                          pageSize: 100,
                          type: 'query',
                      },
                  },
              },
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      default: 'collection',
                      options: [
                          {
                              name: 'Collection',
                              value: 'collection',
                          },
                      ],
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a row',
                              routing: {
                                  send: {
                                      preSend: [this.presendCreateUpdate],
                                  },
                                  request: {
                                      method: 'POST',
                                      url: '=/collections/{{$parameter["collectionId"]}}',
                                  },
                              },
                              action: 'Create a row',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a row',
                              routing: {
                                  request: {
                                      method: 'DELETE',
                                      url: '=/collections/{{$parameter["collectionId"]}}/{{$parameter["rowId"]}}',
                                  },
                                  output: {
                                      postReceive: [
                                          {
                                              type: 'set',
                                              properties: {
                                                  value: '={{ { "success": true } }}',
                                              },
                                          },
                                      ],
                                  },
                              },
                              action: 'Delete a row',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve a row',
                              routing: {
                                  request: {
                                      method: 'GET',
                                      url: '=/collections/{{$parameter["collectionId"]}}/{{$parameter["rowId"]}}',
                                  },
                              },
                              action: 'Retrieve a row',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Retrieve many rows',
                              routing: {
                                  request: {
                                      method: 'GET',
                                      url: '=/collections/{{$parameter["collectionId"]}}',
                                      qs: {
                                          limit: '={{$parameter["limit"]}}',
                                      },
                                  },
                                  send: {
                                      paginate: '={{$parameter["returnAll"]}}',
                                  },
                                  output: {
                                      postReceive: [
                                          {
                                              type: 'rootProperty',
                                              properties: {
                                                  property: 'records',
                                              },
                                          },
                                      ],
                                  },
                              },
                              action: 'Retrieve all rows',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a row',
                              routing: {
                                  send: {
                                      preSend: [this.presendCreateUpdate],
                                  },
                                  request: {
                                      method: 'PUT',
                                      url: '=/collections/{{$parameter["collectionId"]}}/{{$parameter["rowId"]}}',
                                  },
                              },
                              action: 'Update a row',
                          },
                      ],
                      default: 'getAll',
                  },
                  {
                      displayName: 'Collection ID',
                      name: 'collectionId',
                      type: 'string',
                      required: true,
                      default: '',
                      description: 'Open your Adalo application and click on the three buttons beside the collection name, then select API Documentation',
                      hint: "You can find information about app's collections on https://app.adalo.com/apps/<strong>your-app-id</strong>/api-docs",
                      displayOptions: {
                          show: {
                              resource: ['collection'],
                          },
                      },
                  },
                  ...CollectionDescription_1.collectionFields,
              ],
          };
      }
      async presendCreateUpdate(requestOptions) {
          const dataToSend = this.getNodeParameter('dataToSend', 0);
          requestOptions.body = {};
          if (dataToSend === 'autoMapInputData') {
              const inputData = this.getInputData();
              const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore');
              const inputKeysToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
              const inputKeys = Object.keys(inputData.json).filter((key) => !inputKeysToIgnore.includes(key));
              for (const key of inputKeys) {
                  requestOptions.body[key] = inputData.json[key];
              }
          }
          else {
              const fields = this.getNodeParameter('fieldsUi.fieldValues');
              for (const field of fields) {
                  requestOptions.body[field.fieldId] = field.fieldValue;
              }
          }
          return requestOptions;
      }
  }
  exports.Adalo = Adalo;
  //# sourceMappingURL=Adalo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AdaloApi = void 0;
  class AdaloApi {
      constructor() {
          this.name = 'adaloApi';
          this.displayName = 'Adalo API';
          this.documentationUrl = 'adalo';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The Adalo API is available on paid Adalo plans, find more information <a href="https://help.adalo.com/integrations/the-adalo-api" target="_blank">here</a>',
              },
              {
                  displayName: 'App ID',
                  name: 'appId',
                  type: 'string',
                  default: '',
                  description: 'You can get App ID from the URL of your app. For example, if your app URL is <strong>https://app.adalo.com/apps/1234567890/screens</strong>, then your App ID is <strong>1234567890</strong>.',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.AdaloApi = AdaloApi;
  //# sourceMappingURL=AdaloApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AdaloApi = void 0;
  class AdaloApi {
      constructor() {
          this.name = 'adaloApi';
          this.displayName = 'Adalo API';
          this.documentationUrl = 'adalo';
          this.properties = [
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
                  description: 'The Adalo API is available on paid Adalo plans, find more information <a href="https://help.adalo.com/integrations/the-adalo-api" target="_blank">here</a>',
              },
              {
                  displayName: 'App ID',
                  name: 'appId',
                  type: 'string',
                  default: '',
                  description: 'You can get App ID from the URL of your app. For example, if your app URL is <strong>https://app.adalo.com/apps/1234567890/screens</strong>, then your App ID is <strong>1234567890</strong>.',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.AdaloApi = AdaloApi;
  //# sourceMappingURL=AdaloApi.credentials.js.map

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

  # Adalo node

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

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

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

  ## Operations

  * Collection
  	* Create
  	* Delete
  	* Get
  	* Get Many
  	* Update

  ## Templates and examples

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

  ## Related resources

  Refer to [Adalo's documentation](https://help.adalo.com/){:target=_blank .external-link} for more information on using Adalo. Their [External Collections with APIs](https://help.adalo.com/integrations/external-collections-with-apis){:target=_blank .external-link} page gives more detail about what you can do with Adalo collections.

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

related_resources:
  [{"title":"Adalo's documentation","url":"https://help.adalo.com/","type":"external"},{"title":"External Collections with APIs","url":"https://help.adalo.com/integrations/external-collections-with-apis","type":"external"}]

example_workflow:
  {"name":"Adalo Example Workflow","nodes":[{"parameters":{"resource":"collection","operation":"create","collectionId":"example-value","dynamic_property":null},"id":"gls1pd2ql3vancl4pmj41","name":"Adalo","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"collection","operation":"create","collectionId":"example-value","dynamic_property":null}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"collection","options":[{"name":"Collection","value":"collection"}]},{"displayName":"Operation","name":"operation","type":"options","default":"getAll","description":"Create a row","options":[{"name":"Create","value":"create","description":"Create a row"}]},{"displayName":"Collection ID","name":"collectionId","type":"string","default":"","required":true,"description":"Open your Adalo application and click on the three buttons beside the collection name, then select API Documentation"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CollectionDescription_1.collectionFields"}]


node_type: n8n-nodes-base.Airtable
name: Airtable
display_name: Airtable
description: Read, update, write and delete data from Airtable
category: input
icon: file:airtable.svg
code_hash: 2d67e72931697178946f5127b43e954649c4c5e7ad9e29764796404ae96e7db5
example_parameters: {}
properties_schema: []
package_name: n8n-nodes-base
extracted_at: 2025-06-12 08:58:14
updated_at: 2025-06-12 08:58:14
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Airtable = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const AirtableV1_node_1 = require("./v1/AirtableV1.node");
  const AirtableV2_node_1 = require("./v2/AirtableV2.node");
  class Airtable extends n8n_workflow_1.VersionedNodeType {
      constructor() {
          const baseDescription = {
              displayName: 'Airtable',
              name: 'airtable',
              icon: 'file:airtable.svg',
              group: ['input'],
              description: 'Read, update, write and delete data from Airtable',
              defaultVersion: 2,
          };
          const nodeVersions = {
              1: new AirtableV1_node_1.AirtableV1(baseDescription),
              2: new AirtableV2_node_1.AirtableV2(baseDescription),
          };
          super(nodeVersions, baseDescription);
      }
  }
  exports.Airtable = Airtable;
  //# sourceMappingURL=Airtable.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AirtableApi = void 0;
  class AirtableApi {
      constructor() {
          this.name = 'airtableApi';
          this.displayName = 'Airtable API';
          this.documentationUrl = 'airtable';
          this.properties = [
              {
                  displayName: 'API Keys will be deprecated by the end of January 2024, see <a href="https://support.airtable.com/docs/airtable-api-key-deprecation-notice" target="_blank">this article</a> for more details. We recommend to use Personal Access Token instead.',
                  name: 'deprecated',
                  type: 'notice',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  qs: {
                      api_key: '={{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.AirtableApi = AirtableApi;
  //# sourceMappingURL=AirtableApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AirtableOAuth2Api = void 0;
  const scopes = ['schema.bases:read', 'data.records:read', 'data.records:write'];
  class AirtableOAuth2Api {
      constructor() {
          this.name = 'airtableOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Airtable OAuth2 API';
          this.documentationUrl = 'airtable';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'pkce',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://airtable.com/oauth2/v1/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://airtable.com/oauth2/v1/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: `${scopes.join(' ')}`,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.AirtableOAuth2Api = AirtableOAuth2Api;
  //# sourceMappingURL=AirtableOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AirtableApi = void 0;
  class AirtableApi {
      constructor() {
          this.name = 'airtableApi';
          this.displayName = 'Airtable API';
          this.documentationUrl = 'airtable';
          this.properties = [
              {
                  displayName: 'API Keys will be deprecated by the end of January 2024, see <a href="https://support.airtable.com/docs/airtable-api-key-deprecation-notice" target="_blank">this article</a> for more details. We recommend to use Personal Access Token instead.',
                  name: 'deprecated',
                  type: 'notice',
                  default: '',
              },
              {
                  displayName: 'API Key',
                  name: 'apiKey',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  qs: {
                      api_key: '={{$credentials.apiKey}}',
                  },
              },
          };
      }
  }
  exports.AirtableApi = AirtableApi;
  //# sourceMappingURL=AirtableApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AirtableOAuth2Api = void 0;
  const scopes = ['schema.bases:read', 'data.records:read', 'data.records:write'];
  class AirtableOAuth2Api {
      constructor() {
          this.name = 'airtableOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Airtable OAuth2 API';
          this.documentationUrl = 'airtable';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'pkce',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://airtable.com/oauth2/v1/authorize',
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://airtable.com/oauth2/v1/token',
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: `${scopes.join(' ')}`,
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'header',
              },
          ];
      }
  }
  exports.AirtableOAuth2Api = AirtableOAuth2Api;
  //# sourceMappingURL=AirtableOAuth2Api.credentials.js.map

workflow_examples:
  [{"name":"chapter-5.2","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"<YOUR_UNIQUE_ID_HERE>"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[340,-680],"id":"ada6becf-c320-41a7-bdca-a842ea3ee769","name":"HTTP Request1","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblo2KuMyn5X4jU0s","mode":"list","cachedResultName":"orders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"customerID","displayName":"customerID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false},{"id":"orderPrice","displayName":"orderPrice","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"orderStatus","displayName":"orderStatus","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[560,-680],"id":"5e60ca72-d773-439c-b39a-4b14c54f795b","name":"Airtable1","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[140,-680],"id":"ffa1a8ce-1a1e-48c4-8a0d-6af28c0447a5","name":"When clicking ‘Execute workflow’"}],"connections":{"HTTP Request1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblo2KuMyn5X4jU0s","mode":"list","cachedResultName":"orders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"customerID","displayName":"customerID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false},{"id":"orderPrice","displayName":"orderPrice","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"orderStatus","displayName":"orderStatus","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[560,-680]}],"connections":{"HTTP Request1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/chapter-5/chapter-5.2.json","description":"Workflow example from docs/_workflows/courses/level-one/chapter-5/chapter-5.2.json"},{"name":"chapter-5.3","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"<YOUR_UNIQUE_ID_HERE>"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[340,-680],"id":"ada6becf-c320-41a7-bdca-a842ea3ee769","name":"HTTP Request1","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblo2KuMyn5X4jU0s","mode":"list","cachedResultName":"orders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"customerID","displayName":"customerID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false},{"id":"orderPrice","displayName":"orderPrice","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"orderStatus","displayName":"orderStatus","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[800,-680],"id":"5e60ca72-d773-439c-b39a-4b14c54f795b","name":"Airtable1","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"526cb30c-0f90-4f66-8f98-b64ceb2e52f2","leftValue":"={{ $json.orderStatus }}","rightValue":"processing","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[540,-680],"id":"70e4db65-f827-4e4f-8673-b405b7986d6e","name":"If1"},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[140,-680],"id":"ffa1a8ce-1a1e-48c4-8a0d-6af28c0447a5","name":"When clicking ‘Execute workflow’"}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Airtable1","type":"main","index":0}],[]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblo2KuMyn5X4jU0s","mode":"list","cachedResultName":"orders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"customerID","displayName":"customerID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false},{"id":"orderPrice","displayName":"orderPrice","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"orderStatus","displayName":"orderStatus","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[800,-680]}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Airtable1","type":"main","index":0}],[]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/chapter-5/chapter-5.3.json","description":"Workflow example from docs/_workflows/courses/level-one/chapter-5/chapter-5.3.json"},{"name":"chapter-5.4","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"<YOUR_UNIQUE_ID_HERE>"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[300,-520],"id":"ada6becf-c320-41a7-bdca-a842ea3ee769","name":"HTTP Request1","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[1020,-600],"id":"5e60ca72-d773-439c-b39a-4b14c54f795b","name":"Airtable1","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"526cb30c-0f90-4f66-8f98-b64ceb2e52f2","leftValue":"={{ $json.orderStatus }}","rightValue":"processing","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[520,-520],"id":"70e4db65-f827-4e4f-8673-b405b7986d6e","name":"If1"},{"parameters":{"assignments":{"assignments":[{"id":"20d37948-763a-4d7b-b725-e65f3802af03","name":"orderID","value":"={{ $json.orderID }}","type":"number"},{"id":"9df108a7-6b13-42ab-a6dd-9ca582ba8b49","name":"employeeName","value":"={{ $json.employeeName }}","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[800,-600],"id":"a3d3dc53-32f1-4f44-bf95-50bc5450d601","name":"Edit Fields1"},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[80,-520],"id":"ffa1a8ce-1a1e-48c4-8a0d-6af28c0447a5","name":"When clicking ‘Execute workflow’"}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[1020,-600]}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/chapter-5/chapter-5.4.json","description":"Workflow example from docs/_workflows/courses/level-one/chapter-5/chapter-5.4.json"},{"name":"chapter-5.5","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"<YOUR_UNIQUE_ID_HERE>"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[300,-520],"id":"ada6becf-c320-41a7-bdca-a842ea3ee769","name":"HTTP Request1","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[1020,-600],"id":"5e60ca72-d773-439c-b39a-4b14c54f795b","name":"Airtable1","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"526cb30c-0f90-4f66-8f98-b64ceb2e52f2","leftValue":"={{ $json.orderStatus }}","rightValue":"processing","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[520,-520],"id":"70e4db65-f827-4e4f-8673-b405b7986d6e","name":"If1"},{"parameters":{"assignments":{"assignments":[{"id":"20d37948-763a-4d7b-b725-e65f3802af03","name":"orderID","value":"={{ $json.orderID }}","type":"number"},{"id":"9df108a7-6b13-42ab-a6dd-9ca582ba8b49","name":"employeeName","value":"={{ $json.employeeName }}","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[800,-600],"id":"a3d3dc53-32f1-4f44-bf95-50bc5450d601","name":"Edit Fields1"},{"parameters":{"jsCode":"let items = $input.all();\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor (let i=0; i < items.length; i++) {\n  bookedSum = bookedSum + items[i].json.orderPrice;\n}\n\nreturn [{ json: {totalBooked, bookedSum} }];"},"type":"n8n-nodes-base.code","typeVersion":2,"position":[760,-420],"id":"d24ea5e9-c9e6-4d06-b6ee-8db1abd42bc0","name":"Code1"},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[80,-520],"id":"ffa1a8ce-1a1e-48c4-8a0d-6af28c0447a5","name":"When clicking ‘Execute workflow’"}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[{"node":"Code1","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"Code1":{"main":[[]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[1020,-600]}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[{"node":"Code1","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"Code1":{"main":[[]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/chapter-5/chapter-5.5.json","description":"Workflow example from docs/_workflows/courses/level-one/chapter-5/chapter-5.5.json"},{"name":"chapter-5.6","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"<YOUR_UNIQUE_ID_HERE>"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[300,-520],"id":"ada6becf-c320-41a7-bdca-a842ea3ee769","name":"HTTP Request1","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[1020,-600],"id":"5e60ca72-d773-439c-b39a-4b14c54f795b","name":"Airtable1","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"526cb30c-0f90-4f66-8f98-b64ceb2e52f2","leftValue":"={{ $json.orderStatus }}","rightValue":"processing","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[520,-520],"id":"70e4db65-f827-4e4f-8673-b405b7986d6e","name":"If1"},{"parameters":{"assignments":{"assignments":[{"id":"20d37948-763a-4d7b-b725-e65f3802af03","name":"orderID","value":"={{ $json.orderID }}","type":"number"},{"id":"9df108a7-6b13-42ab-a6dd-9ca582ba8b49","name":"employeeName","value":"={{ $json.employeeName }}","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[800,-600],"id":"a3d3dc53-32f1-4f44-bf95-50bc5450d601","name":"Edit Fields1"},{"parameters":{"jsCode":"let items = $input.all();\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor (let i=0; i < items.length; i++) {\n  bookedSum = bookedSum + items[i].json.orderPrice;\n}\n\nreturn [{ json: {totalBooked, bookedSum} }];"},"type":"n8n-nodes-base.code","typeVersion":2,"position":[760,-420],"id":"d24ea5e9-c9e6-4d06-b6ee-8db1abd42bc0","name":"Code1"},{"parameters":{"authentication":"webhook","content":"=This week we've {{$json[\"totalBooked\"]}} booked orders with a total value of {{$json[\"bookedSum\"]}}. My Unique ID: {{ $('HTTP Request1').params[\"headerParameters\"][\"parameters\"][0][\"value\"] }}","options":{}},"type":"n8n-nodes-base.discord","typeVersion":2,"position":[1000,-420],"id":"ed380465-c655-4c38-8eb3-2008b9e7869f","name":"Discord1","webhookId":"eff0b651-f0be-4cae-8f18-7d831385be3c","credentials":{"discordWebhookApi":{"id":"lOieo0mIb6h1Wi9R","name":"Discord Webhook account"}}},{"parameters":{},"type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[80,-520],"id":"ffa1a8ce-1a1e-48c4-8a0d-6af28c0447a5","name":"When clicking ‘Execute workflow’"}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[{"node":"Code1","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"Code1":{"main":[[{"node":"Discord1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[1020,-600]}],"connections":{"HTTP Request1":{"main":[[{"node":"If1","type":"main","index":0}]]},"If1":{"main":[[{"node":"Edit Fields1","type":"main","index":0}],[{"node":"Code1","type":"main","index":0}]]},"Edit Fields1":{"main":[[{"node":"Airtable1","type":"main","index":0}]]},"Code1":{"main":[[{"node":"Discord1","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"HTTP Request1","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/chapter-5/chapter-5.6.json","description":"Workflow example from docs/_workflows/courses/level-one/chapter-5/chapter-5.6.json"},{"name":"finished","workflow":{"nodes":[{"parameters":{"url":"https://internal.users.n8n.cloud/webhook/custom-erp","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","sendHeaders":true,"headerParameters":{"parameters":[{"name":"unique_id","value":"4d259ec5241587a0d2820670fc048f0d"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[220,-40],"id":"e1fb70b3-0212-4e78-9976-cb77c69f1a92","name":"HTTP Request","credentials":{"httpHeaderAuth":{"id":"sMuanZ4xGobAurzY","name":"Nathan's ABCorp data warehouse account"}}},{"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"type":"n8n-nodes-base.airtable","typeVersion":2.1,"position":[880,-140],"id":"5cef2ef7-98a6-4dc6-bc30-667eba06fd7b","name":"Airtable","credentials":{"airtableTokenApi":{"id":"UT32NHUYnp4pn1H3","name":"Airtable Personal Access Token account"}}},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"526cb30c-0f90-4f66-8f98-b64ceb2e52f2","leftValue":"={{ $json.orderStatus }}","rightValue":"processing","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[440,-40],"id":"448b2e3c-569d-42e6-a4b9-57c08b2cac1a","name":"If"},{"parameters":{"assignments":{"assignments":[{"id":"20d37948-763a-4d7b-b725-e65f3802af03","name":"orderID","value":"={{ $json.orderID }}","type":"number"},{"id":"9df108a7-6b13-42ab-a6dd-9ca582ba8b49","name":"employeeName","value":"={{ $json.employeeName }}","type":"string"}]},"options":{}},"type":"n8n-nodes-base.set","typeVersion":3.4,"position":[660,-140],"id":"7e2a8092-fb0f-4260-84e8-d796cf14d309","name":"Edit Fields"},{"parameters":{"jsCode":"let items = $input.all();\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor (let i=0; i < items.length; i++) {\n  bookedSum = bookedSum + items[i].json.orderPrice;\n}\n\nreturn [{ json: {totalBooked, bookedSum} }];"},"type":"n8n-nodes-base.code","typeVersion":2,"position":[660,60],"id":"26ce1d53-794b-4457-9aa8-0ecf9093b838","name":"Code"},{"parameters":{"authentication":"webhook","content":"=This week we've {{$json[\"totalBooked\"]}} booked orders with a total value of {{$json[\"bookedSum\"]}}. My Unique ID: {{ $('HTTP Request').params[\"headerParameters\"][\"parameters\"][0][\"value\"] }}","options":{}},"type":"n8n-nodes-base.discord","typeVersion":2,"position":[880,60],"id":"d8c0b4b6-3bf1-4055-a03f-f0023337777c","name":"Discord","webhookId":"eff0b651-f0be-4cae-8f18-7d831385be3c","credentials":{"discordWebhookApi":{"id":"lOieo0mIb6h1Wi9R","name":"Discord Webhook account"}}},{"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtDay":[1],"triggerAtHour":9}]}},"type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[0,-40],"id":"15f0b179-6a43-483b-a522-2b8ba834b795","name":"Schedule Trigger"}],"connections":{"HTTP Request":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"Edit Fields","type":"main","index":0}],[{"node":"Code","type":"main","index":0}]]},"Edit Fields":{"main":[[{"node":"Airtable","type":"main","index":0}]]},"Code":{"main":[[{"node":"Discord","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]}},"pinData":{},"meta":{"templateCredsSetupCompleted":true,"instanceId":"24789c4d5aa56ca018d140332e7a43fd37dd7af0409453314fff12dc1aeebfa8"}},"nodeConfigurations":[{"nodeType":"n8n-nodes-base.airtable","version":2.1,"parameters":{"operation":"create","base":{"__rl":true,"value":"app9nOVsRxdypoknP","mode":"list","cachedResultName":"beginner course"},"table":{"__rl":true,"value":"tblTIOsm4BLJD9Tql","mode":"list","cachedResultName":"processingOrders"},"columns":{"mappingMode":"autoMapInputData","value":{},"matchingColumns":[],"schema":[{"id":"orderID","displayName":"orderID","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"number","readOnly":false,"removed":false},{"id":"employeeName","displayName":"employeeName","required":false,"defaultMatch":false,"canBeUsedToMatch":true,"display":true,"type":"string","readOnly":false,"removed":false}],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{}},"position":[880,-140]}],"connections":{"HTTP Request":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"Edit Fields","type":"main","index":0}],[{"node":"Code","type":"main","index":0}]]},"Edit Fields":{"main":[[{"node":"Airtable","type":"main","index":0}]]},"Code":{"main":[[{"node":"Discord","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]}},"source":"docs/_workflows/courses/level-one/finished.json","description":"Workflow example from docs/_workflows/courses/level-one/finished.json"}]

node_connections:
  [{"fromNode":"HTTP Request1","toNode":"Airtable1","connectionType":"main"},{"fromNode":"When clicking ‘Execute workflow’","toNode":"HTTP Request1","connectionType":"main"},{"fromNode":"HTTP Request1","toNode":"If1","connectionType":"main"},{"fromNode":"If1","toNode":"Airtable1","connectionType":"main"},{"fromNode":"If1","toNode":"Edit Fields1","connectionType":"main"},{"fromNode":"Edit Fields1","toNode":"Airtable1","connectionType":"main"},{"fromNode":"If1","toNode":"Code1","connectionType":"main"},{"fromNode":"Code1","toNode":"Discord1","connectionType":"main"},{"fromNode":"HTTP Request","toNode":"If","connectionType":"main"},{"fromNode":"If","toNode":"Edit Fields","connectionType":"main"},{"fromNode":"If","toNode":"Code","connectionType":"main"},{"fromNode":"Edit Fields","toNode":"Airtable","connectionType":"main"},{"fromNode":"Code","toNode":"Discord","connectionType":"main"},{"fromNode":"Schedule Trigger","toNode":"HTTP Request","connectionType":"main"}]

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


node_type: n8n-nodes-base.Amqp
name: Amqp
display_name: AMQP Sender
description: Sends a raw-message via AMQP 1.0, executed once per item
category: transform
icon: file:amqp.png
code_hash: 5956b506c6a83fd759bfa78fcfde966ff2241da9d3677bd8139794ce6a9407fd
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Amqp
documentation_title: AMQP Sender node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"amqp-sender","description":"Templates for amqp-sender"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"sink":"example-value","headerParametersJson":null,"options":{}}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:15
updated_at: 2025-06-12 08:58:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Amqp = void 0;
  const rhea_1 = require("rhea");
  const n8n_workflow_1 = require("n8n-workflow");
  class Amqp {
      constructor() {
          this.description = {
              displayName: 'AMQP Sender',
              name: 'amqp',
              icon: 'file:amqp.png',
              group: ['transform'],
              version: 1,
              description: 'Sends a raw-message via AMQP 1.0, executed once per item',
              defaults: {
                  name: 'AMQP Sender',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'amqp',
                      required: true,
                      testedBy: 'amqpConnectionTest',
                  },
              ],
              properties: [
                  {
                      displayName: 'Queue / Topic',
                      name: 'sink',
                      type: 'string',
                      default: '',
                      placeholder: 'topic://sourcename.something',
                      description: 'Name of the queue of topic to publish to',
                  },
                  {
                      displayName: 'Headers',
                      name: 'headerParametersJson',
                      type: 'json',
                      default: '',
                      description: 'Header parameters as JSON (flat object). Sent as application_properties in amqp-message meta info.',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Option',
                      default: {},
                      options: [
                          {
                              displayName: 'Container ID',
                              name: 'containerId',
                              type: 'string',
                              default: '',
                              description: 'Will be used to pass to the RHEA Backend as container_id',
                          },
                          {
                              displayName: 'Data as Object',
                              name: 'dataAsObject',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to send the data as an object',
                          },
                          {
                              displayName: 'Reconnect',
                              name: 'reconnect',
                              type: 'boolean',
                              default: true,
                              description: 'Whether to automatically reconnect if disconnected',
                          },
                          {
                              displayName: 'Reconnect Limit',
                              name: 'reconnectLimit',
                              type: 'number',
                              default: 50,
                              description: 'Maximum number of reconnect attempts',
                          },
                          {
                              displayName: 'Send Property',
                              name: 'sendOnlyProperty',
                              type: 'string',
                              default: '',
                              description: 'The only property to send. If empty the whole item will be sent.',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              credentialTest: {
                  async amqpConnectionTest(credential) {
                      const credentials = credential.data;
                      const connectOptions = {
                          reconnect: false,
                          host: credentials.hostname,
                          hostname: credentials.hostname,
                          port: credentials.port,
                          username: credentials.username ? credentials.username : undefined,
                          password: credentials.password ? credentials.password : undefined,
                          transport: credentials.transportType ? credentials.transportType : undefined,
                      };
                      let conn = undefined;
                      try {
                          const container = (0, rhea_1.create_container)();
                          await new Promise((resolve, reject) => {
                              container.on('connection_open', function (_contex) {
                                  resolve();
                              });
                              container.on('disconnected', function (context) {
                                  var _a;
                                  reject((_a = context.error) !== null && _a !== void 0 ? _a : new Error('unknown error'));
                              });
                              conn = container.connect(connectOptions);
                          });
                      }
                      catch (error) {
                          return {
                              status: 'Error',
                              message: error.message,
                          };
                      }
                      finally {
                          if (conn)
                              conn.close();
                      }
                      return {
                          status: 'OK',
                          message: 'Connection successful!',
                      };
                  },
              },
          };
      }
      async execute() {
          try {
              const credentials = await this.getCredentials('amqp');
              const sink = this.getNodeParameter('sink', 0, '');
              const applicationProperties = this.getNodeParameter('headerParametersJson', 0, {});
              const options = this.getNodeParameter('options', 0, {});
              const containerId = options.containerId;
              const containerReconnect = options.reconnect || true;
              const containerReconnectLimit = options.reconnectLimit || 50;
              let headerProperties;
              if (typeof applicationProperties === 'string' && applicationProperties !== '') {
                  headerProperties = JSON.parse(applicationProperties);
              }
              else {
                  headerProperties = applicationProperties;
              }
              if (sink === '') {
                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Queue or Topic required!');
              }
              const container = (0, rhea_1.create_container)();
              const connectOptions = {
                  host: credentials.hostname,
                  hostname: credentials.hostname,
                  port: credentials.port,
                  reconnect: containerReconnect,
                  reconnect_limit: containerReconnectLimit,
                  username: credentials.username ? credentials.username : undefined,
                  password: credentials.password ? credentials.password : undefined,
                  transport: credentials.transportType ? credentials.transportType : undefined,
                  container_id: containerId ? containerId : undefined,
                  id: containerId ? containerId : undefined,
              };
              const conn = container.connect(connectOptions);
              const sender = conn.open_sender(sink);
              const responseData = await new Promise((resolve) => {
                  container.once('sendable', (context) => {
                      var _a;
                      const returnData = [];
                      const items = this.getInputData();
                      for (let i = 0; i < items.length; i++) {
                          const item = items[i];
                          let body = item.json;
                          const sendOnlyProperty = options.sendOnlyProperty;
                          if (sendOnlyProperty) {
                              body = body[sendOnlyProperty];
                          }
                          if (options.dataAsObject !== true) {
                              body = JSON.stringify(body);
                          }
                          const result = (_a = context.sender) === null || _a === void 0 ? void 0 : _a.send({
                              application_properties: headerProperties,
                              body,
                          });
                          returnData.push({ id: result === null || result === void 0 ? void 0 : result.id });
                      }
                      resolve(returnData);
                  });
              });
              sender.close();
              conn.close();
              return [this.helpers.returnJsonArray(responseData)];
          }
          catch (error) {
              if (this.continueOnFail()) {
                  return [this.helpers.returnJsonArray({ error: error.message })];
              }
              else {
                  throw error;
              }
          }
      }
  }
  exports.Amqp = Amqp;
  //# sourceMappingURL=Amqp.node.js.map

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

  # AMQP Sender node

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

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

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

  ## Operations

  - Send message

  ## Templates and examples

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

example_workflow:
  {"name":"AMQP Sender Example Workflow","nodes":[{"parameters":{"sink":"example-value","headerParametersJson":null,"options":{}},"id":"8gai73roidwy8e0vw75gd","name":"AMQP Sender","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

properties_schema:
  [{"displayName":"Queue / Topic","name":"sink","type":"string","default":"","description":"Name of the queue of topic to publish to","placeholder":"topic://sourcename.something"},{"displayName":"Headers","name":"headerParametersJson","type":"json","default":"","description":"Header parameters as JSON (flat object). Sent as application_properties in amqp-message meta info."},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Will be used to pass to the RHEA Backend as container_id","placeholder":"Add Option"}]


node_type: n8n-nodes-base.Automizy
name: Automizy
display_name: Automizy
description: Consume Automizy API
category: input
icon: file:automizy.png
code_hash: 5bf2d35f75ea1b5f2d4feba181e3fc6af2637832aecf85d5124e984118bbc4e4
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Automizy
documentation_title: Automizy node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"automizy","description":"Templates for automizy"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"contact","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:15
updated_at: 2025-06-12 08:58:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Automizy = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  const ListDescription_1 = require("./ListDescription");
  class Automizy {
      constructor() {
          this.description = {
              displayName: 'Automizy',
              name: 'automizy',
              icon: 'file:automizy.png',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Automizy API',
              defaults: {
                  name: 'Automizy',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'automizyApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'contact',
                  },
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...ListDescription_1.listOperations,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getLists() {
                      const returnData = [];
                      const lists = await GenericFunctions_1.automizyApiRequestAllItems.call(this, 'smartLists', 'GET', '/smart-lists');
                      for (const list of lists) {
                          returnData.push({
                              name: list.name,
                              value: list.id,
                          });
                      }
                      return returnData;
                  },
                  async getTags() {
                      const returnData = [];
                      const tags = await GenericFunctions_1.automizyApiRequestAllItems.call(this, 'contactTags', 'GET', '/contacts/tag-manager');
                      for (const tag of tags) {
                          returnData.push({
                              name: tag.name,
                              value: tag.name,
                          });
                      }
                      return returnData;
                  },
                  async getCustomFields() {
                      const returnData = [];
                      const customFields = await GenericFunctions_1.automizyApiRequestAllItems.call(this, 'customFields', 'GET', '/custom-fields');
                      for (const customField of customFields) {
                          returnData.push({
                              name: customField.name,
                              value: customField.id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              if (resource === 'contact') {
                  if (operation === 'create') {
                      const listId = this.getNodeParameter('listId', i);
                      const email = this.getNodeParameter('email', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      const body = {
                          email,
                      };
                      Object.assign(body, additionalFields);
                      if (body.customFieldsUi) {
                          const customFieldsValues = body.customFieldsUi
                              .customFieldsValues;
                          body.customFields = {};
                          for (const customField of customFieldsValues) {
                              body.customFields[customField.key] = customField.value;
                          }
                          delete body.customFieldsUi;
                      }
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'POST', `/smart-lists/${listId}/contacts`, body);
                      responseData = responseData.contacts;
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'delete') {
                      const contactId = this.getNodeParameter('contactId', i);
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'DELETE', `/contacts/${contactId}`);
                      responseData = { success: true };
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'get') {
                      const contactId = this.getNodeParameter('contactId', i);
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'GET', `/contacts/${contactId}`);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const listId = this.getNodeParameter('listId', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (additionalFields.direction && additionalFields.sortBy) {
                          qs.order = `${additionalFields.sortBy}:${additionalFields.direction}`;
                      }
                      if (additionalFields.fields) {
                          qs.fields = additionalFields.fields;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.automizyApiRequestAllItems.call(this, 'contacts', 'GET', `/smart-lists/${listId}/contacts`, {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'GET', `/smart-lists/${listId}/contacts`, {}, qs);
                      }
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'update') {
                      const email = this.getNodeParameter('email', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      const body = {};
                      Object.assign(body, updateFields);
                      if (body.customFieldsUi) {
                          const customFieldsValues = body.customFieldsUi
                              .customFieldsValues;
                          body.customFields = {};
                          for (const customField of customFieldsValues) {
                              body.customFields[customField.key] = customField.value;
                          }
                          delete body.customFieldsUi;
                      }
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'PATCH', `/contacts/${email}`, body);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
              }
              if (resource === 'list') {
                  if (operation === 'create') {
                      const name = this.getNodeParameter('name', i);
                      const body = {
                          name,
                      };
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'POST', '/smart-lists', body);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'delete') {
                      const listId = this.getNodeParameter('listId', i);
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'DELETE', `/smart-lists/${listId}`);
                      responseData = { success: true };
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'get') {
                      const listId = this.getNodeParameter('listId', i);
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'GET', `/smart-lists/${listId}`);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'getAll') {
                      const returnAll = this.getNodeParameter('returnAll', i);
                      const additionalFields = this.getNodeParameter('additionalFields', i);
                      if (additionalFields.direction && additionalFields.sortBy) {
                          qs.order = `${additionalFields.sortBy}:${additionalFields.direction}`;
                      }
                      if (additionalFields.fields) {
                          qs.fields = additionalFields.fields;
                      }
                      if (returnAll) {
                          responseData = await GenericFunctions_1.automizyApiRequestAllItems.call(this, 'smartLists', 'GET', '/smart-lists', {}, qs);
                      }
                      else {
                          qs.limit = this.getNodeParameter('limit', i);
                          responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'GET', '/smart-lists', {}, qs);
                          responseData = responseData.smartLists;
                      }
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
                  if (operation === 'update') {
                      const listId = this.getNodeParameter('listId', i);
                      const name = this.getNodeParameter('name', i);
                      const body = {
                          name,
                      };
                      responseData = await GenericFunctions_1.automizyApiRequest.call(this, 'PATCH', `/smart-lists/${listId}`, body);
                      responseData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  }
              }
          }
          returnData.push(...responseData);
          return [returnData];
      }
  }
  exports.Automizy = Automizy;
  //# sourceMappingURL=Automizy.node.js.map

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

  // --- Next Credential File ---

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

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

  # Automizy node

  Use the Automizy node to automate work in Automizy, and integrate Automizy with other applications. n8n has built-in support for a wide range of Automizy features, including creating, reading, listing, updating, deleting contacts, and lists.

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

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

  ## Operations

  * Contact
      * Create a contact
      * Delete a contact
      * Get a contact
      * Get all contacts
      * Update a contact
  * List
      * Create a list
      * Delete a list
      * Get a list
      * Get all lists
      * Update a list

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"contact","options":[{"name":"Contact","value":"contact"},{"name":"List","value":"list"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"}]


node_type: n8n-nodes-base.Autopilot
name: Autopilot
display_name: Autopilot
description: Consume Autopilot API
category: input
icon: file:autopilot.svg
code_hash: d198d9e6125eb94e376aac9ae8927fc206d613461b0848f5b3024cb262c5e86f
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Autopilot
documentation_title: Autopilot node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"autopilot","description":"Templates for autopilot"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"contact","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:15
updated_at: 2025-06-12 08:58:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Autopilot = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const ContactDescription_1 = require("./ContactDescription");
  const ContactJourneyDescription_1 = require("./ContactJourneyDescription");
  const ContactListDescription_1 = require("./ContactListDescription");
  const ListDescription_1 = require("./ListDescription");
  class Autopilot {
      constructor() {
          this.description = {
              displayName: 'Autopilot',
              name: 'autopilot',
              icon: 'file:autopilot.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Autopilot API',
              defaults: {
                  name: 'Autopilot',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'autopilotApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Contact',
                              value: 'contact',
                          },
                          {
                              name: 'Contact Journey',
                              value: 'contactJourney',
                          },
                          {
                              name: 'Contact List',
                              value: 'contactList',
                          },
                          {
                              name: 'List',
                              value: 'list',
                          },
                      ],
                      default: 'contact',
                  },
                  ...ContactDescription_1.contactOperations,
                  ...ContactDescription_1.contactFields,
                  ...ContactJourneyDescription_1.contactJourneyOperations,
                  ...ContactJourneyDescription_1.contactJourneyFields,
                  ...ContactListDescription_1.contactListOperations,
                  ...ContactListDescription_1.contactListFields,
                  ...ListDescription_1.listOperations,
                  ...ListDescription_1.listFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getCustomFields() {
                      const returnData = [];
                      const customFields = await GenericFunctions_1.autopilotApiRequest.call(this, 'GET', '/contacts/custom_fields');
                      for (const customField of customFields) {
                          returnData.push({
                              name: customField.name,
                              value: `${customField.name}-${customField.fieldType}`,
                          });
                      }
                      return returnData;
                  },
                  async getLists() {
                      const returnData = [];
                      const { lists } = await GenericFunctions_1.autopilotApiRequest.call(this, 'GET', '/lists');
                      for (const list of lists) {
                          returnData.push({
                              name: list.title,
                              value: list.list_id,
                          });
                      }
                      return returnData;
                  },
                  async getTriggers() {
                      const returnData = [];
                      const { triggers } = await GenericFunctions_1.autopilotApiRequest.call(this, 'GET', '/triggers');
                      for (const trigger of triggers) {
                          returnData.push({
                              name: trigger.journey,
                              value: trigger.trigger_id,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          const qs = {};
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          for (let i = 0; i < length; i++) {
              try {
                  if (resource === 'contact') {
                      if (operation === 'upsert') {
                          const email = this.getNodeParameter('email', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const body = {
                              Email: email,
                          };
                          Object.assign(body, additionalFields);
                          if (body.customFieldsUi) {
                              const customFieldsValues = body.customFieldsUi
                                  .customFieldsValues;
                              body.custom = {};
                              for (const customField of customFieldsValues) {
                                  const [name, fieldType] = customField.key.split('-');
                                  const fieldName = name.replace(/\s/g, '--');
                                  body.custom[`${fieldType}--${fieldName}`] = customField.value;
                              }
                              delete body.customFieldsUi;
                          }
                          if (body.autopilotList) {
                              body._autopilot_list = body.autopilotList;
                              delete body.autopilotList;
                          }
                          if (body.autopilotSessionId) {
                              body._autopilot_session_id = body.autopilotSessionId;
                              delete body.autopilotSessionId;
                          }
                          if (body.newEmail) {
                              body._NewEmail = body.newEmail;
                              delete body.newEmail;
                          }
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'POST', '/contact', {
                              contact: body,
                          });
                      }
                      if (operation === 'delete') {
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'DELETE', `/contact/${contactId}`);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'GET', `/contact/${contactId}`);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.autopilotApiRequestAllItems.call(this, 'contacts', 'GET', '/contacts', {}, qs);
                          if (!returnAll) {
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  if (resource === 'contactJourney') {
                      if (operation === 'add') {
                          const triggerId = this.getNodeParameter('triggerId', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'POST', `/trigger/${triggerId}/contact/${contactId}`);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'contactList') {
                      if (['add', 'remove', 'exist'].includes(operation)) {
                          const listId = this.getNodeParameter('listId', i);
                          const contactId = this.getNodeParameter('contactId', i);
                          const method = {
                              add: 'POST',
                              remove: 'DELETE',
                              exist: 'GET',
                          };
                          const endpoint = `/list/${listId}/contact/${contactId}`;
                          if (operation === 'exist') {
                              try {
                                  await GenericFunctions_1.autopilotApiRequest.call(this, method[operation], endpoint);
                                  responseData = { exist: true };
                              }
                              catch (error) {
                                  responseData = { exist: false };
                              }
                          }
                          else if (operation === 'add' || operation === 'remove') {
                              responseData = await GenericFunctions_1.autopilotApiRequest.call(this, method[operation], endpoint);
                              responseData.success = true;
                          }
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const listId = this.getNodeParameter('listId', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.autopilotApiRequestAllItems.call(this, 'contacts', 'GET', `/list/${listId}/contacts`, {}, qs);
                          if (!returnAll) {
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  if (resource === 'list') {
                      if (operation === 'create') {
                          const name = this.getNodeParameter('name', i);
                          const body = {
                              name,
                          };
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'POST', '/list', body);
                      }
                      if (operation === 'getAll') {
                          const returnAll = this.getNodeParameter('returnAll', i);
                          if (!returnAll) {
                              qs.limit = this.getNodeParameter('limit', i);
                          }
                          responseData = await GenericFunctions_1.autopilotApiRequest.call(this, 'GET', '/lists');
                          responseData = responseData.lists;
                          if (!returnAll) {
                              responseData = responseData.splice(0, qs.limit);
                          }
                      }
                  }
                  const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                  returnData.push(...executionData);
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      const exectionErrorWithMetaData = this.helpers.constructExecutionMetaData([{ json: { error: error.message } }], { itemData: { item: i } });
                      responseData.push(...exectionErrorWithMetaData);
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Autopilot = Autopilot;
  //# sourceMappingURL=Autopilot.node.js.map

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

  // --- Next Credential File ---

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

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

  # Autopilot node

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

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

  /// warning | Autopilot branding change
  Autopilot has become Ortto. The Autopilot credentials and nodes are only compatible with Autopilot, not the new Ortto API.
  ///
  /// note | Credentials
  Refer to [Autopilot credentials](/integrations/builtin/credentials/autopilot.md) for guidance on setting up authentication. 
  ///

  ## Operations

  * Contact
      * Create/Update a contact
      * Delete a contact
      * Get a contact
      * Get all contacts
  * Contact Journey
      * Add contact to list
  * Contact List
      * Add contact to list
      * Check if contact is on list
      * Get all contacts on list
      * Remove a contact from a list
  * List
      * Create a list
      * Get all lists

  ## Templates and examples

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

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

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"contact","options":[{"name":"Contact","value":"contact"},{"name":"Contact Journey","value":"contactJourney"},{"name":"Contact List","value":"contactList"},{"name":"List","value":"list"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactDescription_1.contactFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactJourneyDescription_1.contactJourneyOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactJourneyDescription_1.contactJourneyFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactListDescription_1.contactListOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ContactListDescription_1.contactListFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...ListDescription_1.listFields"}]


node_type: n8n-nodes-base.Asana
name: Asana
display_name: Asana
description: Consume Asana REST API
category: input
icon: file:asana.svg
code_hash: 2b50b513204936aa1c32519a8bf8214321aac2a9ca6b36175033ad0bc18c671c
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Asana
documentation_title: Asana node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"asana","description":"Templates for asana"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
version_info: {"breakingChanges":[],"currentVersion":"1.22.2"}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:15
updated_at: 2025-06-12 08:58:15
source_code:
  "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Asana = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
  const change_case_1 = require("change-case");
  class Asana {
      constructor() {
          this.description = {
              displayName: 'Asana',
              name: 'asana',
              icon: 'file:asana.svg',
              group: ['input'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume Asana REST API',
              defaults: {
                  name: 'Asana',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'asanaApi',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['accessToken'],
                          },
                      },
                      testedBy: {
                          request: {
                              method: 'GET',
                              url: '/users/me',
                          },
                      },
                  },
                  {
                      name: 'asanaOAuth2Api',
                      required: true,
                      displayOptions: {
                          show: {
                              authentication: ['oAuth2'],
                          },
                      },
                  },
              ],
              requestDefaults: {
                  baseURL: 'https://app.asana.com/api/1.0',
                  url: '',
              },
              properties: [
                  {
                      displayName: 'Authentication',
                      name: 'authentication',
                      type: 'options',
                      options: [
                          {
                              name: 'Access Token',
                              value: 'accessToken',
                          },
                          {
                              name: 'OAuth2',
                              value: 'oAuth2',
                          },
                      ],
                      default: 'accessToken',
                  },
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Project',
                              value: 'project',
                          },
                          {
                              name: 'Subtask',
                              value: 'subtask',
                          },
                          {
                              name: 'Task',
                              value: 'task',
                          },
                          {
                              name: 'Task Comment',
                              value: 'taskComment',
                          },
                          {
                              name: 'Task Project',
                              value: 'taskProject',
                          },
                          {
                              name: 'Task Tag',
                              value: 'taskTag',
                          },
                          {
                              name: 'User',
                              value: 'user',
                          },
                      ],
                      default: 'task',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['subtask'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a subtask',
                              action: 'Create a subtask',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many substasks',
                              action: 'Get many subtasks',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Parent Task ID',
                      name: 'taskId',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['subtask'],
                          },
                      },
                      description: 'The task to operate on',
                  },
                  {
                      displayName: 'Name',
                      name: 'name',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['subtask'],
                          },
                      },
                      description: 'The name of the subtask to create',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'otherProperties',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['subtask'],
                              operation: ['create'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'Assignee Name or ID',
                              name: 'assignee',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getUsers',
                              },
                              default: '',
                              description: 'Set Assignee on the subtask. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Assignee Status',
                              name: 'assignee_status',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Inbox',
                                      value: 'inbox',
                                  },
                                  {
                                      name: 'Today',
                                      value: 'today',
                                  },
                                  {
                                      name: 'Upcoming',
                                      value: 'upcoming',
                                  },
                                  {
                                      name: 'Later',
                                      value: 'later',
                                  },
                              ],
                              default: 'inbox',
                              description: 'Set Assignee status on the subtask (requires Assignee)',
                          },
                          {
                              displayName: 'Completed',
                              name: 'completed',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the subtask should be marked completed',
                          },
                          {
                              displayName: 'Due On',
                              name: 'due_on',
                              type: 'dateTime',
                              default: '',
                              description: 'Date on which the time is due',
                          },
                          {
                              displayName: 'Liked',
                              name: 'liked',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the task is liked by the authorized user',
                          },
                          {
                              displayName: 'Notes',
                              name: 'notes',
                              type: 'string',
                              typeOptions: {
                                  rows: 5,
                              },
                              default: '',
                              description: 'The task notes',
                          },
                          {
                              displayName: 'Workspace Name or ID',
                              name: 'workspace',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getWorkspaces',
                              },
                              default: '',
                              description: 'The workspace to create the subtask in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                      ],
                  },
                  {
                      displayName: 'Parent Task ID',
                      name: 'taskId',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['subtask'],
                          },
                      },
                      description: 'The task to operate on',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['subtask'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['subtask'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 500,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['subtask'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'Field Names or IDs',
                              name: 'opt_fields',
                              type: 'multiOptions',
                              typeOptions: {
                                  loadOptionsMethod: 'getTaskFields',
                              },
                              default: ['gid', 'name', 'resource_type'],
                              description: 'Defines fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Pretty',
                              name: 'opt_pretty',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to provide “pretty” output',
                          },
                      ],
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['task'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a task',
                              action: 'Create a task',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a task',
                              action: 'Delete a task',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a task',
                              action: 'Get a task',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many tasks',
                              action: 'Get many tasks',
                          },
                          {
                              name: 'Move',
                              value: 'move',
                              description: 'Move a task',
                              action: 'Move a task',
                          },
                          {
                              name: 'Search',
                              value: 'search',
                              description: 'Search for tasks',
                              action: 'Search a task',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a task',
                              action: 'Update a task',
                          },
                      ],
                      default: 'create',
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['task'],
                          },
                      },
                      description: 'The workspace to create the task in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Name',
                      name: 'name',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['task'],
                          },
                      },
                      description: 'The name of the task to create',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['delete'],
                              resource: ['task'],
                          },
                      },
                      description: 'The ID of the task to delete',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['task'],
                          },
                      },
                      description: 'The ID of the task to get the data of',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['task'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['task'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 500,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Filters',
                      name: 'filters',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['task'],
                          },
                      },
                      default: {},
                      description: 'Properties to search for',
                      placeholder: 'Add Filter',
                      options: [
                          {
                              displayName: 'Assignee Name or ID',
                              name: 'assignee',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getUsers',
                              },
                              default: '',
                              description: 'The assignee to filter tasks on. Note: If you specify assignee, you must also specify the workspace to filter on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Field Names or IDs',
                              name: 'opt_fields',
                              type: 'multiOptions',
                              typeOptions: {
                                  loadOptionsMethod: 'getTaskFields',
                              },
                              default: ['gid', 'name', 'resource_type'],
                              description: 'Defines fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Pretty',
                              name: 'opt_pretty',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to provide “pretty” output',
                          },
                          {
                              displayName: 'Project Name or ID',
                              name: 'project',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getProjects',
                              },
                              default: '',
                              description: 'The project to filter tasks on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Section Name or ID',
                              name: 'section',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getSections',
                              },
                              default: '',
                              description: 'The section to filter tasks on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Workspace Name or ID',
                              name: 'workspace',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getWorkspaces',
                              },
                              default: '',
                              description: 'The workspace to filter tasks on. Note: If you specify workspace, you must also specify the assignee to filter on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Completed Since',
                              name: 'completed_since',
                              type: 'dateTime',
                              default: '',
                              description: 'Only return tasks that are either incomplete or that have been completed since this time',
                          },
                          {
                              displayName: 'Modified Since',
                              name: 'modified_since',
                              type: 'dateTime',
                              default: '',
                              description: 'Only return tasks that have been modified since the given time',
                          },
                      ],
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['task'],
                          },
                      },
                      description: 'The ID of the task to be moved',
                  },
                  {
                      displayName: 'Project Name or ID',
                      name: 'projectId',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getProjects',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['task'],
                          },
                      },
                      description: 'Project to show the sections of. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Section Name or ID',
                      name: 'section',
                      type: 'options',
                      typeOptions: {
                          loadOptionsDependsOn: ['projectId'],
                          loadOptionsMethod: 'getSections',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['move'],
                              resource: ['task'],
                          },
                      },
                      description: 'The Section to move the task to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['update'],
                              resource: ['task'],
                          },
                      },
                      description: 'The ID of the task to update the data of',
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['search'],
                              resource: ['task'],
                          },
                      },
                      description: 'The workspace in which the task is searched. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Filters',
                      name: 'searchTaskProperties',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['search'],
                              resource: ['task'],
                          },
                      },
                      default: {},
                      description: 'Properties to search for',
                      placeholder: 'Add Filter',
                      options: [
                          {
                              displayName: 'Completed',
                              name: 'completed',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the task is marked completed',
                          },
                          {
                              displayName: 'Text',
                              name: 'text',
                              type: 'string',
                              typeOptions: {
                                  rows: 5,
                              },
                              default: '',
                              description: 'Text to search for in name or notes',
                          },
                      ],
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'otherProperties',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['task'],
                              operation: ['create', 'update'],
                          },
                      },
                      default: {},
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'Assignee Name or ID',
                              name: 'assignee',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsMethod: 'getUsers',
                              },
                              default: '',
                              description: 'Set Assignee on the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                          {
                              displayName: 'Assignee Status',
                              name: 'assignee_status',
                              type: 'options',
                              options: [
                                  {
                                      name: 'Inbox',
                                      value: 'inbox',
                                  },
                                  {
                                      name: 'Today',
                                      value: 'today',
                                  },
                                  {
                                      name: 'Upcoming',
                                      value: 'upcoming',
                                  },
                                  {
                                      name: 'Later',
                                      value: 'later',
                                  },
                              ],
                              default: 'inbox',
                              description: 'Set Assignee status on the task (requires Assignee)',
                          },
                          {
                              displayName: 'Completed',
                              name: 'completed',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the task should be marked completed',
                          },
                          {
                              displayName: 'Due On',
                              name: 'due_on',
                              type: 'dateTime',
                              default: '',
                              description: 'Date on which the time is due',
                          },
                          {
                              displayName: 'Name',
                              name: 'name',
                              type: 'string',
                              default: '',
                              displayOptions: {
                                  show: {
                                      '/operation': ['update'],
                                  },
                              },
                              description: 'The new name of the task',
                          },
                          {
                              displayName: 'Liked',
                              name: 'liked',
                              type: 'boolean',
                              default: false,
                              description: 'Whether the task is liked by the authorized user',
                          },
                          {
                              displayName: 'Notes',
                              name: 'notes',
                              type: 'string',
                              typeOptions: {
                                  rows: 5,
                              },
                              default: '',
                              description: 'The task notes',
                          },
                          {
                              displayName: 'Project Names or IDs',
                              name: 'projects',
                              type: 'multiOptions',
                              typeOptions: {
                                  loadOptionsMethod: 'getProjects',
                              },
                              default: [],
                              description: 'The project to filter tasks on. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                      ],
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['taskComment'],
                          },
                      },
                      options: [
                          {
                              name: 'Add',
                              value: 'add',
                              description: 'Add a comment to a task',
                              action: 'Add a task comment',
                          },
                          {
                              name: 'Remove',
                              value: 'remove',
                              description: 'Remove a comment from a task',
                              action: 'Remove a task comment',
                          },
                      ],
                      default: 'add',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskComment'],
                          },
                      },
                      description: 'The ID of the task to add the comment to',
                  },
                  {
                      displayName: 'Is Text HTML',
                      name: 'isTextHtml',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskComment'],
                          },
                      },
                      default: false,
                      description: 'Whether body is HTML or simple text',
                  },
                  {
                      displayName: 'Text',
                      name: 'text',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskComment'],
                              isTextHtml: [false],
                          },
                      },
                      description: 'The plain text of the comment to add',
                  },
                  {
                      displayName: 'HTML Text',
                      name: 'text',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskComment'],
                              isTextHtml: [true],
                          },
                      },
                      description: 'Comment as HTML string. Do not use together with plain text.',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskComment'],
                          },
                      },
                      default: {},
                      description: 'Properties of the task comment',
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'Pinned',
                              name: 'is_pinned',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to pin the comment',
                          },
                      ],
                  },
                  {
                      displayName: 'Comment ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['remove'],
                              resource: ['taskComment'],
                          },
                      },
                      description: 'The ID of the comment to be removed',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['taskProject'],
                          },
                      },
                      options: [
                          {
                              name: 'Add',
                              value: 'add',
                              description: 'Add a task to a project',
                              action: 'Add a task project',
                          },
                          {
                              name: 'Remove',
                              value: 'remove',
                              description: 'Remove a task from a project',
                              action: 'Remove a task project',
                          },
                      ],
                      default: 'add',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskProject'],
                          },
                      },
                      description: 'The ID of the task to add the project to',
                  },
                  {
                      displayName: 'Project Name or ID',
                      name: 'project',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getProjects',
                      },
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskProject'],
                          },
                      },
                      description: 'The project where the task will be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['taskProject'],
                              operation: ['add'],
                          },
                      },
                      default: {},
                      description: 'Other properties to set',
                      placeholder: 'Add Field',
                      options: [
                          {
                              displayName: 'Insert After',
                              name: 'insert_after',
                              type: 'string',
                              default: '',
                              description: 'A task in the project to insert the task after, or null to insert at the beginning of the list',
                          },
                          {
                              displayName: 'Insert Before',
                              name: 'insert_before',
                              type: 'string',
                              default: '',
                              description: 'A task in the project to insert the task before, or null to insert at the end of the list',
                          },
                          {
                              displayName: 'Section',
                              name: 'section',
                              type: 'string',
                              default: '',
                              description: 'A section in the project to insert the task into. The task will be inserted at the bottom of the section.',
                          },
                      ],
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['remove'],
                              resource: ['taskProject'],
                          },
                      },
                      description: 'The ID of the task to add the project to',
                  },
                  {
                      displayName: 'Project Name or ID',
                      name: 'project',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getProjects',
                      },
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['remove'],
                              resource: ['taskProject'],
                          },
                      },
                      description: 'The project where the task will be removed from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['taskTag'],
                          },
                      },
                      options: [
                          {
                              name: 'Add',
                              value: 'add',
                              description: 'Add a tag to a task',
                              action: 'Add a task tag',
                          },
                          {
                              name: 'Remove',
                              value: 'remove',
                              description: 'Remove a tag from a task',
                              action: 'Remove a task tag',
                          },
                      ],
                      default: 'add',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskTag'],
                          },
                      },
                      description: 'The ID of the task to add the tag to',
                  },
                  {
                      displayName: 'Tags Name or ID',
                      name: 'tag',
                      type: 'options',
                      typeOptions: {
                          loadOptionsDependsOn: ['id'],
                          loadOptionsMethod: 'getTags',
                      },
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['add'],
                              resource: ['taskTag'],
                          },
                      },
                      description: 'The tag that should be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Task ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['remove'],
                              resource: ['taskTag'],
                          },
                      },
                      description: 'The ID of the task to add the tag to',
                  },
                  {
                      displayName: 'Tags Name or ID',
                      name: 'tag',
                      type: 'options',
                      typeOptions: {
                          loadOptionsDependsOn: ['id'],
                          loadOptionsMethod: 'getTags',
                      },
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['remove'],
                              resource: ['taskTag'],
                          },
                      },
                      description: 'The tag that should be added. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['user'],
                          },
                      },
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a user',
                              action: 'Get a user',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many users',
                              action: 'Get many users',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'User ID',
                      name: 'userId',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['user'],
                          },
                      },
                      description: 'An identifier for the user to get data of. Can be one of an email address,the globally unique identifier for the user, or the keyword me to indicate the current user making the request.',
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['user'],
                          },
                      },
                      description: 'The workspace in which to get users. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['project'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a new project',
                              action: 'Create a project',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a project',
                              action: 'Delete a project',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Get a project',
                              action: 'Get a project',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Get many projects',
                              action: 'Get many projects',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a project',
                              action: 'Update a project',
                          },
                      ],
                      default: 'get',
                  },
                  {
                      displayName: 'Name',
                      name: 'name',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['project'],
                          },
                      },
                      description: 'The name of the project to create',
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['project'],
                          },
                      },
                      description: 'The workspace to create the project in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Team Name or ID',
                      name: 'team',
                      type: 'options',
                      typeOptions: {
                          loadOptionsDependsOn: ['workspace'],
                          loadOptionsMethod: 'getTeams',
                      },
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['project'],
                          },
                      },
                      default: '',
                      description: 'The team this project will be assigned to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['project'],
                              operation: ['create'],
                          },
                      },
                      default: {},
                      description: 'Other properties to set',
                      placeholder: 'Add Property',
                      options: [
                          {
                              displayName: 'Color',
                              name: 'color',
                              type: 'options',
                              options: (0, GenericFunctions_1.getColorOptions)(),
                              default: 'none',
                              description: 'Color of the project',
                          },
                          {
                              displayName: 'Due On',
                              name: 'due_on',
                              type: 'dateTime',
                              default: '',
                              description: 'The day on which this project is due. This takes a date with format YYYY-MM-DD.',
                          },
                          {
                              displayName: 'Notes',
                              name: 'notes',
                              type: 'string',
                              default: '',
                              description: 'Basic description or notes for the project',
                          },
                      ],
                  },
                  {
                      displayName: 'Project ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['delete'],
                              resource: ['project'],
                          },
                      },
                  },
                  {
                      displayName: 'Project ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['get'],
                              resource: ['project'],
                          },
                      },
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['project'],
                          },
                      },
                      description: 'The workspace in which to get users. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Return All',
                      name: 'returnAll',
                      type: 'boolean',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['project'],
                          },
                      },
                      default: false,
                      description: 'Whether to return all results or only up to a given limit',
                  },
                  {
                      displayName: 'Limit',
                      name: 'limit',
                      type: 'number',
                      displayOptions: {
                          show: {
                              operation: ['getAll'],
                              resource: ['project'],
                              returnAll: [false],
                          },
                      },
                      typeOptions: {
                          minValue: 1,
                          maxValue: 500,
                      },
                      default: 100,
                      description: 'Max number of results to return',
                  },
                  {
                      displayName: 'Additional Fields',
                      name: 'additionalFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['project'],
                              operation: ['getAll'],
                          },
                      },
                      default: {},
                      description: 'Other properties to set',
                      placeholder: 'Add Property',
                      options: [
                          {
                              displayName: 'Archived',
                              name: 'archived',
                              type: 'boolean',
                              default: false,
                              description: 'Whether to only return projects whose archived field takes on the value of this parameter',
                          },
                          {
                              displayName: 'Teams Name or ID',
                              name: 'team',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsDependsOn: ['workspace'],
                                  loadOptionsMethod: 'getTeams',
                              },
                              default: '',
                              description: 'The new name of the task. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                      ],
                  },
                  {
                      displayName: 'Workspace Name or ID',
                      name: 'workspace',
                      type: 'options',
                      typeOptions: {
                          loadOptionsMethod: 'getWorkspaces',
                      },
                      options: [],
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['update'],
                              resource: ['project'],
                          },
                      },
                      description: 'The workspace in which to get users. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                  },
                  {
                      displayName: 'Project ID',
                      name: 'id',
                      type: 'string',
                      default: '',
                      required: true,
                      displayOptions: {
                          show: {
                              operation: ['update'],
                              resource: ['project'],
                          },
                      },
                      description: 'The ID of the project to update the data of',
                  },
                  {
                      displayName: 'Update Fields',
                      name: 'updateFields',
                      type: 'collection',
                      displayOptions: {
                          show: {
                              resource: ['project'],
                              operation: ['update'],
                          },
                      },
                      default: {},
                      description: 'Other properties to set',
                      placeholder: 'Add Property',
                      options: [
                          {
                              displayName: 'Color',
                              name: 'color',
                              type: 'options',
                              options: (0, GenericFunctions_1.getColorOptions)(),
                              default: 'none',
                              description: 'Color of the project',
                          },
                          {
                              displayName: 'Due On',
                              name: 'due_on',
                              type: 'dateTime',
                              default: '',
                              description: 'The day on which this project is due. This takes a date with format YYYY-MM-DD.',
                          },
                          {
                              displayName: 'Name',
                              name: 'name',
                              type: 'string',
                              default: '',
                              description: 'The name of the project',
                          },
                          {
                              displayName: 'Notes',
                              name: 'notes',
                              type: 'string',
                              default: '',
                              description: 'Basic description or notes for the project',
                          },
                          {
                              displayName: 'Owner',
                              name: 'owner',
                              type: 'string',
                              default: '',
                              description: 'The new assignee/cardinal for this project',
                          },
                          {
                              displayName: 'Team Name or ID',
                              name: 'team',
                              type: 'options',
                              typeOptions: {
                                  loadOptionsDependsOn: ['workspace'],
                                  loadOptionsMethod: 'getTeams',
                              },
                              default: '',
                              description: 'The team this project will be assigned to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  getWorkspaces: GenericFunctions_1.getWorkspaces,
                  async getProjects() {
                      const endpoint = '/projects';
                      const responseData = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', endpoint, {});
                      if (responseData.data === undefined) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
                              message: 'No data got returned',
                          });
                      }
                      const returnData = [];
                      for (const projectData of responseData.data) {
                          if (projectData.resource_type !== 'project') {
                              continue;
                          }
                          const projectName = projectData.name;
                          const projectId = projectData.gid;
                          returnData.push({
                              name: projectName,
                              value: projectId,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getSections() {
                      const projectId = this.getNodeParameter('projectId');
                      const endpoint = `/projects/${projectId}/sections`;
                      const responseData = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', endpoint, {});
                      if (responseData.data === undefined) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
                              message: 'No data got returned',
                          });
                      }
                      const returnData = [];
                      for (const sectionData of responseData.data) {
                          if (sectionData.resource_type !== 'section') {
                              continue;
                          }
                          returnData.push({
                              name: sectionData.name,
                              value: sectionData.gid,
                          });
                      }
                      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 workspaceId = this.getCurrentNodeParameter('workspace');
                      const workspace = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', `/workspaces/${workspaceId}`, {});
                      if (workspace.is_organization === false) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'To filter by team, the workspace selected has to be an organization');
                      }
                      const endpoint = `/organizations/${workspaceId}/teams`;
                      const responseData = await GenericFunctions_1.asanaApiRequestAllItems.call(this, 'GET', endpoint, {});
                      const returnData = [];
                      for (const teamData of responseData) {
                          if (teamData.resource_type !== 'team') {
                              continue;
                          }
                          returnData.push({
                              name: teamData.name,
                              value: teamData.gid,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getTags() {
                      const endpoint = '/tags';
                      const taskId = this.getNodeParameter('id');
                      let taskData;
                      try {
                          taskData = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', `/tasks/${taskId}`, {});
                      }
                      catch (error) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
                              message: `Could not find task with id "${taskId}" so tags could not be loaded.`,
                          });
                      }
                      const workspace = taskData.data.workspace.gid;
                      const responseData = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', endpoint, {}, { workspace });
                      if (responseData.data === undefined) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
                              message: 'No data got returned',
                          });
                      }
                      const returnData = [];
                      for (const tagData of responseData.data) {
                          if (tagData.resource_type !== 'tag') {
                              continue;
                          }
                          returnData.push({
                              name: tagData.name,
                              value: tagData.gid,
                          });
                      }
                      returnData.sort((a, b) => {
                          if (a.name < b.name) {
                              return -1;
                          }
                          if (a.name > b.name) {
                              return 1;
                          }
                          return 0;
                      });
                      return returnData;
                  },
                  async getUsers() {
                      const endpoint = '/users';
                      const responseData = await GenericFunctions_1.asanaApiRequest.call(this, 'GET', endpoint, {});
                      if (responseData.data === undefined) {
                          throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
                              message: 'No data got returned',
                          });
                      }
                      const returnData = [];
                      for (const userData of responseData.data) {
                          if (userData.resource_type !== 'user') {
                              continue;
                          }
                          returnData.push({
                              name: userData.name,
                              value: userData.gid,
                          });
                      }
                      return returnData;
                  },
                  async getTaskFields() {
                      const returnData = [];
                      for (const field of (0, GenericFunctions_1.getTaskFields)()) {
                          const value = (0, change_case_1.snakeCase)(field);
                          returnData.push({
                              name: field,
                              value: value === '' ? '*' : value,
                          });
                      }
                      return returnData;
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const returnData = [];
          const timezone = this.getTimezone();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let endpoint = '';
          let requestMethod = 'GET';
          let body;
          let qs;
          let responseData;
          for (let i = 0; i < items.length; i++) {
              try {
                  body = {};
                  qs = {};
                  if (resource === 'subtask') {
                      if (operation === 'create') {
                          const taskId = this.getNodeParameter('taskId', i);
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/subtasks`;
                          body.name = this.getNodeParameter('name', i);
                          const otherProperties = this.getNodeParameter('otherProperties', i);
                          Object.assign(body, otherProperties);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      if (operation === 'getAll') {
                          const taskId = this.getNodeParameter('taskId', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          const options = this.getNodeParameter('options', i);
                          requestMethod = 'GET';
                          endpoint = `/tasks/${taskId}/subtasks`;
                          Object.assign(qs, options);
                          if (qs.opt_fields) {
                              const fields = qs.opt_fields;
                              if (fields.includes('*')) {
                                  qs.opt_fields = (0, GenericFunctions_1.getTaskFields)()
                                      .map((e) => (0, change_case_1.snakeCase)(e))
                                      .join(',');
                              }
                              else {
                                  qs.opt_fields = qs.opt_fields.join(',');
                              }
                          }
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                          if (!returnAll) {
                              const limit = this.getNodeParameter('limit', i);
                              responseData = responseData.splice(0, limit);
                          }
                      }
                  }
                  if (resource === 'task') {
                      if (operation === 'create') {
                          requestMethod = 'POST';
                          endpoint = '/tasks';
                          body.name = this.getNodeParameter('name', i);
                          body.workspace = this.getNodeParameter('workspace', i);
                          const otherProperties = this.getNodeParameter('otherProperties', i);
                          Object.assign(body, otherProperties);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      else if (operation === 'delete') {
                          requestMethod = 'DELETE';
                          endpoint = '/tasks/' + this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      else if (operation === 'get') {
                          requestMethod = 'GET';
                          endpoint = '/tasks/' + this.getNodeParameter('id', i);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      else if (operation === 'getAll') {
                          const filters = this.getNodeParameter('filters', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          requestMethod = 'GET';
                          endpoint = '/tasks';
                          Object.assign(qs, filters);
                          if (qs.opt_fields) {
                              const fields = qs.opt_fields;
                              if (fields.includes('*')) {
                                  qs.opt_fields = (0, GenericFunctions_1.getTaskFields)()
                                      .map((e) => (0, change_case_1.snakeCase)(e))
                                      .join(',');
                              }
                              else {
                                  qs.opt_fields = qs.opt_fields.join(',');
                              }
                          }
                          if (qs.modified_since) {
                              qs.modified_since = moment_timezone_1.default.tz(qs.modified_since, timezone).format();
                          }
                          if (qs.completed_since) {
                              qs.completed_since = moment_timezone_1.default.tz(qs.completed_since, timezone).format();
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.asanaApiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.data;
                          }
                      }
                      else if (operation === 'move') {
                          const sectionId = this.getNodeParameter('section', i);
                          requestMethod = 'POST';
                          endpoint = `/sections/${sectionId}/addTask`;
                          body.task = this.getNodeParameter('id', i);
                          Object.assign(body);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      else if (operation === 'update') {
                          requestMethod = 'PUT';
                          endpoint = '/tasks/' + this.getNodeParameter('id', i);
                          const otherProperties = this.getNodeParameter('otherProperties', i);
                          Object.assign(body, otherProperties);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      else if (operation === 'search') {
                          const workspaceId = this.getNodeParameter('workspace', i);
                          requestMethod = 'GET';
                          endpoint = `/workspaces/${workspaceId}/tasks/search`;
                          const searchTaskProperties = this.getNodeParameter('searchTaskProperties', i);
                          Object.assign(qs, searchTaskProperties);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                  }
                  if (resource === 'taskComment') {
                      if (operation === 'add') {
                          const taskId = this.getNodeParameter('id', i);
                          const isTextHtml = this.getNodeParameter('isTextHtml', i);
                          if (!isTextHtml) {
                              body.text = this.getNodeParameter('text', i);
                          }
                          else {
                              body.html_text = this.getNodeParameter('text', i);
                          }
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/stories`;
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      if (operation === 'remove') {
                          const commentId = this.getNodeParameter('id', i);
                          requestMethod = 'DELETE';
                          endpoint = `/stories/${commentId}`;
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'taskTag') {
                      if (operation === 'add') {
                          const taskId = this.getNodeParameter('id', i);
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/addTag`;
                          body.tag = this.getNodeParameter('tag', i);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const taskId = this.getNodeParameter('id', i);
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/removeTag`;
                          body.tag = this.getNodeParameter('tag', i);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'taskProject') {
                      if (operation === 'add') {
                          const taskId = this.getNodeParameter('id', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/addProject`;
                          body.project = this.getNodeParameter('project', i);
                          Object.assign(body, additionalFields);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'remove') {
                          const taskId = this.getNodeParameter('id', i);
                          requestMethod = 'POST';
                          endpoint = `/tasks/${taskId}/removeProject`;
                          body.project = this.getNodeParameter('project', i);
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                  }
                  if (resource === 'user') {
                      if (operation === 'get') {
                          const userId = this.getNodeParameter('userId', i);
                          requestMethod = 'GET';
                          endpoint = `/users/${userId}`;
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      else if (operation === 'getAll') {
                          const workspaceId = this.getNodeParameter('workspace', i);
                          requestMethod = 'GET';
                          endpoint = `/workspaces/${workspaceId}/users`;
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                  }
                  if (resource === 'project') {
                      if (operation === 'create') {
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const teamId = this.getNodeParameter('team', i);
                          requestMethod = 'POST';
                          endpoint = `/teams/${teamId}/projects`;
                          body.name = this.getNodeParameter('name', i);
                          body.workspace = this.getNodeParameter('workspace', i);
                          if (additionalFields.color) {
                              qs.color = additionalFields.color;
                          }
                          if (additionalFields.due_on) {
                              qs.due_on = additionalFields.due_on;
                          }
                          if (additionalFields.notes) {
                              qs.notes = additionalFields.notes;
                          }
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      if (operation === 'delete') {
                          const projectId = this.getNodeParameter('id', i);
                          requestMethod = 'DELETE';
                          endpoint = `/projects/${projectId}`;
                          await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = { success: true };
                      }
                      if (operation === 'get') {
                          const projectId = this.getNodeParameter('id', i);
                          requestMethod = 'GET';
                          endpoint = `/projects/${projectId}`;
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                      if (operation === 'getAll') {
                          const workspaceId = this.getNodeParameter('workspace', i);
                          const additionalFields = this.getNodeParameter('additionalFields', i);
                          const returnAll = this.getNodeParameter('returnAll', i);
                          requestMethod = 'GET';
                          endpoint = '/projects';
                          if (additionalFields.team) {
                              qs.team = additionalFields.team;
                          }
                          else {
                              qs.workspace = workspaceId;
                          }
                          if (additionalFields.archived) {
                              qs.archived = additionalFields.archived;
                          }
                          if (returnAll) {
                              responseData = await GenericFunctions_1.asanaApiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
                          }
                          else {
                              qs.limit = this.getNodeParameter('limit', i);
                              responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                              responseData = responseData.data;
                          }
                      }
                      if (operation === 'update') {
                          const projectId = this.getNodeParameter('id', i);
                          const updateFields = this.getNodeParameter('updateFields', i);
                          requestMethod = 'PUT';
                          endpoint = `/projects/${projectId}`;
                          if (updateFields.color) {
                              qs.color = updateFields.color;
                          }
                          if (updateFields.due_on) {
                              qs.due_on = updateFields.due_on;
                          }
                          if (updateFields.name) {
                              body.name = updateFields.name;
                          }
                          if (updateFields.notes) {
                              qs.notes = updateFields.notes;
                          }
                          if (updateFields.owner) {
                              body.owner = updateFields.owner;
                          }
                          if (updateFields.team) {
                              body.team = updateFields.team;
                          }
                          responseData = await GenericFunctions_1.asanaApiRequest.call(this, requestMethod, endpoint, body, qs);
                          responseData = responseData.data;
                      }
                  }
                  returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), {
                      itemData: { item: i },
                  }));
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Asana = Asana;
  //# sourceMappingURL=Asana.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsanaApi = void 0;
  class AsanaApi {
      constructor() {
          this.name = 'asanaApi';
          this.displayName = 'Asana API';
          this.documentationUrl = 'asana';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
      }
  }
  exports.AsanaApi = AsanaApi;
  //# sourceMappingURL=AsanaApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsanaOAuth2Api = void 0;
  class AsanaOAuth2Api {
      constructor() {
          this.name = 'asanaOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Asana OAuth2 API';
          this.documentationUrl = 'asana';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://app.asana.com/-/oauth_authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://app.asana.com/-/oauth_token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.AsanaOAuth2Api = AsanaOAuth2Api;
  //# sourceMappingURL=AsanaOAuth2Api.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsanaApi = void 0;
  class AsanaApi {
      constructor() {
          this.name = 'asanaApi';
          this.displayName = 'Asana API';
          this.documentationUrl = 'asana';
          this.properties = [
              {
                  displayName: 'Access Token',
                  name: 'accessToken',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
          ];
          this.authenticate = {
              type: 'generic',
              properties: {
                  headers: {
                      Authorization: '=Bearer {{$credentials.accessToken}}',
                  },
              },
          };
      }
  }
  exports.AsanaApi = AsanaApi;
  //# sourceMappingURL=AsanaApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.AsanaOAuth2Api = void 0;
  class AsanaOAuth2Api {
      constructor() {
          this.name = 'asanaOAuth2Api';
          this.extends = ['oAuth2Api'];
          this.displayName = 'Asana OAuth2 API';
          this.documentationUrl = 'asana';
          this.properties = [
              {
                  displayName: 'Grant Type',
                  name: 'grantType',
                  type: 'hidden',
                  default: 'authorizationCode',
              },
              {
                  displayName: 'Authorization URL',
                  name: 'authUrl',
                  type: 'hidden',
                  default: 'https://app.asana.com/-/oauth_authorize',
                  required: true,
              },
              {
                  displayName: 'Access Token URL',
                  name: 'accessTokenUrl',
                  type: 'hidden',
                  default: 'https://app.asana.com/-/oauth_token',
                  required: true,
              },
              {
                  displayName: 'Scope',
                  name: 'scope',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Auth URI Query Parameters',
                  name: 'authQueryParameters',
                  type: 'hidden',
                  default: '',
              },
              {
                  displayName: 'Authentication',
                  name: 'authentication',
                  type: 'hidden',
                  default: 'body',
              },
          ];
      }
  }
  exports.AsanaOAuth2Api = AsanaOAuth2Api;
  //# sourceMappingURL=AsanaOAuth2Api.credentials.js.map

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

  # Asana node

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

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

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

  /// note | Update to 1.22.2 or above
  Due to changes in Asana's API, some operations in this node stopped working on 17th January 2023. Upgrade to n8n 1.22.2 or above.
  ///

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

  ## Operations

  * Project
      * Create a new project
      * Delete a project
      * Get a project
      * Get all projects
      * Update a project
  * Subtask
      * Create a subtask
      * Get all subtasks
  * Task
      * Create a task
      * Delete a task
      * Get a task
      * Get all tasks
      * Move a task
      * Search for tasks
      * Update a task
  * Task Comment
      * Add a comment to a task
      * Remove a comment from a task
  * Task Tag
      * Add a tag to a task
      * Remove a tag from a task
  * Task Project
      * Add a task to a project
      * Remove a task from a project
  * User
      * Get a user
      * Get all users

  ## Templates and examples

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

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

example_workflow:
  {"name":"Asana Example Workflow","nodes":[{"parameters":{"authentication":"accessToken","resource":"project","operation":"create","taskId":"example-value","name":"Example Name","otherProperties":{},"returnAll":false,"limit":100,"options":{},"workspace":"","id":"example-value","filters":{},"projectId":"","section":"","searchTaskProperties":{},"isTextHtml":false,"text":"example-value","additionalFields":{},"project":"","tag":"","userId":"example-value","team":"","updateFields":{}},"id":"8m9invqdigp8tig82js8q8","name":"Asana","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"authentication":"accessToken","resource":"project","operation":"create","taskId":"example-value","name":"Example Name","otherProperties":{},"returnAll":false,"limit":100,"options":{},"workspace":"","id":"example-value","filters":{},"projectId":"","section":"","searchTaskProperties":{},"isTextHtml":false,"text":"example-value","additionalFields":{},"project":"","tag":"","userId":"example-value","team":"","updateFields":{}}

properties_schema:
  [{"displayName":"Authentication","name":"authentication","type":"options","default":"accessToken","options":[{"name":"Access Token","value":"accessToken"},{"name":"OAuth2","value":"oAuth2"}]},{"displayName":"Resource","name":"resource","type":"options","default":"task","options":[{"name":"Project","value":"project"},{"name":"Subtask","value":"subtask"},{"name":"Task","value":"task"},{"name":"Task Comment","value":"taskComment"},{"name":"Task Project","value":"taskProject"},{"name":"Task Tag","value":"taskTag"},{"name":"User","value":"user"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","description":"Create a subtask","options":[{"name":"Create","value":"create","description":"Create a subtask"},{"name":"Get Many","value":"getAll","description":"Get many substasks"}]},{"displayName":"Parent Task ID","name":"taskId","type":"string","default":"","required":true,"description":"The task to operate on"},{"displayName":"Name","name":"name","type":"string","default":"","required":true,"description":"The name of the subtask to create"},{"displayName":"Additional Fields","name":"otherProperties","type":"collection","default":"{","description":"Set Assignee on the subtask. Choose from the list, or specify an ID using an <a href=","placeholder":"Add Field"},{"displayName":"Parent Task ID","name":"taskId","type":"string","default":"","required":true,"description":"The task to operate on"},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":100,"description":"Max number of results to return"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"Defines fields to return. Choose from the list, or specify IDs using an <a href=","placeholder":"Add Field"},{"displayName":"Operation","name":"operation","type":"options","default":"create","description":"Create a task","options":[{"name":"Create","value":"create","description":"Create a task"},{"name":"Delete","value":"delete","description":"Delete a task"},{"name":"Get","value":"get","description":"Get a task"},{"name":"Get Many","value":"getAll","description":"Get many tasks"},{"name":"Move","value":"move","description":"Move a task"},{"name":"Search","value":"search","description":"Search for tasks"},{"name":"Update","value":"update","description":"Update a task"}]},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace to create the task in. Choose from the list, or specify an ID using an <a href="},{"displayName":"Name","name":"name","type":"string","default":"","required":true,"description":"The name of the task to create"},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to delete"},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to get the data of"},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":100,"description":"Max number of results to return"},{"displayName":"Filters","name":"filters","type":"collection","default":"{","description":"Properties to search for","placeholder":"Add Filter"},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to be moved"},{"displayName":"Project Name or ID","name":"projectId","type":"options","default":"","required":true,"description":"Project to show the sections of. Choose from the list, or specify an ID using an <a href="},{"displayName":"Section Name or ID","name":"section","type":"options","default":"","required":true,"description":"The Section to move the task to. Choose from the list, or specify an ID using an <a href="},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to update the data of"},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace in which the task is searched. Choose from the list, or specify an ID using an <a href="},{"displayName":"Filters","name":"searchTaskProperties","type":"collection","default":"{","description":"Properties to search for","placeholder":"Add Filter"},{"displayName":"Additional Fields","name":"otherProperties","type":"collection","default":"{","description":"Set Assignee on the task. Choose from the list, or specify an ID using an <a href=","placeholder":"Add Field"},{"displayName":"Operation","name":"operation","type":"options","default":"add","description":"Add a comment to a task","options":[{"name":"Add","value":"add","description":"Add a comment to a task"},{"name":"Remove","value":"remove","description":"Remove a comment from a task"}]},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to add the comment to"},{"displayName":"Is Text HTML","name":"isTextHtml","type":"boolean","default":false,"description":"Whether body is HTML or simple text"},{"displayName":"Text","name":"text","type":"string","default":"","required":true,"description":"The plain text of the comment to add"},{"displayName":"HTML Text","name":"text","type":"string","default":"","required":true,"description":"Comment as HTML string. Do not use together with plain text."},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Properties of the task comment","placeholder":"Add Field"},{"displayName":"Comment ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the comment to be removed"},{"displayName":"Operation","name":"operation","type":"options","default":"add","description":"Add a task to a project","options":[{"name":"Add","value":"add","description":"Add a task to a project"},{"name":"Remove","value":"remove","description":"Remove a task from a project"}]},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to add the project to"},{"displayName":"Project Name or ID","name":"project","type":"options","default":"","required":true,"description":"The project where the task will be added. Choose from the list, or specify an ID using an <a href="},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Other properties to set","placeholder":"Add Field"},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to add the project to"},{"displayName":"Project Name or ID","name":"project","type":"options","default":"","required":true,"description":"The project where the task will be removed from. Choose from the list, or specify an ID using an <a href="},{"displayName":"Operation","name":"operation","type":"options","default":"add","description":"Add a tag to a task","options":[{"name":"Add","value":"add","description":"Add a tag to a task"},{"name":"Remove","value":"remove","description":"Remove a tag from a task"}]},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to add the tag to"},{"displayName":"Tags Name or ID","name":"tag","type":"options","default":"","required":true,"description":"The tag that should be added. Choose from the list, or specify an ID using an <a href="},{"displayName":"Task ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the task to add the tag to"},{"displayName":"Tags Name or ID","name":"tag","type":"options","default":"","required":true,"description":"The tag that should be added. Choose from the list, or specify an ID using an <a href="},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Get a user","options":[{"name":"Get","value":"get","description":"Get a user"},{"name":"Get Many","value":"getAll","description":"Get many users"}]},{"displayName":"User ID","name":"userId","type":"string","default":"","required":true,"description":"An identifier for the user to get data of. Can be one of an email address,the globally unique identifier for the user, or the keyword me to indicate the current user making the request."},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace in which to get users. Choose from the list, or specify an ID using an <a href="},{"displayName":"Operation","name":"operation","type":"options","default":"get","description":"Create a new project","options":[{"name":"Create","value":"create","description":"Create a new project"},{"name":"Delete","value":"delete","description":"Delete a project"},{"name":"Get","value":"get","description":"Get a project"},{"name":"Get Many","value":"getAll","description":"Get many projects"},{"name":"Update","value":"update","description":"Update a project"}]},{"displayName":"Name","name":"name","type":"string","default":"","required":true,"description":"The name of the project to create"},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace to create the project in. Choose from the list, or specify an ID using an <a href="},{"displayName":"Team Name or ID","name":"team","type":"options","default":"","description":"The team this project will be assigned to. Choose from the list, or specify an ID using an <a href="},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Other properties to set","placeholder":"Add Property"},{"displayName":"Project ID","name":"id","type":"string","default":"","required":true},{"displayName":"Project ID","name":"id","type":"string","default":"","required":true},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace in which to get users. Choose from the list, or specify an ID using an <a href="},{"displayName":"Return All","name":"returnAll","type":"boolean","default":false,"description":"Whether to return all results or only up to a given limit"},{"displayName":"Limit","name":"limit","type":"number","default":100,"description":"Max number of results to return"},{"displayName":"Additional Fields","name":"additionalFields","type":"collection","default":"{","description":"Other properties to set","placeholder":"Add Property"},{"displayName":"Workspace Name or ID","name":"workspace","type":"options","default":"","required":true,"description":"The workspace in which to get users. Choose from the list, or specify an ID using an <a href="},{"displayName":"Project ID","name":"id","type":"string","default":"","required":true,"description":"The ID of the project to update the data of"},{"displayName":"Update Fields","name":"updateFields","type":"collection","default":"{","description":"Other properties to set","placeholder":"Add Property"}]


node_type: n8n-nodes-base.ApiTemplateIo
name: ApiTemplateIo
display_name: APITemplate.io
description: Consume the APITemplate.io API
category: transform
icon: file:apiTemplateIo.svg
code_hash: 63ec2b9a1c3a1c0abb162b49e24c4a5e88cacf61107c0d9698d7c2de2206c8b1
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.ApiTemplateIo
documentation_title: APITemplate.io node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"apitemplateio","description":"Templates for apitemplateio"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:15
updated_at: 2025-06-12 08:58:15
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ApiTemplateIo = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  class ApiTemplateIo {
      constructor() {
          this.description = {
              displayName: 'APITemplate.io',
              name: 'apiTemplateIo',
              icon: 'file:apiTemplateIo.svg',
              group: ['transform'],
              version: 1,
              description: 'Consume the APITemplate.io API',
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              defaults: {
                  name: 'APITemplate.io',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'apiTemplateIoApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Account',
                              value: 'account',
                          },
                          {
                              name: 'Image',
                              value: 'image',
                          },
                          {
                              name: 'PDF',
                              value: 'pdf',
                          },
                      ],
                      default: 'image',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      default: 'create',
                      required: true,
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              action: 'Create an image',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resource: ['image'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      default: 'create',
                      required: true,
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              action: 'Create a pdf',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resource: ['pdf'],
                          },
                      },
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      default: 'get',
                      required: true,
                      options: [
                          {
                              name: 'Get',
                              value: 'get',
                              action: 'Get an account',
                          },
                      ],
                      displayOptions: {
                          show: {
                              resource: ['account'],
                          },
                      },
                  },
                  {
                      displayName: 'Template Name or ID',
                      name: 'imageTemplateId',
                      type: 'options',
                      required: true,
                      default: '',
                      description: 'ID of the image template to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                      typeOptions: {
                          loadOptionsMethod: 'getImageTemplates',
                      },
                      displayOptions: {
                          show: {
                              resource: ['image'],
                              operation: ['create'],
                          },
                      },
                  },
                  {
                      displayName: 'Template Name or ID',
                      name: 'pdfTemplateId',
                      type: 'options',
                      required: true,
                      default: '',
                      description: 'ID of the PDF template to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
                      typeOptions: {
                          loadOptionsMethod: 'getPdfTemplates',
                      },
                      displayOptions: {
                          show: {
                              resource: ['pdf'],
                              operation: ['create'],
                          },
                      },
                  },
                  {
                      displayName: 'JSON Parameters',
                      name: 'jsonParameters',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              resource: ['pdf', 'image'],
                              operation: ['create'],
                          },
                      },
                  },
                  {
                      displayName: 'Download',
                      name: 'download',
                      type: 'boolean',
                      default: false,
                      displayOptions: {
                          show: {
                              resource: ['pdf', 'image'],
                              operation: ['create'],
                          },
                      },
                      description: 'Name of the binary property to which to write the data of the read file',
                  },
                  {
                      displayName: 'Binary Property',
                      name: 'binaryProperty',
                      type: 'string',
                      required: true,
                      default: 'data',
                      description: 'Name of the binary property to which to write to',
                      displayOptions: {
                          show: {
                              resource: ['pdf', 'image'],
                              operation: ['create'],
                              download: [true],
                          },
                      },
                  },
                  {
                      displayName: 'Overrides (JSON)',
                      name: 'overridesJson',
                      type: 'json',
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['image'],
                              operation: ['create'],
                              jsonParameters: [true],
                          },
                      },
                      placeholder: '[ {"name": "text_1", "text": "hello world", "textBackgroundColor": "rgba(246, 243, 243, 0)" } ]',
                  },
                  {
                      displayName: 'Properties (JSON)',
                      name: 'propertiesJson',
                      type: 'json',
                      default: '',
                      displayOptions: {
                          show: {
                              resource: ['pdf'],
                              operation: ['create'],
                              jsonParameters: [true],
                          },
                      },
                      placeholder: '{ "name": "text_1" }',
                  },
                  {
                      displayName: 'Overrides',
                      name: 'overridesUi',
                      placeholder: 'Add Override',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      displayOptions: {
                          show: {
                              resource: ['image'],
                              operation: ['create'],
                              jsonParameters: [false],
                          },
                      },
                      default: {},
                      options: [
                          {
                              name: 'overrideValues',
                              displayName: 'Override',
                              values: [
                                  {
                                      displayName: 'Properties',
                                      name: 'propertiesUi',
                                      placeholder: 'Add Property',
                                      type: 'fixedCollection',
                                      typeOptions: {
                                          multipleValues: true,
                                      },
                                      default: {},
                                      options: [
                                          {
                                              name: 'propertyValues',
                                              displayName: 'Property',
                                              values: [
                                                  {
                                                      displayName: 'Key',
                                                      name: 'key',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Name of the property',
                                                  },
                                                  {
                                                      displayName: 'Value',
                                                      name: 'value',
                                                      type: 'string',
                                                      default: '',
                                                      description: 'Value to the property',
                                                  },
                                              ],
                                          },
                                      ],
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Properties',
                      name: 'propertiesUi',
                      placeholder: 'Add Property',
                      type: 'fixedCollection',
                      typeOptions: {
                          multipleValues: true,
                      },
                      default: {},
                      displayOptions: {
                          show: {
                              resource: ['pdf'],
                              operation: ['create'],
                              jsonParameters: [false],
                          },
                      },
                      options: [
                          {
                              name: 'propertyValues',
                              displayName: 'Property',
                              values: [
                                  {
                                      displayName: 'Key',
                                      name: 'key',
                                      type: 'string',
                                      default: '',
                                      description: 'Name of the property',
                                  },
                                  {
                                      displayName: 'Value',
                                      name: 'value',
                                      type: 'string',
                                      default: '',
                                      description: 'Value to the property',
                                  },
                              ],
                          },
                      ],
                  },
                  {
                      displayName: 'Options',
                      name: 'options',
                      type: 'collection',
                      placeholder: 'Add Field',
                      displayOptions: {
                          show: {
                              operation: ['create'],
                              resource: ['pdf', 'image'],
                              download: [true],
                          },
                      },
                      default: {},
                      options: [
                          {
                              displayName: 'File Name',
                              name: 'fileName',
                              type: 'string',
                              default: '',
                              description: 'The name of the downloaded image/pdf. It has to include the extension. For example: report.pdf',
                          },
                      ],
                  },
              ],
          };
          this.methods = {
              loadOptions: {
                  async getImageTemplates() {
                      return GenericFunctions_1.loadResource.call(this, 'image');
                  },
                  async getPdfTemplates() {
                      return GenericFunctions_1.loadResource.call(this, 'pdf');
                  },
              },
          };
      }
      async execute() {
          var _a, _b, _c;
          const items = this.getInputData();
          const returnData = [];
          const length = items.length;
          let responseData;
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          if (resource === 'account') {
              if (operation === 'get') {
                  for (let i = 0; i < length; i++) {
                      try {
                          responseData = await GenericFunctions_1.apiTemplateIoApiRequest.call(this, 'GET', '/account-information');
                          returnData.push(responseData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              returnData.push({ json: { error: error.message } });
                              continue;
                          }
                          throw error;
                      }
                  }
              }
          }
          else if (resource === 'image') {
              if (operation === 'create') {
                  const download = this.getNodeParameter('download', 0);
                  for (let i = 0; i < length; i++) {
                      try {
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          let options = {};
                          if (download) {
                              options = this.getNodeParameter('options', i);
                          }
                          const qs = {
                              template_id: this.getNodeParameter('imageTemplateId', i),
                          };
                          const body = { overrides: [] };
                          if (!jsonParameters) {
                              const overrides = ((_a = this.getNodeParameter('overridesUi', i)) === null || _a === void 0 ? void 0 : _a.overrideValues) || [];
                              if (overrides.length !== 0) {
                                  const data = [];
                                  for (const override of overrides) {
                                      const properties = ((_b = override.propertiesUi) === null || _b === void 0 ? void 0 : _b.propertyValues) || [];
                                      data.push(properties.reduce((obj, value) => Object.assign(obj, { [`${value.key}`]: value.value }), {}));
                                  }
                                  body.overrides = data;
                              }
                          }
                          else {
                              const overrideJson = this.getNodeParameter('overridesJson', i);
                              if (overrideJson !== '') {
                                  const data = (0, GenericFunctions_1.validateJSON)(overrideJson);
                                  if (data === undefined) {
                                      throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'A valid JSON must be provided.', {
                                          itemIndex: i,
                                      });
                                  }
                                  body.overrides = data;
                              }
                          }
                          responseData = await GenericFunctions_1.apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, body);
                          if (download) {
                              const binaryProperty = this.getNodeParameter('binaryProperty', i);
                              const data = await GenericFunctions_1.downloadImage.call(this, responseData.download_url);
                              const fileName = responseData.download_url.split('/').pop();
                              const binaryData = await this.helpers.prepareBinaryData(data, options.fileName || fileName);
                              responseData = {
                                  json: responseData,
                                  binary: {
                                      [binaryProperty]: binaryData,
                                  },
                              };
                          }
                          returnData.push(responseData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              returnData.push({ json: { error: error.message } });
                              continue;
                          }
                          throw error;
                      }
                  }
                  if (download) {
                      return [returnData];
                  }
              }
          }
          else if (resource === 'pdf') {
              if (operation === 'create') {
                  const download = this.getNodeParameter('download', 0);
                  for (let i = 0; i < length; i++) {
                      try {
                          const jsonParameters = this.getNodeParameter('jsonParameters', i);
                          let options = {};
                          if (download) {
                              options = this.getNodeParameter('options', i);
                          }
                          const qs = {
                              template_id: this.getNodeParameter('pdfTemplateId', i),
                          };
                          let data;
                          if (!jsonParameters) {
                              const properties = ((_c = this.getNodeParameter('propertiesUi', i)) === null || _c === void 0 ? void 0 : _c.propertyValues) || [];
                              if (properties.length === 0) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The parameter properties cannot be empty', { itemIndex: i });
                              }
                              data = properties.reduce((obj, value) => Object.assign(obj, { [`${value.key}`]: value.value }), {});
                          }
                          else {
                              const propertiesJson = this.getNodeParameter('propertiesJson', i);
                              data = (0, GenericFunctions_1.validateJSON)(propertiesJson);
                              if (data === undefined) {
                                  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'A valid JSON must be provided.', {
                                      itemIndex: i,
                                  });
                              }
                          }
                          responseData = await GenericFunctions_1.apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, data);
                          if (download) {
                              const binaryProperty = this.getNodeParameter('binaryProperty', i);
                              const imageData = await GenericFunctions_1.downloadImage.call(this, responseData.download_url);
                              const fileName = responseData.download_url.split('/').pop();
                              const binaryData = await this.helpers.prepareBinaryData(imageData, (options.fileName || fileName));
                              responseData = {
                                  json: responseData,
                                  binary: {
                                      [binaryProperty]: binaryData,
                                  },
                              };
                          }
                          returnData.push(responseData);
                      }
                      catch (error) {
                          if (this.continueOnFail()) {
                              returnData.push({ json: { error: error.message } });
                              continue;
                          }
                          throw error;
                      }
                  }
                  if (download) {
                      return [returnData];
                  }
              }
          }
          return [this.helpers.returnJsonArray(returnData)];
      }
  }
  exports.ApiTemplateIo = ApiTemplateIo;
  //# sourceMappingURL=ApiTemplateIo.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ApiTemplateIoApi = void 0;
  class ApiTemplateIoApi {
      constructor() {
          this.name = 'apiTemplateIoApi';
          this.displayName = 'APITemplate.io API';
          this.documentationUrl = 'apiTemplateIo';
          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://api.apitemplate.io/v1',
                  url: '/list-templates',
              },
          };
      }
  }
  exports.ApiTemplateIoApi = ApiTemplateIoApi;
  //# sourceMappingURL=ApiTemplateIoApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ApiTemplateIoApi = void 0;
  class ApiTemplateIoApi {
      constructor() {
          this.name = 'apiTemplateIoApi';
          this.displayName = 'APITemplate.io API';
          this.documentationUrl = 'apiTemplateIo';
          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://api.apitemplate.io/v1',
                  url: '/list-templates',
              },
          };
      }
  }
  exports.ApiTemplateIoApi = ApiTemplateIoApi;
  //# sourceMappingURL=ApiTemplateIoApi.credentials.js.map

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

  # APITemplate.io node

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

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

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

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

  ## Operations

  * Account
      * Get
  * Image
      * Create
  * PDF
      * Create

  ## Templates and examples

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

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

example_workflow:
  {"name":"APITemplate.io Example Workflow","nodes":[{"parameters":{"resource":"account","operation":"get","imageTemplateId":"","pdfTemplateId":"","jsonParameters":false,"download":false,"binaryProperty":"data","overridesJson":null,"propertiesJson":null,"overridesUi":{},"propertiesUi":{},"options":{}},"id":"ukmezcwr5xau3rk6b09x","name":"APITemplate.io","type":"n8n-nodes-base.exampleNode","typeVersion":1,"position":[250,300]}],"connections":{},"active":false,"settings":{},"tags":["example","generated"]}

example_parameters:
  {"resource":"account","operation":"get","imageTemplateId":"","pdfTemplateId":"","jsonParameters":false,"download":false,"binaryProperty":"data","overridesJson":null,"propertiesJson":null,"overridesUi":{},"propertiesUi":{},"options":{}}

properties_schema:
  [{"displayName":"Resource","name":"resource","type":"options","default":"image","options":[{"name":"Account","value":"account"},{"name":"Image","value":"image"},{"name":"PDF","value":"pdf"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","required":true,"options":[{"name":"Create","value":"create"}]},{"displayName":"Operation","name":"operation","type":"options","default":"create","required":true,"options":[{"name":"Create","value":"create"}]},{"displayName":"Operation","name":"operation","type":"options","default":"get","required":true,"options":[{"name":"Get","value":"get"}]},{"displayName":"Template Name or ID","name":"imageTemplateId","type":"options","default":"","required":true,"description":"ID of the image template to use. Choose from the list, or specify an ID using an <a href="},{"displayName":"Template Name or ID","name":"pdfTemplateId","type":"options","default":"","required":true,"description":"ID of the PDF template to use. Choose from the list, or specify an ID using an <a href="},{"displayName":"JSON Parameters","name":"jsonParameters","type":"boolean","default":false},{"displayName":"Download","name":"download","type":"boolean","default":false,"description":"Name of the binary property to which to write the data of the read file"},{"displayName":"Binary Property","name":"binaryProperty","type":"string","default":"data","required":true,"description":"Name of the binary property to which to write to"},{"displayName":"Overrides (JSON)","name":"overridesJson","type":"json","default":"","placeholder":"[ {"},{"displayName":"Properties (JSON)","name":"propertiesJson","type":"json","default":"","placeholder":"{ "},{"displayName":"Overrides","name":"overridesUi","type":"fixedCollection","default":"{","description":"Name of the property","placeholder":"Add Override"},{"displayName":"Properties","name":"propertiesUi","type":"fixedCollection","default":"{","description":"Name of the property","placeholder":"Add Property"},{"displayName":"Options","name":"options","type":"collection","default":"{","description":"The name of the downloaded image/pdf. It has to include the extension. For example: report.pdf","placeholder":"Add Field"}]


node_type: n8n-nodes-base.Baserow
name: Baserow
display_name: Baserow
description: Consume the Baserow API
category: output
icon: file:baserow.svg
code_hash: 35dcc1ad8d7ae19a0beea857f0a72f62a5584b739a0724669647f1bf02de6964
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Baserow
documentation_title: Baserow node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"baserow","description":"Templates for baserow"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"row","operation":"create","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:19
updated_at: 2025-06-12 08:58:19
source_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Baserow = void 0;
  const GenericFunctions_1 = require("./GenericFunctions");
  const OperationDescription_1 = require("./OperationDescription");
  class Baserow {
      constructor() {
          this.description = {
              displayName: 'Baserow',
              name: 'baserow',
              icon: 'file:baserow.svg',
              group: ['output'],
              version: 1,
              description: 'Consume the Baserow API',
              subtitle: '={{$parameter["operation"] + ":" + $parameter["resource"]}}',
              defaults: {
                  name: 'Baserow',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'baserowApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Row',
                              value: 'row',
                          },
                      ],
                      default: 'row',
                  },
                  {
                      displayName: 'Operation',
                      name: 'operation',
                      type: 'options',
                      noDataExpression: true,
                      displayOptions: {
                          show: {
                              resource: ['row'],
                          },
                      },
                      options: [
                          {
                              name: 'Create',
                              value: 'create',
                              description: 'Create a row',
                              action: 'Create a row',
                          },
                          {
                              name: 'Delete',
                              value: 'delete',
                              description: 'Delete a row',
                              action: 'Delete a row',
                          },
                          {
                              name: 'Get',
                              value: 'get',
                              description: 'Retrieve a row',
                              action: 'Get a row',
                          },
                          {
                              name: 'Get Many',
                              value: 'getAll',
                              description: 'Retrieve many rows',
                              action: 'Get many rows',
                          },
                          {
                              name: 'Update',
                              value: 'update',
                              description: 'Update a row',
                              action: 'Update a row',
                          },
                      ],
                      default: 'getAll',
                  },
                  ...OperationDescription_1.operationFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getDatabaseIds() {
                      const credentials = (await this.getCredentials('baserowApi'));
                      const jwtToken = await GenericFunctions_1.getJwtToken.call(this, credentials);
                      const endpoint = '/api/applications/';
                      const databases = (await GenericFunctions_1.baserowApiRequest.call(this, 'GET', endpoint, jwtToken));
                      return (0, GenericFunctions_1.toOptions)(databases);
                  },
                  async getTableIds() {
                      const credentials = (await this.getCredentials('baserowApi'));
                      const jwtToken = await GenericFunctions_1.getJwtToken.call(this, credentials);
                      const databaseId = this.getNodeParameter('databaseId', 0);
                      const endpoint = `/api/database/tables/database/${databaseId}/`;
                      const tables = (await GenericFunctions_1.baserowApiRequest.call(this, 'GET', endpoint, jwtToken));
                      return (0, GenericFunctions_1.toOptions)(tables);
                  },
                  async getTableFields() {
                      const credentials = (await this.getCredentials('baserowApi'));
                      const jwtToken = await GenericFunctions_1.getJwtToken.call(this, credentials);
                      const tableId = this.getNodeParameter('tableId', 0);
                      const endpoint = `/api/database/fields/table/${tableId}/`;
                      const fields = (await GenericFunctions_1.baserowApiRequest.call(this, 'GET', endpoint, jwtToken));
                      return (0, GenericFunctions_1.toOptions)(fields);
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const mapper = new GenericFunctions_1.TableFieldMapper();
          const returnData = [];
          const operation = this.getNodeParameter('operation', 0);
          const tableId = this.getNodeParameter('tableId', 0);
          const credentials = (await this.getCredentials('baserowApi'));
          const jwtToken = await GenericFunctions_1.getJwtToken.call(this, credentials);
          const fields = await mapper.getTableFields.call(this, tableId, jwtToken);
          mapper.createMappings(fields);
          for (let i = 0; i < items.length; i++) {
              try {
                  if (operation === 'getAll') {
                      const { order, filters, filterType, search } = this.getNodeParameter('additionalOptions', i);
                      const qs = {};
                      if (order === null || order === void 0 ? void 0 : order.fields) {
                          qs.order_by = order.fields
                              .map(({ field, direction }) => `${direction}${mapper.setField(field)}`)
                              .join(',');
                      }
                      if (filters === null || filters === void 0 ? void 0 : filters.fields) {
                          filters.fields.forEach(({ field, operator, value }) => {
                              qs[`filter__field_${mapper.setField(field)}__${operator}`] = value;
                          });
                      }
                      if (filterType) {
                          qs.filter_type = filterType;
                      }
                      if (search) {
                          qs.search = search;
                      }
                      const endpoint = `/api/database/rows/table/${tableId}/`;
                      const rows = (await GenericFunctions_1.baserowApiRequestAllItems.call(this, 'GET', endpoint, jwtToken, {}, qs));
                      rows.forEach((row) => mapper.idsToNames(row));
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(rows), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'get') {
                      const rowId = this.getNodeParameter('rowId', i);
                      const endpoint = `/api/database/rows/table/${tableId}/${rowId}/`;
                      const row = await GenericFunctions_1.baserowApiRequest.call(this, 'GET', endpoint, jwtToken);
                      mapper.idsToNames(row);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(row), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'create') {
                      const body = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputDataToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputDataToIgnore.includes(key))
                                  continue;
                              body[key] = items[i].json[key];
                              mapper.namesToIds(body);
                          }
                      }
                      else {
                          const fieldsUi = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fieldsUi) {
                              body[`field_${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      const endpoint = `/api/database/rows/table/${tableId}/`;
                      const createdRow = await GenericFunctions_1.baserowApiRequest.call(this, 'POST', endpoint, jwtToken, body);
                      mapper.idsToNames(createdRow);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(createdRow), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'update') {
                      const rowId = this.getNodeParameter('rowId', i);
                      const body = {};
                      const dataToSend = this.getNodeParameter('dataToSend', 0);
                      if (dataToSend === 'autoMapInputData') {
                          const incomingKeys = Object.keys(items[i].json);
                          const rawInputsToIgnore = this.getNodeParameter('inputsToIgnore', i);
                          const inputsToIgnore = rawInputsToIgnore.split(',').map((c) => c.trim());
                          for (const key of incomingKeys) {
                              if (inputsToIgnore.includes(key))
                                  continue;
                              body[key] = items[i].json[key];
                              mapper.namesToIds(body);
                          }
                      }
                      else {
                          const fieldsUi = this.getNodeParameter('fieldsUi.fieldValues', i, []);
                          for (const field of fieldsUi) {
                              body[`field_${field.fieldId}`] = field.fieldValue;
                          }
                      }
                      const endpoint = `/api/database/rows/table/${tableId}/${rowId}/`;
                      const updatedRow = await GenericFunctions_1.baserowApiRequest.call(this, 'PATCH', endpoint, jwtToken, body);
                      mapper.idsToNames(updatedRow);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(updatedRow), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'delete') {
                      const rowId = this.getNodeParameter('rowId', i);
                      const endpoint = `/api/database/rows/table/${tableId}/${rowId}/`;
                      await GenericFunctions_1.baserowApiRequest.call(this, 'DELETE', endpoint, jwtToken);
                      const executionData = this.helpers.constructExecutionMetaData([{ json: { success: true } }], { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              catch (error) {
                  if (this.continueOnFail()) {
                      returnData.push({ error: error.message, json: {}, itemIndex: i });
                      continue;
                  }
                  throw error;
              }
          }
          return [returnData];
      }
  }
  exports.Baserow = Baserow;
  //# sourceMappingURL=Baserow.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BaserowApi = void 0;
  class BaserowApi {
      constructor() {
          this.name = 'baserowApi';
          this.displayName = 'Baserow API';
          this.documentationUrl = 'baserow';
          this.properties = [
              {
                  displayName: 'Host',
                  name: 'host',
                  type: 'string',
                  default: 'https://api.baserow.io',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
              },
          ];
      }
  }
  exports.BaserowApi = BaserowApi;
  //# sourceMappingURL=BaserowApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BaserowApi = void 0;
  class BaserowApi {
      constructor() {
          this.name = 'baserowApi';
          this.displayName = 'Baserow API';
          this.documentationUrl = 'baserow';
          this.properties = [
              {
                  displayName: 'Host',
                  name: 'host',
                  type: 'string',
                  default: 'https://api.baserow.io',
              },
              {
                  displayName: 'Username',
                  name: 'username',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Password',
                  name: 'password',
                  type: 'string',
                  default: '',
                  typeOptions: {
                      password: true,
                  },
              },
          ];
      }
  }
  exports.BaserowApi = BaserowApi;
  //# sourceMappingURL=BaserowApi.credentials.js.map

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

  # Baserow node

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

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

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

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

  ## Operations

  * Row
      * Create a row
      * Delete a row
      * Retrieve a row
      * Retrieve all rows
      * Update a row

  ## Templates and examples

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

example_workflow:
  {"name":"Baserow Example Workflow","nodes":[{"parameters":{"resource":"row","operation":"create","dynamic_property":null},"id":"pw576ctucdcl085h0w104","name":"Baserow","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":"row","options":[{"name":"Row","value":"row"}]},{"displayName":"Operation","name":"operation","type":"options","default":"getAll","description":"Create a row","options":[{"name":"Create","value":"create","description":"Create a row"},{"name":"Delete","value":"delete","description":"Delete a row"},{"name":"Get","value":"get","description":"Retrieve a row"},{"name":"Get Many","value":"getAll","description":"Retrieve many rows"},{"name":"Update","value":"update","description":"Update a row"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...OperationDescription_1.operationFields"}]


node_type: n8n-nodes-base.Bitwarden
name: Bitwarden
display_name: Bitwarden
description: Consume the Bitwarden API
category: transform
icon: file:bitwarden.svg
code_hash: 20bdb447182caf7742ac1e31d75b73fd993e9add607facca5fb2273d51707339
documentation_url: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.Bitwarden
documentation_title: Bitwarden node documentation
operations: []
api_methods: []
documentation_examples: []
templates: [{"name":"bitwarden","description":"Templates for bitwarden"}]
related_resources: []
required_scopes: []
parameter_schemas: []
troubleshooting_info: []
example_parameters: {"resource":"collection","dynamic_property":null}
package_name: n8n-nodes-base
version: 1.0
extracted_at: 2025-06-12 08:58:19
updated_at: 2025-06-12 08:58:19
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.Bitwarden = void 0;
  const n8n_workflow_1 = require("n8n-workflow");
  const GenericFunctions_1 = require("./GenericFunctions");
  const CollectionDescription_1 = require("./descriptions/CollectionDescription");
  const EventDescription_1 = require("./descriptions/EventDescription");
  const GroupDescription_1 = require("./descriptions/GroupDescription");
  const MemberDescription_1 = require("./descriptions/MemberDescription");
  const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
  const partialRight_1 = __importDefault(require("lodash/partialRight"));
  class Bitwarden {
      constructor() {
          this.description = {
              displayName: 'Bitwarden',
              name: 'bitwarden',
              icon: 'file:bitwarden.svg',
              group: ['transform'],
              version: 1,
              subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
              description: 'Consume the Bitwarden API',
              defaults: {
                  name: 'Bitwarden',
              },
              inputs: ['main'],
              outputs: ['main'],
              credentials: [
                  {
                      name: 'bitwardenApi',
                      required: true,
                  },
              ],
              properties: [
                  {
                      displayName: 'Resource',
                      name: 'resource',
                      type: 'options',
                      noDataExpression: true,
                      options: [
                          {
                              name: 'Collection',
                              value: 'collection',
                          },
                          {
                              name: 'Event',
                              value: 'event',
                          },
                          {
                              name: 'Group',
                              value: 'group',
                          },
                          {
                              name: 'Member',
                              value: 'member',
                          },
                      ],
                      default: 'collection',
                  },
                  ...CollectionDescription_1.collectionOperations,
                  ...CollectionDescription_1.collectionFields,
                  ...EventDescription_1.eventOperations,
                  ...EventDescription_1.eventFields,
                  ...GroupDescription_1.groupOperations,
                  ...GroupDescription_1.groupFields,
                  ...MemberDescription_1.memberOperations,
                  ...MemberDescription_1.memberFields,
              ],
          };
          this.methods = {
              loadOptions: {
                  async getGroups() {
                      return GenericFunctions_1.loadResource.call(this, 'groups');
                  },
                  async getCollections() {
                      return GenericFunctions_1.loadResource.call(this, 'collections');
                  },
              },
          };
      }
      async execute() {
          const items = this.getInputData();
          const resource = this.getNodeParameter('resource', 0);
          const operation = this.getNodeParameter('operation', 0);
          let responseData;
          const returnData = [];
          const token = await GenericFunctions_1.getAccessToken.call(this);
          const bitwardenApiRequest = (0, partialRight_1.default)(GenericFunctions_1.bitwardenApiRequest, token);
          const handleGetAll = (0, partialRight_1.default)(GenericFunctions_1.handleGetAll, token);
          for (let i = 0; i < items.length; i++) {
              if (resource === 'collection') {
                  if (operation === 'delete') {
                      const id = this.getNodeParameter('collectionId', i);
                      const endpoint = `/public/collections/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'get') {
                      const id = this.getNodeParameter('collectionId', i);
                      const endpoint = `/public/collections/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'getAll') {
                      const endpoint = '/public/collections';
                      responseData = await handleGetAll.call(this, i, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'update') {
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if ((0, isEmpty_1.default)(updateFields)) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                      }
                      const { groups, externalId } = updateFields;
                      const body = {};
                      if (groups) {
                          body.groups = groups.map((groupId) => ({
                              id: groupId,
                              ReadOnly: false,
                          }));
                      }
                      if (externalId) {
                          body.externalId = externalId;
                      }
                      const id = this.getNodeParameter('collectionId', i);
                      const endpoint = `/public/collections/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'PUT', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              else if (resource === 'event') {
                  if (operation === 'getAll') {
                      const filters = this.getNodeParameter('filters', i);
                      const qs = (0, isEmpty_1.default)(filters) ? {} : filters;
                      const endpoint = '/public/events';
                      responseData = await handleGetAll.call(this, i, 'GET', endpoint, qs, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              else if (resource === 'group') {
                  if (operation === 'create') {
                      const body = {
                          name: this.getNodeParameter('name', i),
                          AccessAll: this.getNodeParameter('accessAll', i),
                      };
                      const { collections, externalId } = this.getNodeParameter('additionalFields', i);
                      if (collections) {
                          body.collections = collections.map((collectionId) => ({
                              id: collectionId,
                              ReadOnly: false,
                          }));
                      }
                      if (externalId) {
                          body.externalId = externalId;
                      }
                      const endpoint = '/public/groups';
                      responseData = await bitwardenApiRequest.call(this, 'POST', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'delete') {
                      const id = this.getNodeParameter('groupId', i);
                      const endpoint = `/public/groups/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'get') {
                      const id = this.getNodeParameter('groupId', i);
                      const endpoint = `/public/groups/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'getAll') {
                      const endpoint = '/public/groups';
                      responseData = await handleGetAll.call(this, i, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'getMembers') {
                      const id = this.getNodeParameter('groupId', i);
                      const endpoint = `/public/groups/${id}/member-ids`;
                      responseData = await bitwardenApiRequest.call(this, 'GET', endpoint, {}, {});
                      responseData = responseData.map((memberId) => ({ memberId }));
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'update') {
                      const groupId = this.getNodeParameter('groupId', i);
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if ((0, isEmpty_1.default)(updateFields)) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                      }
                      let { name, accessAll } = updateFields;
                      if (name === undefined) {
                          responseData = (await bitwardenApiRequest.call(this, 'GET', `/public/groups/${groupId}`, {}, {}));
                          name = responseData.name;
                      }
                      if (accessAll === undefined) {
                          accessAll = false;
                      }
                      const body = {
                          name,
                          AccessAll: accessAll,
                      };
                      const { collections, externalId } = updateFields;
                      if (collections) {
                          body.collections = collections.map((collectionId) => ({
                              id: collectionId,
                              ReadOnly: false,
                          }));
                      }
                      if (externalId) {
                          body.externalId = externalId;
                      }
                      const endpoint = `/public/groups/${groupId}`;
                      responseData = await bitwardenApiRequest.call(this, 'PUT', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'updateMembers') {
                      const memberIds = this.getNodeParameter('memberIds', i);
                      const body = {
                          memberIds: memberIds.includes(',') ? memberIds.split(',') : [memberIds],
                      };
                      const groupId = this.getNodeParameter('groupId', i);
                      const endpoint = `/public/groups/${groupId}/member-ids`;
                      responseData = await bitwardenApiRequest.call(this, 'PUT', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
              else if (resource === 'member') {
                  if (operation === 'create') {
                      const body = {
                          email: this.getNodeParameter('email', i),
                          type: this.getNodeParameter('type', i),
                          AccessAll: this.getNodeParameter('accessAll', i),
                      };
                      const { collections, externalId } = this.getNodeParameter('additionalFields', i);
                      if (collections) {
                          body.collections = collections.map((collectionId) => ({
                              id: collectionId,
                              ReadOnly: false,
                          }));
                      }
                      if (externalId) {
                          body.externalId = externalId;
                      }
                      const endpoint = '/public/members/';
                      responseData = await bitwardenApiRequest.call(this, 'POST', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'delete') {
                      const id = this.getNodeParameter('memberId', i);
                      const endpoint = `/public/members/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'DELETE', endpoint, {}, {});
                      responseData = { success: true };
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'get') {
                      const id = this.getNodeParameter('memberId', i);
                      const endpoint = `/public/members/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'getAll') {
                      const endpoint = '/public/members';
                      responseData = await handleGetAll.call(this, i, 'GET', endpoint, {}, {});
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'getGroups') {
                      const id = this.getNodeParameter('memberId', i);
                      const endpoint = `/public/members/${id}/group-ids`;
                      responseData = await bitwardenApiRequest.call(this, 'GET', endpoint, {}, {});
                      responseData = responseData.map((groupId) => ({ groupId }));
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'update') {
                      const body = {};
                      const updateFields = this.getNodeParameter('updateFields', i);
                      if ((0, isEmpty_1.default)(updateFields)) {
                          throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please enter at least one field to update for the ${resource}.`, { itemIndex: i });
                      }
                      const { accessAll, collections, externalId, type } = updateFields;
                      if (accessAll !== undefined) {
                          body.AccessAll = accessAll;
                      }
                      if (collections) {
                          body.collections = collections.map((collectionId) => ({
                              id: collectionId,
                              ReadOnly: false,
                          }));
                      }
                      if (externalId) {
                          body.externalId = externalId;
                      }
                      if (type !== undefined) {
                          body.Type = type;
                      }
                      const id = this.getNodeParameter('memberId', i);
                      const endpoint = `/public/members/${id}`;
                      responseData = await bitwardenApiRequest.call(this, 'PUT', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
                  else if (operation === 'updateGroups') {
                      const groupIds = this.getNodeParameter('groupIds', i);
                      const body = {
                          groupIds: groupIds.includes(',') ? groupIds.split(',') : [groupIds],
                      };
                      const memberId = this.getNodeParameter('memberId', i);
                      const endpoint = `/public/members/${memberId}/group-ids`;
                      responseData = await bitwardenApiRequest.call(this, 'PUT', endpoint, {}, body);
                      const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
                      returnData.push(...executionData);
                  }
              }
          }
          return [returnData];
      }
  }
  exports.Bitwarden = Bitwarden;
  //# sourceMappingURL=Bitwarden.node.js.map

credential_code:
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BitwardenApi = void 0;
  class BitwardenApi {
      constructor() {
          this.name = 'bitwardenApi';
          this.displayName = 'Bitwarden API';
          this.documentationUrl = 'bitwarden';
          this.properties = [
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Self-Hosted Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
          ];
      }
  }
  exports.BitwardenApi = BitwardenApi;
  //# sourceMappingURL=BitwardenApi.credentials.js.map

  // --- Next Credential File ---

  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.BitwardenApi = void 0;
  class BitwardenApi {
      constructor() {
          this.name = 'bitwardenApi';
          this.displayName = 'Bitwarden API';
          this.documentationUrl = 'bitwarden';
          this.properties = [
              {
                  displayName: 'Client ID',
                  name: 'clientId',
                  type: 'string',
                  default: '',
              },
              {
                  displayName: 'Client Secret',
                  name: 'clientSecret',
                  type: 'string',
                  typeOptions: { password: true },
                  default: '',
              },
              {
                  displayName: 'Environment',
                  name: 'environment',
                  type: 'options',
                  default: 'cloudHosted',
                  options: [
                      {
                          name: 'Cloud-Hosted',
                          value: 'cloudHosted',
                      },
                      {
                          name: 'Self-Hosted',
                          value: 'selfHosted',
                      },
                  ],
              },
              {
                  displayName: 'Self-Hosted Domain',
                  name: 'domain',
                  type: 'string',
                  default: '',
                  placeholder: 'https://www.mydomain.com',
                  displayOptions: {
                      show: {
                          environment: ['selfHosted'],
                      },
                  },
              },
          ];
      }
  }
  exports.BitwardenApi = BitwardenApi;
  //# sourceMappingURL=BitwardenApi.credentials.js.map

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

  # Bitwarden node

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

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

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

  ## Operations

  * Collection
      * Delete
      * Get
      * Get All
      * Update
  * Event
      * Get All
  * Group
      * Create
      * Delete
      * Get
      * Get All
      * Get Members
      * Update
      * Update Members
  * Member
      * Create
      * Delete
      * Get
      * Get All
      * Get Groups
      * Update
      * Update Groups

  ## Templates and examples

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

example_workflow:
  {"name":"Bitwarden Example Workflow","nodes":[{"parameters":{"resource":"collection","dynamic_property":null},"id":"ybmcwu79rob18h2ahs15hd","name":"Bitwarden","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":"collection","options":[{"name":"Collection","value":"collection"},{"name":"Event","value":"event"},{"name":"Group","value":"group"},{"name":"Member","value":"member"}]},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CollectionDescription_1.collectionOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...CollectionDescription_1.collectionFields"},{"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":"...GroupDescription_1.groupOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...GroupDescription_1.groupFields"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MemberDescription_1.memberOperations"},{"name":"dynamic_property","type":"unknown","displayName":"Dynamic Property","_source":"...MemberDescription_1.memberFields"}]


