n8n-nodes-base 0.209.1 → 0.210.0

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 (411) hide show
  1. package/dist/credentials/GitlabApi.credentials.js +1 -1
  2. package/dist/credentials/GitlabApi.credentials.js.map +1 -1
  3. package/dist/credentials/GoogleSheetsTriggerOAuth2Api.credentials.d.ts +8 -0
  4. package/dist/credentials/GoogleSheetsTriggerOAuth2Api.credentials.js +27 -0
  5. package/dist/credentials/GoogleSheetsTriggerOAuth2Api.credentials.js.map +1 -0
  6. package/dist/known/credentials.json +7 -0
  7. package/dist/known/nodes.json +4 -0
  8. package/dist/nodes/AcuityScheduling/GenericFunctions.js +1 -1
  9. package/dist/nodes/AcuityScheduling/GenericFunctions.js.map +1 -1
  10. package/dist/nodes/Affinity/GenericFunctions.js +1 -1
  11. package/dist/nodes/Affinity/GenericFunctions.js.map +1 -1
  12. package/dist/nodes/AgileCrm/GenericFunctions.js +2 -2
  13. package/dist/nodes/AgileCrm/GenericFunctions.js.map +1 -1
  14. package/dist/nodes/Airtable/GenericFunctions.js +2 -2
  15. package/dist/nodes/Airtable/GenericFunctions.js.map +1 -1
  16. package/dist/nodes/ApiTemplateIo/ApiTemplateIo.node.js +4 -4
  17. package/dist/nodes/ApiTemplateIo/ApiTemplateIo.node.js.map +1 -1
  18. package/dist/nodes/Asana/GenericFunctions.js +1 -1
  19. package/dist/nodes/Asana/GenericFunctions.js.map +1 -1
  20. package/dist/nodes/Autopilot/GenericFunctions.js +1 -1
  21. package/dist/nodes/Autopilot/GenericFunctions.js.map +1 -1
  22. package/dist/nodes/Aws/Transcribe/GenericFunctions.js +1 -1
  23. package/dist/nodes/Aws/Transcribe/GenericFunctions.js.map +1 -1
  24. package/dist/nodes/Bannerbear/GenericFunctions.js +1 -1
  25. package/dist/nodes/Bannerbear/GenericFunctions.js.map +1 -1
  26. package/dist/nodes/Bitbucket/GenericFunctions.js +1 -1
  27. package/dist/nodes/Bitbucket/GenericFunctions.js.map +1 -1
  28. package/dist/nodes/Bitly/GenericFunctions.js +1 -1
  29. package/dist/nodes/Bitly/GenericFunctions.js.map +1 -1
  30. package/dist/nodes/Bitwarden/GenericFunctions.js +1 -2
  31. package/dist/nodes/Bitwarden/GenericFunctions.js.map +1 -1
  32. package/dist/nodes/Box/GenericFunctions.js +1 -1
  33. package/dist/nodes/Box/GenericFunctions.js.map +1 -1
  34. package/dist/nodes/Brandfetch/GenericFunctions.js +1 -1
  35. package/dist/nodes/Brandfetch/GenericFunctions.js.map +1 -1
  36. package/dist/nodes/Calendly/GenericFunctions.js +1 -1
  37. package/dist/nodes/Calendly/GenericFunctions.js.map +1 -1
  38. package/dist/nodes/CircleCi/GenericFunctions.js +1 -1
  39. package/dist/nodes/CircleCi/GenericFunctions.js.map +1 -1
  40. package/dist/nodes/Cisco/Webex/GenericFunctions.js +1 -1
  41. package/dist/nodes/Cisco/Webex/GenericFunctions.js.map +1 -1
  42. package/dist/nodes/Citrix/ADC/GenericFunctions.js +1 -1
  43. package/dist/nodes/Citrix/ADC/GenericFunctions.js.map +1 -1
  44. package/dist/nodes/Clearbit/GenericFunctions.js +1 -1
  45. package/dist/nodes/Clearbit/GenericFunctions.js.map +1 -1
  46. package/dist/nodes/ClickUp/GenericFunctions.js +1 -1
  47. package/dist/nodes/ClickUp/GenericFunctions.js.map +1 -1
  48. package/dist/nodes/Cockpit/GenericFunctions.js +1 -1
  49. package/dist/nodes/Cockpit/GenericFunctions.js.map +1 -1
  50. package/dist/nodes/Coda/GenericFunctions.js +1 -1
  51. package/dist/nodes/Coda/GenericFunctions.js.map +1 -1
  52. package/dist/nodes/CoinGecko/GenericFunctions.js +1 -1
  53. package/dist/nodes/CoinGecko/GenericFunctions.js.map +1 -1
  54. package/dist/nodes/CompareDatasets/GenericFunctions.js +5 -7
  55. package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
  56. package/dist/nodes/Contentful/GenericFunctions.js +1 -1
  57. package/dist/nodes/Contentful/GenericFunctions.js.map +1 -1
  58. package/dist/nodes/ConvertKit/GenericFunctions.js +1 -1
  59. package/dist/nodes/ConvertKit/GenericFunctions.js.map +1 -1
  60. package/dist/nodes/Cortex/GenericFunctions.js +1 -1
  61. package/dist/nodes/Cortex/GenericFunctions.js.map +1 -1
  62. package/dist/nodes/DateTime/DateTime.node.js +1 -2
  63. package/dist/nodes/DateTime/DateTime.node.js.map +1 -1
  64. package/dist/nodes/DeepL/GenericFunctions.js +1 -1
  65. package/dist/nodes/DeepL/GenericFunctions.js.map +1 -1
  66. package/dist/nodes/Demio/GenericFunctions.js +1 -1
  67. package/dist/nodes/Demio/GenericFunctions.js.map +1 -1
  68. package/dist/nodes/Dhl/GenericFunctions.js +1 -1
  69. package/dist/nodes/Dhl/GenericFunctions.js.map +1 -1
  70. package/dist/nodes/Drift/GenericFunctions.js +1 -1
  71. package/dist/nodes/Drift/GenericFunctions.js.map +1 -1
  72. package/dist/nodes/ERPNext/GenericFunctions.js +1 -1
  73. package/dist/nodes/ERPNext/GenericFunctions.js.map +1 -1
  74. package/dist/nodes/EditImage/EditImage.node.js +1 -2
  75. package/dist/nodes/EditImage/EditImage.node.js.map +1 -1
  76. package/dist/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.js +2 -2
  77. package/dist/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.js.map +1 -1
  78. package/dist/nodes/EmailSend/EmailSend.node.js +1 -2
  79. package/dist/nodes/EmailSend/EmailSend.node.js.map +1 -1
  80. package/dist/nodes/Eventbrite/GenericFunctions.js +1 -1
  81. package/dist/nodes/Eventbrite/GenericFunctions.js.map +1 -1
  82. package/dist/nodes/ExecuteCommand/ExecuteCommand.node.js +1 -1
  83. package/dist/nodes/ExecuteCommand/ExecuteCommand.node.js.map +1 -1
  84. package/dist/nodes/Facebook/GenericFunctions.js +1 -1
  85. package/dist/nodes/Facebook/GenericFunctions.js.map +1 -1
  86. package/dist/nodes/Figma/GenericFunctions.js +1 -1
  87. package/dist/nodes/Figma/GenericFunctions.js.map +1 -1
  88. package/dist/nodes/Flow/GenericFunctions.js +1 -1
  89. package/dist/nodes/Flow/GenericFunctions.js.map +1 -1
  90. package/dist/nodes/FormIo/GenericFunctions.js +2 -4
  91. package/dist/nodes/FormIo/GenericFunctions.js.map +1 -1
  92. package/dist/nodes/Freshdesk/GenericFunctions.js +1 -1
  93. package/dist/nodes/Freshdesk/GenericFunctions.js.map +1 -1
  94. package/dist/nodes/GetResponse/GenericFunctions.js +1 -1
  95. package/dist/nodes/GetResponse/GenericFunctions.js.map +1 -1
  96. package/dist/nodes/GetResponse/GetResponse.node.js +1 -2
  97. package/dist/nodes/GetResponse/GetResponse.node.js.map +1 -1
  98. package/dist/nodes/Ghost/GenericFunctions.js +1 -1
  99. package/dist/nodes/Ghost/GenericFunctions.js.map +1 -1
  100. package/dist/nodes/Ghost/Ghost.node.js +1 -2
  101. package/dist/nodes/Ghost/Ghost.node.js.map +1 -1
  102. package/dist/nodes/Google/Analytics/GenericFunctions.js +1 -1
  103. package/dist/nodes/Google/Analytics/GenericFunctions.js.map +1 -1
  104. package/dist/nodes/Google/BigQuery/GenericFunctions.js +2 -3
  105. package/dist/nodes/Google/BigQuery/GenericFunctions.js.map +1 -1
  106. package/dist/nodes/Google/Books/GenericFunctions.js +2 -3
  107. package/dist/nodes/Google/Books/GenericFunctions.js.map +1 -1
  108. package/dist/nodes/Google/Calendar/GenericFunctions.js +1 -1
  109. package/dist/nodes/Google/Calendar/GenericFunctions.js.map +1 -1
  110. package/dist/nodes/Google/Calendar/GoogleCalendar.node.js +8 -8
  111. package/dist/nodes/Google/Calendar/GoogleCalendar.node.js.map +1 -1
  112. package/dist/nodes/Google/Chat/GenericFunctions.js +2 -3
  113. package/dist/nodes/Google/Chat/GenericFunctions.js.map +1 -1
  114. package/dist/nodes/Google/CloudNaturalLanguage/GenericFunctions.js +1 -1
  115. package/dist/nodes/Google/CloudNaturalLanguage/GenericFunctions.js.map +1 -1
  116. package/dist/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.js +2 -3
  117. package/dist/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.js.map +1 -1
  118. package/dist/nodes/Google/Contacts/GenericFunctions.js +1 -1
  119. package/dist/nodes/Google/Contacts/GenericFunctions.js.map +1 -1
  120. package/dist/nodes/Google/Docs/GenericFunctions.js +2 -3
  121. package/dist/nodes/Google/Docs/GenericFunctions.js.map +1 -1
  122. package/dist/nodes/Google/Drive/GenericFunctions.js +4 -6
  123. package/dist/nodes/Google/Drive/GenericFunctions.js.map +1 -1
  124. package/dist/nodes/Google/Drive/GoogleDrive.node.js +2 -2
  125. package/dist/nodes/Google/Drive/GoogleDrive.node.js.map +1 -1
  126. package/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js +1 -1
  127. package/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js.map +1 -1
  128. package/dist/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.js +1 -1
  129. package/dist/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.js.map +1 -1
  130. package/dist/nodes/Google/GSuiteAdmin/GenericFunctions.js +1 -1
  131. package/dist/nodes/Google/GSuiteAdmin/GenericFunctions.js.map +1 -1
  132. package/dist/nodes/Google/Gmail/GenericFunctions.js +2 -3
  133. package/dist/nodes/Google/Gmail/GenericFunctions.js.map +1 -1
  134. package/dist/nodes/Google/Gmail/GmailTrigger.node.d.ts +6 -1
  135. package/dist/nodes/Google/Gmail/GmailTrigger.node.js +23 -0
  136. package/dist/nodes/Google/Gmail/GmailTrigger.node.js.map +1 -1
  137. package/dist/nodes/Google/Gmail/v1/GmailV1.node.js +10 -10
  138. package/dist/nodes/Google/Gmail/v1/GmailV1.node.js.map +1 -1
  139. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js +1 -2
  140. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js.map +1 -1
  141. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.d.ts +16 -0
  142. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +540 -0
  143. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -0
  144. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.json +20 -0
  145. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.utils.d.ts +8 -0
  146. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.utils.js +160 -0
  147. package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.utils.js.map +1 -0
  148. package/dist/nodes/Google/Sheet/v1/GenericFunctions.js +2 -3
  149. package/dist/nodes/Google/Sheet/v1/GenericFunctions.js.map +1 -1
  150. package/dist/nodes/Google/Sheet/v1/GoogleSheetsV1.node.js +3 -4
  151. package/dist/nodes/Google/Sheet/v1/GoogleSheetsV1.node.js.map +1 -1
  152. package/dist/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.js +1 -1
  153. package/dist/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.js.map +1 -1
  154. package/dist/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.js +3 -3
  155. package/dist/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.js.map +1 -1
  156. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js +4 -3
  157. package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js.map +1 -1
  158. package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js +3 -3
  159. package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js.map +1 -1
  160. package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.d.ts +3 -3
  161. package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js +15 -13
  162. package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js.map +1 -1
  163. package/dist/nodes/Google/Sheet/v2/methods/listSearch.js +1 -1
  164. package/dist/nodes/Google/Sheet/v2/methods/listSearch.js.map +1 -1
  165. package/dist/nodes/Google/Sheet/v2/transport/index.d.ts +3 -3
  166. package/dist/nodes/Google/Sheet/v2/transport/index.js +7 -4
  167. package/dist/nodes/Google/Sheet/v2/transport/index.js.map +1 -1
  168. package/dist/nodes/Google/Slides/GoogleSlides.node.js +1 -2
  169. package/dist/nodes/Google/Slides/GoogleSlides.node.js.map +1 -1
  170. package/dist/nodes/Google/Task/GenericFunctions.js +1 -1
  171. package/dist/nodes/Google/Task/GenericFunctions.js.map +1 -1
  172. package/dist/nodes/Google/Translate/GenericFunctions.js +1 -1
  173. package/dist/nodes/Google/Translate/GenericFunctions.js.map +1 -1
  174. package/dist/nodes/Google/YouTube/GenericFunctions.js +1 -1
  175. package/dist/nodes/Google/YouTube/GenericFunctions.js.map +1 -1
  176. package/dist/nodes/Gotify/GenericFunctions.js +1 -1
  177. package/dist/nodes/Gotify/GenericFunctions.js.map +1 -1
  178. package/dist/nodes/GraphQL/GraphQL.node.js +1 -1
  179. package/dist/nodes/GraphQL/GraphQL.node.js.map +1 -1
  180. package/dist/nodes/Gumroad/GenericFunctions.js +1 -1
  181. package/dist/nodes/Gumroad/GenericFunctions.js.map +1 -1
  182. package/dist/nodes/Harvest/GenericFunctions.js +1 -1
  183. package/dist/nodes/Harvest/GenericFunctions.js.map +1 -1
  184. package/dist/nodes/HelpScout/GenericFunctions.js +1 -1
  185. package/dist/nodes/HelpScout/GenericFunctions.js.map +1 -1
  186. package/dist/nodes/HelpScout/HelpScout.node.js +1 -2
  187. package/dist/nodes/HelpScout/HelpScout.node.js.map +1 -1
  188. package/dist/nodes/HighLevel/GenericFunctions.js +13 -21
  189. package/dist/nodes/HighLevel/GenericFunctions.js.map +1 -1
  190. package/dist/nodes/HomeAssistant/GenericFunctions.js +1 -2
  191. package/dist/nodes/HomeAssistant/GenericFunctions.js.map +1 -1
  192. package/dist/nodes/HtmlExtract/HtmlExtract.node.js +1 -1
  193. package/dist/nodes/HtmlExtract/HtmlExtract.node.js.map +1 -1
  194. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +20 -9
  195. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
  196. package/dist/nodes/Hubspot/GenericFunctions.js +2 -3
  197. package/dist/nodes/Hubspot/GenericFunctions.js.map +1 -1
  198. package/dist/nodes/Hubspot/Hubspot.node.js +6 -6
  199. package/dist/nodes/Hubspot/Hubspot.node.js.map +1 -1
  200. package/dist/nodes/Hubspot/HubspotTrigger.node.js +2 -2
  201. package/dist/nodes/Hubspot/HubspotTrigger.node.js.map +1 -1
  202. package/dist/nodes/Hunter/GenericFunctions.js +1 -1
  203. package/dist/nodes/Hunter/GenericFunctions.js.map +1 -1
  204. package/dist/nodes/If/If.node.js +14 -14
  205. package/dist/nodes/If/If.node.js.map +1 -1
  206. package/dist/nodes/Intercom/GenericFunctions.js +1 -1
  207. package/dist/nodes/Intercom/GenericFunctions.js.map +1 -1
  208. package/dist/nodes/InvoiceNinja/GenericFunctions.js +1 -1
  209. package/dist/nodes/InvoiceNinja/GenericFunctions.js.map +1 -1
  210. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.js +1 -2
  211. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.js.map +1 -1
  212. package/dist/nodes/ItemLists/ItemLists.node.js +37 -3
  213. package/dist/nodes/ItemLists/ItemLists.node.js.map +1 -1
  214. package/dist/nodes/ItemLists/ItemLists.node.json +9 -1
  215. package/dist/nodes/ItemLists/summarize.operation.d.ts +3 -0
  216. package/dist/nodes/ItemLists/summarize.operation.js +451 -0
  217. package/dist/nodes/ItemLists/summarize.operation.js.map +1 -0
  218. package/dist/nodes/Iterable/GenericFunctions.js +1 -1
  219. package/dist/nodes/Iterable/GenericFunctions.js.map +1 -1
  220. package/dist/nodes/Jira/GenericFunctions.js +1 -1
  221. package/dist/nodes/Jira/GenericFunctions.js.map +1 -1
  222. package/dist/nodes/Jira/Jira.node.js +3 -5
  223. package/dist/nodes/Jira/Jira.node.js.map +1 -1
  224. package/dist/nodes/JotForm/GenericFunctions.js +1 -1
  225. package/dist/nodes/JotForm/GenericFunctions.js.map +1 -1
  226. package/dist/nodes/Kafka/KafkaTrigger.node.js +2 -2
  227. package/dist/nodes/Kafka/KafkaTrigger.node.js.map +1 -1
  228. package/dist/nodes/Keap/GenericFunctions.js +1 -1
  229. package/dist/nodes/Keap/GenericFunctions.js.map +1 -1
  230. package/dist/nodes/KoBoToolbox/GenericFunctions.js +3 -5
  231. package/dist/nodes/KoBoToolbox/GenericFunctions.js.map +1 -1
  232. package/dist/nodes/Line/GenericFunctions.js +1 -1
  233. package/dist/nodes/Line/GenericFunctions.js.map +1 -1
  234. package/dist/nodes/LingvaNex/GenericFunctions.js +1 -1
  235. package/dist/nodes/LingvaNex/GenericFunctions.js.map +1 -1
  236. package/dist/nodes/Magento/GenericFunctions.js +1 -1
  237. package/dist/nodes/Magento/GenericFunctions.js.map +1 -1
  238. package/dist/nodes/Mailcheck/GenericFunctions.js +1 -1
  239. package/dist/nodes/Mailcheck/GenericFunctions.js.map +1 -1
  240. package/dist/nodes/Mailgun/Mailgun.node.js +1 -2
  241. package/dist/nodes/Mailgun/Mailgun.node.js.map +1 -1
  242. package/dist/nodes/Mailjet/GenericFunctions.js +1 -1
  243. package/dist/nodes/Mailjet/GenericFunctions.js.map +1 -1
  244. package/dist/nodes/Mandrill/Mandrill.node.js +1 -2
  245. package/dist/nodes/Mandrill/Mandrill.node.js.map +1 -1
  246. package/dist/nodes/Matrix/GenericFunctions.js +2 -3
  247. package/dist/nodes/Matrix/GenericFunctions.js.map +1 -1
  248. package/dist/nodes/Mautic/GenericFunctions.js +1 -1
  249. package/dist/nodes/Mautic/GenericFunctions.js.map +1 -1
  250. package/dist/nodes/Medium/GenericFunctions.js +1 -1
  251. package/dist/nodes/Medium/GenericFunctions.js.map +1 -1
  252. package/dist/nodes/Microsoft/Dynamics/GenericFunctions.js +1 -1
  253. package/dist/nodes/Microsoft/Dynamics/GenericFunctions.js.map +1 -1
  254. package/dist/nodes/Microsoft/Excel/GenericFunctions.js +1 -1
  255. package/dist/nodes/Microsoft/Excel/GenericFunctions.js.map +1 -1
  256. package/dist/nodes/Microsoft/OneDrive/GenericFunctions.js +1 -1
  257. package/dist/nodes/Microsoft/OneDrive/GenericFunctions.js.map +1 -1
  258. package/dist/nodes/Microsoft/Outlook/GenericFunctions.js +1 -1
  259. package/dist/nodes/Microsoft/Outlook/GenericFunctions.js.map +1 -1
  260. package/dist/nodes/Microsoft/Teams/GenericFunctions.js +1 -1
  261. package/dist/nodes/Microsoft/Teams/GenericFunctions.js.map +1 -1
  262. package/dist/nodes/Microsoft/ToDo/GenericFunctions.js +1 -1
  263. package/dist/nodes/Microsoft/ToDo/GenericFunctions.js.map +1 -1
  264. package/dist/nodes/MySql/GenericFunctions.js +1 -1
  265. package/dist/nodes/MySql/GenericFunctions.js.map +1 -1
  266. package/dist/nodes/N8n/GenericFunctions.js +7 -8
  267. package/dist/nodes/N8n/GenericFunctions.js.map +1 -1
  268. package/dist/nodes/Nasa/GenericFunctions.js +1 -1
  269. package/dist/nodes/Nasa/GenericFunctions.js.map +1 -1
  270. package/dist/nodes/Netlify/GenericFunctions.js +1 -1
  271. package/dist/nodes/Netlify/GenericFunctions.js.map +1 -1
  272. package/dist/nodes/NocoDB/GenericFunctions.js +1 -1
  273. package/dist/nodes/NocoDB/GenericFunctions.js.map +1 -1
  274. package/dist/nodes/Notion/GenericFunctions.js +4 -4
  275. package/dist/nodes/Notion/GenericFunctions.js.map +1 -1
  276. package/dist/nodes/Odoo/GenericFunctions.js +2 -2
  277. package/dist/nodes/Odoo/GenericFunctions.js.map +1 -1
  278. package/dist/nodes/OneSimpleApi/GenericFunctions.js +2 -1
  279. package/dist/nodes/OneSimpleApi/GenericFunctions.js.map +1 -1
  280. package/dist/nodes/Onfleet/GenericFunctions.js +1 -1
  281. package/dist/nodes/Onfleet/GenericFunctions.js.map +1 -1
  282. package/dist/nodes/OpenThesaurus/GenericFunctions.js +1 -1
  283. package/dist/nodes/OpenThesaurus/GenericFunctions.js.map +1 -1
  284. package/dist/nodes/Orbit/GenericFunctions.js +1 -1
  285. package/dist/nodes/Orbit/GenericFunctions.js.map +1 -1
  286. package/dist/nodes/Oura/GenericFunctions.js +1 -1
  287. package/dist/nodes/Oura/GenericFunctions.js.map +1 -1
  288. package/dist/nodes/PagerDuty/GenericFunctions.js +1 -1
  289. package/dist/nodes/PagerDuty/GenericFunctions.js.map +1 -1
  290. package/dist/nodes/PayPal/GenericFunctions.js +2 -2
  291. package/dist/nodes/PayPal/GenericFunctions.js.map +1 -1
  292. package/dist/nodes/Peekalink/GenericFunctions.js +1 -1
  293. package/dist/nodes/Peekalink/GenericFunctions.js.map +1 -1
  294. package/dist/nodes/PhilipsHue/GenericFunctions.js +1 -1
  295. package/dist/nodes/PhilipsHue/GenericFunctions.js.map +1 -1
  296. package/dist/nodes/ProfitWell/GenericFunctions.js +1 -1
  297. package/dist/nodes/ProfitWell/GenericFunctions.js.map +1 -1
  298. package/dist/nodes/Pushbullet/GenericFunctions.js +1 -1
  299. package/dist/nodes/Pushbullet/GenericFunctions.js.map +1 -1
  300. package/dist/nodes/Pushcut/GenericFunctions.js +1 -1
  301. package/dist/nodes/Pushcut/GenericFunctions.js.map +1 -1
  302. package/dist/nodes/QuestDb/QuestDb.node.js +1 -2
  303. package/dist/nodes/QuestDb/QuestDb.node.js.map +1 -1
  304. package/dist/nodes/Redis/Redis.node.js +1 -2
  305. package/dist/nodes/Redis/Redis.node.js.map +1 -1
  306. package/dist/nodes/S3/GenericFunctions.js +2 -2
  307. package/dist/nodes/S3/GenericFunctions.js.map +1 -1
  308. package/dist/nodes/Salesforce/GenericFunctions.js +2 -2
  309. package/dist/nodes/Salesforce/GenericFunctions.js.map +1 -1
  310. package/dist/nodes/Salesforce/Salesforce.node.js +1 -2
  311. package/dist/nodes/Salesforce/Salesforce.node.js.map +1 -1
  312. package/dist/nodes/Salesmate/GenericFunctions.js +1 -1
  313. package/dist/nodes/Salesmate/GenericFunctions.js.map +1 -1
  314. package/dist/nodes/SeaTable/GenericFunctions.js +2 -3
  315. package/dist/nodes/SeaTable/GenericFunctions.js.map +1 -1
  316. package/dist/nodes/SecurityScorecard/GenericFunctions.js +1 -1
  317. package/dist/nodes/SecurityScorecard/GenericFunctions.js.map +1 -1
  318. package/dist/nodes/SecurityScorecard/SecurityScorecard.node.js +1 -2
  319. package/dist/nodes/SecurityScorecard/SecurityScorecard.node.js.map +1 -1
  320. package/dist/nodes/Segment/GenericFunctions.js +1 -1
  321. package/dist/nodes/Segment/GenericFunctions.js.map +1 -1
  322. package/dist/nodes/SendGrid/SendGrid.node.js +2 -2
  323. package/dist/nodes/SendGrid/SendGrid.node.js.map +1 -1
  324. package/dist/nodes/SendInBlue/GenericFunctions.js +1 -1
  325. package/dist/nodes/SendInBlue/GenericFunctions.js.map +1 -1
  326. package/dist/nodes/SentryIo/GenericFunctions.js +1 -1
  327. package/dist/nodes/SentryIo/GenericFunctions.js.map +1 -1
  328. package/dist/nodes/ServiceNow/GenericFunctions.js +1 -1
  329. package/dist/nodes/ServiceNow/GenericFunctions.js.map +1 -1
  330. package/dist/nodes/Shopify/GenericFunctions.js +1 -1
  331. package/dist/nodes/Shopify/GenericFunctions.js.map +1 -1
  332. package/dist/nodes/Slack/GenericFunctions.js +1 -1
  333. package/dist/nodes/Slack/GenericFunctions.js.map +1 -1
  334. package/dist/nodes/Spotify/GenericFunctions.js +1 -1
  335. package/dist/nodes/Spotify/GenericFunctions.js.map +1 -1
  336. package/dist/nodes/Stackby/GenericFunction.js +1 -1
  337. package/dist/nodes/Stackby/GenericFunction.js.map +1 -1
  338. package/dist/nodes/Strava/GenericFunctions.js +1 -1
  339. package/dist/nodes/Strava/GenericFunctions.js.map +1 -1
  340. package/dist/nodes/Supabase/GenericFunctions.js +1 -1
  341. package/dist/nodes/Supabase/GenericFunctions.js.map +1 -1
  342. package/dist/nodes/SurveyMonkey/GenericFunctions.js +1 -1
  343. package/dist/nodes/SurveyMonkey/GenericFunctions.js.map +1 -1
  344. package/dist/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.js +2 -2
  345. package/dist/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.js.map +1 -1
  346. package/dist/nodes/Switch/Switch.node.js +14 -14
  347. package/dist/nodes/Switch/Switch.node.js.map +1 -1
  348. package/dist/nodes/Tapfiliate/GenericFunctions.js +1 -1
  349. package/dist/nodes/Tapfiliate/GenericFunctions.js.map +1 -1
  350. package/dist/nodes/Telegram/GenericFunctions.js +1 -1
  351. package/dist/nodes/Telegram/GenericFunctions.js.map +1 -1
  352. package/dist/nodes/Telegram/Telegram.node.js +2 -2
  353. package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
  354. package/dist/nodes/TheHive/GenericFunctions.js +1 -1
  355. package/dist/nodes/TheHive/GenericFunctions.js.map +1 -1
  356. package/dist/nodes/Toggl/GenericFunctions.js +1 -1
  357. package/dist/nodes/Toggl/GenericFunctions.js.map +1 -1
  358. package/dist/nodes/TravisCi/GenericFunctions.js +1 -1
  359. package/dist/nodes/TravisCi/GenericFunctions.js.map +1 -1
  360. package/dist/nodes/Trello/GenericFunctions.js +1 -1
  361. package/dist/nodes/Trello/GenericFunctions.js.map +1 -1
  362. package/dist/nodes/Twake/GenericFunctions.js +1 -1
  363. package/dist/nodes/Twake/GenericFunctions.js.map +1 -1
  364. package/dist/nodes/Twitter/GenericFunctions.js +1 -1
  365. package/dist/nodes/Twitter/GenericFunctions.js.map +1 -1
  366. package/dist/nodes/Twitter/Twitter.node.js +1 -2
  367. package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
  368. package/dist/nodes/Typeform/GenericFunctions.js +1 -1
  369. package/dist/nodes/Typeform/GenericFunctions.js.map +1 -1
  370. package/dist/nodes/Uplead/GenericFunctions.js +1 -1
  371. package/dist/nodes/Uplead/GenericFunctions.js.map +1 -1
  372. package/dist/nodes/UptimeRobot/GenericFunctions.js +1 -1
  373. package/dist/nodes/UptimeRobot/GenericFunctions.js.map +1 -1
  374. package/dist/nodes/Venafi/Datacenter/GenericFunctions.js +1 -1
  375. package/dist/nodes/Venafi/Datacenter/GenericFunctions.js.map +1 -1
  376. package/dist/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.js +1 -2
  377. package/dist/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.js.map +1 -1
  378. package/dist/nodes/Vero/GenericFunctions.js +1 -1
  379. package/dist/nodes/Vero/GenericFunctions.js.map +1 -1
  380. package/dist/nodes/Wait/Wait.node.js +3 -4
  381. package/dist/nodes/Wait/Wait.node.js.map +1 -1
  382. package/dist/nodes/Webflow/GenericFunctions.js +1 -1
  383. package/dist/nodes/Webflow/GenericFunctions.js.map +1 -1
  384. package/dist/nodes/Webhook/Webhook.node.js +3 -4
  385. package/dist/nodes/Webhook/Webhook.node.js.map +1 -1
  386. package/dist/nodes/Wekan/GenericFunctions.js +1 -1
  387. package/dist/nodes/Wekan/GenericFunctions.js.map +1 -1
  388. package/dist/nodes/WhatsApp/MediaFunctions.js +1 -1
  389. package/dist/nodes/WhatsApp/MediaFunctions.js.map +1 -1
  390. package/dist/nodes/WhatsApp/MessageFunctions.js +2 -2
  391. package/dist/nodes/WhatsApp/MessageFunctions.js.map +1 -1
  392. package/dist/nodes/WooCommerce/GenericFunctions.js +1 -1
  393. package/dist/nodes/WooCommerce/GenericFunctions.js.map +1 -1
  394. package/dist/nodes/Wordpress/GenericFunctions.js +1 -1
  395. package/dist/nodes/Wordpress/GenericFunctions.js.map +1 -1
  396. package/dist/nodes/Workable/GenericFunctions.js +1 -1
  397. package/dist/nodes/Workable/GenericFunctions.js.map +1 -1
  398. package/dist/nodes/Xero/GenericFunctions.js +1 -1
  399. package/dist/nodes/Xero/GenericFunctions.js.map +1 -1
  400. package/dist/nodes/Zendesk/GenericFunctions.js +1 -1
  401. package/dist/nodes/Zendesk/GenericFunctions.js.map +1 -1
  402. package/dist/nodes/Zoho/GenericFunctions.js +1 -1
  403. package/dist/nodes/Zoho/GenericFunctions.js.map +1 -1
  404. package/dist/nodes/Zoom/GenericFunctions.js +1 -1
  405. package/dist/nodes/Zoom/GenericFunctions.js.map +1 -1
  406. package/dist/nodes/Zulip/GenericFunctions.js +1 -1
  407. package/dist/nodes/Zulip/GenericFunctions.js.map +1 -1
  408. package/dist/tsconfig.tsbuildinfo +1 -1
  409. package/dist/types/credentials.json +2 -1
  410. package/dist/types/nodes.json +3 -2
  411. package/package.json +3 -1
@@ -0,0 +1,540 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoogleSheetsTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const transport_1 = require("./v2/transport");
6
+ const listSearch_1 = require("./v2/methods/listSearch");
7
+ const GoogleSheet_1 = require("./v2/helpers/GoogleSheet");
8
+ const loadOptions_1 = require("./v2/methods/loadOptions");
9
+ const GoogleSheetsTrigger_utils_1 = require("./GoogleSheetsTrigger.utils");
10
+ class GoogleSheetsTrigger {
11
+ constructor() {
12
+ this.description = {
13
+ displayName: 'Google Sheets Trigger',
14
+ name: 'googleSheetsTrigger',
15
+ icon: 'file:googleSheets.svg',
16
+ group: ['trigger'],
17
+ version: 1,
18
+ subtitle: '={{($parameter["event"])}}',
19
+ description: 'Starts the workflow when Google Sheets events occur',
20
+ defaults: {
21
+ name: 'Google Sheets Trigger',
22
+ },
23
+ inputs: [],
24
+ outputs: ['main'],
25
+ credentials: [
26
+ {
27
+ name: 'googleSheetsTriggerOAuth2Api',
28
+ required: true,
29
+ displayOptions: {
30
+ show: {
31
+ authentication: ['triggerOAuth2'],
32
+ },
33
+ },
34
+ },
35
+ ],
36
+ polling: true,
37
+ properties: [
38
+ {
39
+ displayName: 'Authentication',
40
+ name: 'authentication',
41
+ type: 'hidden',
42
+ options: [
43
+ {
44
+ name: 'OAuth2 (recommended)',
45
+ value: 'triggerOAuth2',
46
+ },
47
+ ],
48
+ default: 'triggerOAuth2',
49
+ },
50
+ {
51
+ displayName: 'Document',
52
+ name: 'documentId',
53
+ type: 'resourceLocator',
54
+ default: { mode: 'list', value: '' },
55
+ required: true,
56
+ modes: [
57
+ {
58
+ displayName: 'From List',
59
+ name: 'list',
60
+ type: 'list',
61
+ typeOptions: {
62
+ searchListMethod: 'spreadSheetsSearch',
63
+ searchable: true,
64
+ },
65
+ },
66
+ {
67
+ displayName: 'By URL',
68
+ name: 'url',
69
+ type: 'string',
70
+ extractValue: {
71
+ type: 'regex',
72
+ regex: 'https:\\/\\/(?:drive|docs)\\.google\\.com\\/\\w+\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)',
73
+ },
74
+ validation: [
75
+ {
76
+ type: 'regex',
77
+ properties: {
78
+ regex: 'https:\\/\\/(?:drive|docs)\\.google.com\\/\\w+\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)',
79
+ errorMessage: 'Not a valid Google Drive File URL',
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ {
85
+ displayName: 'By ID',
86
+ name: 'id',
87
+ type: 'string',
88
+ validation: [
89
+ {
90
+ type: 'regex',
91
+ properties: {
92
+ regex: '[a-zA-Z0-9\\-_]{2,}',
93
+ errorMessage: 'Not a valid Google Drive File ID',
94
+ },
95
+ },
96
+ ],
97
+ url: '=https://docs.google.com/spreadsheets/d/{{$value}}/edit',
98
+ },
99
+ ],
100
+ },
101
+ {
102
+ displayName: 'Sheet',
103
+ name: 'sheetName',
104
+ type: 'resourceLocator',
105
+ default: { mode: 'list', value: '' },
106
+ required: true,
107
+ modes: [
108
+ {
109
+ displayName: 'From List',
110
+ name: 'list',
111
+ type: 'list',
112
+ typeOptions: {
113
+ searchListMethod: 'sheetsSearch',
114
+ searchable: false,
115
+ },
116
+ },
117
+ {
118
+ displayName: 'By URL',
119
+ name: 'url',
120
+ type: 'string',
121
+ extractValue: {
122
+ type: 'regex',
123
+ regex: 'https:\\/\\/docs\\.google\\.com/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)',
124
+ },
125
+ validation: [
126
+ {
127
+ type: 'regex',
128
+ properties: {
129
+ regex: 'https:\\/\\/docs\\.google\\.com/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+\\/edit\\#gid=([0-9]+)',
130
+ errorMessage: 'Not a valid Sheet URL',
131
+ },
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ displayName: 'By ID',
137
+ name: 'id',
138
+ type: 'string',
139
+ validation: [
140
+ {
141
+ type: 'regex',
142
+ properties: {
143
+ regex: '((gid=)?[0-9]{1,})',
144
+ errorMessage: 'Not a valid Sheet ID',
145
+ },
146
+ },
147
+ ],
148
+ },
149
+ ],
150
+ },
151
+ {
152
+ displayName: 'Trigger On',
153
+ name: 'event',
154
+ type: 'options',
155
+ description: "It will be triggered also by newly created columns (if the 'Columns to Watch' option is not set)",
156
+ options: [
157
+ {
158
+ name: 'Row Added',
159
+ value: 'rowAdded',
160
+ },
161
+ {
162
+ name: 'Row Updated',
163
+ value: 'rowUpdate',
164
+ },
165
+ {
166
+ name: 'Row Added or Updated',
167
+ value: 'anyUpdate',
168
+ },
169
+ ],
170
+ default: 'anyUpdate',
171
+ required: true,
172
+ },
173
+ {
174
+ displayName: 'Include in Output',
175
+ name: 'includeInOutput',
176
+ type: 'options',
177
+ default: 'new',
178
+ description: 'This option will be effective only when automatically executing the workflow',
179
+ options: [
180
+ {
181
+ name: 'New Version',
182
+ value: 'new',
183
+ },
184
+ {
185
+ name: 'Old Version',
186
+ value: 'old',
187
+ },
188
+ {
189
+ name: 'Both Versions',
190
+ value: 'both',
191
+ },
192
+ ],
193
+ displayOptions: {
194
+ hide: {
195
+ event: ['rowAdded'],
196
+ },
197
+ },
198
+ },
199
+ {
200
+ displayName: 'Options',
201
+ name: 'options',
202
+ type: 'collection',
203
+ placeholder: 'Add Option',
204
+ default: {},
205
+ options: [
206
+ {
207
+ displayName: 'Columns to Watch',
208
+ name: 'columnsToWatch',
209
+ type: 'multiOptions',
210
+ description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
211
+ typeOptions: {
212
+ loadOptionsDependsOn: ['sheetName.value'],
213
+ loadOptionsMethod: 'getSheetHeaderRowAndSkipEmpty',
214
+ },
215
+ default: [],
216
+ displayOptions: {
217
+ show: {
218
+ '/event': ['anyUpdate', 'rowUpdate'],
219
+ },
220
+ },
221
+ },
222
+ {
223
+ displayName: 'Data Location on Sheet',
224
+ name: 'dataLocationOnSheet',
225
+ type: 'fixedCollection',
226
+ placeholder: 'Select Range',
227
+ default: { values: { rangeDefinition: 'specifyRangeA1' } },
228
+ options: [
229
+ {
230
+ displayName: 'Values',
231
+ name: 'values',
232
+ values: [
233
+ {
234
+ displayName: 'Range Definition',
235
+ name: 'rangeDefinition',
236
+ type: 'options',
237
+ options: [
238
+ {
239
+ name: 'Specify Range (A1 Notation)',
240
+ value: 'specifyRangeA1',
241
+ description: 'Manually specify the data range',
242
+ },
243
+ {
244
+ name: 'Specify Range (Rows)',
245
+ value: 'specifyRange',
246
+ description: 'Manually specify the data range',
247
+ },
248
+ ],
249
+ default: '',
250
+ },
251
+ {
252
+ displayName: 'Header Row',
253
+ name: 'headerRow',
254
+ type: 'number',
255
+ typeOptions: {
256
+ minValue: 1,
257
+ },
258
+ default: 1,
259
+ description: 'Index of the row which contains the keys. Starts at 1. The incoming node data is matched to the keys for assignment. The matching is case sensitive.',
260
+ hint: 'First row is row 1',
261
+ displayOptions: {
262
+ show: {
263
+ rangeDefinition: ['specifyRange'],
264
+ },
265
+ },
266
+ },
267
+ {
268
+ displayName: 'First Data Row',
269
+ name: 'firstDataRow',
270
+ type: 'number',
271
+ typeOptions: {
272
+ minValue: 1,
273
+ },
274
+ default: 2,
275
+ description: 'Index of the first row which contains the actual data and not the keys. Starts with 1.',
276
+ hint: 'First row is row 1',
277
+ displayOptions: {
278
+ show: {
279
+ rangeDefinition: ['specifyRange'],
280
+ },
281
+ },
282
+ },
283
+ {
284
+ displayName: 'Range',
285
+ name: 'range',
286
+ type: 'string',
287
+ default: '',
288
+ placeholder: 'A:Z',
289
+ description: 'The table range to read from or to append data to. See the Google <a href="https://developers.google.com/sheets/api/guides/values#writing">documentation</a> for the details.',
290
+ hint: 'You can specify both the rows and the columns, e.g. C4:E7',
291
+ displayOptions: {
292
+ show: {
293
+ rangeDefinition: ['specifyRangeA1'],
294
+ },
295
+ },
296
+ },
297
+ ],
298
+ },
299
+ ],
300
+ },
301
+ {
302
+ displayName: 'Value Render',
303
+ name: 'valueRender',
304
+ type: 'options',
305
+ options: [
306
+ {
307
+ name: 'Unformatted',
308
+ value: 'UNFORMATTED_VALUE',
309
+ description: 'Values will be calculated, but not formatted in the reply',
310
+ },
311
+ {
312
+ name: 'Formatted',
313
+ value: 'FORMATTED_VALUE',
314
+ description: "Values will be formatted and calculated according to the cell's formatting (based on the spreadsheet's locale)",
315
+ },
316
+ {
317
+ name: 'Formula',
318
+ value: 'FORMULA',
319
+ description: 'Values will not be calculated. The reply will include the formulas.',
320
+ },
321
+ ],
322
+ default: 'UNFORMATTED_VALUE',
323
+ description: 'Determines how values will be rendered in the output. <a href="https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption" target="_blank">More info</a>.',
324
+ displayOptions: {
325
+ hide: {
326
+ '/event': ['anyUpdate', 'rowUpdate'],
327
+ },
328
+ },
329
+ },
330
+ {
331
+ displayName: 'DateTime Render',
332
+ name: 'dateTimeRenderOption',
333
+ type: 'options',
334
+ options: [
335
+ {
336
+ name: 'Serial Number',
337
+ value: 'SERIAL_NUMBER',
338
+ description: 'Fields will be returned as doubles in "serial number" format (as popularized by Lotus 1-2-3)',
339
+ },
340
+ {
341
+ name: 'Formatted String',
342
+ value: 'FORMATTED_STRING',
343
+ description: 'Fields will be rendered as strings in their given number format (which depends on the spreadsheet locale)',
344
+ },
345
+ ],
346
+ default: 'SERIAL_NUMBER',
347
+ description: 'Determines how dates should be rendered in the output. <a href="https://developers.google.com/sheets/api/reference/rest/v4/DateTimeRenderOption" target="_blank">More info</a>.',
348
+ displayOptions: {
349
+ hide: {
350
+ '/event': ['anyUpdate', 'rowUpdate'],
351
+ },
352
+ },
353
+ },
354
+ ],
355
+ },
356
+ ],
357
+ };
358
+ this.methods = {
359
+ listSearch: { spreadSheetsSearch: listSearch_1.spreadSheetsSearch, sheetsSearch: listSearch_1.sheetsSearch },
360
+ loadOptions: { getSheetHeaderRowAndSkipEmpty: loadOptions_1.getSheetHeaderRowAndSkipEmpty },
361
+ };
362
+ }
363
+ async poll() {
364
+ var _a, _b, _c;
365
+ try {
366
+ const workflowStaticData = this.getWorkflowStaticData('node');
367
+ const event = this.getNodeParameter('event', 0);
368
+ const documentId = this.getNodeParameter('documentId', undefined, {
369
+ extractValue: true,
370
+ });
371
+ let sheetId = this.getNodeParameter('sheetName', undefined, {
372
+ extractValue: true,
373
+ });
374
+ sheetId = sheetId === 'gid=0' ? '0' : sheetId;
375
+ if (this.getMode() !== 'manual' &&
376
+ (workflowStaticData.documentId !== documentId || workflowStaticData.sheetId !== sheetId)) {
377
+ workflowStaticData.documentId = documentId;
378
+ workflowStaticData.sheetId = sheetId;
379
+ workflowStaticData.lastRevision = undefined;
380
+ workflowStaticData.lastRevisionLink = undefined;
381
+ workflowStaticData.lastIndexChecked = undefined;
382
+ }
383
+ const googleSheet = new GoogleSheet_1.GoogleSheet(documentId, this);
384
+ const sheetName = await googleSheet.spreadsheetGetSheetNameById(sheetId);
385
+ const options = this.getNodeParameter('options');
386
+ const previousRevision = workflowStaticData.lastRevision;
387
+ const previousRevisionLink = workflowStaticData.lastRevisionLink;
388
+ if (event !== 'rowAdded') {
389
+ let pageToken;
390
+ do {
391
+ const { revisions, nextPageToken } = await transport_1.apiRequest.call(this, 'GET', '', undefined, {
392
+ fields: 'revisions(id, exportLinks), nextPageToken',
393
+ pageToken,
394
+ pageSize: 1000,
395
+ }, `https://www.googleapis.com/drive/v3/files/${documentId}/revisions`);
396
+ if (nextPageToken) {
397
+ pageToken = nextPageToken;
398
+ }
399
+ else {
400
+ pageToken = undefined;
401
+ const lastRevision = +revisions[revisions.length - 1].id;
402
+ if (lastRevision <= previousRevision) {
403
+ return null;
404
+ }
405
+ else {
406
+ if (this.getMode() !== 'manual') {
407
+ workflowStaticData.lastRevision = lastRevision;
408
+ workflowStaticData.lastRevisionLink =
409
+ revisions[revisions.length - 1].exportLinks[GoogleSheetsTrigger_utils_1.BINARY_MIME_TYPE];
410
+ }
411
+ }
412
+ }
413
+ } while (pageToken);
414
+ }
415
+ let range = 'A:ZZZ';
416
+ let keyRow = 1;
417
+ let startIndex = 2;
418
+ let rangeDefinition = '';
419
+ const [from, to] = range.split(':');
420
+ let keyRange = `${from}${keyRow}:${to}${keyRow}`;
421
+ let rangeToCheck = `${from}${startIndex}:${to}`;
422
+ if (options.dataLocationOnSheet) {
423
+ const locationDefine = options.dataLocationOnSheet.values;
424
+ rangeDefinition = locationDefine.rangeDefinition;
425
+ if (rangeDefinition === 'specifyRangeA1') {
426
+ if (locationDefine.range === '') {
427
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "The field 'Range' is empty, please provide a range");
428
+ }
429
+ range = locationDefine.range;
430
+ }
431
+ if (rangeDefinition === 'specifyRange') {
432
+ keyRow = parseInt(locationDefine.headerRow, 10);
433
+ startIndex = parseInt(locationDefine.firstDataRow, 10);
434
+ }
435
+ const [rangeFrom, rangeTo] = range.split(':');
436
+ const cellDataFrom = rangeFrom.match(/([a-zA-Z]{1,10})([0-9]{0,10})/) || [];
437
+ const cellDataTo = rangeTo.match(/([a-zA-Z]{1,10})([0-9]{0,10})/) || [];
438
+ if (rangeDefinition === 'specifyRangeA1' && cellDataFrom[2] !== undefined) {
439
+ keyRange = `${cellDataFrom[1]}${+cellDataFrom[2]}:${cellDataTo[1]}${+cellDataFrom[2]}`;
440
+ rangeToCheck = `${cellDataFrom[1]}${+cellDataFrom[2] + 1}:${rangeTo}`;
441
+ }
442
+ else {
443
+ keyRange = `${cellDataFrom[1]}${keyRow}:${cellDataTo[1]}${keyRow}`;
444
+ rangeToCheck = `${cellDataFrom[1]}${startIndex}:${rangeTo}`;
445
+ }
446
+ }
447
+ const qs = {};
448
+ Object.assign(qs, options);
449
+ if (event === 'rowAdded') {
450
+ const [columns] = (await transport_1.apiRequest.call(this, 'GET', `/v4/spreadsheets/${documentId}/values/${sheetName}!${keyRange}`)).values || [[]];
451
+ if (!(columns === null || columns === void 0 ? void 0 : columns.length)) {
452
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Could not retrieve the columns from key row');
453
+ }
454
+ const sheetData = await googleSheet.getData(`${sheetName}!${rangeToCheck}`, options.valueRender || 'UNFORMATTED_VALUE', options.dateTimeRenderOption || 'FORMATTED_STRING');
455
+ if (this.getMode() === 'manual') {
456
+ if (Array.isArray(sheetData)) {
457
+ const returnData = (0, GoogleSheetsTrigger_utils_1.arrayOfArraysToJson)(sheetData, columns);
458
+ if (Array.isArray(returnData) && returnData.length !== 0) {
459
+ return [this.helpers.returnJsonArray(returnData)];
460
+ }
461
+ }
462
+ }
463
+ if (Array.isArray(sheetData) && this.getMode() !== 'manual') {
464
+ if (workflowStaticData.lastIndexChecked === undefined) {
465
+ workflowStaticData.lastIndexChecked = sheetData.length;
466
+ return null;
467
+ }
468
+ const addedRows = (sheetData === null || sheetData === void 0 ? void 0 : sheetData.slice(workflowStaticData.lastIndexChecked)) || [];
469
+ const returnData = (0, GoogleSheetsTrigger_utils_1.arrayOfArraysToJson)(addedRows, columns);
470
+ workflowStaticData.lastIndexChecked = sheetData.length;
471
+ if (Array.isArray(returnData) && returnData.length !== 0) {
472
+ return [this.helpers.returnJsonArray(returnData)];
473
+ }
474
+ }
475
+ }
476
+ if (event === 'anyUpdate' || event === 'rowUpdate') {
477
+ const sheetRange = `${sheetName}!${range}`;
478
+ let dataStartIndex = startIndex - 1;
479
+ if (rangeDefinition !== 'specifyRangeA1') {
480
+ dataStartIndex = keyRow < startIndex ? startIndex - 2 : startIndex - 1;
481
+ }
482
+ const currentData = (await googleSheet.getData(sheetRange, 'UNFORMATTED_VALUE', 'SERIAL_NUMBER')) || [];
483
+ if (previousRevision === undefined) {
484
+ if (currentData.length === 0) {
485
+ return [[]];
486
+ }
487
+ const zeroBasedKeyRow = keyRow - 1;
488
+ const columns = currentData[zeroBasedKeyRow];
489
+ currentData.splice(zeroBasedKeyRow, 1);
490
+ let returnData;
491
+ if (rangeDefinition !== 'specifyRangeA1') {
492
+ returnData = (0, GoogleSheetsTrigger_utils_1.arrayOfArraysToJson)(currentData.slice(dataStartIndex), columns);
493
+ }
494
+ else {
495
+ returnData = (0, GoogleSheetsTrigger_utils_1.arrayOfArraysToJson)(currentData, columns);
496
+ }
497
+ if (Array.isArray(returnData) && returnData.length !== 0 && this.getMode() === 'manual') {
498
+ return [this.helpers.returnJsonArray(returnData)];
499
+ }
500
+ else {
501
+ return null;
502
+ }
503
+ }
504
+ const previousRevisionBinaryData = await GoogleSheetsTrigger_utils_1.getRevisionFile.call(this, previousRevisionLink);
505
+ const previousRevisionSheetData = (0, GoogleSheetsTrigger_utils_1.sheetBinaryToArrayOfArrays)(previousRevisionBinaryData, sheetName, rangeDefinition === 'specifyRangeA1' ? range : undefined) || [];
506
+ const includeInOutput = this.getNodeParameter('includeInOutput', 'new');
507
+ let returnData;
508
+ if (options.columnsToWatch) {
509
+ returnData = (0, GoogleSheetsTrigger_utils_1.compareRevisions)(previousRevisionSheetData, currentData, keyRow, includeInOutput, options.columnsToWatch, dataStartIndex, event);
510
+ }
511
+ else {
512
+ returnData = (0, GoogleSheetsTrigger_utils_1.compareRevisions)(previousRevisionSheetData, currentData, keyRow, includeInOutput, [], dataStartIndex, event);
513
+ }
514
+ if (Array.isArray(returnData) && returnData.length !== 0) {
515
+ return [this.helpers.returnJsonArray(returnData)];
516
+ }
517
+ }
518
+ }
519
+ catch (error) {
520
+ if ((_a = error === null || error === void 0 ? void 0 : error.description) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('user does not have sufficient permissions for file')) {
521
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Edit access to the document is required for the 'Row Update' and 'Row Added or Updated' triggers. Request edit access to the document's owner or select the 'Row Added' trigger in the 'Trigger On' dropdown.");
522
+ }
523
+ if (((_c = (_b = error === null || error === void 0 ? void 0 : error.error) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) !== undefined &&
524
+ !error.error.error.message.toLocaleLowerCase().includes('unknown error') &&
525
+ !error.error.error.message.toLocaleLowerCase().includes('bad request')) {
526
+ let [message, ...description] = error.error.error.message.split('. ');
527
+ if (message.toLowerCase() === 'access not configured') {
528
+ message = 'Missing Google Drive API';
529
+ }
530
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), message, {
531
+ description: description.join('.\n '),
532
+ });
533
+ }
534
+ throw error;
535
+ }
536
+ return null;
537
+ }
538
+ }
539
+ exports.GoogleSheetsTrigger = GoogleSheetsTrigger;
540
+ //# sourceMappingURL=GoogleSheetsTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleSheetsTrigger.node.js","sourceRoot":"","sources":["../../../../nodes/Google/Sheet/GoogleSheetsTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,8CAA4C;AAC5C,wDAA2E;AAC3E,0DAAuD;AACvD,0DAAyE;AAGzE,2EAMqC;AAErC,MAAa,mBAAmB;IAAhC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,4BAA4B;YACtC,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE;gBACT,IAAI,EAAE,uBAAuB;aAC7B;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,8BAA8B;oBACpC,QAAQ,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;gBAClF,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,uBAAuB,EAAE;oBACtD,OAAO,GAAG,0BAA0B,CAAC;iBACrC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE;oBACrD,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;iBACrC,CAAC,CAAC;aACH;YACD,MAAM,KAAK,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA9nBD,kDA8nBC"}
@@ -0,0 +1,20 @@
1
+ {
2
+ "node": "n8n-nodes-base.googleSheetsTrigger",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Data & Storage", "Productivity"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googlesheetstrigger/"
15
+ }
16
+ ],
17
+ "generic": []
18
+ },
19
+ "alias": ["CSV", "Spreadsheet", "GS"]
20
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { IDataObject, IPollFunctions } from 'n8n-workflow';
3
+ import { SheetDataRow, SheetRangeData } from './v2/helpers/GoogleSheets.types';
4
+ export declare const BINARY_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
5
+ export declare function getRevisionFile(this: IPollFunctions, exportLink: string): Promise<Buffer>;
6
+ export declare function sheetBinaryToArrayOfArrays(data: Buffer, sheetName: string, range: string | undefined): string[][];
7
+ export declare function arrayOfArraysToJson(sheetData: SheetRangeData, columns: SheetDataRow): IDataObject[];
8
+ export declare function compareRevisions(previous: SheetRangeData, current: SheetRangeData, keyRow: number, includeInOutput: string, columnsToWatch: string[], dataStartIndex: number, event: string): IDataObject[];