n8n-nodes-autotask 0.9.0 → 0.9.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 (167) hide show
  1. package/README.md +483 -483
  2. package/dist/nodes/Autotask/constants/api.d.ts +1 -1
  3. package/dist/nodes/Autotask/constants/api.js +1 -1
  4. package/dist/nodes/Autotask/constants/api.js.map +1 -1
  5. package/dist/nodes/Autotask/helpers/filter.d.ts +7 -4
  6. package/dist/nodes/Autotask/helpers/filter.js +35 -5
  7. package/dist/nodes/Autotask/helpers/filter.js.map +1 -1
  8. package/dist/nodes/Autotask/operations/base/count-operation.js +1 -1
  9. package/dist/nodes/Autotask/operations/base/count-operation.js.map +1 -1
  10. package/dist/nodes/Autotask/operations/base/field-processor.js +1 -0
  11. package/dist/nodes/Autotask/operations/base/field-processor.js.map +1 -1
  12. package/dist/nodes/Autotask/operations/base/get-many.d.ts +1 -1
  13. package/dist/nodes/Autotask/operations/base/get-many.js +8 -6
  14. package/dist/nodes/Autotask/operations/base/get-many.js.map +1 -1
  15. package/dist/nodes/Autotask/resources/billingCodes/execute.js +1 -1
  16. package/dist/nodes/Autotask/resources/billingCodes/execute.js.map +1 -1
  17. package/dist/nodes/Autotask/resources/companies/execute.js +1 -1
  18. package/dist/nodes/Autotask/resources/companies/execute.js.map +1 -1
  19. package/dist/nodes/Autotask/resources/companyAlerts/execute.js +1 -1
  20. package/dist/nodes/Autotask/resources/companyAlerts/execute.js.map +1 -1
  21. package/dist/nodes/Autotask/resources/companyLocations/execute.js +1 -1
  22. package/dist/nodes/Autotask/resources/companyLocations/execute.js.map +1 -1
  23. package/dist/nodes/Autotask/resources/companyNotes/execute.js +1 -1
  24. package/dist/nodes/Autotask/resources/companyNotes/execute.js.map +1 -1
  25. package/dist/nodes/Autotask/resources/companyWebhooks/execute.js +1 -1
  26. package/dist/nodes/Autotask/resources/companyWebhooks/execute.js.map +1 -1
  27. package/dist/nodes/Autotask/resources/configurationItemBillingProductAssociations/execute.js +1 -1
  28. package/dist/nodes/Autotask/resources/configurationItemBillingProductAssociations/execute.js.map +1 -1
  29. package/dist/nodes/Autotask/resources/configurationItemCategories/execute.js +1 -1
  30. package/dist/nodes/Autotask/resources/configurationItemCategories/execute.js.map +1 -1
  31. package/dist/nodes/Autotask/resources/configurationItemCategoryUdfAssociation/execute.js +1 -1
  32. package/dist/nodes/Autotask/resources/configurationItemCategoryUdfAssociation/execute.js.map +1 -1
  33. package/dist/nodes/Autotask/resources/configurationItemDnsRecords/execute.js +1 -1
  34. package/dist/nodes/Autotask/resources/configurationItemDnsRecords/execute.js.map +1 -1
  35. package/dist/nodes/Autotask/resources/configurationItemNotes/execute.js +1 -1
  36. package/dist/nodes/Autotask/resources/configurationItemNotes/execute.js.map +1 -1
  37. package/dist/nodes/Autotask/resources/configurationItemRelatedItems/execute.js +1 -1
  38. package/dist/nodes/Autotask/resources/configurationItemRelatedItems/execute.js.map +1 -1
  39. package/dist/nodes/Autotask/resources/configurationItemSslSubjectAlternativeNames/execute.js +1 -1
  40. package/dist/nodes/Autotask/resources/configurationItemSslSubjectAlternativeNames/execute.js.map +1 -1
  41. package/dist/nodes/Autotask/resources/configurationItemTypes/execute.js +1 -1
  42. package/dist/nodes/Autotask/resources/configurationItemTypes/execute.js.map +1 -1
  43. package/dist/nodes/Autotask/resources/configurationItemWebhooks/execute.js +1 -1
  44. package/dist/nodes/Autotask/resources/configurationItemWebhooks/execute.js.map +1 -1
  45. package/dist/nodes/Autotask/resources/configurationItems/execute.js +1 -1
  46. package/dist/nodes/Autotask/resources/configurationItems/execute.js.map +1 -1
  47. package/dist/nodes/Autotask/resources/contactGroupContacts/execute.js +1 -1
  48. package/dist/nodes/Autotask/resources/contactGroupContacts/execute.js.map +1 -1
  49. package/dist/nodes/Autotask/resources/contactGroups/execute.js +1 -1
  50. package/dist/nodes/Autotask/resources/contactGroups/execute.js.map +1 -1
  51. package/dist/nodes/Autotask/resources/contactWebhooks/execute.js +1 -1
  52. package/dist/nodes/Autotask/resources/contactWebhooks/execute.js.map +1 -1
  53. package/dist/nodes/Autotask/resources/contacts/execute.js +1 -1
  54. package/dist/nodes/Autotask/resources/contacts/execute.js.map +1 -1
  55. package/dist/nodes/Autotask/resources/contract-exclusion-sets/execute.js +1 -1
  56. package/dist/nodes/Autotask/resources/contract-exclusion-sets/execute.js.map +1 -1
  57. package/dist/nodes/Autotask/resources/contractBillingRules/execute.js +1 -1
  58. package/dist/nodes/Autotask/resources/contractBillingRules/execute.js.map +1 -1
  59. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js +1 -1
  60. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js.map +1 -1
  61. package/dist/nodes/Autotask/resources/contractBlocks/execute.js +1 -1
  62. package/dist/nodes/Autotask/resources/contractBlocks/execute.js.map +1 -1
  63. package/dist/nodes/Autotask/resources/contractCharges/execute.js +1 -1
  64. package/dist/nodes/Autotask/resources/contractCharges/execute.js.map +1 -1
  65. package/dist/nodes/Autotask/resources/contractExclusionBillingCodes/execute.js +1 -1
  66. package/dist/nodes/Autotask/resources/contractExclusionBillingCodes/execute.js.map +1 -1
  67. package/dist/nodes/Autotask/resources/contractExclusionRoles/execute.js +1 -1
  68. package/dist/nodes/Autotask/resources/contractExclusionRoles/execute.js.map +1 -1
  69. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedRoles/execute.js +1 -1
  70. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedRoles/execute.js.map +1 -1
  71. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedWorkTypes/execute.js +1 -1
  72. package/dist/nodes/Autotask/resources/contractExclusionSetExcludedWorkTypes/execute.js.map +1 -1
  73. package/dist/nodes/Autotask/resources/contractMilestones/execute.js +1 -1
  74. package/dist/nodes/Autotask/resources/contractMilestones/execute.js.map +1 -1
  75. package/dist/nodes/Autotask/resources/contractNotes/execute.js +1 -1
  76. package/dist/nodes/Autotask/resources/contractNotes/execute.js.map +1 -1
  77. package/dist/nodes/Autotask/resources/contractRates/execute.js +1 -1
  78. package/dist/nodes/Autotask/resources/contractRates/execute.js.map +1 -1
  79. package/dist/nodes/Autotask/resources/contractRetainers/execute.js +1 -1
  80. package/dist/nodes/Autotask/resources/contractRetainers/execute.js.map +1 -1
  81. package/dist/nodes/Autotask/resources/contractRoleCosts/execute.js +1 -1
  82. package/dist/nodes/Autotask/resources/contractRoleCosts/execute.js.map +1 -1
  83. package/dist/nodes/Autotask/resources/contractServiceBundleUnits/execute.js +1 -1
  84. package/dist/nodes/Autotask/resources/contractServiceBundleUnits/execute.js.map +1 -1
  85. package/dist/nodes/Autotask/resources/contractServiceBundles/execute.js +1 -1
  86. package/dist/nodes/Autotask/resources/contractServiceBundles/execute.js.map +1 -1
  87. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js +1 -1
  88. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js.map +1 -1
  89. package/dist/nodes/Autotask/resources/contractServices/execute.js +1 -1
  90. package/dist/nodes/Autotask/resources/contractServices/execute.js.map +1 -1
  91. package/dist/nodes/Autotask/resources/contractTicketPurchases/execute.js +1 -1
  92. package/dist/nodes/Autotask/resources/contractTicketPurchases/execute.js.map +1 -1
  93. package/dist/nodes/Autotask/resources/contracts/execute.js +1 -1
  94. package/dist/nodes/Autotask/resources/contracts/execute.js.map +1 -1
  95. package/dist/nodes/Autotask/resources/countries/execute.js +1 -1
  96. package/dist/nodes/Autotask/resources/countries/execute.js.map +1 -1
  97. package/dist/nodes/Autotask/resources/domainRegistrar/execute.js +1 -1
  98. package/dist/nodes/Autotask/resources/domainRegistrar/execute.js.map +1 -1
  99. package/dist/nodes/Autotask/resources/holidaySets/execute.js +1 -1
  100. package/dist/nodes/Autotask/resources/holidaySets/execute.js.map +1 -1
  101. package/dist/nodes/Autotask/resources/holidays/execute.js +1 -1
  102. package/dist/nodes/Autotask/resources/holidays/execute.js.map +1 -1
  103. package/dist/nodes/Autotask/resources/invoices/execute.js +1 -1
  104. package/dist/nodes/Autotask/resources/invoices/execute.js.map +1 -1
  105. package/dist/nodes/Autotask/resources/notificationHistory/execute.js +1 -1
  106. package/dist/nodes/Autotask/resources/notificationHistory/execute.js.map +1 -1
  107. package/dist/nodes/Autotask/resources/opportunities/execute.js +1 -1
  108. package/dist/nodes/Autotask/resources/opportunities/execute.js.map +1 -1
  109. package/dist/nodes/Autotask/resources/productVendors/execute.js +1 -1
  110. package/dist/nodes/Autotask/resources/productVendors/execute.js.map +1 -1
  111. package/dist/nodes/Autotask/resources/products/execute.js +1 -1
  112. package/dist/nodes/Autotask/resources/products/execute.js.map +1 -1
  113. package/dist/nodes/Autotask/resources/projectCharges/execute.js +1 -1
  114. package/dist/nodes/Autotask/resources/projectCharges/execute.js.map +1 -1
  115. package/dist/nodes/Autotask/resources/projectNotes/execute.js +1 -1
  116. package/dist/nodes/Autotask/resources/projectNotes/execute.js.map +1 -1
  117. package/dist/nodes/Autotask/resources/projectPhases/execute.js +1 -1
  118. package/dist/nodes/Autotask/resources/projectPhases/execute.js.map +1 -1
  119. package/dist/nodes/Autotask/resources/projectTasks/execute.js +1 -1
  120. package/dist/nodes/Autotask/resources/projectTasks/execute.js.map +1 -1
  121. package/dist/nodes/Autotask/resources/projects/execute.js +1 -1
  122. package/dist/nodes/Autotask/resources/projects/execute.js.map +1 -1
  123. package/dist/nodes/Autotask/resources/quoteItems/execute.js +1 -1
  124. package/dist/nodes/Autotask/resources/quoteItems/execute.js.map +1 -1
  125. package/dist/nodes/Autotask/resources/quoteLocations/execute.js +1 -1
  126. package/dist/nodes/Autotask/resources/quoteLocations/execute.js.map +1 -1
  127. package/dist/nodes/Autotask/resources/quoteTemplates/execute.js +1 -1
  128. package/dist/nodes/Autotask/resources/quoteTemplates/execute.js.map +1 -1
  129. package/dist/nodes/Autotask/resources/quotes/execute.js +1 -1
  130. package/dist/nodes/Autotask/resources/quotes/execute.js.map +1 -1
  131. package/dist/nodes/Autotask/resources/resourceRoles/execute.js +1 -1
  132. package/dist/nodes/Autotask/resources/resourceRoles/execute.js.map +1 -1
  133. package/dist/nodes/Autotask/resources/resources/execute.js +1 -1
  134. package/dist/nodes/Autotask/resources/resources/execute.js.map +1 -1
  135. package/dist/nodes/Autotask/resources/roles/execute.js +1 -1
  136. package/dist/nodes/Autotask/resources/roles/execute.js.map +1 -1
  137. package/dist/nodes/Autotask/resources/serviceCallTaskResources/execute.js +1 -1
  138. package/dist/nodes/Autotask/resources/serviceCallTaskResources/execute.js.map +1 -1
  139. package/dist/nodes/Autotask/resources/serviceCallTasks/execute.js +1 -1
  140. package/dist/nodes/Autotask/resources/serviceCallTasks/execute.js.map +1 -1
  141. package/dist/nodes/Autotask/resources/serviceCallTicketResources/execute.js +1 -1
  142. package/dist/nodes/Autotask/resources/serviceCallTicketResources/execute.js.map +1 -1
  143. package/dist/nodes/Autotask/resources/serviceCallTickets/execute.js +1 -1
  144. package/dist/nodes/Autotask/resources/serviceCallTickets/execute.js.map +1 -1
  145. package/dist/nodes/Autotask/resources/serviceCalls/execute.js +1 -1
  146. package/dist/nodes/Autotask/resources/serviceCalls/execute.js.map +1 -1
  147. package/dist/nodes/Autotask/resources/services/execute.js +1 -1
  148. package/dist/nodes/Autotask/resources/services/execute.js.map +1 -1
  149. package/dist/nodes/Autotask/resources/skills/execute.js +1 -1
  150. package/dist/nodes/Autotask/resources/skills/execute.js.map +1 -1
  151. package/dist/nodes/Autotask/resources/surveyResults/execute.js +1 -1
  152. package/dist/nodes/Autotask/resources/surveyResults/execute.js.map +1 -1
  153. package/dist/nodes/Autotask/resources/surveys/execute.js +1 -1
  154. package/dist/nodes/Autotask/resources/surveys/execute.js.map +1 -1
  155. package/dist/nodes/Autotask/resources/ticketNoteWebhooks/execute.js +1 -1
  156. package/dist/nodes/Autotask/resources/ticketNoteWebhooks/execute.js.map +1 -1
  157. package/dist/nodes/Autotask/resources/ticketNotes/execute.js +1 -1
  158. package/dist/nodes/Autotask/resources/ticketNotes/execute.js.map +1 -1
  159. package/dist/nodes/Autotask/resources/ticketWebhooks/execute.js +1 -1
  160. package/dist/nodes/Autotask/resources/ticketWebhooks/execute.js.map +1 -1
  161. package/dist/nodes/Autotask/resources/tickets/execute.js +2 -1
  162. package/dist/nodes/Autotask/resources/tickets/execute.js.map +1 -1
  163. package/dist/nodes/Autotask/resources/timeEntries/execute.js +1 -1
  164. package/dist/nodes/Autotask/resources/timeEntries/execute.js.map +1 -1
  165. package/dist/package.json +1 -1
  166. package/dist/tsconfig.tsbuildinfo +1 -1
  167. package/package.json +1 -1
package/README.md CHANGED
@@ -1,483 +1,483 @@
1
- # n8n-nodes-autotask
2
-
3
- ![n8n-nodes-autotask](https://img.shields.io/badge/n8n--nodes--autotask-0.9.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
- ## Authentication
45
-
46
- To use this node, you need to have API access to your Autotask instance. Follow these steps to set up authentication:
47
-
48
- 1. In Autotask, go to **Admin > API User Security**
49
- 2. Create or select an API user
50
- 3. Note the API Integration Code, Username, and Secret
51
- 4. In n8n, create a new credential of type **Autotask API**
52
- 5. Enter your API Integration Code, Username, and Secret
53
- 6. Select your Autotask zone
54
- 7. Select your timezone (affects how dates and times are displayed and entered)
55
- 8. Configure caching options as needed (this will cache dynamically fetched field picklists)
56
-
57
- ## Features
58
-
59
- ### Supported Resources
60
-
61
- The node supports the following Autotask resources:
62
-
63
- | Resource | Description |
64
- |----------|-------------|
65
- | API Threshold | Check Autotask API usage limits and current usage levels |
66
- | Billing Code | Manage billing codes for time entries and charges |
67
- | Company | Manage organisations in Autotask |
68
- | Company Alert | Manage alerts associated with companies |
69
- | Company Location | Manage locations for companies |
70
- | Company Note | Manage notes attached to companies |
71
- | Company Webhook | Manage webhooks for company events |
72
- | Configuration Item | Manage configuration items (CIs) for companies |
73
- | Configuration Item Billing Product Association | Manage product associations for configuration items |
74
- | Configuration Item Category | Manage categories for configuration items |
75
- | Configuration Item Category UDF Association | Manage UDF associations for CI categories |
76
- | Configuration Item DNS Record | Manage DNS records for configuration items |
77
- | Configuration Item Note | Manage notes for configuration items |
78
- | Configuration Item Related Item | Manage related items for configuration items |
79
- | Configuration Item SSL Subject Alternative Name | Manage SSL alternative names for configuration items |
80
- | Configuration Item Type | Manage types for configuration items |
81
- | Configuration Item Webhook | Manage webhooks for configuration item events |
82
- | Contact | Manage contacts associated with companies |
83
- | Contact Groups | Manage contact groups |
84
- | Contact Group Contacts | Manage contacts within contact groups |
85
- | Contact Webhook | Manage webhooks for contact events |
86
- | Contract | Manage contracts for companies |
87
- | Contract Billing Rules | Manage billing rules for contracts |
88
- | Contract Block | Manage block hour contracts |
89
- | Contract Block Hour Factor | Manage hour factors for block hour contracts |
90
- | Contract Charge | Manage charges associated with contracts |
91
- | Contract Exclusion Billing Codes | Manage excluded billing codes for contracts |
92
- | Contract Exclusion Roles | Manage excluded roles for contracts |
93
- | Contract Exclusion Set Excluded Roles | Manage excluded roles within exclusion sets |
94
- | Contract Exclusion Set Excluded Work Types | Manage excluded work types within exclusion sets |
95
- | Contract Exclusion Sets | Manage exclusion sets for contracts |
96
- | Contract Milestone | Manage milestones for contracts |
97
- | Contract Note | Manage notes attached to contracts |
98
- | Contract Rate | Manage rates for contract services |
99
- | Contract Retainers | Manage retainers for contracts |
100
- | Contract Role Costs | Manage role costs for contracts |
101
- | Contract Service | Manage services within contracts |
102
- | Contract Service Adjustments | Manage adjustments for contract services |
103
- | Contract Service Bundle Adjustments | Manage adjustments for service bundles |
104
- | Contract Service Bundles | Manage service bundles within contracts |
105
- | Contract Service Bundle Units | Manage service bundle units |
106
- | Contract Service Unit | Manage service units for contracts |
107
- | Contract Ticket Purchases | Manage ticket purchases for contracts |
108
- | Countries | Query countries, which are used in address information for companies, contacts, and resources |
109
- | Domain Registrars | Manage domain registrars |
110
- | Holiday | Manage holiday dates |
111
- | Holiday Set | Manage holiday sets for resources |
112
- | Invoices | Manage invoices |
113
- | Notification History | View notification history |
114
- | Opportunity | Manage sales opportunities |
115
- | Product | Manage products in the catalogue |
116
- | Product Vendors | Manage vendor associations for products |
117
- | Project | Manage projects |
118
- | Project Charge | Manage charges associated with projects |
119
- | Project Note | Manage notes attached to projects |
120
- | Project Phase | Manage phases within projects |
121
- | Project Task | Manage tasks within projects |
122
- | Quote | Manage quotes for opportunities with pricing for products, services, and labor |
123
- | Quote Item | Manage line items for quotes including products, services, and labor |
124
- | Quote Location | Manage shipping and billing address information for quotes |
125
- | Quote Template | Query quote templates that define content and appearance of quotes |
126
- | Resource | Manage staff resources |
127
- | Resource Role | Manage department/role relationships, service desk queues, and service desk roles |
128
- | Roles | Manage roles in the system |
129
- | Search Filter | Build advanced search filters |
130
- | Service | Manage services offered to clients |
131
- | Service Call | Manage service calls |
132
- | Service Call Task | Manage tasks associated with service calls |
133
- | Service Call Task Resource | Manage resources assigned to service call tasks |
134
- | Service Call Ticket | Manage tickets linked to service calls |
135
- | Service Call Ticket Resource | Manage resources assigned to service call tickets |
136
- | Survey | Manage customer surveys |
137
- | Survey Results | Manage results from customer surveys |
138
- | Ticket | Manage service tickets |
139
- | Ticket History | View historical changes to tickets |
140
- | Ticket Note | Manage notes attached to tickets |
141
- | Ticket Note Webhook | Manage webhooks for ticket note events |
142
- | Ticket Webhook | Manage webhooks for ticket events |
143
- | Time Entry | Manage time entries for billing |
144
-
145
- ### Operations
146
-
147
- For most resources, the following operations are available:
148
-
149
- - **Create**: Add new records
150
- - **Read**: Retrieve a single record by ID
151
- - **Update**: Modify existing records
152
- - **Delete**: Remove records
153
- - **Get Many**: Retrieve multiple records with basic filtering options. This operation allows you to:
154
- - Filter records using simple field conditions (equals)
155
- - Filtering on User Defined Fields (UDFs)
156
- - Automatically paginate through large result sets
157
- - Choose to get all results or limit to a specific number (1-500)
158
- - Set a maximum number of records to return when not retrieving all records
159
- - Select specific columns to return in the response
160
- - Add human-readable labels for picklist and reference fields
161
- - Flatten User-Defined Fields for easier access in workflows
162
- - **Get Many Advanced**: Build complex queries with multiple filter conditions and logical operators. This operation provides:
163
- - Support for complex AND/OR logic in filters
164
- - Nested condition groups for sophisticated queries
165
- - Filtering on User Defined Fields (UDFs)
166
- - Advanced operators like contains, beginsWith, endsWith, exists, notExists
167
- - Support for IN and NOT IN operators with multiple values
168
- - Choose to get all results or limit to a specific number (1-500)
169
- - Set a maximum number of records to return when not retrieving all records
170
- - Select specific columns to return in the response
171
- - Add human-readable labels for picklist and reference fields
172
- - Flatten User-Defined Fields for easier access in workflows
173
- - Date-based filtering with automatic timezone handling
174
- - **Count**: Get the number of matching records
175
- - **Get Entity Info**: Retrieve metadata about the entity
176
- - **Get Field Info**: Retrieve field definitions for the selected entity
177
-
178
- For webhook resources (Company Webhook, Contact Webhook, Configuration Item Webhook, Ticket Webhook, Ticket Note Webhook), the following operations are available:
179
- - **Get**: Retrieve a single webhook by ID
180
- - **Get Many**: Retrieve multiple webhooks with basic filtering
181
- - **Delete**: Remove a webhook
182
-
183
- ### Webhook Trigger
184
-
185
- The node includes an Autotask Trigger node that can receive webhook events from Autotask. The trigger supports:
186
-
187
- - Events for multiple entity types (Companies, Contacts, Tickets, Configuration Items, Ticket Notes)
188
- - Create, Update, and Delete events
189
- - Field selection for webhook payloads (specify which fields to include)
190
- - Resource exclusion (exclude specific resources from triggering the workflow)
191
- - Email notifications for webhook delivery failures
192
- - Threshold notifications for monitoring webhook performance
193
- - Automatic webhook registration and cleanup
194
- - Secure payload verification with HMAC signatures
195
-
196
- ### Advanced Features
197
-
198
- - **Resource Mapping**: Dynamically map fields based on entity definitions
199
- - **Advanced Filtering**: Build complex queries with multiple conditions
200
- - **Column Selection**: Choose specific fields to return in get operations
201
- - **Picklist Label Enrichment**: Automatically add human-readable labels for picklist fields
202
- - **Reference Label Enrichment**: Add human-readable labels for reference fields
203
- - **UDF Flattening**: Bring user-defined fields up to the top level of response objects for easier access
204
- - **File-based Caching**: Improved performance with persistent caching that can be shared between workflows and runs
205
- - **Timezone Handling**: Automatic conversion between local time and UTC
206
- - **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
207
-
208
- ### API Threshold Resource
209
-
210
- The API Threshold resource provides a simple way to monitor your Autotask API usage limits and current consumption. This helps users:
211
- - Track how many API requests have been made in the current timeframe
212
- - See the maximum allowed requests (threshold limit)
213
- - View the usage as a percentage and categorized level (Normal, Moderate, High, Critical)
214
- - Calculate remaining available requests
215
- - Monitor timeframe duration for rate limits
216
-
217
- 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.
218
-
219
- ### AI Tool Integration
220
-
221
- This node can be used as a tool by AI agents in n8n workflows. This allows AI agents to interact with Autotask PSA, performing operations like retrieving company information, creating tickets, or updating contacts.
222
-
223
- #### Requirements
224
-
225
- Currently, n8n only allows core nodes to be used as tools by default. To use this community node as a tool, you need to:
226
-
227
- 1. Set the environment variable `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE` to `true` when running n8n.
228
- 2. Add the Autotask node as a tool in your AI agent workflow.
229
-
230
- #### Environment Variable Configuration
231
-
232
- For the node to be usable as an AI tool, you must set the following environment variable:
233
-
234
- ```bash
235
- N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
236
- ```
237
-
238
- This can be done by:
239
- - Adding it to your .env file
240
- - Setting it in your system environment variables
241
- - Including it in your Docker or container configuration
242
- - Adding it to your startup command (e.g., `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true n8n start`)
243
-
244
- Without this environment variable set to `true`, n8n will not allow AI agents to use this community node as a tool.
245
-
246
- #### Example AI Tool Usage
247
-
248
- An AI agent might use the Autotask node to:
249
- - Retrieve information about a company or contact
250
- - Create a new ticket based on user input
251
- - Update the status of an existing ticket
252
- - Add notes to a ticket or company record
253
- - Search for tickets matching specific criteria
254
-
255
- ## Usage
256
-
257
- ### Basic Example: Creating a Ticket
258
-
259
- 1. Add an **Autotask** node to your workflow
260
- 2. Select **Ticket** as the resource
261
- 3. Select **Create** as the operation
262
- 4. Configure the required fields (Title, Status, etc.)
263
- 5. Connect to a trigger or previous node
264
- 6. Execute the workflow
265
-
266
- ### Intermediate Example: Querying Projects with Filters
267
-
268
- 1. Add an **Autotask** node to your workflow
269
- 2. Select **Project** as the resource
270
- 3. Select **Get Many** as the operation
271
- 4. Add filter conditions (e.g., Status equals "Active")
272
- 5. Choose whether to retrieve all results or limit the number:
273
- - Toggle "Get All" to true to retrieve all matching records
274
- - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
275
- 6. Connect to a trigger or previous node
276
- 7. Execute the workflow
277
-
278
- ### Advanced Example: Using Column Selection and Reference Labels
279
-
280
- 1. Add an **Autotask** node to your workflow
281
- 2. Select **Ticket** as the resource
282
- 3. Select **Get Many** as the operation
283
- 4. Add filter conditions as needed
284
- 5. Enable **Select Columns** to choose specific fields to return
285
- 6. Select only the fields you need in the response (improves performance)
286
- 7. Enable **Add Picklist Labels** to get human-readable values for picklist fields
287
- 8. Enable **Add Reference Labels** to get human-readable values for reference fields
288
- 9. Enable **Flatten User-Defined Fields** to bring UDFs to the top level of response objects
289
- 10. Execute the workflow to get tickets with only the selected fields and human-readable labels
290
-
291
- ### Advanced Example: Complex Filtering with Get Many Advanced
292
-
293
- 1. Add an **Autotask** node to your workflow
294
- 2. Select **Ticket** as the resource
295
- 3. Select **Get Many Advanced** as the operation
296
- 4. Build a complex filter, for example:
297
- ```json
298
- {
299
- "filter": [
300
- {
301
- "op": "and",
302
- "items": [
303
- {
304
- "field": "status",
305
- "op": "noteq",
306
- "value": 5
307
- },
308
- {
309
- "op": "or",
310
- "items": [
311
- {
312
- "field": "priority",
313
- "op": "eq",
314
- "value": 6
315
- },
316
- {
317
- "field": "dueDateTime",
318
- "op": "lt",
319
- "value": "{{ $now.plus(3, 'days').toLocal()}}"
320
- }
321
- ]
322
- }
323
- ]
324
- }
325
- ]
326
- }
327
- ```
328
- [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)
329
- 5. Choose whether to retrieve all results or limit the number:
330
- - Toggle "Get All" to true to retrieve all matching records
331
- - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
332
- 6. Enable **Select Columns** to choose specific fields to return
333
- 7. Enable **Add Reference Labels** and **Add Picklist Labels** for human-readable values
334
- 8. Execute the workflow to retrieve tickets that are not complete AND either have priority 6 OR are due within the next 3 days
335
-
336
- ### Example: Monitoring API Usage with API Threshold
337
-
338
- 1. Add an **Autotask** node to your workflow
339
- 2. Select **API Threshold** as the resource
340
- 3. The operation **Get API Usage** will be automatically selected (it's the only available operation)
341
- 4. Execute the node to receive current API usage information including:
342
- - Current usage count
343
- - Maximum threshold (limit)
344
- - Usage percentage
345
- - Usage level (Normal, Moderate, High, Critical)
346
- - Remaining requests
347
- - Timeframe duration
348
- 5. You can use this information with IF nodes to implement conditional logic:
349
- - Pause workflows when usage is too high
350
- - Throttle requests during peak usage periods
351
- - Log warnings when approaching limits
352
- - Only execute non-critical operations when usage is below certain thresholds
353
-
354
- ### Advanced Example: Working with Parent-Child Relationships
355
-
356
- Many Autotask entities have parent-child relationships (e.g., Companies and Contacts). To work with these:
357
-
358
- 1. First, retrieve or create the parent entity
359
- 2. Use the parent entity's ID in the child entity operations
360
- 3. For example, to create a Contact for a Company:
361
- - First node: Get or create the Company
362
- - Second node: Create a Contact with the Company ID
363
-
364
- ### Example: Setting Up a Webhook Trigger
365
-
366
- 1. Add an **Autotask Trigger** node to your workflow
367
- 2. Select the entity type to monitor (Companies, Contacts, Tickets, etc.)
368
- 3. Select the events to subscribe to (Create, Update, Delete)
369
- 4. Configure the webhook URL (n8n will handle this automatically)
370
- 5. Optionally specify fields to include in the webhook payload
371
- 6. Optionally exclude specific resources from triggering the workflow
372
- 7. Configure email notifications for webhook delivery failures if needed
373
- 8. Save and activate the workflow
374
- 9. The node will automatically register the webhook with Autotask
375
- 10. When events occur in Autotask, they will trigger your workflow
376
- 11. When the workflow is deactivated, the webhook will be automatically removed
377
-
378
- ## Configuration
379
-
380
- ### Caching Options
381
-
382
- The node includes an enhanced file-based caching system to improve performance by reducing API calls:
383
-
384
- - **Enable Field Caching**: Toggle caching on/off
385
- - **Cache TTL**: How long to cache field values (in seconds)
386
- - **Cache Entity Info**: Whether to cache entity information and field definitions
387
- - **Entity Info TTL**: How long to cache entity information
388
- - **Cache Reference Fields**: Whether to cache reference field values
389
- - **Reference Fields TTL**: How long to cache reference field values
390
- - **Cache Picklists**: Whether to cache picklist values
391
- - **Picklists TTL**: How long to cache picklist values
392
- - **File-based Cache**: Cache is stored in files that can be shared between workflows and runs
393
- - **Cache Directory**: Optional path to a directory where cache files will be stored
394
-
395
- > **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.
396
-
397
- ### Label Enrichment and Field Processing
398
-
399
- The node provides options to enrich entities with human-readable labels and simplify field access:
400
-
401
- - **Add Picklist Labels**: Adds "_label" fields for picklist values (e.g., Status_label: "In Progress")
402
- - **Add Reference Labels**: Adds "_label" fields for reference values (e.g., Company_label: "Acme Corporation")
403
- - **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)
404
-
405
- ### Column Selection
406
-
407
- To improve performance and reduce payload size, you can select specific columns to return:
408
-
409
- - **Select Columns**: Choose which fields to include in the response
410
- - Works with all get operations (get, getMany, getManyAdvanced)
411
- - Compatible with label enrichment features
412
-
413
- ### Timezone Handling
414
-
415
- All dates and times in the Autotask API are in UTC. The node automatically converts between your selected timezone and UTC:
416
-
417
- - When creating or updating records, local times are converted to UTC
418
- - When retrieving records, UTC times are converted to your local timezone
419
- - The timezone is configured in the credentials
420
- - For Search Filter operations, input dates are thoroughly converted to UTC using the configured timezone, ensuring consistency with API requirements
421
- - Output dates from all operations are converted to the configured local timezone for easier workflow handling
422
-
423
- ## Limitations
424
-
425
- ### API Limits
426
-
427
- - Maximum 500 records per page in query results
428
- - Maximum 50 pages per query operation
429
- - Maximum 500 OR conditions in filters
430
- - Maximum 1 User Defined Field per query
431
-
432
- ### Entity-Specific Limitations
433
-
434
- - Some entities may not support all operations (e.g., Project Phases cannot be deleted)
435
- - Parent-child relationships require specific handling
436
- - Some fields may be read-only or have specific validation rules
437
-
438
- ### Performance Considerations
439
-
440
- - Large queries may be slow and should be optimised with filters
441
- - Column selection can significantly improve performance by reducing payload size
442
- - Complex workflows with many API calls may hit rate limits
443
- - 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.
444
-
445
- ## Troubleshooting
446
-
447
- ### Common Issues
448
-
449
- - **Authentication Errors**: Verify your API credentials and ensure the API user has appropriate permissions
450
- - **Field Validation Errors**: Check field requirements in the Autotask API documentation
451
- - **Rate Limiting**: If you encounter rate limiting, reduce the frequency of API calls or implement retry logic
452
-
453
- ### Reporting Bugs
454
-
455
- If you encounter any bugs or issues with this integration:
456
-
457
- 1. Check the [GitHub Issues](https://github.com/msoukhomlinov/n8n-nodes-autotask/issues) to see if the problem has already been reported
458
- 2. If not, please submit a new issue with:
459
- - A clear description of the problem
460
- - Steps to reproduce the issue
461
- - Expected vs actual behaviour
462
- - Your environment details (n8n version, Node.js version)
463
- - Any relevant error messages or screenshots
464
-
465
- Bug reports should be submitted via GitHub at: https://github.com/msoukhomlinov/n8n-nodes-autotask/issues
466
-
467
- ## Resources
468
-
469
- - [Autotask API Documentation](https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm)
470
- - [n8n Documentation](https://docs.n8n.io/)
471
- - [GitHub Repository](https://github.com/msoukhomlinov/n8n-nodes-autotask)
472
-
473
- ## Support
474
-
475
- If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
476
-
477
- [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
478
-
479
- Your support helps maintain this project and develop new features.
480
-
481
- ## License
482
-
483
- [MIT](LICENSE)
1
+ # n8n-nodes-autotask
2
+
3
+ ![n8n-nodes-autotask](https://img.shields.io/badge/n8n--nodes--autotask-0.9.1-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
+ ## Authentication
45
+
46
+ To use this node, you need to have API access to your Autotask instance. Follow these steps to set up authentication:
47
+
48
+ 1. In Autotask, go to **Admin > API User Security**
49
+ 2. Create or select an API user
50
+ 3. Note the API Integration Code, Username, and Secret
51
+ 4. In n8n, create a new credential of type **Autotask API**
52
+ 5. Enter your API Integration Code, Username, and Secret
53
+ 6. Select your Autotask zone
54
+ 7. Select your timezone (affects how dates and times are displayed and entered)
55
+ 8. Configure caching options as needed (this will cache dynamically fetched field picklists)
56
+
57
+ ## Features
58
+
59
+ ### Supported Resources
60
+
61
+ The node supports the following Autotask resources:
62
+
63
+ | Resource | Description |
64
+ |----------|-------------|
65
+ | API Threshold | Check Autotask API usage limits and current usage levels |
66
+ | Billing Code | Manage billing codes for time entries and charges |
67
+ | Company | Manage organisations in Autotask |
68
+ | Company Alert | Manage alerts associated with companies |
69
+ | Company Location | Manage locations for companies |
70
+ | Company Note | Manage notes attached to companies |
71
+ | Company Webhook | Manage webhooks for company events |
72
+ | Configuration Item | Manage configuration items (CIs) for companies |
73
+ | Configuration Item Billing Product Association | Manage product associations for configuration items |
74
+ | Configuration Item Category | Manage categories for configuration items |
75
+ | Configuration Item Category UDF Association | Manage UDF associations for CI categories |
76
+ | Configuration Item DNS Record | Manage DNS records for configuration items |
77
+ | Configuration Item Note | Manage notes for configuration items |
78
+ | Configuration Item Related Item | Manage related items for configuration items |
79
+ | Configuration Item SSL Subject Alternative Name | Manage SSL alternative names for configuration items |
80
+ | Configuration Item Type | Manage types for configuration items |
81
+ | Configuration Item Webhook | Manage webhooks for configuration item events |
82
+ | Contact | Manage contacts associated with companies |
83
+ | Contact Groups | Manage contact groups |
84
+ | Contact Group Contacts | Manage contacts within contact groups |
85
+ | Contact Webhook | Manage webhooks for contact events |
86
+ | Contract | Manage contracts for companies |
87
+ | Contract Billing Rules | Manage billing rules for contracts |
88
+ | Contract Block | Manage block hour contracts |
89
+ | Contract Block Hour Factor | Manage hour factors for block hour contracts |
90
+ | Contract Charge | Manage charges associated with contracts |
91
+ | Contract Exclusion Billing Codes | Manage excluded billing codes for contracts |
92
+ | Contract Exclusion Roles | Manage excluded roles for contracts |
93
+ | Contract Exclusion Set Excluded Roles | Manage excluded roles within exclusion sets |
94
+ | Contract Exclusion Set Excluded Work Types | Manage excluded work types within exclusion sets |
95
+ | Contract Exclusion Sets | Manage exclusion sets for contracts |
96
+ | Contract Milestone | Manage milestones for contracts |
97
+ | Contract Note | Manage notes attached to contracts |
98
+ | Contract Rate | Manage rates for contract services |
99
+ | Contract Retainers | Manage retainers for contracts |
100
+ | Contract Role Costs | Manage role costs for contracts |
101
+ | Contract Service | Manage services within contracts |
102
+ | Contract Service Adjustments | Manage adjustments for contract services |
103
+ | Contract Service Bundle Adjustments | Manage adjustments for service bundles |
104
+ | Contract Service Bundles | Manage service bundles within contracts |
105
+ | Contract Service Bundle Units | Manage service bundle units |
106
+ | Contract Service Unit | Manage service units for contracts |
107
+ | Contract Ticket Purchases | Manage ticket purchases for contracts |
108
+ | Countries | Query countries, which are used in address information for companies, contacts, and resources |
109
+ | Domain Registrars | Manage domain registrars |
110
+ | Holiday | Manage holiday dates |
111
+ | Holiday Set | Manage holiday sets for resources |
112
+ | Invoices | Manage invoices |
113
+ | Notification History | View notification history |
114
+ | Opportunity | Manage sales opportunities |
115
+ | Product | Manage products in the catalogue |
116
+ | Product Vendors | Manage vendor associations for products |
117
+ | Project | Manage projects |
118
+ | Project Charge | Manage charges associated with projects |
119
+ | Project Note | Manage notes attached to projects |
120
+ | Project Phase | Manage phases within projects |
121
+ | Project Task | Manage tasks within projects |
122
+ | Quote | Manage quotes for opportunities with pricing for products, services, and labor |
123
+ | Quote Item | Manage line items for quotes including products, services, and labor |
124
+ | Quote Location | Manage shipping and billing address information for quotes |
125
+ | Quote Template | Query quote templates that define content and appearance of quotes |
126
+ | Resource | Manage staff resources |
127
+ | Resource Role | Manage department/role relationships, service desk queues, and service desk roles |
128
+ | Roles | Manage roles in the system |
129
+ | Search Filter | Build advanced search filters |
130
+ | Service | Manage services offered to clients |
131
+ | Service Call | Manage service calls |
132
+ | Service Call Task | Manage tasks associated with service calls |
133
+ | Service Call Task Resource | Manage resources assigned to service call tasks |
134
+ | Service Call Ticket | Manage tickets linked to service calls |
135
+ | Service Call Ticket Resource | Manage resources assigned to service call tickets |
136
+ | Survey | Manage customer surveys |
137
+ | Survey Results | Manage results from customer surveys |
138
+ | Ticket | Manage service tickets |
139
+ | Ticket History | View historical changes to tickets |
140
+ | Ticket Note | Manage notes attached to tickets |
141
+ | Ticket Note Webhook | Manage webhooks for ticket note events |
142
+ | Ticket Webhook | Manage webhooks for ticket events |
143
+ | Time Entry | Manage time entries for billing |
144
+
145
+ ### Operations
146
+
147
+ For most resources, the following operations are available:
148
+
149
+ - **Create**: Add new records
150
+ - **Read**: Retrieve a single record by ID
151
+ - **Update**: Modify existing records
152
+ - **Delete**: Remove records
153
+ - **Get Many**: Retrieve multiple records with basic filtering options. This operation allows you to:
154
+ - Filter records using simple field conditions (equals)
155
+ - Filtering on User Defined Fields (UDFs)
156
+ - Automatically paginate through large result sets
157
+ - Choose to get all results or limit to a specific number (1-500)
158
+ - Set a maximum number of records to return when not retrieving all records
159
+ - Select specific columns to return in the response
160
+ - Add human-readable labels for picklist and reference fields
161
+ - Flatten User-Defined Fields for easier access in workflows
162
+ - **Get Many Advanced**: Build complex queries with multiple filter conditions and logical operators. This operation provides:
163
+ - Support for complex AND/OR logic in filters
164
+ - Nested condition groups for sophisticated queries
165
+ - Filtering on User Defined Fields (UDFs)
166
+ - Advanced operators like contains, beginsWith, endsWith, exists, notExists
167
+ - Support for IN and NOT IN operators with multiple values
168
+ - Choose to get all results or limit to a specific number (1-500)
169
+ - Set a maximum number of records to return when not retrieving all records
170
+ - Select specific columns to return in the response
171
+ - Add human-readable labels for picklist and reference fields
172
+ - Flatten User-Defined Fields for easier access in workflows
173
+ - Date-based filtering with automatic timezone handling
174
+ - **Count**: Get the number of matching records
175
+ - **Get Entity Info**: Retrieve metadata about the entity
176
+ - **Get Field Info**: Retrieve field definitions for the selected entity
177
+
178
+ For webhook resources (Company Webhook, Contact Webhook, Configuration Item Webhook, Ticket Webhook, Ticket Note Webhook), the following operations are available:
179
+ - **Get**: Retrieve a single webhook by ID
180
+ - **Get Many**: Retrieve multiple webhooks with basic filtering
181
+ - **Delete**: Remove a webhook
182
+
183
+ ### Webhook Trigger
184
+
185
+ The node includes an Autotask Trigger node that can receive webhook events from Autotask. The trigger supports:
186
+
187
+ - Events for multiple entity types (Companies, Contacts, Tickets, Configuration Items, Ticket Notes)
188
+ - Create, Update, and Delete events
189
+ - Field selection for webhook payloads (specify which fields to include)
190
+ - Resource exclusion (exclude specific resources from triggering the workflow)
191
+ - Email notifications for webhook delivery failures
192
+ - Threshold notifications for monitoring webhook performance
193
+ - Automatic webhook registration and cleanup
194
+ - Secure payload verification with HMAC signatures
195
+
196
+ ### Advanced Features
197
+
198
+ - **Resource Mapping**: Dynamically map fields based on entity definitions
199
+ - **Advanced Filtering**: Build complex queries with multiple conditions
200
+ - **Column Selection**: Choose specific fields to return in get operations
201
+ - **Picklist Label Enrichment**: Automatically add human-readable labels for picklist fields
202
+ - **Reference Label Enrichment**: Add human-readable labels for reference fields
203
+ - **UDF Flattening**: Bring user-defined fields up to the top level of response objects for easier access
204
+ - **File-based Caching**: Improved performance with persistent caching that can be shared between workflows and runs
205
+ - **Timezone Handling**: Automatic conversion between local time and UTC
206
+ - **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
207
+
208
+ ### API Threshold Resource
209
+
210
+ The API Threshold resource provides a simple way to monitor your Autotask API usage limits and current consumption. This helps users:
211
+ - Track how many API requests have been made in the current timeframe
212
+ - See the maximum allowed requests (threshold limit)
213
+ - View the usage as a percentage and categorized level (Normal, Moderate, High, Critical)
214
+ - Calculate remaining available requests
215
+ - Monitor timeframe duration for rate limits
216
+
217
+ 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.
218
+
219
+ ### AI Tool Integration
220
+
221
+ This node can be used as a tool by AI agents in n8n workflows. This allows AI agents to interact with Autotask PSA, performing operations like retrieving company information, creating tickets, or updating contacts.
222
+
223
+ #### Requirements
224
+
225
+ Currently, n8n only allows core nodes to be used as tools by default. To use this community node as a tool, you need to:
226
+
227
+ 1. Set the environment variable `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE` to `true` when running n8n.
228
+ 2. Add the Autotask node as a tool in your AI agent workflow.
229
+
230
+ #### Environment Variable Configuration
231
+
232
+ For the node to be usable as an AI tool, you must set the following environment variable:
233
+
234
+ ```bash
235
+ N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
236
+ ```
237
+
238
+ This can be done by:
239
+ - Adding it to your .env file
240
+ - Setting it in your system environment variables
241
+ - Including it in your Docker or container configuration
242
+ - Adding it to your startup command (e.g., `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true n8n start`)
243
+
244
+ Without this environment variable set to `true`, n8n will not allow AI agents to use this community node as a tool.
245
+
246
+ #### Example AI Tool Usage
247
+
248
+ An AI agent might use the Autotask node to:
249
+ - Retrieve information about a company or contact
250
+ - Create a new ticket based on user input
251
+ - Update the status of an existing ticket
252
+ - Add notes to a ticket or company record
253
+ - Search for tickets matching specific criteria
254
+
255
+ ## Usage
256
+
257
+ ### Basic Example: Creating a Ticket
258
+
259
+ 1. Add an **Autotask** node to your workflow
260
+ 2. Select **Ticket** as the resource
261
+ 3. Select **Create** as the operation
262
+ 4. Configure the required fields (Title, Status, etc.)
263
+ 5. Connect to a trigger or previous node
264
+ 6. Execute the workflow
265
+
266
+ ### Intermediate Example: Querying Projects with Filters
267
+
268
+ 1. Add an **Autotask** node to your workflow
269
+ 2. Select **Project** as the resource
270
+ 3. Select **Get Many** as the operation
271
+ 4. Add filter conditions (e.g., Status equals "Active")
272
+ 5. Choose whether to retrieve all results or limit the number:
273
+ - Toggle "Get All" to true to retrieve all matching records
274
+ - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
275
+ 6. Connect to a trigger or previous node
276
+ 7. Execute the workflow
277
+
278
+ ### Advanced Example: Using Column Selection and Reference Labels
279
+
280
+ 1. Add an **Autotask** node to your workflow
281
+ 2. Select **Ticket** as the resource
282
+ 3. Select **Get Many** as the operation
283
+ 4. Add filter conditions as needed
284
+ 5. Enable **Select Columns** to choose specific fields to return
285
+ 6. Select only the fields you need in the response (improves performance)
286
+ 7. Enable **Add Picklist Labels** to get human-readable values for picklist fields
287
+ 8. Enable **Add Reference Labels** to get human-readable values for reference fields
288
+ 9. Enable **Flatten User-Defined Fields** to bring UDFs to the top level of response objects
289
+ 10. Execute the workflow to get tickets with only the selected fields and human-readable labels
290
+
291
+ ### Advanced Example: Complex Filtering with Get Many Advanced
292
+
293
+ 1. Add an **Autotask** node to your workflow
294
+ 2. Select **Ticket** as the resource
295
+ 3. Select **Get Many Advanced** as the operation
296
+ 4. Build a complex filter, for example:
297
+ ```json
298
+ {
299
+ "filter": [
300
+ {
301
+ "op": "and",
302
+ "items": [
303
+ {
304
+ "field": "status",
305
+ "op": "noteq",
306
+ "value": 5
307
+ },
308
+ {
309
+ "op": "or",
310
+ "items": [
311
+ {
312
+ "field": "priority",
313
+ "op": "eq",
314
+ "value": 6
315
+ },
316
+ {
317
+ "field": "dueDateTime",
318
+ "op": "lt",
319
+ "value": "{{ $now.plus(3, 'days').toLocal()}}"
320
+ }
321
+ ]
322
+ }
323
+ ]
324
+ }
325
+ ]
326
+ }
327
+ ```
328
+ [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)
329
+ 5. Choose whether to retrieve all results or limit the number:
330
+ - Toggle "Get All" to true to retrieve all matching records
331
+ - Toggle "Get All" to false and set "Max Records" (1-500) to limit the results
332
+ 6. Enable **Select Columns** to choose specific fields to return
333
+ 7. Enable **Add Reference Labels** and **Add Picklist Labels** for human-readable values
334
+ 8. Execute the workflow to retrieve tickets that are not complete AND either have priority 6 OR are due within the next 3 days
335
+
336
+ ### Example: Monitoring API Usage with API Threshold
337
+
338
+ 1. Add an **Autotask** node to your workflow
339
+ 2. Select **API Threshold** as the resource
340
+ 3. The operation **Get API Usage** will be automatically selected (it's the only available operation)
341
+ 4. Execute the node to receive current API usage information including:
342
+ - Current usage count
343
+ - Maximum threshold (limit)
344
+ - Usage percentage
345
+ - Usage level (Normal, Moderate, High, Critical)
346
+ - Remaining requests
347
+ - Timeframe duration
348
+ 5. You can use this information with IF nodes to implement conditional logic:
349
+ - Pause workflows when usage is too high
350
+ - Throttle requests during peak usage periods
351
+ - Log warnings when approaching limits
352
+ - Only execute non-critical operations when usage is below certain thresholds
353
+
354
+ ### Advanced Example: Working with Parent-Child Relationships
355
+
356
+ Many Autotask entities have parent-child relationships (e.g., Companies and Contacts). To work with these:
357
+
358
+ 1. First, retrieve or create the parent entity
359
+ 2. Use the parent entity's ID in the child entity operations
360
+ 3. For example, to create a Contact for a Company:
361
+ - First node: Get or create the Company
362
+ - Second node: Create a Contact with the Company ID
363
+
364
+ ### Example: Setting Up a Webhook Trigger
365
+
366
+ 1. Add an **Autotask Trigger** node to your workflow
367
+ 2. Select the entity type to monitor (Companies, Contacts, Tickets, etc.)
368
+ 3. Select the events to subscribe to (Create, Update, Delete)
369
+ 4. Configure the webhook URL (n8n will handle this automatically)
370
+ 5. Optionally specify fields to include in the webhook payload
371
+ 6. Optionally exclude specific resources from triggering the workflow
372
+ 7. Configure email notifications for webhook delivery failures if needed
373
+ 8. Save and activate the workflow
374
+ 9. The node will automatically register the webhook with Autotask
375
+ 10. When events occur in Autotask, they will trigger your workflow
376
+ 11. When the workflow is deactivated, the webhook will be automatically removed
377
+
378
+ ## Configuration
379
+
380
+ ### Caching Options
381
+
382
+ The node includes an enhanced file-based caching system to improve performance by reducing API calls:
383
+
384
+ - **Enable Field Caching**: Toggle caching on/off
385
+ - **Cache TTL**: How long to cache field values (in seconds)
386
+ - **Cache Entity Info**: Whether to cache entity information and field definitions
387
+ - **Entity Info TTL**: How long to cache entity information
388
+ - **Cache Reference Fields**: Whether to cache reference field values
389
+ - **Reference Fields TTL**: How long to cache reference field values
390
+ - **Cache Picklists**: Whether to cache picklist values
391
+ - **Picklists TTL**: How long to cache picklist values
392
+ - **File-based Cache**: Cache is stored in files that can be shared between workflows and runs
393
+ - **Cache Directory**: Optional path to a directory where cache files will be stored
394
+
395
+ > **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.
396
+
397
+ ### Label Enrichment and Field Processing
398
+
399
+ The node provides options to enrich entities with human-readable labels and simplify field access:
400
+
401
+ - **Add Picklist Labels**: Adds "_label" fields for picklist values (e.g., Status_label: "In Progress")
402
+ - **Add Reference Labels**: Adds "_label" fields for reference values (e.g., Company_label: "Acme Corporation")
403
+ - **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)
404
+
405
+ ### Column Selection
406
+
407
+ To improve performance and reduce payload size, you can select specific columns to return:
408
+
409
+ - **Select Columns**: Choose which fields to include in the response
410
+ - Works with all get operations (get, getMany, getManyAdvanced)
411
+ - Compatible with label enrichment features
412
+
413
+ ### Timezone Handling
414
+
415
+ All dates and times in the Autotask API are in UTC. The node automatically converts between your selected timezone and UTC:
416
+
417
+ - When creating or updating records, local times are converted to UTC
418
+ - When retrieving records, UTC times are converted to your local timezone
419
+ - The timezone is configured in the credentials
420
+ - For Search Filter operations, input dates are thoroughly converted to UTC using the configured timezone, ensuring consistency with API requirements
421
+ - Output dates from all operations are converted to the configured local timezone for easier workflow handling
422
+
423
+ ## Limitations
424
+
425
+ ### API Limits
426
+
427
+ - Maximum 500 records per page in query results
428
+ - Maximum 50 pages per query operation
429
+ - Maximum 500 OR conditions in filters
430
+ - Maximum 1 User Defined Field per query
431
+
432
+ ### Entity-Specific Limitations
433
+
434
+ - Some entities may not support all operations (e.g., Project Phases cannot be deleted)
435
+ - Parent-child relationships require specific handling
436
+ - Some fields may be read-only or have specific validation rules
437
+
438
+ ### Performance Considerations
439
+
440
+ - Large queries may be slow and should be optimised with filters
441
+ - Column selection can significantly improve performance by reducing payload size
442
+ - Complex workflows with many API calls may hit rate limits
443
+ - 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.
444
+
445
+ ## Troubleshooting
446
+
447
+ ### Common Issues
448
+
449
+ - **Authentication Errors**: Verify your API credentials and ensure the API user has appropriate permissions
450
+ - **Field Validation Errors**: Check field requirements in the Autotask API documentation
451
+ - **Rate Limiting**: If you encounter rate limiting, reduce the frequency of API calls or implement retry logic
452
+
453
+ ### Reporting Bugs
454
+
455
+ If you encounter any bugs or issues with this integration:
456
+
457
+ 1. Check the [GitHub Issues](https://github.com/msoukhomlinov/n8n-nodes-autotask/issues) to see if the problem has already been reported
458
+ 2. If not, please submit a new issue with:
459
+ - A clear description of the problem
460
+ - Steps to reproduce the issue
461
+ - Expected vs actual behaviour
462
+ - Your environment details (n8n version, Node.js version)
463
+ - Any relevant error messages or screenshots
464
+
465
+ Bug reports should be submitted via GitHub at: https://github.com/msoukhomlinov/n8n-nodes-autotask/issues
466
+
467
+ ## Resources
468
+
469
+ - [Autotask API Documentation](https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm)
470
+ - [n8n Documentation](https://docs.n8n.io/)
471
+ - [GitHub Repository](https://github.com/msoukhomlinov/n8n-nodes-autotask)
472
+
473
+ ## Support
474
+
475
+ If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
476
+
477
+ [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow.svg)](https://buymeacoffee.com/msoukhomlinov)
478
+
479
+ Your support helps maintain this project and develop new features.
480
+
481
+ ## License
482
+
483
+ [MIT](LICENSE)