n8n-nodes-autotask 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/README.md +764 -764
  2. package/dist/nodes/Autotask/Autotask.node.js +24 -2
  3. package/dist/nodes/Autotask/Autotask.node.js.map +1 -1
  4. package/dist/nodes/Autotask/AutotaskAiTools.node.js +11 -8
  5. package/dist/nodes/Autotask/AutotaskAiTools.node.js.map +1 -1
  6. package/dist/nodes/Autotask/AutotaskTrigger.node.js +2 -2
  7. package/dist/nodes/Autotask/AutotaskTrigger.node.js.map +1 -1
  8. package/dist/nodes/Autotask/ai-tools/description-builders.d.ts +7 -6
  9. package/dist/nodes/Autotask/ai-tools/description-builders.js +39 -14
  10. package/dist/nodes/Autotask/ai-tools/description-builders.js.map +1 -1
  11. package/dist/nodes/Autotask/ai-tools/schema-generator.d.ts +2 -2
  12. package/dist/nodes/Autotask/ai-tools/schema-generator.js +52 -14
  13. package/dist/nodes/Autotask/ai-tools/schema-generator.js.map +1 -1
  14. package/dist/nodes/Autotask/ai-tools/tool-executor.js +32 -13
  15. package/dist/nodes/Autotask/ai-tools/tool-executor.js.map +1 -1
  16. package/dist/nodes/Autotask/constants/field.constants.js +1 -1
  17. package/dist/nodes/Autotask/constants/field.constants.js.map +1 -1
  18. package/dist/nodes/Autotask/helpers/common-operations-context.d.ts +8 -0
  19. package/dist/nodes/Autotask/helpers/common-operations-context.js +49 -0
  20. package/dist/nodes/Autotask/helpers/common-operations-context.js.map +1 -0
  21. package/dist/nodes/Autotask/helpers/contact-mover.js +13 -7
  22. package/dist/nodes/Autotask/helpers/contact-mover.js.map +1 -1
  23. package/dist/nodes/Autotask/helpers/date-time/utils.js +1 -1
  24. package/dist/nodes/Autotask/helpers/date-time/utils.js.map +1 -1
  25. package/dist/nodes/Autotask/helpers/date-time/wrapper.js +4 -1
  26. package/dist/nodes/Autotask/helpers/date-time/wrapper.js.map +1 -1
  27. package/dist/nodes/Autotask/helpers/entity/api.js +22 -18
  28. package/dist/nodes/Autotask/helpers/entity/api.js.map +1 -1
  29. package/dist/nodes/Autotask/helpers/http/rateLimit.js +5 -5
  30. package/dist/nodes/Autotask/helpers/impersonation.d.ts +1 -0
  31. package/dist/nodes/Autotask/helpers/impersonation.js +22 -0
  32. package/dist/nodes/Autotask/helpers/impersonation.js.map +1 -1
  33. package/dist/nodes/Autotask/helpers/resource-operations.helper.js +59 -0
  34. package/dist/nodes/Autotask/helpers/resource-operations.helper.js.map +1 -1
  35. package/dist/nodes/Autotask/helpers/udf/flatten.js +7 -1
  36. package/dist/nodes/Autotask/helpers/udf/flatten.js.map +1 -1
  37. package/dist/nodes/Autotask/helpers/webhook/resources.js +2 -2
  38. package/dist/nodes/Autotask/helpers/webhook/resources.js.map +1 -1
  39. package/dist/nodes/Autotask/helpers/webhook/signature.js +6 -3
  40. package/dist/nodes/Autotask/helpers/webhook/signature.js.map +1 -1
  41. package/dist/nodes/Autotask/helpers/webhook/urls.js +2 -2
  42. package/dist/nodes/Autotask/helpers/webhook/urls.js.map +1 -1
  43. package/dist/nodes/Autotask/helpers/work-reassigner.js +1 -1
  44. package/dist/nodes/Autotask/helpers/work-reassigner.js.map +1 -1
  45. package/dist/nodes/Autotask/operations/base/create-operation.js +26 -2
  46. package/dist/nodes/Autotask/operations/base/create-operation.js.map +1 -1
  47. package/dist/nodes/Autotask/operations/base/field-validator.d.ts +1 -1
  48. package/dist/nodes/Autotask/operations/base/field-validator.js +3 -2
  49. package/dist/nodes/Autotask/operations/base/field-validator.js.map +1 -1
  50. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js +16 -14
  51. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js.map +1 -1
  52. package/dist/nodes/Autotask/operations/base/update-operation.js +26 -2
  53. package/dist/nodes/Autotask/operations/base/update-operation.js.map +1 -1
  54. package/dist/nodes/Autotask/operations/common/common-operations-handler.d.ts +2 -0
  55. package/dist/nodes/Autotask/operations/common/common-operations-handler.js +33 -0
  56. package/dist/nodes/Autotask/operations/common/common-operations-handler.js.map +1 -0
  57. package/dist/nodes/Autotask/operations/common/select-columns/include-fields.js +12 -16
  58. package/dist/nodes/Autotask/operations/common/select-columns/include-fields.js.map +1 -1
  59. package/dist/nodes/Autotask/resources/appointments/execute.js +0 -13
  60. package/dist/nodes/Autotask/resources/appointments/execute.js.map +1 -1
  61. package/dist/nodes/Autotask/resources/billingCodes/execute.js +0 -13
  62. package/dist/nodes/Autotask/resources/billingCodes/execute.js.map +1 -1
  63. package/dist/nodes/Autotask/resources/billingItems/execute.js +0 -13
  64. package/dist/nodes/Autotask/resources/billingItems/execute.js.map +1 -1
  65. package/dist/nodes/Autotask/resources/checklistLibraries/execute.js +1 -16
  66. package/dist/nodes/Autotask/resources/checklistLibraries/execute.js.map +1 -1
  67. package/dist/nodes/Autotask/resources/checklistLibraryChecklistItems/execute.js +1 -16
  68. package/dist/nodes/Autotask/resources/checklistLibraryChecklistItems/execute.js.map +1 -1
  69. package/dist/nodes/Autotask/resources/classificationIcons/execute.js +1 -16
  70. package/dist/nodes/Autotask/resources/classificationIcons/execute.js.map +1 -1
  71. package/dist/nodes/Autotask/resources/companies/execute.js +0 -13
  72. package/dist/nodes/Autotask/resources/companies/execute.js.map +1 -1
  73. package/dist/nodes/Autotask/resources/companyAlerts/execute.js +0 -13
  74. package/dist/nodes/Autotask/resources/companyAlerts/execute.js.map +1 -1
  75. package/dist/nodes/Autotask/resources/companyLocations/execute.js +0 -13
  76. package/dist/nodes/Autotask/resources/companyLocations/execute.js.map +1 -1
  77. package/dist/nodes/Autotask/resources/companyNotes/execute.js +0 -13
  78. package/dist/nodes/Autotask/resources/companyNotes/execute.js.map +1 -1
  79. package/dist/nodes/Autotask/resources/companySiteConfigurations/execute.js +0 -17
  80. package/dist/nodes/Autotask/resources/companySiteConfigurations/execute.js.map +1 -1
  81. package/dist/nodes/Autotask/resources/companyWebhooks/execute.js +0 -13
  82. package/dist/nodes/Autotask/resources/companyWebhooks/execute.js.map +1 -1
  83. package/dist/nodes/Autotask/resources/configurationItemBillingProductAssociations/execute.js +0 -17
  84. package/dist/nodes/Autotask/resources/configurationItemBillingProductAssociations/execute.js.map +1 -1
  85. package/dist/nodes/Autotask/resources/configurationItemCategories/execute.js +0 -13
  86. package/dist/nodes/Autotask/resources/configurationItemCategories/execute.js.map +1 -1
  87. package/dist/nodes/Autotask/resources/configurationItemCategoryUdfAssociation/execute.js +0 -13
  88. package/dist/nodes/Autotask/resources/configurationItemCategoryUdfAssociation/execute.js.map +1 -1
  89. package/dist/nodes/Autotask/resources/configurationItemDnsRecords/execute.js +0 -17
  90. package/dist/nodes/Autotask/resources/configurationItemDnsRecords/execute.js.map +1 -1
  91. package/dist/nodes/Autotask/resources/configurationItemNotes/execute.js +0 -17
  92. package/dist/nodes/Autotask/resources/configurationItemNotes/execute.js.map +1 -1
  93. package/dist/nodes/Autotask/resources/configurationItemRelatedItems/execute.js +0 -17
  94. package/dist/nodes/Autotask/resources/configurationItemRelatedItems/execute.js.map +1 -1
  95. package/dist/nodes/Autotask/resources/configurationItemSslSubjectAlternativeNames/execute.js +0 -17
  96. package/dist/nodes/Autotask/resources/configurationItemSslSubjectAlternativeNames/execute.js.map +1 -1
  97. package/dist/nodes/Autotask/resources/configurationItemTypes/execute.js +0 -13
  98. package/dist/nodes/Autotask/resources/configurationItemTypes/execute.js.map +1 -1
  99. package/dist/nodes/Autotask/resources/configurationItemWebhooks/execute.js +0 -13
  100. package/dist/nodes/Autotask/resources/configurationItemWebhooks/execute.js.map +1 -1
  101. package/dist/nodes/Autotask/resources/configurationItems/execute.js +0 -13
  102. package/dist/nodes/Autotask/resources/configurationItems/execute.js.map +1 -1
  103. package/dist/nodes/Autotask/resources/contactGroupContacts/execute.js +0 -13
  104. package/dist/nodes/Autotask/resources/contactGroupContacts/execute.js.map +1 -1
  105. package/dist/nodes/Autotask/resources/contactGroups/execute.js +0 -13
  106. package/dist/nodes/Autotask/resources/contactGroups/execute.js.map +1 -1
  107. package/dist/nodes/Autotask/resources/contactWebhooks/execute.js +0 -13
  108. package/dist/nodes/Autotask/resources/contactWebhooks/execute.js.map +1 -1
  109. package/dist/nodes/Autotask/resources/contacts/execute.js +0 -13
  110. package/dist/nodes/Autotask/resources/contacts/execute.js.map +1 -1
  111. package/dist/nodes/Autotask/resources/contractBillingRules/execute.js +0 -17
  112. package/dist/nodes/Autotask/resources/contractBillingRules/execute.js.map +1 -1
  113. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js +0 -17
  114. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js.map +1 -1
  115. package/dist/nodes/Autotask/resources/contractBlocks/execute.js +0 -17
  116. package/dist/nodes/Autotask/resources/contractBlocks/execute.js.map +1 -1
  117. package/dist/nodes/Autotask/resources/contractCharges/execute.js +0 -17
  118. package/dist/nodes/Autotask/resources/contractCharges/execute.js.map +1 -1
  119. package/dist/nodes/Autotask/resources/contractExclusionBillingCodes/execute.js +0 -17
  120. package/dist/nodes/Autotask/resources/contractExclusionBillingCodes/execute.js.map +1 -1
  121. package/dist/nodes/Autotask/resources/contractExclusionRoles/execute.js +0 -17
  122. package/dist/nodes/Autotask/resources/contractExclusionRoles/execute.js.map +1 -1
  123. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedRoles/execute.js +0 -17
  124. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedRoles/execute.js.map +1 -1
  125. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedWorkTypes/execute.js +0 -17
  126. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedWorkTypes/execute.js.map +1 -1
  127. package/dist/nodes/Autotask/resources/contractExclusionSets/execute.js +0 -13
  128. package/dist/nodes/Autotask/resources/contractExclusionSets/execute.js.map +1 -1
  129. package/dist/nodes/Autotask/resources/contractMilestones/execute.js +0 -17
  130. package/dist/nodes/Autotask/resources/contractMilestones/execute.js.map +1 -1
  131. package/dist/nodes/Autotask/resources/contractNotes/execute.js +0 -17
  132. package/dist/nodes/Autotask/resources/contractNotes/execute.js.map +1 -1
  133. package/dist/nodes/Autotask/resources/contractRates/execute.js +0 -17
  134. package/dist/nodes/Autotask/resources/contractRates/execute.js.map +1 -1
  135. package/dist/nodes/Autotask/resources/contractRetainers/execute.js +0 -17
  136. package/dist/nodes/Autotask/resources/contractRetainers/execute.js.map +1 -1
  137. package/dist/nodes/Autotask/resources/contractRoleCosts/execute.js +0 -13
  138. package/dist/nodes/Autotask/resources/contractRoleCosts/execute.js.map +1 -1
  139. package/dist/nodes/Autotask/resources/contractServiceAdjustments/description.js +0 -12
  140. package/dist/nodes/Autotask/resources/contractServiceAdjustments/description.js.map +1 -1
  141. package/dist/nodes/Autotask/resources/contractServiceAdjustments/execute.js +0 -7
  142. package/dist/nodes/Autotask/resources/contractServiceAdjustments/execute.js.map +1 -1
  143. package/dist/nodes/Autotask/resources/contractServiceBundleAdjustments/description.js +0 -12
  144. package/dist/nodes/Autotask/resources/contractServiceBundleAdjustments/description.js.map +1 -1
  145. package/dist/nodes/Autotask/resources/contractServiceBundleAdjustments/execute.js +0 -7
  146. package/dist/nodes/Autotask/resources/contractServiceBundleAdjustments/execute.js.map +1 -1
  147. package/dist/nodes/Autotask/resources/contractServiceBundleUnits/execute.js +0 -17
  148. package/dist/nodes/Autotask/resources/contractServiceBundleUnits/execute.js.map +1 -1
  149. package/dist/nodes/Autotask/resources/contractServiceBundles/execute.js +0 -17
  150. package/dist/nodes/Autotask/resources/contractServiceBundles/execute.js.map +1 -1
  151. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js +0 -17
  152. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js.map +1 -1
  153. package/dist/nodes/Autotask/resources/contractServices/execute.js +0 -17
  154. package/dist/nodes/Autotask/resources/contractServices/execute.js.map +1 -1
  155. package/dist/nodes/Autotask/resources/contractTicketPurchases/execute.js +0 -17
  156. package/dist/nodes/Autotask/resources/contractTicketPurchases/execute.js.map +1 -1
  157. package/dist/nodes/Autotask/resources/contracts/description.js +1 -1
  158. package/dist/nodes/Autotask/resources/contracts/description.js.map +1 -1
  159. package/dist/nodes/Autotask/resources/contracts/execute.js +0 -13
  160. package/dist/nodes/Autotask/resources/contracts/execute.js.map +1 -1
  161. package/dist/nodes/Autotask/resources/countries/execute.js +0 -7
  162. package/dist/nodes/Autotask/resources/countries/execute.js.map +1 -1
  163. package/dist/nodes/Autotask/resources/domainRegistrar/execute.js +0 -13
  164. package/dist/nodes/Autotask/resources/domainRegistrar/execute.js.map +1 -1
  165. package/dist/nodes/Autotask/resources/holidaySets/execute.js +0 -13
  166. package/dist/nodes/Autotask/resources/holidaySets/execute.js.map +1 -1
  167. package/dist/nodes/Autotask/resources/holidays/execute.js +0 -13
  168. package/dist/nodes/Autotask/resources/holidays/execute.js.map +1 -1
  169. package/dist/nodes/Autotask/resources/invoices/execute.js +0 -13
  170. package/dist/nodes/Autotask/resources/invoices/execute.js.map +1 -1
  171. package/dist/nodes/Autotask/resources/notificationHistory/execute.js +0 -13
  172. package/dist/nodes/Autotask/resources/notificationHistory/execute.js.map +1 -1
  173. package/dist/nodes/Autotask/resources/opportunities/execute.js +0 -13
  174. package/dist/nodes/Autotask/resources/opportunities/execute.js.map +1 -1
  175. package/dist/nodes/Autotask/resources/productVendors/execute.js +0 -13
  176. package/dist/nodes/Autotask/resources/productVendors/execute.js.map +1 -1
  177. package/dist/nodes/Autotask/resources/products/execute.js +0 -13
  178. package/dist/nodes/Autotask/resources/products/execute.js.map +1 -1
  179. package/dist/nodes/Autotask/resources/projectCharges/execute.js +0 -13
  180. package/dist/nodes/Autotask/resources/projectCharges/execute.js.map +1 -1
  181. package/dist/nodes/Autotask/resources/projectNotes/execute.js +0 -13
  182. package/dist/nodes/Autotask/resources/projectNotes/execute.js.map +1 -1
  183. package/dist/nodes/Autotask/resources/projectPhases/execute.js +0 -13
  184. package/dist/nodes/Autotask/resources/projectPhases/execute.js.map +1 -1
  185. package/dist/nodes/Autotask/resources/projectTasks/execute.js +0 -13
  186. package/dist/nodes/Autotask/resources/projectTasks/execute.js.map +1 -1
  187. package/dist/nodes/Autotask/resources/projects/execute.js +0 -13
  188. package/dist/nodes/Autotask/resources/projects/execute.js.map +1 -1
  189. package/dist/nodes/Autotask/resources/quoteItems/execute.js +0 -17
  190. package/dist/nodes/Autotask/resources/quoteItems/execute.js.map +1 -1
  191. package/dist/nodes/Autotask/resources/quoteLocations/execute.js +0 -13
  192. package/dist/nodes/Autotask/resources/quoteLocations/execute.js.map +1 -1
  193. package/dist/nodes/Autotask/resources/quoteTemplates/execute.js +0 -13
  194. package/dist/nodes/Autotask/resources/quoteTemplates/execute.js.map +1 -1
  195. package/dist/nodes/Autotask/resources/quotes/execute.js +0 -13
  196. package/dist/nodes/Autotask/resources/quotes/execute.js.map +1 -1
  197. package/dist/nodes/Autotask/resources/resourceRoles/execute.js +0 -13
  198. package/dist/nodes/Autotask/resources/resourceRoles/execute.js.map +1 -1
  199. package/dist/nodes/Autotask/resources/resources/description.js +13 -32
  200. package/dist/nodes/Autotask/resources/resources/description.js.map +1 -1
  201. package/dist/nodes/Autotask/resources/resources/execute.js +3 -17
  202. package/dist/nodes/Autotask/resources/resources/execute.js.map +1 -1
  203. package/dist/nodes/Autotask/resources/roles/execute.js +0 -13
  204. package/dist/nodes/Autotask/resources/roles/execute.js.map +1 -1
  205. package/dist/nodes/Autotask/resources/serviceCallTaskResources/execute.js +0 -13
  206. package/dist/nodes/Autotask/resources/serviceCallTaskResources/execute.js.map +1 -1
  207. package/dist/nodes/Autotask/resources/serviceCallTasks/execute.js +0 -13
  208. package/dist/nodes/Autotask/resources/serviceCallTasks/execute.js.map +1 -1
  209. package/dist/nodes/Autotask/resources/serviceCallTicketResources/execute.js +0 -13
  210. package/dist/nodes/Autotask/resources/serviceCallTicketResources/execute.js.map +1 -1
  211. package/dist/nodes/Autotask/resources/serviceCallTickets/execute.js +0 -13
  212. package/dist/nodes/Autotask/resources/serviceCallTickets/execute.js.map +1 -1
  213. package/dist/nodes/Autotask/resources/serviceCalls/execute.js +0 -13
  214. package/dist/nodes/Autotask/resources/serviceCalls/execute.js.map +1 -1
  215. package/dist/nodes/Autotask/resources/serviceLevelAgreementResults/description.js +0 -13
  216. package/dist/nodes/Autotask/resources/serviceLevelAgreementResults/description.js.map +1 -1
  217. package/dist/nodes/Autotask/resources/serviceLevelAgreementResults/execute.js +10 -100
  218. package/dist/nodes/Autotask/resources/serviceLevelAgreementResults/execute.js.map +1 -1
  219. package/dist/nodes/Autotask/resources/services/execute.js +0 -13
  220. package/dist/nodes/Autotask/resources/services/execute.js.map +1 -1
  221. package/dist/nodes/Autotask/resources/skills/execute.js +0 -13
  222. package/dist/nodes/Autotask/resources/skills/execute.js.map +1 -1
  223. package/dist/nodes/Autotask/resources/subscriptionPeriods/execute.js +0 -13
  224. package/dist/nodes/Autotask/resources/subscriptionPeriods/execute.js.map +1 -1
  225. package/dist/nodes/Autotask/resources/subscriptions/execute.js +0 -13
  226. package/dist/nodes/Autotask/resources/subscriptions/execute.js.map +1 -1
  227. package/dist/nodes/Autotask/resources/surveyResults/execute.js +0 -13
  228. package/dist/nodes/Autotask/resources/surveyResults/execute.js.map +1 -1
  229. package/dist/nodes/Autotask/resources/surveys/execute.js +0 -13
  230. package/dist/nodes/Autotask/resources/surveys/execute.js.map +1 -1
  231. package/dist/nodes/Autotask/resources/tagAliases/execute.js +1 -16
  232. package/dist/nodes/Autotask/resources/tagAliases/execute.js.map +1 -1
  233. package/dist/nodes/Autotask/resources/tagGroups/execute.js +1 -16
  234. package/dist/nodes/Autotask/resources/tagGroups/execute.js.map +1 -1
  235. package/dist/nodes/Autotask/resources/tags/execute.js +1 -16
  236. package/dist/nodes/Autotask/resources/tags/execute.js.map +1 -1
  237. package/dist/nodes/Autotask/resources/taskSecondaryResources/execute.js +0 -13
  238. package/dist/nodes/Autotask/resources/taskSecondaryResources/execute.js.map +1 -1
  239. package/dist/nodes/Autotask/resources/ticketAttachments/execute.js +0 -13
  240. package/dist/nodes/Autotask/resources/ticketAttachments/execute.js.map +1 -1
  241. package/dist/nodes/Autotask/resources/ticketCategories/execute.js +0 -13
  242. package/dist/nodes/Autotask/resources/ticketCategories/execute.js.map +1 -1
  243. package/dist/nodes/Autotask/resources/ticketCategoryFieldDefaults/execute.js +0 -13
  244. package/dist/nodes/Autotask/resources/ticketCategoryFieldDefaults/execute.js.map +1 -1
  245. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/description.js +3 -2
  246. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/description.js.map +1 -1
  247. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/execute.js +14 -90
  248. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/execute.js.map +1 -1
  249. package/dist/nodes/Autotask/resources/ticketCharges/execute.js +1 -16
  250. package/dist/nodes/Autotask/resources/ticketCharges/execute.js.map +1 -1
  251. package/dist/nodes/Autotask/resources/ticketChecklistItems/execute.js +1 -16
  252. package/dist/nodes/Autotask/resources/ticketChecklistItems/execute.js.map +1 -1
  253. package/dist/nodes/Autotask/resources/ticketChecklistLibraries/execute.js +1 -8
  254. package/dist/nodes/Autotask/resources/ticketChecklistLibraries/execute.js.map +1 -1
  255. package/dist/nodes/Autotask/resources/ticketHistories/execute.js +0 -7
  256. package/dist/nodes/Autotask/resources/ticketHistories/execute.js.map +1 -1
  257. package/dist/nodes/Autotask/resources/ticketNoteAttachments/execute.js +0 -13
  258. package/dist/nodes/Autotask/resources/ticketNoteAttachments/execute.js.map +1 -1
  259. package/dist/nodes/Autotask/resources/ticketNoteWebhooks/execute.js +0 -13
  260. package/dist/nodes/Autotask/resources/ticketNoteWebhooks/execute.js.map +1 -1
  261. package/dist/nodes/Autotask/resources/ticketNotes/execute.js +0 -13
  262. package/dist/nodes/Autotask/resources/ticketNotes/execute.js.map +1 -1
  263. package/dist/nodes/Autotask/resources/ticketSecondaryResources/description.js +14 -0
  264. package/dist/nodes/Autotask/resources/ticketSecondaryResources/description.js.map +1 -1
  265. package/dist/nodes/Autotask/resources/ticketSecondaryResources/execute.js +0 -13
  266. package/dist/nodes/Autotask/resources/ticketSecondaryResources/execute.js.map +1 -1
  267. package/dist/nodes/Autotask/resources/ticketWebhooks/execute.js +0 -13
  268. package/dist/nodes/Autotask/resources/ticketWebhooks/execute.js.map +1 -1
  269. package/dist/nodes/Autotask/resources/tickets/execute.js +0 -14
  270. package/dist/nodes/Autotask/resources/tickets/execute.js.map +1 -1
  271. package/dist/nodes/Autotask/resources/timeEntries/description.js +3 -5
  272. package/dist/nodes/Autotask/resources/timeEntries/description.js.map +1 -1
  273. package/dist/nodes/Autotask/resources/timeEntries/execute.js +115 -64
  274. package/dist/nodes/Autotask/resources/timeEntries/execute.js.map +1 -1
  275. package/dist/nodes/Autotask/resources/timeEntryAttachments/execute.js +0 -13
  276. package/dist/nodes/Autotask/resources/timeEntryAttachments/execute.js.map +1 -1
  277. package/dist/nodes/Autotask/resources/tool/execute.js +11 -0
  278. package/dist/nodes/Autotask/resources/tool/execute.js.map +1 -1
  279. package/dist/package.json +1 -1
  280. package/dist/tsconfig.tsbuildinfo +1 -1
  281. package/package.json +84 -84
package/README.md CHANGED
@@ -1,764 +1,764 @@
1
- # n8n-nodes-autotask
2
-
3
- ![n8n-nodes-autotask](https://img.shields.io/badge/n8n--nodes--autotask-2.0.0-blue)
4
- ![License](https://img.shields.io/badge/license-MIT-green)
5
-
6
- [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
7
-
8
- > **IMPORTANT**: After updating this node to a new version, a restart of your n8n instance is highly recommended to ensure all changes are properly applied.
9
-
10
- This is an n8n community node for integrating with Autotask PSA. It provides a comprehensive set of operations to interact with Autotask entities through their REST API.
11
-
12
- ![Overview of n8n-nodes-autotask](./overview.gif)
13
-
14
- [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
15
-
16
- [Installation](#installation)
17
- [Authentication](#authentication)
18
- [Features](#features)
19
- [Usage](#usage)
20
- [Configuration](#configuration)
21
- [Limitations](#limitations)
22
- [Troubleshooting](#troubleshooting)
23
- [Resources](#resources)
24
- [Support](#support)
25
- [License](#license)
26
-
27
- ## Installation
28
-
29
- Follow these steps to install this node:
30
-
31
- ```bash
32
- # Install with npm
33
- npm install n8n-nodes-autotask
34
-
35
- # Install with pnpm
36
- pnpm install n8n-nodes-autotask
37
- ```
38
-
39
- **Requirements:**
40
- - n8n version 1.0.0 or later
41
- - Node.js version 18.10 or later
42
- - pnpm version 9.1 or later (if using pnpm)
43
-
44
- **Autotask AI Tools node:** To use the Autotask AI Tools node with the AI Agent, set `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` in your n8n environment.
45
-
46
- ## Authentication
47
-
48
- To use this node, you need to have API access to your Autotask instance. Follow these steps to set up authentication:
49
-
50
- 1. In Autotask, go to **Admin > API User Security**
51
- 2. Create or select an API user
52
- 3. Note the API Integration Code, Username, and Secret
53
- 4. In n8n, create a new credential of type **Autotask API**
54
- 5. Enter your API Integration Code, Username, and Secret
55
- 6. Select your Autotask zone
56
- 7. Select your timezone (affects how dates and times are displayed and entered)
57
- 8. Configure caching options as needed (this will cache dynamically fetched field picklists)
58
-
59
- **Australia/New Zealand (Sydney) datacentre:** If you are on the AUS/NZ Sydney datacentre, from 11 March 2026 select the zone **Australia / New Zealand (Sydney — from 11 Mar 2026)** (API: webservices29.autotask.net). For that zone, the URLs are: User interface ww29.autotask.net; API webservices29.autotask.net; Data Warehouse reports29.autotask.net; Performance Analytics workbooks workbooks29.autotask.net.
60
-
61
- ## Features
62
-
63
- ### Autotask AI Tools
64
-
65
- The **Autotask AI Tools** node exposes Autotask operations as individual tools for the AI Agent. Add one node per resource (e.g. ticket, company, contact), select the operations to expose (get, getMany, count, create, update, delete; plus whoAmI and transferOwnership for Resource, getPosted/getUnposted for Time Entry, searchByDomain for Company, slaHealthCheck for Ticket, moveConfigurationItem for Configuration Items), and connect to an AI Agent. Each operation becomes a separate tool with a flat, typed schema that LLMs handle reliably. Available resources and operations are derived from the same entity metadata as the main Autotask node. Requires `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` in your n8n environment.
66
-
67
- ### Supported Resources
68
-
69
- The node supports the following Autotask resources:
70
-
71
- | Resource | Description |
72
- |----------|-------------|
73
- | API Threshold | Check Autotask API usage limits and current usage levels |
74
- | Appointment | Manage appointments (scheduled calendar work assigned to resources) |
75
- | Billing Code | Manage billing codes for time entries and charges |
76
- | Billing Items | Manage Autotask Billing Items, which represent billable items that have been approved and posted for potential invoicing |
77
- | Checklist Library | Manage modular checklist components that can be applied to tickets or tasks |
78
- | Checklist Library Checklist Item | Manage individual checklist items within checklist library templates |
79
- | Classification Icon | Query classification icons used for categorising and visually identifying items |
80
- | Company | Manage organisations in Autotask. Includes Search by Domain (website/domain with optional contact-email fallback). |
81
- | Company Alert | Manage alerts associated with companies |
82
- | Company Location | Manage locations for companies |
83
- | Company Note | Manage notes attached to companies |
84
- | Company Site Configuration | Manage company site configurations and user-defined fields for customer companies |
85
- | Company Webhook | Manage webhooks for company events |
86
- | Configuration Item | Manage configuration items (CIs) for companies. Includes Move Configuration Item for cross-company CI cloning with optional notes and attachments copy. |
87
- | Configuration Item Billing Product Association | Manage product associations for configuration items |
88
- | Configuration Item Category | Manage categories for configuration items |
89
- | Configuration Item Category UDF Association | Manage UDF associations for CI categories |
90
- | Configuration Item DNS Record | Manage DNS records for configuration items |
91
- | Configuration Item Note | Manage notes for configuration items |
92
- | Configuration Item Related Item | Manage related items for configuration items |
93
- | Configuration Item SSL Subject Alternative Name | Manage SSL alternative names for configuration items |
94
- | Configuration Item Type | Manage types for configuration items |
95
- | Configuration Item Webhook | Manage webhooks for configuration item events |
96
- | Contact | Manage contacts associated with companies. Includes Move to Company operation for migrating contacts between companies. |
97
- | Contact Groups | Manage contact groups |
98
- | Contact Group Contacts | Manage contacts within contact groups |
99
- | Contact Webhook | Manage webhooks for contact events |
100
- | Contract | Manage contracts for companies |
101
- | Contract Billing Rules | Manage billing rules for contracts |
102
- | Contract Block | Manage block hour contracts |
103
- | Contract Block Hour Factor | Manage hour factors for block hour contracts |
104
- | Contract Charge | Manage charges associated with contracts |
105
- | Contract Exclusion Billing Codes | Manage excluded billing codes for contracts |
106
- | Contract Exclusion Roles | Manage excluded roles for contracts |
107
- | Contract Exclusion Set Excluded Roles | Manage excluded roles within exclusion sets |
108
- | Contract Exclusion Set Excluded Work Types | Manage excluded work types within exclusion sets |
109
- | Contract Exclusion Sets | Manage reusable sets of excluded roles and work types for contracts |
110
- | Contract Milestone | Manage milestones for contracts |
111
- | Contract Note | Manage notes attached to contracts |
112
- | Contract Rate | Manage rates for contract services |
113
- | Contract Retainers | Manage retainers for contracts |
114
- | Contract Role Costs | Manage role costs for contracts |
115
- | Contract Service | Manage services within contracts |
116
- | Contract Service Adjustments | Manage adjustments for contract services |
117
- | Contract Service Bundle Adjustments | Manage adjustments for service bundles |
118
- | Contract Service Bundles | Manage service bundles within contracts |
119
- | Contract Service Bundle Units | Manage service bundle units |
120
- | Contract Service Unit | Manage service units for contracts |
121
- | Contract Ticket Purchases | Manage ticket purchases for contracts |
122
- | Countries | Query countries, which are used in address information for companies, contacts, and resources |
123
- | Domain Registrars | Manage domain registrars |
124
- | Holiday | Manage holiday dates |
125
- | Holiday Set | Manage holiday sets for resources |
126
- | Invoices | Manage invoices |
127
- | Notification History | View notification history |
128
- | Opportunity | Manage sales opportunities |
129
- | Product | Manage products in the catalogue |
130
- | Product Vendors | Manage vendor associations for products |
131
- | Project | Manage projects |
132
- | Project Charge | Manage charges associated with projects |
133
- | Project Note | Manage notes attached to projects |
134
- | Project Phase | Manage phases within projects |
135
- | Project Task | Manage tasks within projects |
136
- | Project Task Secondary Resources | Manage secondary resource assignments on project tasks |
137
- | Quote | Manage quotes for opportunities with pricing for products, services, and labour |
138
- | Quote Item | Manage line items for quotes including products, services, and labour |
139
- | Quote Location | Manage shipping and billing address information for quotes |
140
- | Quote Template | Query quote templates that define content and appearance of quotes |
141
- | Resource | Manage staff resources. Includes Who Am I and Transfer Ownership (companies, opportunities, tickets, tasks, projects, task/secondary and service-call assignments, appointments) with dry run and optional audit notes. |
142
- | Resource Role | Manage department/role relationships, service desk queues, and service desk roles |
143
- | Roles | Manage roles in the system |
144
- | Search Filter | Build advanced search filters |
145
- | Service | Manage services offered to clients |
146
- | Service Call | Manage service calls |
147
- | Service Call Task | Manage tasks associated with service calls |
148
- | Service Call Task Resource | Manage resources assigned to service call tasks |
149
- | Service Call Ticket | Manage tickets linked to service calls |
150
- | Service Call Ticket Resource | Manage resources assigned to service call tickets |
151
- | Service Level Agreement Result | Query SLA results tracking time and completion data for service level events |
152
- | Skill | Query skills used for resource competency tracking |
153
- | Survey | Manage customer surveys |
154
- | Survey Results | Manage results from customer surveys |
155
- | Subscription | Manage Subscriptions, which represent recurring service agreements with customers |
156
- | Subscription Period | Query Subscription Periods, which track billing periods and usage for subscriptions |
157
- | Tag | Manage ticket and article tags with unique label requirements |
158
- | Tag Alias | Manage alternative names for tags to improve searchability |
159
- | Tag Group | Organise tags into categories with display colours and system group protections |
160
- | Ticket | Manage service tickets |
161
- | Ticket Attachment | Manage files attached directly to tickets |
162
- | Ticket Category | Manage ticket categories with display colors and default field values |
163
- | Ticket Category Field Default | Query default field values for ticket categories |
164
- | Ticket Change Request Approval | Manage ticket change request approvals using root and ticket child endpoint scopes |
165
- | Ticket Charge | Manage charges associated with tickets |
166
- | Ticket Checklist Item | Manage checklist items on tickets |
167
- | Ticket Checklist Library | Add all items from a checklist library to a ticket |
168
- | Ticket History | View historical changes to tickets |
169
- | Ticket Note | Manage notes attached to tickets |
170
- | Ticket Note Attachment | Manage files attached to ticket notes |
171
- | Ticket Note Webhook | Manage webhooks for ticket note events |
172
- | Ticket Secondary Resource | Manage secondary resource assignments on tickets |
173
- | Ticket Webhook | Manage webhooks for ticket events |
174
- | Time Entry | Manage time entries for billing. Includes Get Posted and Get Unposted operations for listing labour entries by posting status with cross-entity filters |
175
- | Time Entry Attachment | Manage files attached to time entries |
176
-
177
- ### Operations
178
-
179
- For most resources, the following operations are available:
180
-
181
- - **Create**: Add new records
182
- - **Read**: Retrieve a single record by ID
183
- - **Update**: Modify existing records
184
- - **Delete**: Remove records
185
- - **Get Many**: Retrieve multiple records with basic filtering options. This operation allows you to:
186
- - Filter records using simple field conditions (equals)
187
- - Filtering on User Defined Fields (UDFs)
188
- - Automatically paginate through large result sets
189
- - Choose to get all results or limit to a specific number (1-500)
190
- - Set a maximum number of records to return when not retrieving all records
191
- - Select specific columns to return in the response
192
- - Add human-readable labels for picklist and reference fields
193
- - Flatten User-Defined Fields for easier access in workflows
194
- - **Get Many Advanced**: Build complex queries with multiple filter conditions and logical operators. This operation provides:
195
- - Support for complex AND/OR logic in filters
196
- - Nested condition groups for sophisticated queries
197
- - Filtering on User Defined Fields (UDFs)
198
- - Advanced operators like contains, beginsWith, endsWith, exists, notExists
199
- - Support for IN and NOT IN operators with multiple values
200
- - Choose to get all results or limit to a specific number (1-500)
201
- - Set a maximum number of records to return when not retrieving all records
202
- - Select specific columns to return in the response
203
- - Add human-readable labels for picklist and reference fields
204
- - Flatten User-Defined Fields for easier access in workflows
205
- - Date-based filtering with automatic timezone handling
206
- - **Count**: Get the number of matching records
207
- - **Get Entity Info**: Retrieve metadata about the entity
208
- - **Get Field Info**: Retrieve field definitions for the selected entity
209
-
210
- For the **Time Entry** resource, additional posting-status operations are available:
211
-
212
- - **Get Posted**: List time entries that have been approved and posted as billing items
213
- - **Get Unposted**: List time entries that have not yet been posted
214
-
215
- Both operations cross-reference TimeEntries with BillingItems (Autotask has no posted-status field on TimeEntry itself). They support collapsible filters including Date Range (13 presets), Time Entry Type, Billable Status, Hours Worked range, Resource, Contract Type, Ticket Status, Task Status, Queue, and Account Manager. Date range resolution respects the configured credential timezone and converts to UTC for the API.
216
-
217
- For the **Company** resource, **Search by Domain** finds companies by website/domain (domain or full URL; operator: eq, contains, beginsWith, endsWith). If no company website matches and the option is enabled (default), it falls back to contact email domain and returns the most common company. Available on both the main Autotask node and the Autotask AI Tools node.
218
-
219
- For the **Ticket** resource, **SLA Health Check** accepts either Ticket ID or Ticket Number, then combines Ticket and Service Level Agreement Result data to return first-response, resolution-plan, and resolution health with a consistent unit of hours (2 decimal places). It supports **Add Picklist Labels** and **Add Reference Labels** for enriched output, includes an SLA-only fallback to resolve `companyID_label` when reference labels are enabled, and lets you choose which ticket fields to include in the ticket payload (default: `id`, `ticketNumber`, `title`, `status`, `companyID`). This operation is available in both the main Autotask node and the Autotask AI Tools node (AI parameter: `ticketFields`).
220
-
221
- For the **Configuration Item** resource, **Move Configuration Item** clones a CI to another company (Autotask does not allow companyID changes in place), with optional copying of UDFs, CI attachments, notes, and note attachments. Uses API-driven writable field detection so new Autotask fields are handled automatically. Leaves customisable audit notes on both source and destination CIs with deep links and company names, supports dry-run mode, and can deactivate the source CI after completion checks. Optionally set **Impersonation Resource ID** so created records are attributed to a specific resource. Tickets/tasks/projects/contracts and other associations are explicitly not migrated by this operation.
222
-
223
- For webhook resources (Company Webhook, Contact Webhook, Configuration Item Webhook, Ticket Webhook, Ticket Note Webhook), the following operations are available:
224
- - **Get**: Retrieve a single webhook by ID
225
- - **Get Many**: Retrieve multiple webhooks with basic filtering
226
- - **Delete**: Remove a webhook
227
-
228
- ### Webhook Trigger
229
-
230
- The node includes an Autotask Trigger node that can receive webhook events from Autotask. The trigger supports:
231
-
232
- - Events for multiple entity types (Companies, Contacts, Tickets, Configuration Items, Ticket Notes)
233
- - Create, Update, and Delete events
234
- - Field selection for webhook payloads (specify which fields to include)
235
- - Resource exclusion (exclude specific resources from triggering the workflow)
236
- - Email notifications for webhook delivery failures
237
- - Threshold notifications for monitoring webhook performance
238
- - Automatic webhook registration and cleanup
239
- - Secure payload verification with HMAC signatures
240
-
241
- ### Advanced Features
242
-
243
- - **Resource Mapping**: Dynamically map fields based on entity definitions. When Mapping Column Mode is set to "Map automatically" (`autoMapInputData`), the node uses incoming item data directly and passes all fields whose keys match the selected entity's schema IDs, regardless of whether those columns are toggled off in the UI. Node parameter mappings are ignored in this mode (matching n8n's standard resource mapper behaviour). `bodyJson` still takes final precedence as an override.
244
- - **Advanced Filtering**: Build complex queries with multiple conditions
245
- - **Column Selection**: Choose specific fields to return in get operations
246
- - **Picklist Label Enrichment**: Automatically add human-readable labels for picklist fields
247
- - **Reference Label Enrichment**: Add human-readable labels for reference fields
248
- - **UDF Flattening**: Bring user-defined fields up to the top level of response objects for easier access
249
- - **File-based Caching**: Improved performance with persistent caching that can be shared between workflows and runs
250
- - **Timezone Handling**: Automatic conversion between local time and UTC
251
- - **API Usage Monitoring**: Check current API usage thresholds and limits using the API Threshold resource to help prevent hitting rate limits and ensure smooth operations
252
- - **Dry Run Mode**: Preview write operations (create, update, delete) without making actual changes. When enabled, returns a preview of the request that would be sent, useful for testing and validation
253
- - **Inactive Entity Handling**: When a create or update is rejected because a reference field (e.g. `contactID`, `createdByPersonID`) points to an inactive contact or resource, the node automatically activates the entity, retries the operation, then deactivates it again. This applies to all entities and requires no configuration
254
-
255
- ### API Threshold Resource
256
-
257
- The API Threshold resource provides a simple way to monitor your Autotask API usage limits and current consumption. This helps users:
258
- - Track how many API requests have been made in the current timeframe
259
- - See the maximum allowed requests (threshold limit)
260
- - View the usage as a percentage and categorized level (Normal, Moderate, High, Critical)
261
- - Calculate remaining available requests
262
- - Monitor timeframe duration for rate limits
263
-
264
- This is particularly useful for workflows that make many API calls, allowing you to implement conditional logic based on current usage levels to avoid hitting rate limits and ensure continuous operation.
265
-
266
- ### AI Agent Playbook
267
-
268
- > **Deprecation notice:** The *Tool* resource and *AI Helper* resource within the main Autotask node are deprecated and will be removed in a future release. Use the dedicated **Autotask AI Tools** node (see [Autotask AI Tools](#autotask-ai-tools) above) for all new AI agent integrations. The helper tools (`describeFields`, `listPicklistValues`) are built into the AI Tools node and do not require a separate aiHelper resource.
269
-
270
- This node is optimised for AI agents and tool-calling systems with specialised features designed for autonomous operation.
271
-
272
- #### Quick Start for AI Agents
273
-
274
- **1. Introspect Resources**
275
- ```javascript
276
- // Discover available fields and requirements
277
- operation: aiHelper.describeResource
278
- params: { resource: "ticket", mode: "write" }
279
- ```
280
-
281
- **2. Prepare Data**
282
- ```javascript
283
- // Use JSON parameters for direct data input
284
- bodyJson: {
285
- "title": "API Integration Issue",
286
- "description": "Customer reporting connection problems",
287
- "priority": "Medium",
288
- "status": "New"
289
- }
290
- ```
291
-
292
- Note: You may provide labels for picklist/reference fields in `bodyJson` (e.g., `status: "New"`). They are automatically resolved to IDs pre-flight.
293
-
294
- **3. Preview First (Optional)**
295
- ```javascript
296
- // Test your request without making API calls
297
- dryRun: true
298
- ```
299
-
300
- **4. Execute with Optimal Output**
301
- ```javascript
302
- // Choose output format for token efficiency
303
- outputMode: "rawIds" // Most efficient
304
- outputMode: "idsAndLabels" // Default (balanced)
305
- outputMode: "labelsOnly" // Most readable
306
- ```
307
-
308
- #### AI Helper Operations
309
-
310
- **Introspection Endpoint:**
311
- - `aiHelper.describeResource(resource, mode)` - Get field metadata, requirements, constraints, and **entity dependencies**
312
- - `aiHelper.listPicklistValues(resource, fieldId, query, limit, page)` - Get valid values for dropdown fields
313
- - `aiHelper.validateParameters(resource, mode, fieldValues)` - Validate field values without API calls (pre-flight validation)
314
-
315
- **Resource and Time Entry:**
316
- - `resource.whoAmI` - Resolve the current authenticated API user (use before user-scoped actions)
317
- - `timeEntry.getPosted` / `timeEntry.getUnposted` - List time entries by posting status (with optional filters)
318
-
319
- **Dynamic Dependency Discovery:**
320
- - **Reference fields** show what entity they link to (e.g., `companyID → company`)
321
- - **Field dependencies** reveal required relationships (e.g., `contactID requires: companyID`)
322
- - **Workflow guidance** provides creation order tips (e.g., "Ensure company exists before creating contact")
323
-
324
- **Enhanced Validation:**
325
- - **JSON Schema validation** - Immediate feedback on malformed `bodyJson`/`selectColumnsJson`
326
- - **Parameter pre-validation** - Validate field values, types, dependencies without API calls
327
- - **Structured error responses** - Detailed validation results with field-by-field feedback
328
-
329
- **JSON Parameter Fallbacks:**
330
- - `bodyJson` - Override UI mappings for write operations (create/update)
331
- - `selectColumnsJson` - Specify fields for read operations as JSON array
332
-
333
- **Agent-Friendly Features:**
334
- - `outputMode` - Control response format (rawIds/idsAndLabels/labelsOnly)
335
- - `dryRun` - Get request preview without API execution
336
- - Smart error hints with actionable suggestions
337
-
338
- #### Tool Configuration for Maximum Effectiveness
339
-
340
- For optimal AI agent integration, configure multiple instances of this node as separate tools. This provides focused, reliable access to different resource types.
341
-
342
- **Recommended Tool Setup:**
343
-
344
- ```javascript
345
- // Tool 1: Resource Discovery and Field Introspection
346
- {
347
- name: "autotask_inspector",
348
- description: "Discover Autotask resources, fields, and valid values",
349
- resource: "aiHelper",
350
- operations: ["describeResource", "listPicklistValues", "validateParameters"]
351
- }
352
-
353
- // Tool 2: Contact Management
354
- {
355
- name: "autotask_contacts",
356
- description: "Read and write Autotask contacts and people",
357
- resource: "contact",
358
- operations: ["get", "getMany", "create", "update"],
359
- defaultParams: {
360
- outputMode: "idsAndLabels",
361
- selectColumnsJson: ["id", "firstName", "lastName", "emailAddress", "companyID", "title", "phone"]
362
- }
363
- // Accepts labels in bodyJson; labels are auto-resolved to IDs
364
- }
365
-
366
- // Tool 3: Company/Account Management
367
- {
368
- name: "autotask_companies",
369
- description: "Read and write Autotask companies and accounts",
370
- resource: "company",
371
- operations: ["get", "getMany", "create", "update"],
372
- defaultParams: {
373
- outputMode: "idsAndLabels",
374
- selectColumnsJson: ["id", "companyName", "companyType", "phone", "address1", "city", "state"]
375
- }
376
- // Accepts labels in bodyJson; labels are auto-resolved to IDs
377
- }
378
-
379
- // Tool 4: General Resource Access
380
- {
381
- name: "autotask_resources",
382
- description: "Access any Autotask resource with full flexibility",
383
- allResources: true,
384
- defaultParams: {
385
- outputMode: "rawIds" // Most token-efficient for exploratory queries
386
- }
387
- // Accepts labels in bodyJson; labels are auto-resolved to IDs
388
- }
389
- ```
390
-
391
- **Usage Pattern:**
392
- 1. **Start with Inspector** - Use `autotask_inspector` to understand field requirements
393
- 2. **Use Focused Tools** - Call `autotask_contacts` or `autotask_companies` for CRM related operations
394
- 3. **Use Specialist Tools** - Use `autotask_resources` for lookups of Autotask MSP staff (resources)
395
-
396
- **Benefits:**
397
- - **Faster execution** - Pre-configured tools reduce parameter complexity
398
- - **Better reliability** - Focused tools have predictable schemas
399
- - **Token efficiency** - Default parameters optimised for each use case
400
- - **Easier debugging** - Clear separation of concerns
401
-
402
- #### Environment Setup
403
-
404
- For AI tool usage, set this environment variable:
405
-
406
- ```bash
407
- N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
408
- ```
409
-
410
- Configuration options:
411
- - Add to your `.env` file
412
- - Set in system environment variables
413
- - Include in Docker/container configuration
414
- - Add to startup command: `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true n8n start`
415
-
416
- #### Example Agent Workflow
417
-
418
- **Scenario: Create a contact for a new company**
419
-
420
- ```javascript
421
- // 1. Inspect contact requirements using dedicated tool
422
- autotask_inspector.call({
423
- operation: "describeResource",
424
- targetResource: "contact",
425
- mode: "write"
426
- })
427
- // Returns: {
428
- // fields: [
429
- // { id: "companyID", required: true, isReference: true, referencesEntity: "company" },
430
- // { id: "firstName", required: true, type: "string" },
431
- // { id: "lastName", required: true, type: "string" }
432
- // ],
433
- // notes: [
434
- // "Required fields for write: companyID, firstName, lastName",
435
- // "Reference fields (must reference existing entities): companyID → company",
436
- // "Workflow tip: Ensure referenced company exists before creating contact."
437
- // ]
438
- // }
439
-
440
- // 2. Check company picklist values if needed
441
- autotask_inspector.call({
442
- operation: "listPicklistValues",
443
- targetResource: "contact",
444
- fieldId: "companyID",
445
- query: "Tech Solutions" // Search for company
446
- })
447
-
448
- // 2.5. Validate parameters before creation (NEW!)
449
- autotask_inspector.call({
450
- operation: "validateParameters",
451
- targetResource: "contact",
452
- mode: "create",
453
- fieldValues: {
454
- "firstName": "John",
455
- "lastName": "Smith",
456
- "emailAddress": "john.smith@techsolutions.com",
457
- "companyID": 12345,
458
- "title": "IT Manager"
459
- }
460
- })
461
- // Returns: {
462
- // isValid: true,
463
- // errors: [],
464
- // warnings: [
465
- // { field: "companyID", message: "Reference field 'companyID' points to company. Ensure the referenced record exists.", code: "REFERENCE_EXISTENCE_CHECK" }
466
- // ],
467
- // summary: { totalFields: 15, providedFields: 5, validFields: 5, requiredFieldsMissing: 0, invalidValues: 0 }
468
- // }
469
-
470
- // 3. Create contact using focused tool
471
- autotask_contacts.call({
472
- operation: "create",
473
- bodyJson: {
474
- "firstName": "John",
475
- "lastName": "Smith",
476
- "emailAddress": "john.smith@techsolutions.com",
477
- "companyID": 12345,
478
- "title": "IT Manager"
479
- },
480
- dryRun: true // Preview first
481
- })
482
- // Dry-run response includes a `resolutions` array when labels were resolved to IDs, e.g.:
483
- // resolutions: [{ field: 'status', from: 'New', to: 1, method: 'picklist' }]
484
-
485
- // 4. Execute after validation
486
- autotask_contacts.call({
487
- operation: "create",
488
- bodyJson: { /* same data */ },
489
- outputMode: "idsAndLabels"
490
- })
491
-
492
- // 5. Retrieve company details using focused tool
493
- autotask_companies.call({
494
- operation: "get",
495
- id: 12345
496
- })
497
- ```
498
-
499
- #### Error Self-Healing
500
-
501
- Errors include structured hints to help agents self-correct:
502
-
503
- ```javascript
504
- // Error response includes actionable guidance
505
- {
506
- "error": "Field 'priority' has invalid value 'Urgent'",
507
- "extensions": {
508
- "hint": "Use aiHelper.listPicklistValues('ticket', 'priority') to get valid options, then retry with a valid value.",
509
- "suggestions": [
510
- "Get valid values: aiHelper.listPicklistValues('ticket', 'priority')",
511
- "Use exact values from the picklist response"
512
- ]
513
- }
514
- }
515
- ```
516
-
517
- #### Best Practices for Agents
518
-
519
- - **Configure focused tools** - Set up separate tools for inspector, contacts, companies, and general resources
520
- - **Start with inspection** - Always call `autotask_inspector.describeResource` first to understand field requirements
521
- - **Use focused tools** - Prefer `autotask_contacts` or `autotask_companies` over general tools for better reliability
522
- - **Validate before execution** - Use `autotask_inspector.validateParameters` for pre-flight validation to catch errors early
523
- - **Optimise responses** - Use `selectColumnsJson` to reduce payload size and `outputMode: "rawIds"` for token efficiency
524
- - **Double-check with dry-run** - Use `dryRun: true` to preview requests before execution, especially for write operations
525
- - **Handle errors smartly** - Follow the structured hints in error responses for self-correction
526
- - **Cache discoveries** - Store field metadata and picklist values to avoid repeated introspection calls
527
- - **JSON validation** - Invalid JSON in `bodyJson`/`selectColumnsJson` is caught immediately with helpful error messages
528
-
529
- #### Troubleshooting
530
-
531
- **Tool Not Available:** Ensure `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` is set
532
- **No Parameters Visible:** Call `aiHelper.describeResource` to inspect available fields
533
- **Large Responses:** Use `selectColumnsJson` and `outputMode: "rawIds"` for efficiency
534
- **Validation Errors:** Follow error hints to resolve field requirement issues
535
-
536
- ## Usage
537
-
538
- ### Basic Example: Creating a Ticket
539
-
540
- 1. Add an **Autotask** node to your workflow
541
- 2. Select **Ticket** as the resource
542
- 3. Select **Create** as the operation
543
- 4. Configure the required fields (Title, Status, etc.)
544
- 5. Connect to a trigger or previous node
545
- 6. Execute the workflow
546
-
547
- ### Intermediate Example: Querying Projects with Filters
548
-
549
- 1. Add an **Autotask** node to your workflow
550
- 2. Select **Project** as the resource
551
- 3. Select **Get Many** as the operation
552
- 4. Add filter conditions (e.g., Status equals "Active")
553
- 5. Choose whether to retrieve all results or limit the number:
554
- - Toggle "Get All" to true to retrieve all matching records
555
- - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
556
- 6. Connect to a trigger or previous node
557
- 7. Execute the workflow
558
-
559
- ### Advanced Example: Using Column Selection and Reference Labels
560
-
561
- 1. Add an **Autotask** node to your workflow
562
- 2. Select **Ticket** as the resource
563
- 3. Select **Get Many** as the operation
564
- 4. Add filter conditions as needed
565
- 5. Enable **Select Columns** to choose specific fields to return
566
- 6. Select only the fields you need in the response (improves performance)
567
- 7. Enable **Add Picklist Labels** to get human-readable values for picklist fields
568
- 8. Enable **Add Reference Labels** to get human-readable values for reference fields
569
- 9. Enable **Flatten User-Defined Fields** to bring UDFs to the top level of response objects
570
- 10. Execute the workflow to get tickets with only the selected fields and human-readable labels
571
-
572
- ### Advanced Example: Complex Filtering with Get Many Advanced
573
-
574
- 1. Add an **Autotask** node to your workflow
575
- 2. Select **Ticket** as the resource
576
- 3. Select **Get Many Advanced** as the operation
577
- 4. Build a complex filter, for example:
578
- ```json
579
- {
580
- "filter": [
581
- {
582
- "op": "and",
583
- "items": [
584
- {
585
- "field": "status",
586
- "op": "noteq",
587
- "value": 5
588
- },
589
- {
590
- "op": "or",
591
- "items": [
592
- {
593
- "field": "priority",
594
- "op": "eq",
595
- "value": 6
596
- },
597
- {
598
- "field": "dueDateTime",
599
- "op": "lt",
600
- "value": "{{ $now.plus(3, 'days').toLocal()}}"
601
- }
602
- ]
603
- }
604
- ]
605
- }
606
- ]
607
- }
608
- ```
609
- [Valid filter operators and filter documentation can be found here](https://ww15.autotask.net/help/DeveloperHelp/Content/APIs/REST/API_Calls/REST_Basic_Query_Calls.htm?Highlight=filter#List2)
610
- 5. Choose whether to retrieve all results or limit the number:
611
- - Toggle "Get All" to true to retrieve all matching records
612
- - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
613
- 6. Enable **Select Columns** to choose specific fields to return
614
- 7. Enable **Add Reference Labels** and **Add Picklist Labels** for human-readable values
615
- 8. Execute the workflow to retrieve tickets that are not complete AND either have priority 6 OR are due within the next 3 days
616
-
617
- ### Example: Monitoring API Usage with API Threshold
618
-
619
- 1. Add an **Autotask** node to your workflow
620
- 2. Select **API Threshold** as the resource
621
- 3. The operation **Get API Usage** will be automatically selected (it's the only available operation)
622
- 4. Execute the node to receive current API usage information including:
623
- - Current usage count
624
- - Maximum threshold (limit)
625
- - Usage percentage
626
- - Usage level (Normal, Moderate, High, Critical)
627
- - Remaining requests
628
- - Timeframe duration
629
- 5. You can use this information with IF nodes to implement conditional logic:
630
- - Pause workflows when usage is too high
631
- - Throttle requests during peak usage periods
632
- - Log warnings when approaching limits
633
- - Only execute non-critical operations when usage is below certain thresholds
634
-
635
- ### Advanced Example: Working with Parent-Child Relationships
636
-
637
- Many Autotask entities have parent-child relationships (e.g., Companies and Contacts). To work with these:
638
-
639
- 1. First, retrieve or create the parent entity
640
- 2. Use the parent entity's ID in the child entity operations
641
- 3. For example, to create a Contact for a Company:
642
- - First node: Get or create the Company
643
- - Second node: Create a Contact with the Company ID
644
-
645
- ### Example: Setting Up a Webhook Trigger
646
-
647
- 1. Add an **Autotask Trigger** node to your workflow
648
- 2. Select the entity type to monitor (Companies, Contacts, Tickets, etc.)
649
- 3. Select the events to subscribe to (Create, Update, Delete)
650
- 4. Configure the webhook URL (n8n will handle this automatically)
651
- 5. Optionally specify fields to include in the webhook payload
652
- 6. Optionally exclude specific resources from triggering the workflow
653
- 7. Configure email notifications for webhook delivery failures if needed
654
- 8. Save and activate the workflow
655
- 9. The node will automatically register the webhook with Autotask
656
- 10. When events occur in Autotask, they will trigger your workflow
657
- 11. When the workflow is deactivated, the webhook will be automatically removed
658
-
659
- ## Configuration
660
-
661
- ### Caching Options
662
-
663
- The node includes an enhanced file-based caching system to improve performance by reducing API calls:
664
-
665
- - **Enable Field Caching**: Toggle caching on/off
666
- - **Cache TTL**: How long to cache field values (in seconds)
667
- - **Cache Entity Info**: Whether to cache entity information and field definitions
668
- - **Entity Info TTL**: How long to cache entity information
669
- - **Cache Reference Fields**: Whether to cache reference field values
670
- - **Reference Fields TTL**: How long to cache reference field values
671
- - **Cache Picklists**: Whether to cache picklist values
672
- - **Picklists TTL**: How long to cache picklist values
673
- - **File-based Cache**: Cache is stored in files that can be shared between workflows and runs
674
- - **Cache Directory**: Optional path to a directory where cache files will be stored
675
-
676
- > **IMPORTANT**: This node uses dynamic picklists and field enrichers to convert numerical values into human-readable labels through dynamic lookups. It's strongly recommended to keep caching enabled to avoid excessive API calls. Without caching, each picklist and reference field lookup requires separate API calls, which can quickly consume your API rate limits, especially in workflows with many operations or large data sets.
677
-
678
- ### Label Enrichment and Field Processing
679
-
680
- The node provides options to enrich entities with human-readable labels and simplify field access:
681
-
682
- - **Add Picklist Labels**: Adds "_label" fields for picklist values (e.g., Status_label: "In Progress")
683
- - **Add Reference Labels**: Adds "_label" fields for reference values (e.g., Company_label: "Acme Corporation")
684
- - **Flatten User-Defined Fields**: When enabled, brings UDFs up to the top level of each response object for easier access instead of being nested in the userDefinedFields array (maintains the original array for backward compatibility)
685
-
686
- ### Column Selection
687
-
688
- To improve performance and reduce payload size, you can select specific columns to return:
689
-
690
- - **Select Columns**: Choose which fields to include in the response
691
- - Works with all get operations (get, getMany, getManyAdvanced)
692
- - Compatible with label enrichment features
693
-
694
- ### Timezone Handling
695
-
696
- All dates and times in the Autotask API are in UTC. The node automatically converts between your selected timezone and UTC:
697
-
698
- - When creating or updating records, local times are converted to UTC
699
- - When retrieving records, UTC times are converted to your local timezone
700
- - The timezone is configured in the credentials
701
- - For Search Filter operations, input dates are thoroughly converted to UTC using the configured timezone, ensuring consistency with API requirements
702
- - Output dates from all operations are converted to the configured local timezone for easier workflow handling
703
-
704
- ## Limitations
705
-
706
- ### API Limits
707
-
708
- - Maximum 500 records per page in query results
709
- - Maximum 50 pages per query operation
710
- - Maximum 500 OR conditions in filters
711
- - Maximum 1 User Defined Field per query
712
-
713
- ### Entity-Specific Limitations
714
-
715
- - Some entities may not support all operations (e.g., Project Phases cannot be deleted)
716
- - Parent-child relationships require specific handling
717
- - Some fields may be read-only or have specific validation rules
718
-
719
- ### Performance Considerations
720
-
721
- - Large queries may be slow and should be optimised with filters
722
- - Column selection can significantly improve performance by reducing payload size
723
- - Complex workflows with many API calls may hit rate limits
724
- - Disabling caching when using picklist or reference label enrichment can lead to a high volume of API calls, potentially triggering rate limits. Each field being enriched requires a separate API call when cache is not available.
725
-
726
- ## Troubleshooting
727
-
728
- ### Common Issues
729
-
730
- - **Authentication Errors**: Verify your API credentials and ensure the API user has appropriate permissions
731
- - **Field Validation Errors**: Check field requirements in the Autotask API documentation
732
- - **Rate Limiting**: If you encounter rate limiting, reduce the frequency of API calls or implement retry logic
733
-
734
- ### Reporting Bugs
735
-
736
- If you encounter any bugs or issues with this integration:
737
-
738
- 1. Check the [GitHub Issues](https://github.com/msoukhomlinov/n8n-nodes-autotask/issues) to see if the problem has already been reported
739
- 2. If not, please submit a new issue with:
740
- - A clear description of the problem
741
- - Steps to reproduce the issue
742
- - Expected vs actual behaviour
743
- - Your environment details (n8n version, Node.js version)
744
- - Any relevant error messages or screenshots
745
-
746
- Bug reports should be submitted via GitHub at: https://github.com/msoukhomlinov/n8n-nodes-autotask/issues
747
-
748
- ## Resources
749
-
750
- - [Autotask API Documentation](https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm)
751
- - [n8n Documentation](https://docs.n8n.io/)
752
- - [GitHub Repository](https://github.com/msoukhomlinov/n8n-nodes-autotask)
753
-
754
- ## Support
755
-
756
- If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
757
-
758
- [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
759
-
760
- Your support helps maintain this project and develop new features.
761
-
762
- ## License
763
-
764
- [MIT](LICENSE)
1
+ # n8n-nodes-autotask
2
+
3
+ ![n8n-nodes-autotask](https://img.shields.io/badge/n8n--nodes--autotask-2.0.0-blue)
4
+ ![License](https://img.shields.io/badge/license-MIT-green)
5
+
6
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
7
+
8
+ > **IMPORTANT**: After updating this node to a new version, a restart of your n8n instance is highly recommended to ensure all changes are properly applied.
9
+
10
+ This is an n8n community node for integrating with Autotask PSA. It provides a comprehensive set of operations to interact with Autotask entities through their REST API.
11
+
12
+ ![Overview of n8n-nodes-autotask](./overview.gif)
13
+
14
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
15
+
16
+ [Installation](#installation)
17
+ [Authentication](#authentication)
18
+ [Features](#features)
19
+ [Usage](#usage)
20
+ [Configuration](#configuration)
21
+ [Limitations](#limitations)
22
+ [Troubleshooting](#troubleshooting)
23
+ [Resources](#resources)
24
+ [Support](#support)
25
+ [License](#license)
26
+
27
+ ## Installation
28
+
29
+ Follow these steps to install this node:
30
+
31
+ ```bash
32
+ # Install with npm
33
+ npm install n8n-nodes-autotask
34
+
35
+ # Install with pnpm
36
+ pnpm install n8n-nodes-autotask
37
+ ```
38
+
39
+ **Requirements:**
40
+ - n8n version 1.0.0 or later
41
+ - Node.js version 18.10 or later
42
+ - pnpm version 9.1 or later (if using pnpm)
43
+
44
+ **Autotask AI Tools node:** To use the Autotask AI Tools node with the AI Agent, set `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` in your n8n environment.
45
+
46
+ ## Authentication
47
+
48
+ To use this node, you need to have API access to your Autotask instance. Follow these steps to set up authentication:
49
+
50
+ 1. In Autotask, go to **Admin > API User Security**
51
+ 2. Create or select an API user
52
+ 3. Note the API Integration Code, Username, and Secret
53
+ 4. In n8n, create a new credential of type **Autotask API**
54
+ 5. Enter your API Integration Code, Username, and Secret
55
+ 6. Select your Autotask zone
56
+ 7. Select your timezone (affects how dates and times are displayed and entered)
57
+ 8. Configure caching options as needed (this will cache dynamically fetched field picklists)
58
+
59
+ **Australia/New Zealand (Sydney) datacentre:** If you are on the AUS/NZ Sydney datacentre, from 11 March 2026 select the zone **Australia / New Zealand (Sydney — from 11 Mar 2026)** (API: webservices29.autotask.net). For that zone, the URLs are: User interface ww29.autotask.net; API webservices29.autotask.net; Data Warehouse reports29.autotask.net; Performance Analytics workbooks workbooks29.autotask.net.
60
+
61
+ ## Features
62
+
63
+ ### Autotask AI Tools
64
+
65
+ The **Autotask AI Tools** node exposes Autotask operations as individual tools for the AI Agent. Add one node per resource (e.g. ticket, company, contact), select the operations to expose (get, getMany, count, create, update, delete; plus whoAmI and transferOwnership for Resource, getPosted/getUnposted for Time Entry, searchByDomain for Company, slaHealthCheck for Ticket, moveConfigurationItem for Configuration Items), and connect to an AI Agent. Each operation becomes a separate tool with a flat, typed schema that LLMs handle reliably. Available resources and operations are derived from the same entity metadata as the main Autotask node. Requires `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` in your n8n environment.
66
+
67
+ ### Supported Resources
68
+
69
+ The node supports the following Autotask resources:
70
+
71
+ | Resource | Description |
72
+ |----------|-------------|
73
+ | API Threshold | Check Autotask API usage limits and current usage levels |
74
+ | Appointment | Manage appointments (scheduled calendar work assigned to resources) |
75
+ | Billing Code | Manage billing codes for time entries and charges |
76
+ | Billing Items | Manage Autotask Billing Items, which represent billable items that have been approved and posted for potential invoicing |
77
+ | Checklist Library | Manage modular checklist components that can be applied to tickets or tasks |
78
+ | Checklist Library Checklist Item | Manage individual checklist items within checklist library templates |
79
+ | Classification Icon | Query classification icons used for categorising and visually identifying items |
80
+ | Company | Manage organisations in Autotask. Includes Search by Domain (website/domain with optional contact-email fallback). |
81
+ | Company Alert | Manage alerts associated with companies |
82
+ | Company Location | Manage locations for companies |
83
+ | Company Note | Manage notes attached to companies |
84
+ | Company Site Configuration | Manage company site configurations and user-defined fields for customer companies |
85
+ | Company Webhook | Manage webhooks for company events |
86
+ | Configuration Item | Manage configuration items (CIs) for companies. Includes Move Configuration Item for cross-company CI cloning with optional notes and attachments copy. |
87
+ | Configuration Item Billing Product Association | Manage product associations for configuration items |
88
+ | Configuration Item Category | Manage categories for configuration items |
89
+ | Configuration Item Category UDF Association | Manage UDF associations for CI categories |
90
+ | Configuration Item DNS Record | Manage DNS records for configuration items |
91
+ | Configuration Item Note | Manage notes for configuration items |
92
+ | Configuration Item Related Item | Manage related items for configuration items |
93
+ | Configuration Item SSL Subject Alternative Name | Manage SSL alternative names for configuration items |
94
+ | Configuration Item Type | Manage types for configuration items |
95
+ | Configuration Item Webhook | Manage webhooks for configuration item events |
96
+ | Contact | Manage contacts associated with companies. Includes Move to Company operation for migrating contacts between companies. |
97
+ | Contact Groups | Manage contact groups |
98
+ | Contact Group Contacts | Manage contacts within contact groups |
99
+ | Contact Webhook | Manage webhooks for contact events |
100
+ | Contract | Manage contracts for companies |
101
+ | Contract Billing Rules | Manage billing rules for contracts |
102
+ | Contract Block | Manage block hour contracts |
103
+ | Contract Block Hour Factor | Manage hour factors for block hour contracts |
104
+ | Contract Charge | Manage charges associated with contracts |
105
+ | Contract Exclusion Billing Codes | Manage excluded billing codes for contracts |
106
+ | Contract Exclusion Roles | Manage excluded roles for contracts |
107
+ | Contract Exclusion Set Excluded Roles | Manage excluded roles within exclusion sets |
108
+ | Contract Exclusion Set Excluded Work Types | Manage excluded work types within exclusion sets |
109
+ | Contract Exclusion Sets | Manage reusable sets of excluded roles and work types for contracts |
110
+ | Contract Milestone | Manage milestones for contracts |
111
+ | Contract Note | Manage notes attached to contracts |
112
+ | Contract Rate | Manage rates for contract services |
113
+ | Contract Retainers | Manage retainers for contracts |
114
+ | Contract Role Costs | Manage role costs for contracts |
115
+ | Contract Service | Manage services within contracts |
116
+ | Contract Service Adjustments | Manage adjustments for contract services |
117
+ | Contract Service Bundle Adjustments | Manage adjustments for service bundles |
118
+ | Contract Service Bundles | Manage service bundles within contracts |
119
+ | Contract Service Bundle Units | Manage service bundle units |
120
+ | Contract Service Unit | Manage service units for contracts |
121
+ | Contract Ticket Purchases | Manage ticket purchases for contracts |
122
+ | Countries | Query countries, which are used in address information for companies, contacts, and resources |
123
+ | Domain Registrars | Manage domain registrars |
124
+ | Holiday | Manage holiday dates |
125
+ | Holiday Set | Manage holiday sets for resources |
126
+ | Invoices | Manage invoices |
127
+ | Notification History | View notification history |
128
+ | Opportunity | Manage sales opportunities |
129
+ | Product | Manage products in the catalogue |
130
+ | Product Vendors | Manage vendor associations for products |
131
+ | Project | Manage projects |
132
+ | Project Charge | Manage charges associated with projects |
133
+ | Project Note | Manage notes attached to projects |
134
+ | Project Phase | Manage phases within projects |
135
+ | Project Task | Manage tasks within projects |
136
+ | Project Task Secondary Resources | Manage secondary resource assignments on project tasks |
137
+ | Quote | Manage quotes for opportunities with pricing for products, services, and labour |
138
+ | Quote Item | Manage line items for quotes including products, services, and labour |
139
+ | Quote Location | Manage shipping and billing address information for quotes |
140
+ | Quote Template | Query quote templates that define content and appearance of quotes |
141
+ | Resource | Manage staff resources. Includes Who Am I and Transfer Ownership (companies, opportunities, tickets, tasks, projects, task/secondary and service-call assignments, appointments) with dry run and optional audit notes. |
142
+ | Resource Role | Manage department/role relationships, service desk queues, and service desk roles |
143
+ | Roles | Manage roles in the system |
144
+ | Search Filter | Build advanced search filters |
145
+ | Service | Manage services offered to clients |
146
+ | Service Call | Manage service calls |
147
+ | Service Call Task | Manage tasks associated with service calls |
148
+ | Service Call Task Resource | Manage resources assigned to service call tasks |
149
+ | Service Call Ticket | Manage tickets linked to service calls |
150
+ | Service Call Ticket Resource | Manage resources assigned to service call tickets |
151
+ | Service Level Agreement Result | Query SLA results tracking time and completion data for service level events |
152
+ | Skill | Query skills used for resource competency tracking |
153
+ | Survey | Manage customer surveys |
154
+ | Survey Results | Manage results from customer surveys |
155
+ | Subscription | Manage Subscriptions, which represent recurring service agreements with customers |
156
+ | Subscription Period | Query Subscription Periods, which track billing periods and usage for subscriptions |
157
+ | Tag | Manage ticket and article tags with unique label requirements |
158
+ | Tag Alias | Manage alternative names for tags to improve searchability |
159
+ | Tag Group | Organise tags into categories with display colours and system group protections |
160
+ | Ticket | Manage service tickets |
161
+ | Ticket Attachment | Manage files attached directly to tickets |
162
+ | Ticket Category | Manage ticket categories with display colors and default field values |
163
+ | Ticket Category Field Default | Query default field values for ticket categories |
164
+ | Ticket Change Request Approval | Manage ticket change request approvals using root and ticket child endpoint scopes |
165
+ | Ticket Charge | Manage charges associated with tickets |
166
+ | Ticket Checklist Item | Manage checklist items on tickets |
167
+ | Ticket Checklist Library | Add all items from a checklist library to a ticket |
168
+ | Ticket History | View historical changes to tickets |
169
+ | Ticket Note | Manage notes attached to tickets |
170
+ | Ticket Note Attachment | Manage files attached to ticket notes |
171
+ | Ticket Note Webhook | Manage webhooks for ticket note events |
172
+ | Ticket Secondary Resource | Manage secondary resource assignments on tickets |
173
+ | Ticket Webhook | Manage webhooks for ticket events |
174
+ | Time Entry | Manage time entries for billing. Includes Get Posted and Get Unposted operations for listing labour entries by posting status with cross-entity filters |
175
+ | Time Entry Attachment | Manage files attached to time entries |
176
+
177
+ ### Operations
178
+
179
+ For most resources, the following operations are available:
180
+
181
+ - **Create**: Add new records
182
+ - **Read**: Retrieve a single record by ID
183
+ - **Update**: Modify existing records
184
+ - **Delete**: Remove records
185
+ - **Get Many**: Retrieve multiple records with basic filtering options. This operation allows you to:
186
+ - Filter records using simple field conditions (equals)
187
+ - Filtering on User Defined Fields (UDFs)
188
+ - Automatically paginate through large result sets
189
+ - Choose to get all results or limit to a specific number (1-500)
190
+ - Set a maximum number of records to return when not retrieving all records
191
+ - Select specific columns to return in the response
192
+ - Add human-readable labels for picklist and reference fields
193
+ - Flatten User-Defined Fields for easier access in workflows
194
+ - **Get Many Advanced**: Build complex queries with multiple filter conditions and logical operators. This operation provides:
195
+ - Support for complex AND/OR logic in filters
196
+ - Nested condition groups for sophisticated queries
197
+ - Filtering on User Defined Fields (UDFs)
198
+ - Advanced operators like contains, beginsWith, endsWith, exists, notExists
199
+ - Support for IN and NOT IN operators with multiple values
200
+ - Choose to get all results or limit to a specific number (1-500)
201
+ - Set a maximum number of records to return when not retrieving all records
202
+ - Select specific columns to return in the response
203
+ - Add human-readable labels for picklist and reference fields
204
+ - Flatten User-Defined Fields for easier access in workflows
205
+ - Date-based filtering with automatic timezone handling
206
+ - **Count**: Get the number of matching records
207
+ - **Get Entity Info**: Retrieve metadata about the entity
208
+ - **Get Field Info**: Retrieve field definitions for the selected entity
209
+
210
+ For the **Time Entry** resource, additional posting-status operations are available:
211
+
212
+ - **Get Posted**: List time entries that have been approved and posted as billing items
213
+ - **Get Unposted**: List time entries that have not yet been posted
214
+
215
+ Both operations cross-reference TimeEntries with BillingItems (Autotask has no posted-status field on TimeEntry itself). They support collapsible filters including Date Range (13 presets), Time Entry Type, Billable Status, Hours Worked range, Resource, Contract Type, Ticket Status, Task Status, Queue, and Account Manager. Date range resolution respects the configured credential timezone and converts to UTC for the API.
216
+
217
+ For the **Company** resource, **Search by Domain** finds companies by website/domain (domain or full URL; operator: eq, contains, beginsWith, endsWith). If no company website matches and the option is enabled (default), it falls back to contact email domain and returns the most common company. Available on both the main Autotask node and the Autotask AI Tools node.
218
+
219
+ For the **Ticket** resource, **SLA Health Check** accepts either Ticket ID or Ticket Number, then combines Ticket and Service Level Agreement Result data to return first-response, resolution-plan, and resolution health with a consistent unit of hours (2 decimal places). It supports **Add Picklist Labels** and **Add Reference Labels** for enriched output, includes an SLA-only fallback to resolve `companyID_label` when reference labels are enabled, and lets you choose which ticket fields to include in the ticket payload (default: `id`, `ticketNumber`, `title`, `status`, `companyID`). This operation is available in both the main Autotask node and the Autotask AI Tools node (AI parameter: `ticketFields`).
220
+
221
+ For the **Configuration Item** resource, **Move Configuration Item** clones a CI to another company (Autotask does not allow companyID changes in place), with optional copying of UDFs, CI attachments, notes, and note attachments. Uses API-driven writable field detection so new Autotask fields are handled automatically. Leaves customisable audit notes on both source and destination CIs with deep links and company names, supports dry-run mode, and can deactivate the source CI after completion checks. Optionally set **Impersonation Resource ID** so created records are attributed to a specific resource. Tickets/tasks/projects/contracts and other associations are explicitly not migrated by this operation.
222
+
223
+ For webhook resources (Company Webhook, Contact Webhook, Configuration Item Webhook, Ticket Webhook, Ticket Note Webhook), the following operations are available:
224
+ - **Get**: Retrieve a single webhook by ID
225
+ - **Get Many**: Retrieve multiple webhooks with basic filtering
226
+ - **Delete**: Remove a webhook
227
+
228
+ ### Webhook Trigger
229
+
230
+ The node includes an Autotask Trigger node that can receive webhook events from Autotask. The trigger supports:
231
+
232
+ - Events for multiple entity types (Companies, Contacts, Tickets, Configuration Items, Ticket Notes)
233
+ - Create, Update, and Delete events
234
+ - Field selection for webhook payloads (specify which fields to include)
235
+ - Resource exclusion (exclude specific resources from triggering the workflow)
236
+ - Email notifications for webhook delivery failures
237
+ - Threshold notifications for monitoring webhook performance
238
+ - Automatic webhook registration and cleanup
239
+ - Secure payload verification with HMAC signatures
240
+
241
+ ### Advanced Features
242
+
243
+ - **Resource Mapping**: Dynamically map fields based on entity definitions. When Mapping Column Mode is set to "Map automatically" (`autoMapInputData`), the node uses incoming item data directly and passes all fields whose keys match the selected entity's schema IDs, regardless of whether those columns are toggled off in the UI. Node parameter mappings are ignored in this mode (matching n8n's standard resource mapper behaviour). `bodyJson` still takes final precedence as an override.
244
+ - **Advanced Filtering**: Build complex queries with multiple conditions
245
+ - **Column Selection**: Choose specific fields to return in get operations
246
+ - **Picklist Label Enrichment**: Automatically add human-readable labels for picklist fields
247
+ - **Reference Label Enrichment**: Add human-readable labels for reference fields
248
+ - **UDF Flattening**: Bring user-defined fields up to the top level of response objects for easier access
249
+ - **File-based Caching**: Improved performance with persistent caching that can be shared between workflows and runs
250
+ - **Timezone Handling**: Automatic conversion between local time and UTC
251
+ - **API Usage Monitoring**: Check current API usage thresholds and limits using the API Threshold resource to help prevent hitting rate limits and ensure smooth operations
252
+ - **Dry Run Mode**: Preview write operations (create, update, delete) without making actual changes. When enabled, returns a preview of the request that would be sent, useful for testing and validation
253
+ - **Inactive Entity Handling**: When a create or update is rejected because a reference field (e.g. `contactID`, `createdByPersonID`) points to an inactive contact or resource, the node automatically activates the entity, retries the operation, then deactivates it again. This applies to all entities and requires no configuration
254
+
255
+ ### API Threshold Resource
256
+
257
+ The API Threshold resource provides a simple way to monitor your Autotask API usage limits and current consumption. This helps users:
258
+ - Track how many API requests have been made in the current timeframe
259
+ - See the maximum allowed requests (threshold limit)
260
+ - View the usage as a percentage and categorized level (Normal, Moderate, High, Critical)
261
+ - Calculate remaining available requests
262
+ - Monitor timeframe duration for rate limits
263
+
264
+ This is particularly useful for workflows that make many API calls, allowing you to implement conditional logic based on current usage levels to avoid hitting rate limits and ensure continuous operation.
265
+
266
+ ### AI Agent Playbook
267
+
268
+ > **Deprecation notice:** The *Tool* resource and *AI Helper* resource within the main Autotask node are deprecated and will be removed in a future release. Use the dedicated **Autotask AI Tools** node (see [Autotask AI Tools](#autotask-ai-tools) above) for all new AI agent integrations. The helper tools (`describeFields`, `listPicklistValues`) are built into the AI Tools node and do not require a separate aiHelper resource.
269
+
270
+ This node is optimised for AI agents and tool-calling systems with specialised features designed for autonomous operation.
271
+
272
+ #### Quick Start for AI Agents
273
+
274
+ **1. Introspect Resources**
275
+ ```javascript
276
+ // Discover available fields and requirements
277
+ operation: aiHelper.describeResource
278
+ params: { resource: "ticket", mode: "write" }
279
+ ```
280
+
281
+ **2. Prepare Data**
282
+ ```javascript
283
+ // Use JSON parameters for direct data input
284
+ bodyJson: {
285
+ "title": "API Integration Issue",
286
+ "description": "Customer reporting connection problems",
287
+ "priority": "Medium",
288
+ "status": "New"
289
+ }
290
+ ```
291
+
292
+ Note: You may provide labels for picklist/reference fields in `bodyJson` (e.g., `status: "New"`). They are automatically resolved to IDs pre-flight.
293
+
294
+ **3. Preview First (Optional)**
295
+ ```javascript
296
+ // Test your request without making API calls
297
+ dryRun: true
298
+ ```
299
+
300
+ **4. Execute with Optimal Output**
301
+ ```javascript
302
+ // Choose output format for token efficiency
303
+ outputMode: "rawIds" // Most efficient
304
+ outputMode: "idsAndLabels" // Default (balanced)
305
+ outputMode: "labelsOnly" // Most readable
306
+ ```
307
+
308
+ #### AI Helper Operations
309
+
310
+ **Introspection Endpoint:**
311
+ - `aiHelper.describeResource(resource, mode)` - Get field metadata, requirements, constraints, and **entity dependencies**
312
+ - `aiHelper.listPicklistValues(resource, fieldId, query, limit, page)` - Get valid values for dropdown fields
313
+ - `aiHelper.validateParameters(resource, mode, fieldValues)` - Validate field values without API calls (pre-flight validation)
314
+
315
+ **Resource and Time Entry:**
316
+ - `resource.whoAmI` - Resolve the current authenticated API user (use before user-scoped actions)
317
+ - `timeEntry.getPosted` / `timeEntry.getUnposted` - List time entries by posting status (with optional filters)
318
+
319
+ **Dynamic Dependency Discovery:**
320
+ - **Reference fields** show what entity they link to (e.g., `companyID → company`)
321
+ - **Field dependencies** reveal required relationships (e.g., `contactID requires: companyID`)
322
+ - **Workflow guidance** provides creation order tips (e.g., "Ensure company exists before creating contact")
323
+
324
+ **Enhanced Validation:**
325
+ - **JSON Schema validation** - Immediate feedback on malformed `bodyJson`/`selectColumnsJson`
326
+ - **Parameter pre-validation** - Validate field values, types, dependencies without API calls
327
+ - **Structured error responses** - Detailed validation results with field-by-field feedback
328
+
329
+ **JSON Parameter Fallbacks:**
330
+ - `bodyJson` - Override UI mappings for write operations (create/update)
331
+ - `selectColumnsJson` - Specify fields for read operations as JSON array
332
+
333
+ **Agent-Friendly Features:**
334
+ - `outputMode` - Control response format (rawIds/idsAndLabels/labelsOnly)
335
+ - `dryRun` - Get request preview without API execution
336
+ - Smart error hints with actionable suggestions
337
+
338
+ #### Tool Configuration for Maximum Effectiveness
339
+
340
+ For optimal AI agent integration, configure multiple instances of this node as separate tools. This provides focused, reliable access to different resource types.
341
+
342
+ **Recommended Tool Setup:**
343
+
344
+ ```javascript
345
+ // Tool 1: Resource Discovery and Field Introspection
346
+ {
347
+ name: "autotask_inspector",
348
+ description: "Discover Autotask resources, fields, and valid values",
349
+ resource: "aiHelper",
350
+ operations: ["describeResource", "listPicklistValues", "validateParameters"]
351
+ }
352
+
353
+ // Tool 2: Contact Management
354
+ {
355
+ name: "autotask_contacts",
356
+ description: "Read and write Autotask contacts and people",
357
+ resource: "contact",
358
+ operations: ["get", "getMany", "create", "update"],
359
+ defaultParams: {
360
+ outputMode: "idsAndLabels",
361
+ selectColumnsJson: ["id", "firstName", "lastName", "emailAddress", "companyID", "title", "phone"]
362
+ }
363
+ // Accepts labels in bodyJson; labels are auto-resolved to IDs
364
+ }
365
+
366
+ // Tool 3: Company/Account Management
367
+ {
368
+ name: "autotask_companies",
369
+ description: "Read and write Autotask companies and accounts",
370
+ resource: "company",
371
+ operations: ["get", "getMany", "create", "update"],
372
+ defaultParams: {
373
+ outputMode: "idsAndLabels",
374
+ selectColumnsJson: ["id", "companyName", "companyType", "phone", "address1", "city", "state"]
375
+ }
376
+ // Accepts labels in bodyJson; labels are auto-resolved to IDs
377
+ }
378
+
379
+ // Tool 4: General Resource Access
380
+ {
381
+ name: "autotask_resources",
382
+ description: "Access any Autotask resource with full flexibility",
383
+ allResources: true,
384
+ defaultParams: {
385
+ outputMode: "rawIds" // Most token-efficient for exploratory queries
386
+ }
387
+ // Accepts labels in bodyJson; labels are auto-resolved to IDs
388
+ }
389
+ ```
390
+
391
+ **Usage Pattern:**
392
+ 1. **Start with Inspector** - Use `autotask_inspector` to understand field requirements
393
+ 2. **Use Focused Tools** - Call `autotask_contacts` or `autotask_companies` for CRM related operations
394
+ 3. **Use Specialist Tools** - Use `autotask_resources` for lookups of Autotask MSP staff (resources)
395
+
396
+ **Benefits:**
397
+ - **Faster execution** - Pre-configured tools reduce parameter complexity
398
+ - **Better reliability** - Focused tools have predictable schemas
399
+ - **Token efficiency** - Default parameters optimised for each use case
400
+ - **Easier debugging** - Clear separation of concerns
401
+
402
+ #### Environment Setup
403
+
404
+ For AI tool usage, set this environment variable:
405
+
406
+ ```bash
407
+ N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
408
+ ```
409
+
410
+ Configuration options:
411
+ - Add to your `.env` file
412
+ - Set in system environment variables
413
+ - Include in Docker/container configuration
414
+ - Add to startup command: `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true n8n start`
415
+
416
+ #### Example Agent Workflow
417
+
418
+ **Scenario: Create a contact for a new company**
419
+
420
+ ```javascript
421
+ // 1. Inspect contact requirements using dedicated tool
422
+ autotask_inspector.call({
423
+ operation: "describeResource",
424
+ targetResource: "contact",
425
+ mode: "write"
426
+ })
427
+ // Returns: {
428
+ // fields: [
429
+ // { id: "companyID", required: true, isReference: true, referencesEntity: "company" },
430
+ // { id: "firstName", required: true, type: "string" },
431
+ // { id: "lastName", required: true, type: "string" }
432
+ // ],
433
+ // notes: [
434
+ // "Required fields for write: companyID, firstName, lastName",
435
+ // "Reference fields (must reference existing entities): companyID → company",
436
+ // "Workflow tip: Ensure referenced company exists before creating contact."
437
+ // ]
438
+ // }
439
+
440
+ // 2. Check company picklist values if needed
441
+ autotask_inspector.call({
442
+ operation: "listPicklistValues",
443
+ targetResource: "contact",
444
+ fieldId: "companyID",
445
+ query: "Tech Solutions" // Search for company
446
+ })
447
+
448
+ // 2.5. Validate parameters before creation (NEW!)
449
+ autotask_inspector.call({
450
+ operation: "validateParameters",
451
+ targetResource: "contact",
452
+ mode: "create",
453
+ fieldValues: {
454
+ "firstName": "John",
455
+ "lastName": "Smith",
456
+ "emailAddress": "john.smith@techsolutions.com",
457
+ "companyID": 12345,
458
+ "title": "IT Manager"
459
+ }
460
+ })
461
+ // Returns: {
462
+ // isValid: true,
463
+ // errors: [],
464
+ // warnings: [
465
+ // { field: "companyID", message: "Reference field 'companyID' points to company. Ensure the referenced record exists.", code: "REFERENCE_EXISTENCE_CHECK" }
466
+ // ],
467
+ // summary: { totalFields: 15, providedFields: 5, validFields: 5, requiredFieldsMissing: 0, invalidValues: 0 }
468
+ // }
469
+
470
+ // 3. Create contact using focused tool
471
+ autotask_contacts.call({
472
+ operation: "create",
473
+ bodyJson: {
474
+ "firstName": "John",
475
+ "lastName": "Smith",
476
+ "emailAddress": "john.smith@techsolutions.com",
477
+ "companyID": 12345,
478
+ "title": "IT Manager"
479
+ },
480
+ dryRun: true // Preview first
481
+ })
482
+ // Dry-run response includes a `resolutions` array when labels were resolved to IDs, e.g.:
483
+ // resolutions: [{ field: 'status', from: 'New', to: 1, method: 'picklist' }]
484
+
485
+ // 4. Execute after validation
486
+ autotask_contacts.call({
487
+ operation: "create",
488
+ bodyJson: { /* same data */ },
489
+ outputMode: "idsAndLabels"
490
+ })
491
+
492
+ // 5. Retrieve company details using focused tool
493
+ autotask_companies.call({
494
+ operation: "get",
495
+ id: 12345
496
+ })
497
+ ```
498
+
499
+ #### Error Self-Healing
500
+
501
+ Errors include structured hints to help agents self-correct:
502
+
503
+ ```javascript
504
+ // Error response includes actionable guidance
505
+ {
506
+ "error": "Field 'priority' has invalid value 'Urgent'",
507
+ "extensions": {
508
+ "hint": "Use aiHelper.listPicklistValues('ticket', 'priority') to get valid options, then retry with a valid value.",
509
+ "suggestions": [
510
+ "Get valid values: aiHelper.listPicklistValues('ticket', 'priority')",
511
+ "Use exact values from the picklist response"
512
+ ]
513
+ }
514
+ }
515
+ ```
516
+
517
+ #### Best Practices for Agents
518
+
519
+ - **Configure focused tools** - Set up separate tools for inspector, contacts, companies, and general resources
520
+ - **Start with inspection** - Always call `autotask_inspector.describeResource` first to understand field requirements
521
+ - **Use focused tools** - Prefer `autotask_contacts` or `autotask_companies` over general tools for better reliability
522
+ - **Validate before execution** - Use `autotask_inspector.validateParameters` for pre-flight validation to catch errors early
523
+ - **Optimise responses** - Use `selectColumnsJson` to reduce payload size and `outputMode: "rawIds"` for token efficiency
524
+ - **Double-check with dry-run** - Use `dryRun: true` to preview requests before execution, especially for write operations
525
+ - **Handle errors smartly** - Follow the structured hints in error responses for self-correction
526
+ - **Cache discoveries** - Store field metadata and picklist values to avoid repeated introspection calls
527
+ - **JSON validation** - Invalid JSON in `bodyJson`/`selectColumnsJson` is caught immediately with helpful error messages
528
+
529
+ #### Troubleshooting
530
+
531
+ **Tool Not Available:** Ensure `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true` is set
532
+ **No Parameters Visible:** Call `aiHelper.describeResource` to inspect available fields
533
+ **Large Responses:** Use `selectColumnsJson` and `outputMode: "rawIds"` for efficiency
534
+ **Validation Errors:** Follow error hints to resolve field requirement issues
535
+
536
+ ## Usage
537
+
538
+ ### Basic Example: Creating a Ticket
539
+
540
+ 1. Add an **Autotask** node to your workflow
541
+ 2. Select **Ticket** as the resource
542
+ 3. Select **Create** as the operation
543
+ 4. Configure the required fields (Title, Status, etc.)
544
+ 5. Connect to a trigger or previous node
545
+ 6. Execute the workflow
546
+
547
+ ### Intermediate Example: Querying Projects with Filters
548
+
549
+ 1. Add an **Autotask** node to your workflow
550
+ 2. Select **Project** as the resource
551
+ 3. Select **Get Many** as the operation
552
+ 4. Add filter conditions (e.g., Status equals "Active")
553
+ 5. Choose whether to retrieve all results or limit the number:
554
+ - Toggle "Get All" to true to retrieve all matching records
555
+ - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
556
+ 6. Connect to a trigger or previous node
557
+ 7. Execute the workflow
558
+
559
+ ### Advanced Example: Using Column Selection and Reference Labels
560
+
561
+ 1. Add an **Autotask** node to your workflow
562
+ 2. Select **Ticket** as the resource
563
+ 3. Select **Get Many** as the operation
564
+ 4. Add filter conditions as needed
565
+ 5. Enable **Select Columns** to choose specific fields to return
566
+ 6. Select only the fields you need in the response (improves performance)
567
+ 7. Enable **Add Picklist Labels** to get human-readable values for picklist fields
568
+ 8. Enable **Add Reference Labels** to get human-readable values for reference fields
569
+ 9. Enable **Flatten User-Defined Fields** to bring UDFs to the top level of response objects
570
+ 10. Execute the workflow to get tickets with only the selected fields and human-readable labels
571
+
572
+ ### Advanced Example: Complex Filtering with Get Many Advanced
573
+
574
+ 1. Add an **Autotask** node to your workflow
575
+ 2. Select **Ticket** as the resource
576
+ 3. Select **Get Many Advanced** as the operation
577
+ 4. Build a complex filter, for example:
578
+ ```json
579
+ {
580
+ "filter": [
581
+ {
582
+ "op": "and",
583
+ "items": [
584
+ {
585
+ "field": "status",
586
+ "op": "noteq",
587
+ "value": 5
588
+ },
589
+ {
590
+ "op": "or",
591
+ "items": [
592
+ {
593
+ "field": "priority",
594
+ "op": "eq",
595
+ "value": 6
596
+ },
597
+ {
598
+ "field": "dueDateTime",
599
+ "op": "lt",
600
+ "value": "{{ $now.plus(3, 'days').toLocal()}}"
601
+ }
602
+ ]
603
+ }
604
+ ]
605
+ }
606
+ ]
607
+ }
608
+ ```
609
+ [Valid filter operators and filter documentation can be found here](https://ww15.autotask.net/help/DeveloperHelp/Content/APIs/REST/API_Calls/REST_Basic_Query_Calls.htm?Highlight=filter#List2)
610
+ 5. Choose whether to retrieve all results or limit the number:
611
+ - Toggle "Get All" to true to retrieve all matching records
612
+ - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
613
+ 6. Enable **Select Columns** to choose specific fields to return
614
+ 7. Enable **Add Reference Labels** and **Add Picklist Labels** for human-readable values
615
+ 8. Execute the workflow to retrieve tickets that are not complete AND either have priority 6 OR are due within the next 3 days
616
+
617
+ ### Example: Monitoring API Usage with API Threshold
618
+
619
+ 1. Add an **Autotask** node to your workflow
620
+ 2. Select **API Threshold** as the resource
621
+ 3. The operation **Get API Usage** will be automatically selected (it's the only available operation)
622
+ 4. Execute the node to receive current API usage information including:
623
+ - Current usage count
624
+ - Maximum threshold (limit)
625
+ - Usage percentage
626
+ - Usage level (Normal, Moderate, High, Critical)
627
+ - Remaining requests
628
+ - Timeframe duration
629
+ 5. You can use this information with IF nodes to implement conditional logic:
630
+ - Pause workflows when usage is too high
631
+ - Throttle requests during peak usage periods
632
+ - Log warnings when approaching limits
633
+ - Only execute non-critical operations when usage is below certain thresholds
634
+
635
+ ### Advanced Example: Working with Parent-Child Relationships
636
+
637
+ Many Autotask entities have parent-child relationships (e.g., Companies and Contacts). To work with these:
638
+
639
+ 1. First, retrieve or create the parent entity
640
+ 2. Use the parent entity's ID in the child entity operations
641
+ 3. For example, to create a Contact for a Company:
642
+ - First node: Get or create the Company
643
+ - Second node: Create a Contact with the Company ID
644
+
645
+ ### Example: Setting Up a Webhook Trigger
646
+
647
+ 1. Add an **Autotask Trigger** node to your workflow
648
+ 2. Select the entity type to monitor (Companies, Contacts, Tickets, etc.)
649
+ 3. Select the events to subscribe to (Create, Update, Delete)
650
+ 4. Configure the webhook URL (n8n will handle this automatically)
651
+ 5. Optionally specify fields to include in the webhook payload
652
+ 6. Optionally exclude specific resources from triggering the workflow
653
+ 7. Configure email notifications for webhook delivery failures if needed
654
+ 8. Save and activate the workflow
655
+ 9. The node will automatically register the webhook with Autotask
656
+ 10. When events occur in Autotask, they will trigger your workflow
657
+ 11. When the workflow is deactivated, the webhook will be automatically removed
658
+
659
+ ## Configuration
660
+
661
+ ### Caching Options
662
+
663
+ The node includes an enhanced file-based caching system to improve performance by reducing API calls:
664
+
665
+ - **Enable Field Caching**: Toggle caching on/off
666
+ - **Cache TTL**: How long to cache field values (in seconds)
667
+ - **Cache Entity Info**: Whether to cache entity information and field definitions
668
+ - **Entity Info TTL**: How long to cache entity information
669
+ - **Cache Reference Fields**: Whether to cache reference field values
670
+ - **Reference Fields TTL**: How long to cache reference field values
671
+ - **Cache Picklists**: Whether to cache picklist values
672
+ - **Picklists TTL**: How long to cache picklist values
673
+ - **File-based Cache**: Cache is stored in files that can be shared between workflows and runs
674
+ - **Cache Directory**: Optional path to a directory where cache files will be stored
675
+
676
+ > **IMPORTANT**: This node uses dynamic picklists and field enrichers to convert numerical values into human-readable labels through dynamic lookups. It's strongly recommended to keep caching enabled to avoid excessive API calls. Without caching, each picklist and reference field lookup requires separate API calls, which can quickly consume your API rate limits, especially in workflows with many operations or large data sets.
677
+
678
+ ### Label Enrichment and Field Processing
679
+
680
+ The node provides options to enrich entities with human-readable labels and simplify field access:
681
+
682
+ - **Add Picklist Labels**: Adds "_label" fields for picklist values (e.g., Status_label: "In Progress")
683
+ - **Add Reference Labels**: Adds "_label" fields for reference values (e.g., Company_label: "Acme Corporation")
684
+ - **Flatten User-Defined Fields**: When enabled, brings UDFs up to the top level of each response object for easier access instead of being nested in the userDefinedFields array (maintains the original array for backward compatibility)
685
+
686
+ ### Column Selection
687
+
688
+ To improve performance and reduce payload size, you can select specific columns to return:
689
+
690
+ - **Select Columns**: Choose which fields to include in the response
691
+ - Works with all get operations (get, getMany, getManyAdvanced)
692
+ - Compatible with label enrichment features
693
+
694
+ ### Timezone Handling
695
+
696
+ All dates and times in the Autotask API are in UTC. The node automatically converts between your selected timezone and UTC:
697
+
698
+ - When creating or updating records, local times are converted to UTC
699
+ - When retrieving records, UTC times are converted to your local timezone
700
+ - The timezone is configured in the credentials
701
+ - For Search Filter operations, input dates are thoroughly converted to UTC using the configured timezone, ensuring consistency with API requirements
702
+ - Output dates from all operations are converted to the configured local timezone for easier workflow handling
703
+
704
+ ## Limitations
705
+
706
+ ### API Limits
707
+
708
+ - Maximum 500 records per page in query results
709
+ - Maximum 50 pages per query operation
710
+ - Maximum 500 OR conditions in filters
711
+ - Maximum 1 User Defined Field per query
712
+
713
+ ### Entity-Specific Limitations
714
+
715
+ - Some entities may not support all operations (e.g., Project Phases cannot be deleted)
716
+ - Parent-child relationships require specific handling
717
+ - Some fields may be read-only or have specific validation rules
718
+
719
+ ### Performance Considerations
720
+
721
+ - Large queries may be slow and should be optimised with filters
722
+ - Column selection can significantly improve performance by reducing payload size
723
+ - Complex workflows with many API calls may hit rate limits
724
+ - Disabling caching when using picklist or reference label enrichment can lead to a high volume of API calls, potentially triggering rate limits. Each field being enriched requires a separate API call when cache is not available.
725
+
726
+ ## Troubleshooting
727
+
728
+ ### Common Issues
729
+
730
+ - **Authentication Errors**: Verify your API credentials and ensure the API user has appropriate permissions
731
+ - **Field Validation Errors**: Check field requirements in the Autotask API documentation
732
+ - **Rate Limiting**: If you encounter rate limiting, reduce the frequency of API calls or implement retry logic
733
+
734
+ ### Reporting Bugs
735
+
736
+ If you encounter any bugs or issues with this integration:
737
+
738
+ 1. Check the [GitHub Issues](https://github.com/msoukhomlinov/n8n-nodes-autotask/issues) to see if the problem has already been reported
739
+ 2. If not, please submit a new issue with:
740
+ - A clear description of the problem
741
+ - Steps to reproduce the issue
742
+ - Expected vs actual behaviour
743
+ - Your environment details (n8n version, Node.js version)
744
+ - Any relevant error messages or screenshots
745
+
746
+ Bug reports should be submitted via GitHub at: https://github.com/msoukhomlinov/n8n-nodes-autotask/issues
747
+
748
+ ## Resources
749
+
750
+ - [Autotask API Documentation](https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm)
751
+ - [n8n Documentation](https://docs.n8n.io/)
752
+ - [GitHub Repository](https://github.com/msoukhomlinov/n8n-nodes-autotask)
753
+
754
+ ## Support
755
+
756
+ If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
757
+
758
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
759
+
760
+ Your support helps maintain this project and develop new features.
761
+
762
+ ## License
763
+
764
+ [MIT](LICENSE)