n8n-nodes-base 1.72.1 → 1.73.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 (211) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/ElasticsearchApi.credentials.js +1 -1
  3. package/dist/credentials/ElasticsearchApi.credentials.js.map +1 -1
  4. package/dist/credentials/LinearOAuth2Api.credentials.js +8 -2
  5. package/dist/credentials/LinearOAuth2Api.credentials.js.map +1 -1
  6. package/dist/credentials/MailerLiteApi.credentials.d.ts +3 -1
  7. package/dist/credentials/MailerLiteApi.credentials.js +26 -0
  8. package/dist/credentials/MailerLiteApi.credentials.js.map +1 -1
  9. package/dist/credentials/OpenAiApi.credentials.js +9 -2
  10. package/dist/credentials/OpenAiApi.credentials.js.map +1 -1
  11. package/dist/credentials/Redis.credentials.js +7 -0
  12. package/dist/credentials/Redis.credentials.js.map +1 -1
  13. package/dist/credentials/SolarWindsIpamApi.credentials.d.ts +18 -0
  14. package/dist/credentials/SolarWindsIpamApi.credentials.js +78 -0
  15. package/dist/credentials/SolarWindsIpamApi.credentials.js.map +1 -0
  16. package/dist/credentials/SolarWindsObservabilityApi.credentials.d.ts +18 -0
  17. package/dist/credentials/SolarWindsObservabilityApi.credentials.js +64 -0
  18. package/dist/credentials/SolarWindsObservabilityApi.credentials.js.map +1 -0
  19. package/dist/credentials/icons/SolarWindsIpam.svg +71 -0
  20. package/dist/credentials/icons/SolarWindsObservability.svg +240 -0
  21. package/dist/known/credentials.json +8 -0
  22. package/dist/methods/defined.json +2 -1
  23. package/dist/methods/referenced.json +1 -0
  24. package/dist/nodes/Affinity/GenericFunctions.js.map +1 -1
  25. package/dist/nodes/Automizy/GenericFunctions.js.map +1 -1
  26. package/dist/nodes/BambooHr/v1/transport/index.js.map +1 -1
  27. package/dist/nodes/Box/GenericFunctions.js.map +1 -1
  28. package/dist/nodes/Cisco/Webex/GenericFunctions.js.map +1 -1
  29. package/dist/nodes/ClickUp/GenericFunctions.js.map +1 -1
  30. package/dist/nodes/Coda/GenericFunctions.js.map +1 -1
  31. package/dist/nodes/CoinGecko/GenericFunctions.js.map +1 -1
  32. package/dist/nodes/Elastic/Elasticsearch/Elasticsearch.node.js +2 -2
  33. package/dist/nodes/Elastic/Elasticsearch/Elasticsearch.node.js.map +1 -1
  34. package/dist/nodes/Elastic/Elasticsearch/GenericFunctions.js +2 -2
  35. package/dist/nodes/Elastic/Elasticsearch/GenericFunctions.js.map +1 -1
  36. package/dist/nodes/ExecutionData/test/ExecutionData.workflow.json +112 -0
  37. package/dist/nodes/Facebook/FacebookGraphApi.node.js +4 -0
  38. package/dist/nodes/Facebook/FacebookGraphApi.node.js.map +1 -1
  39. package/dist/nodes/Files/ExtractFromFile/ExtractFromFile.node.js +1 -1
  40. package/dist/nodes/Files/ExtractFromFile/ExtractFromFile.node.js.map +1 -1
  41. package/dist/nodes/Files/ExtractFromFile/actions/moveTo.operation.js +1 -1
  42. package/dist/nodes/Files/ExtractFromFile/actions/moveTo.operation.js.map +1 -1
  43. package/dist/nodes/Files/ExtractFromFile/test/workflow.non_utf8_encoding.json +98 -0
  44. package/dist/nodes/Flow/GenericFunctions.js.map +1 -1
  45. package/dist/nodes/Form/Form.node.d.ts +2 -1
  46. package/dist/nodes/Form/Form.node.js +9 -6
  47. package/dist/nodes/Form/Form.node.js.map +1 -1
  48. package/dist/nodes/Form/interfaces.d.ts +1 -0
  49. package/dist/nodes/Form/interfaces.js.map +1 -1
  50. package/dist/nodes/Form/utils.d.ts +2 -1
  51. package/dist/nodes/Form/utils.js +2 -1
  52. package/dist/nodes/Form/utils.js.map +1 -1
  53. package/dist/nodes/Formstack/FormstackTrigger.node.js.map +1 -1
  54. package/dist/nodes/Freshdesk/Freshdesk.node.js.map +1 -1
  55. package/dist/nodes/GetResponse/GenericFunctions.js.map +1 -1
  56. package/dist/nodes/Git/Git.node.js.map +1 -1
  57. package/dist/nodes/Github/Github.node.js +4 -4
  58. package/dist/nodes/Github/Github.node.js.map +1 -1
  59. package/dist/nodes/Google/Calendar/GenericFunctions.js.map +1 -1
  60. package/dist/nodes/Google/CloudNaturalLanguage/GenericFunctions.js.map +1 -1
  61. package/dist/nodes/Google/Contacts/GenericFunctions.js.map +1 -1
  62. package/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js.map +1 -1
  63. package/dist/nodes/Google/GSuiteAdmin/GenericFunctions.js.map +1 -1
  64. package/dist/nodes/Google/Gmail/Gmail.node.json +1 -1
  65. package/dist/nodes/Google/Gmail/test/v2/drafts.workflow.json +386 -0
  66. package/dist/nodes/Google/Gmail/test/v2/fixtures/labels.json +14 -0
  67. package/dist/nodes/Google/Gmail/test/v2/fixtures/messages.json +240 -0
  68. package/dist/nodes/Google/Gmail/test/v2/labels.workflow.json +163 -0
  69. package/dist/nodes/Google/Gmail/test/v2/messages.workflow.json +1151 -0
  70. package/dist/nodes/Google/Gmail/test/v2/threads.workflow.json +1174 -0
  71. package/dist/nodes/Google/Gmail/v2/GmailV2.node.d.ts +5 -4
  72. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js +16 -48
  73. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js.map +1 -1
  74. package/dist/nodes/Google/Gmail/v2/MessageDescription.js +2 -2
  75. package/dist/nodes/Google/Gmail/v2/MessageDescription.js.map +1 -1
  76. package/dist/nodes/Google/Gmail/v2/loadOptions.d.ts +4 -0
  77. package/dist/nodes/Google/Gmail/v2/loadOptions.js +50 -0
  78. package/dist/nodes/Google/Gmail/v2/loadOptions.js.map +1 -0
  79. package/dist/nodes/Google/Task/GenericFunctions.js.map +1 -1
  80. package/dist/nodes/Google/YouTube/GenericFunctions.js.map +1 -1
  81. package/dist/nodes/Gotify/GenericFunctions.js.map +1 -1
  82. package/dist/nodes/HelpScout/GenericFunctions.js.map +1 -1
  83. package/dist/nodes/HomeAssistant/HomeAssistant.node.js.map +1 -1
  84. package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js.map +1 -1
  85. package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js.map +1 -1
  86. package/dist/nodes/Hubspot/HubspotTrigger.node.js.map +1 -1
  87. package/dist/nodes/Hubspot/V2/HubspotV2.node.js.map +1 -1
  88. package/dist/nodes/InvoiceNinja/BankTransactionDescription.js +10 -0
  89. package/dist/nodes/InvoiceNinja/BankTransactionDescription.js.map +1 -1
  90. package/dist/nodes/InvoiceNinja/BankTransactionInterface.d.ts +5 -1
  91. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.d.ts +1 -0
  92. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.js +27 -3
  93. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.js.map +1 -1
  94. package/dist/nodes/Keap/GenericFunctions.js.map +1 -1
  95. package/dist/nodes/Linear/GenericFunctions.js +17 -4
  96. package/dist/nodes/Linear/GenericFunctions.js.map +1 -1
  97. package/dist/nodes/Linear/LinearTrigger.node.js +6 -0
  98. package/dist/nodes/Linear/LinearTrigger.node.js.map +1 -1
  99. package/dist/nodes/Magento/GenericFunctions.js.map +1 -1
  100. package/dist/nodes/MailerLite/GenericFunctions.d.ts +2 -1
  101. package/dist/nodes/MailerLite/GenericFunctions.js +43 -11
  102. package/dist/nodes/MailerLite/GenericFunctions.js.map +1 -1
  103. package/dist/nodes/MailerLite/MailerLite.node.d.ts +3 -9
  104. package/dist/nodes/MailerLite/MailerLite.node.js +12 -132
  105. package/dist/nodes/MailerLite/MailerLite.node.js.map +1 -1
  106. package/dist/nodes/MailerLite/MailerLite.svg +33 -0
  107. package/dist/nodes/MailerLite/MailerLiteTrigger.node.d.ts +3 -11
  108. package/dist/nodes/MailerLite/MailerLiteTrigger.node.js +11 -145
  109. package/dist/nodes/MailerLite/MailerLiteTrigger.node.js.map +1 -1
  110. package/dist/nodes/MailerLite/tests/apiResponses.d.ts +237 -0
  111. package/dist/nodes/MailerLite/tests/apiResponses.js +414 -0
  112. package/dist/nodes/MailerLite/tests/apiResponses.js.map +1 -0
  113. package/dist/nodes/MailerLite/tests/v1/MailerLite.v1.workflow.json +460 -0
  114. package/dist/nodes/MailerLite/tests/v2/MailerLite.v2.workflow.json +370 -0
  115. package/dist/nodes/MailerLite/v1/MailerLiteTriggerV1.node.d.ts +13 -0
  116. package/dist/nodes/MailerLite/v1/MailerLiteTriggerV1.node.js +159 -0
  117. package/dist/nodes/MailerLite/v1/MailerLiteTriggerV1.node.js.map +1 -0
  118. package/dist/nodes/MailerLite/v1/MailerLiteV1.node.d.ts +12 -0
  119. package/dist/nodes/MailerLite/v1/MailerLiteV1.node.js +136 -0
  120. package/dist/nodes/MailerLite/v1/MailerLiteV1.node.js.map +1 -0
  121. package/dist/nodes/MailerLite/v1/SubscriberDescription.js.map +1 -0
  122. package/dist/nodes/MailerLite/v2/MailerLite.Interface.d.ts +33 -0
  123. package/dist/nodes/MailerLite/v2/MailerLite.Interface.js +3 -0
  124. package/dist/nodes/MailerLite/v2/MailerLite.Interface.js.map +1 -0
  125. package/dist/nodes/MailerLite/v2/MailerLiteTriggerV2.node.d.ts +13 -0
  126. package/dist/nodes/MailerLite/v2/MailerLiteTriggerV2.node.js +154 -0
  127. package/dist/nodes/MailerLite/v2/MailerLiteTriggerV2.node.js.map +1 -0
  128. package/dist/nodes/MailerLite/v2/MailerLiteV2.node.d.ts +12 -0
  129. package/dist/nodes/MailerLite/v2/MailerLiteV2.node.js +141 -0
  130. package/dist/nodes/MailerLite/v2/MailerLiteV2.node.js.map +1 -0
  131. package/dist/nodes/MailerLite/v2/SubscriberDescription.d.ts +3 -0
  132. package/dist/nodes/MailerLite/v2/SubscriberDescription.js +286 -0
  133. package/dist/nodes/MailerLite/v2/SubscriberDescription.js.map +1 -0
  134. package/dist/nodes/Mailgun/Mailgun.node.js.map +1 -1
  135. package/dist/nodes/Mandrill/Mandrill.node.js.map +1 -1
  136. package/dist/nodes/Matrix/GenericFunctions.js.map +1 -1
  137. package/dist/nodes/Mautic/GenericFunctions.js.map +1 -1
  138. package/dist/nodes/Microsoft/Dynamics/GenericFunctions.js.map +1 -1
  139. package/dist/nodes/Microsoft/OneDrive/GenericFunctions.js.map +1 -1
  140. package/dist/nodes/Microsoft/Teams/v1/GenericFunctions.js.map +1 -1
  141. package/dist/nodes/Microsoft/Teams/v2/transport/index.js.map +1 -1
  142. package/dist/nodes/Microsoft/ToDo/GenericFunctions.js.map +1 -1
  143. package/dist/nodes/MongoDb/MongoDb.node.js +3 -1
  144. package/dist/nodes/MongoDb/MongoDb.node.js.map +1 -1
  145. package/dist/nodes/Notion/test/node/v2/block/append.workflow.json +535 -0
  146. package/dist/nodes/Notion/test/node/v2/block/getAll.workflow.json +188 -0
  147. package/dist/nodes/Notion/test/node/v2/database/get.workflow.json +90 -0
  148. package/dist/nodes/Notion/test/node/v2/database/getAll.workflow.json +99 -0
  149. package/dist/nodes/Notion/test/node/v2/database/search.workflow.json +265 -0
  150. package/dist/nodes/Notion/test/node/v2/databasePage/create.workflow.json +116 -0
  151. package/dist/nodes/Notion/test/node/v2/databasePage/get.workflow.json +91 -0
  152. package/dist/nodes/Notion/test/node/v2/databasePage/getAll.workflow.json +114 -0
  153. package/dist/nodes/Notion/test/node/v2/databasePage/update.workflow.json +100 -0
  154. package/dist/nodes/Notion/test/node/v2/page/archive.workflow.json +90 -0
  155. package/dist/nodes/Notion/test/node/v2/page/create.workflow.json +111 -0
  156. package/dist/nodes/Notion/test/node/v2/page/search.workflow.json +97 -0
  157. package/dist/nodes/Notion/test/node/v2/user/get.workflow.json +88 -0
  158. package/dist/nodes/Notion/test/node/v2/user/getAll.workflow.json +104 -0
  159. package/dist/nodes/Onfleet/Onfleet.js.map +1 -1
  160. package/dist/nodes/OpenAi/OpenAi.node.js +1 -1
  161. package/dist/nodes/OpenAi/OpenAi.node.js.map +1 -1
  162. package/dist/nodes/PhilipsHue/test/apiResponses.d.ts +115 -0
  163. package/dist/nodes/PhilipsHue/test/apiResponses.js +109 -0
  164. package/dist/nodes/PhilipsHue/test/apiResponses.js.map +1 -0
  165. package/dist/nodes/PhilipsHue/test/workflow.json +227 -0
  166. package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +1 -1
  167. package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -1
  168. package/dist/nodes/Postgres/v2/helpers/interfaces.d.ts +2 -0
  169. package/dist/nodes/RabbitMQ/RabbitMQ.node.js.map +1 -1
  170. package/dist/nodes/Redis/Redis.node.js.map +1 -1
  171. package/dist/nodes/Redis/RedisTrigger.node.js.map +1 -1
  172. package/dist/nodes/Redis/types.d.ts +10 -0
  173. package/dist/nodes/Redis/types.js +3 -0
  174. package/dist/nodes/Redis/types.js.map +1 -0
  175. package/dist/nodes/Redis/utils.d.ts +5 -6
  176. package/dist/nodes/Redis/utils.js +3 -3
  177. package/dist/nodes/Redis/utils.js.map +1 -1
  178. package/dist/nodes/Salesforce/GenericFunctions.js.map +1 -1
  179. package/dist/nodes/Slack/Slack.node.json +1 -0
  180. package/dist/nodes/Slack/V2/FileDescription.js +2 -2
  181. package/dist/nodes/Slack/V2/FileDescription.js.map +1 -1
  182. package/dist/nodes/Slack/V2/MessageDescription.js +2 -2
  183. package/dist/nodes/Slack/V2/MessageDescription.js.map +1 -1
  184. package/dist/nodes/Slack/V2/SlackV2.node.js +9 -0
  185. package/dist/nodes/Slack/V2/SlackV2.node.js.map +1 -1
  186. package/dist/nodes/Slack/test/v2/node/channel/archive.workflow.json +89 -0
  187. package/dist/nodes/Slack/test/v2/node/channel/create.workflow.json +119 -0
  188. package/dist/nodes/Slack/test/v2/node/channel/get.workflow.json +127 -0
  189. package/dist/nodes/Slack/test/v2/node/channel/getAll.workflow.json +181 -0
  190. package/dist/nodes/Slack/test/v2/node/channel/history.workflow.json +254 -0
  191. package/dist/nodes/Slack/test/v2/node/file/upload.workflow.json +147 -0
  192. package/dist/nodes/Slack/test/v2/node/message/delete.workflow.json +92 -0
  193. package/dist/nodes/Slack/test/v2/node/message/getPermalink.workflow.json +91 -0
  194. package/dist/nodes/Slack/test/v2/node/message/post.workflow.json +143 -0
  195. package/dist/nodes/Slack/test/v2/node/message/search.workflow.json +262 -0
  196. package/dist/nodes/Slack/test/v2/node/message/update.workflow.json +142 -0
  197. package/dist/nodes/Slack/test/v2/node/user/updateProfile.workflow.json +106 -0
  198. package/dist/nodes/UProc/ToolDescription.js +1 -3
  199. package/dist/nodes/UProc/ToolDescription.js.map +1 -1
  200. package/dist/types/credentials.json +6 -4
  201. package/dist/types/nodes.json +14 -12
  202. package/dist/utils/sendAndWait/email-templates.js +1 -1
  203. package/dist/utils/sendAndWait/email-templates.js.map +1 -1
  204. package/dist/utils/sendAndWait/utils.d.ts +20 -2
  205. package/dist/utils/sendAndWait/utils.js +197 -11
  206. package/dist/utils/sendAndWait/utils.js.map +1 -1
  207. package/package.json +6 -4
  208. package/dist/nodes/MailerLite/SubscriberDescription.js.map +0 -1
  209. package/dist/nodes/MailerLite/mailerLite.png +0 -0
  210. /package/dist/nodes/MailerLite/{SubscriberDescription.d.ts → v1/SubscriberDescription.d.ts} +0 -0
  211. /package/dist/nodes/MailerLite/{SubscriberDescription.js → v1/SubscriberDescription.js} +0 -0
@@ -0,0 +1,370 @@
1
+ {
2
+ "name": "[TEST] MailerLite v2 Node",
3
+ "nodes": [
4
+ {
5
+ "parameters": {},
6
+ "id": "3c72284b-2b88-4d5f-81bc-b1970b14f2af",
7
+ "name": "When clicking ‘Test workflow’",
8
+ "type": "n8n-nodes-base.manualTrigger",
9
+ "typeVersion": 1,
10
+ "position": [800, 240]
11
+ },
12
+ {
13
+ "parameters": {
14
+ "email": "user@n8n.io",
15
+ "additionalFields": {
16
+ "status": "active"
17
+ }
18
+ },
19
+ "id": "702c6598-cbe8-403e-962e-56621ec727a4",
20
+ "name": "Create Subscriber",
21
+ "type": "n8n-nodes-base.mailerLite",
22
+ "typeVersion": 2,
23
+ "position": [1000, 0],
24
+ "credentials": {
25
+ "mailerLiteApi": {
26
+ "id": "bm7VHS2C7lRgVOhb",
27
+ "name": "Mailer Lite account"
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "parameters": {},
33
+ "type": "n8n-nodes-base.noOp",
34
+ "typeVersion": 1,
35
+ "position": [1220, 0],
36
+ "id": "540b98b5-b3bf-49a1-a406-acc6872f4b50",
37
+ "name": "No Operation, do nothing"
38
+ },
39
+ {
40
+ "parameters": {},
41
+ "type": "n8n-nodes-base.noOp",
42
+ "typeVersion": 1,
43
+ "position": [1220, 180],
44
+ "id": "17c0b8e7-a9d7-4a4f-882f-c3fb3f6bc289",
45
+ "name": "No Operation, do nothing1"
46
+ },
47
+ {
48
+ "parameters": {
49
+ "operation": "get",
50
+ "subscriberId": "user@n8n.io"
51
+ },
52
+ "type": "n8n-nodes-base.mailerLite",
53
+ "typeVersion": 2,
54
+ "position": [1000, 180],
55
+ "id": "5598f2b9-4d67-4ad7-a8e4-7b7bf723cd5a",
56
+ "name": "Get Subscriber",
57
+ "credentials": {
58
+ "mailerLiteApi": {
59
+ "id": "bm7VHS2C7lRgVOhb",
60
+ "name": "Mailer Lite account"
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "parameters": {
66
+ "operation": "update",
67
+ "subscriberId": "user@n8n.io",
68
+ "additionalFields": {
69
+ "status": "junk",
70
+ "optin_ip": "8.8.8.8"
71
+ }
72
+ },
73
+ "type": "n8n-nodes-base.mailerLite",
74
+ "typeVersion": 2,
75
+ "position": [1000, 380],
76
+ "id": "223e4507-c88e-4066-a122-ccaf9cea7b49",
77
+ "name": "Update Subscriber",
78
+ "credentials": {
79
+ "mailerLiteApi": {
80
+ "id": "bm7VHS2C7lRgVOhb",
81
+ "name": "Mailer Lite account"
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "parameters": {},
87
+ "type": "n8n-nodes-base.noOp",
88
+ "typeVersion": 1,
89
+ "position": [1220, 380],
90
+ "id": "94d04b52-8809-4670-a8ca-135921139fc9",
91
+ "name": "No Operation, do nothing2"
92
+ },
93
+ {
94
+ "parameters": {
95
+ "operation": "getAll",
96
+ "limit": 2,
97
+ "filters": {
98
+ "status": "junk"
99
+ }
100
+ },
101
+ "type": "n8n-nodes-base.mailerLite",
102
+ "typeVersion": 2,
103
+ "position": [960, 640],
104
+ "id": "30c6e797-ceda-4c84-8f34-b61200ffd9e9",
105
+ "name": "Get Many Subscrbers",
106
+ "credentials": {
107
+ "mailerLiteApi": {
108
+ "id": "bm7VHS2C7lRgVOhb",
109
+ "name": "Mailer Lite account"
110
+ }
111
+ }
112
+ },
113
+ {
114
+ "parameters": {},
115
+ "type": "n8n-nodes-base.noOp",
116
+ "typeVersion": 1,
117
+ "position": [1180, 640],
118
+ "id": "c8529a30-889b-4ac9-a509-73f5dd8eef4a",
119
+ "name": "No Operation, do nothing3"
120
+ }
121
+ ],
122
+ "pinData": {
123
+ "No Operation, do nothing": [
124
+ {
125
+ "json": {
126
+ "id": "139872142007207563",
127
+ "email": "user@n8n.io",
128
+ "status": "junk",
129
+ "source": "api",
130
+ "sent": 0,
131
+ "opens_count": 0,
132
+ "clicks_count": 0,
133
+ "open_rate": 0,
134
+ "click_rate": 0,
135
+ "ip_address": null,
136
+ "subscribed_at": "2024-12-05 09:54:29",
137
+ "unsubscribed_at": null,
138
+ "created_at": "2024-12-05 09:54:29",
139
+ "updated_at": "2024-12-05 10:20:32",
140
+ "fields": {
141
+ "name": null,
142
+ "last_name": null,
143
+ "company": null,
144
+ "country": null,
145
+ "city": null,
146
+ "phone": null,
147
+ "state": null,
148
+ "z_i_p": null
149
+ },
150
+ "groups": [],
151
+ "opted_in_at": null,
152
+ "optin_ip": "8.8.8.8"
153
+ }
154
+ }
155
+ ],
156
+ "No Operation, do nothing1": [
157
+ {
158
+ "json": {
159
+ "id": "139872142007207563",
160
+ "email": "user@n8n.io",
161
+ "status": "junk",
162
+ "source": "api",
163
+ "sent": 0,
164
+ "opens_count": 0,
165
+ "clicks_count": 0,
166
+ "open_rate": 0,
167
+ "click_rate": 0,
168
+ "ip_address": null,
169
+ "subscribed_at": "2024-12-05 09:54:29",
170
+ "unsubscribed_at": null,
171
+ "created_at": "2024-12-05 09:54:29",
172
+ "updated_at": "2024-12-05 10:20:32",
173
+ "fields": {
174
+ "name": null,
175
+ "last_name": null,
176
+ "company": null,
177
+ "country": null,
178
+ "city": null,
179
+ "phone": null,
180
+ "state": null,
181
+ "z_i_p": null
182
+ },
183
+ "groups": [],
184
+ "opted_in_at": null,
185
+ "optin_ip": "8.8.8.8"
186
+ }
187
+ }
188
+ ],
189
+ "No Operation, do nothing2": [
190
+ {
191
+ "json": {
192
+ "data": {
193
+ "id": "139872142007207563",
194
+ "email": "user@n8n.io",
195
+ "status": "junk",
196
+ "source": "api",
197
+ "sent": 0,
198
+ "opens_count": 0,
199
+ "clicks_count": 0,
200
+ "open_rate": 0,
201
+ "click_rate": 0,
202
+ "ip_address": null,
203
+ "subscribed_at": "2024-12-05 09:54:29",
204
+ "unsubscribed_at": null,
205
+ "created_at": "2024-12-05 09:54:29",
206
+ "updated_at": "2024-12-05 10:20:32",
207
+ "fields": {
208
+ "name": null,
209
+ "last_name": null,
210
+ "company": null,
211
+ "country": null,
212
+ "city": null,
213
+ "phone": null,
214
+ "state": null,
215
+ "z_i_p": null
216
+ },
217
+ "groups": [],
218
+ "opted_in_at": null,
219
+ "optin_ip": "8.8.8.8"
220
+ }
221
+ }
222
+ }
223
+ ],
224
+ "No Operation, do nothing3": [
225
+ {
226
+ "json": {
227
+ "id": "139872142007207563",
228
+ "email": "user@n8n.io",
229
+ "status": "junk",
230
+ "source": "api",
231
+ "sent": 0,
232
+ "opens_count": 0,
233
+ "clicks_count": 0,
234
+ "open_rate": 0,
235
+ "click_rate": 0,
236
+ "ip_address": null,
237
+ "subscribed_at": "2024-12-05 09:54:29",
238
+ "unsubscribed_at": null,
239
+ "created_at": "2024-12-05 09:54:29",
240
+ "updated_at": "2024-12-05 10:20:32",
241
+ "fields": {
242
+ "name": null,
243
+ "last_name": null,
244
+ "company": null,
245
+ "country": null,
246
+ "city": null,
247
+ "phone": null,
248
+ "state": null,
249
+ "z_i_p": null
250
+ },
251
+ "opted_in_at": null,
252
+ "optin_ip": "8.8.8.8"
253
+ }
254
+ },
255
+ {
256
+ "json": {
257
+ "id": "139059851540038710",
258
+ "email": "nathan@n8n.io",
259
+ "status": "junk",
260
+ "source": "api",
261
+ "sent": 0,
262
+ "opens_count": 0,
263
+ "clicks_count": 0,
264
+ "open_rate": 0,
265
+ "click_rate": 0,
266
+ "ip_address": null,
267
+ "subscribed_at": null,
268
+ "unsubscribed_at": null,
269
+ "created_at": "2024-11-26 10:43:28",
270
+ "updated_at": "2024-11-27 10:09:34",
271
+ "fields": {
272
+ "name": "Nathan",
273
+ "last_name": "Workflow",
274
+ "company": null,
275
+ "country": null,
276
+ "city": null,
277
+ "phone": null,
278
+ "state": null,
279
+ "z_i_p": null
280
+ },
281
+ "opted_in_at": null,
282
+ "optin_ip": null
283
+ }
284
+ }
285
+ ]
286
+ },
287
+ "connections": {
288
+ "When clicking ‘Test workflow’": {
289
+ "main": [
290
+ [
291
+ {
292
+ "node": "Create Subscriber",
293
+ "type": "main",
294
+ "index": 0
295
+ },
296
+ {
297
+ "node": "Get Subscriber",
298
+ "type": "main",
299
+ "index": 0
300
+ },
301
+ {
302
+ "node": "Update Subscriber",
303
+ "type": "main",
304
+ "index": 0
305
+ },
306
+ {
307
+ "node": "Get Many Subscrbers",
308
+ "type": "main",
309
+ "index": 0
310
+ }
311
+ ]
312
+ ]
313
+ },
314
+ "Create Subscriber": {
315
+ "main": [
316
+ [
317
+ {
318
+ "node": "No Operation, do nothing",
319
+ "type": "main",
320
+ "index": 0
321
+ }
322
+ ]
323
+ ]
324
+ },
325
+ "Get Subscriber": {
326
+ "main": [
327
+ [
328
+ {
329
+ "node": "No Operation, do nothing1",
330
+ "type": "main",
331
+ "index": 0
332
+ }
333
+ ]
334
+ ]
335
+ },
336
+ "Update Subscriber": {
337
+ "main": [
338
+ [
339
+ {
340
+ "node": "No Operation, do nothing2",
341
+ "type": "main",
342
+ "index": 0
343
+ }
344
+ ]
345
+ ]
346
+ },
347
+ "Get Many Subscrbers": {
348
+ "main": [
349
+ [
350
+ {
351
+ "node": "No Operation, do nothing3",
352
+ "type": "main",
353
+ "index": 0
354
+ }
355
+ ]
356
+ ]
357
+ }
358
+ },
359
+ "active": false,
360
+ "settings": {
361
+ "executionOrder": "v1"
362
+ },
363
+ "versionId": "338331ef-1b38-47dc-9e2b-45340ea3fe3b",
364
+ "meta": {
365
+ "templateCredsSetupCompleted": true,
366
+ "instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd"
367
+ },
368
+ "id": "0Ov6Vd62DUXrWWQH",
369
+ "tags": []
370
+ }
@@ -0,0 +1,13 @@
1
+ import { type IHookFunctions, type IWebhookFunctions, type INodeType, type INodeTypeDescription, type IWebhookResponseData, type INodeTypeBaseDescription } from 'n8n-workflow';
2
+ export declare class MailerLiteTriggerV1 implements INodeType {
3
+ description: INodeTypeDescription;
4
+ constructor(baseDescription: INodeTypeBaseDescription);
5
+ webhookMethods: {
6
+ default: {
7
+ checkExists(this: IHookFunctions): Promise<boolean>;
8
+ create(this: IHookFunctions): Promise<boolean>;
9
+ delete(this: IHookFunctions): Promise<boolean>;
10
+ };
11
+ };
12
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
13
+ }
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MailerLiteTriggerV1 = void 0;
4
+ const GenericFunctions_1 = require("../GenericFunctions");
5
+ class MailerLiteTriggerV1 {
6
+ constructor(baseDescription) {
7
+ this.webhookMethods = {
8
+ default: {
9
+ async checkExists() {
10
+ const webhookUrl = this.getNodeWebhookUrl('default');
11
+ const webhookData = this.getWorkflowStaticData('node');
12
+ const event = this.getNodeParameter('event');
13
+ const endpoint = '/webhooks';
14
+ const { webhooks } = await GenericFunctions_1.mailerliteApiRequest.call(this, 'GET', endpoint, {});
15
+ for (const webhook of webhooks) {
16
+ if (webhook.url === webhookUrl && webhook.event === event) {
17
+ webhookData.webhookId = webhook.id;
18
+ return true;
19
+ }
20
+ }
21
+ return false;
22
+ },
23
+ async create() {
24
+ const webhookData = this.getWorkflowStaticData('node');
25
+ const webhookUrl = this.getNodeWebhookUrl('default');
26
+ const event = this.getNodeParameter('event');
27
+ const endpoint = '/webhooks';
28
+ const body = {
29
+ url: webhookUrl,
30
+ event,
31
+ };
32
+ const responseData = await GenericFunctions_1.mailerliteApiRequest.call(this, 'POST', endpoint, body);
33
+ if (responseData.id === undefined) {
34
+ return false;
35
+ }
36
+ webhookData.webhookId = responseData.id;
37
+ return true;
38
+ },
39
+ async delete() {
40
+ const webhookData = this.getWorkflowStaticData('node');
41
+ if (webhookData.webhookId !== undefined) {
42
+ const endpoint = `/webhooks/${webhookData.webhookId}`;
43
+ try {
44
+ await GenericFunctions_1.mailerliteApiRequest.call(this, 'DELETE', endpoint);
45
+ }
46
+ catch (error) {
47
+ return false;
48
+ }
49
+ delete webhookData.webhookId;
50
+ }
51
+ return true;
52
+ },
53
+ },
54
+ };
55
+ this.description = {
56
+ ...baseDescription,
57
+ displayName: 'MailerLite Trigger',
58
+ name: 'mailerLiteTrigger',
59
+ group: ['trigger'],
60
+ version: 1,
61
+ description: 'Starts the workflow when MailerLite events occur',
62
+ defaults: {
63
+ name: 'MailerLite Trigger',
64
+ },
65
+ inputs: [],
66
+ outputs: ["main"],
67
+ credentials: [
68
+ {
69
+ name: 'mailerLiteApi',
70
+ required: true,
71
+ },
72
+ ],
73
+ webhooks: [
74
+ {
75
+ name: 'default',
76
+ httpMethod: 'POST',
77
+ responseMode: 'onReceived',
78
+ path: 'webhook',
79
+ },
80
+ ],
81
+ properties: [
82
+ {
83
+ displayName: 'Event',
84
+ name: 'event',
85
+ type: 'options',
86
+ options: [
87
+ {
88
+ name: 'Campaign Sent',
89
+ value: 'campaign.sent',
90
+ description: 'Fired when campaign is sent',
91
+ },
92
+ {
93
+ name: 'Subscriber Added Through Webform',
94
+ value: 'subscriber.added_through_webform',
95
+ description: 'Fired when a subscriber is added though a form',
96
+ },
97
+ {
98
+ name: 'Subscriber Added to Group',
99
+ value: 'subscriber.add_to_group',
100
+ description: 'Fired when a subscriber is added to a group',
101
+ },
102
+ {
103
+ name: 'Subscriber Automation Completed',
104
+ value: 'subscriber.automation_complete',
105
+ description: 'Fired when subscriber finishes automation',
106
+ },
107
+ {
108
+ name: 'Subscriber Automation Triggered',
109
+ value: 'subscriber.automation_triggered',
110
+ description: 'Fired when subscriber starts automation',
111
+ },
112
+ {
113
+ name: 'Subscriber Bounced',
114
+ value: 'subscriber.bounced',
115
+ description: 'Fired when an email address bounces',
116
+ },
117
+ {
118
+ name: 'Subscriber Complained',
119
+ value: 'subscriber.complaint',
120
+ description: 'Fired when subscriber marks a campaign as a spam',
121
+ },
122
+ {
123
+ name: 'Subscriber Created',
124
+ value: 'subscriber.create',
125
+ description: 'Fired when a new subscriber is added to an account',
126
+ },
127
+ {
128
+ name: 'Subscriber Removed From Group',
129
+ value: 'subscriber.remove_from_group',
130
+ description: 'Fired when a subscriber is removed from a group',
131
+ },
132
+ {
133
+ name: 'Subscriber Unsubscribe',
134
+ value: 'subscriber.unsubscribe',
135
+ description: 'Fired when a subscriber becomes unsubscribed',
136
+ },
137
+ {
138
+ name: 'Subscriber Updated',
139
+ value: 'subscriber.update',
140
+ description: "Fired when any of the subscriber's custom fields are updated",
141
+ },
142
+ ],
143
+ required: true,
144
+ default: [],
145
+ description: 'The events to listen to',
146
+ },
147
+ ],
148
+ };
149
+ }
150
+ async webhook() {
151
+ const body = this.getBodyData();
152
+ const events = body.events;
153
+ return {
154
+ workflowData: [this.helpers.returnJsonArray(events)],
155
+ };
156
+ }
157
+ }
158
+ exports.MailerLiteTriggerV1 = MailerLiteTriggerV1;
159
+ //# sourceMappingURL=MailerLiteTriggerV1.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MailerLiteTriggerV1.node.js","sourceRoot":"","sources":["../../../../nodes/M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BACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,yBAAyB;iBACtC;aACD;SACD,CAAC;IACH,CAAC;IA+DD,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAEhC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAuB,CAAC;QAE5C,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACpD,CAAC;IACH,CAAC;CACD;AA1KD,kDA0KC"}
@@ -0,0 +1,12 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, INodeTypeBaseDescription } from 'n8n-workflow';
2
+ import { getCustomFields } from '../GenericFunctions';
3
+ export declare class MailerLiteV1 implements INodeType {
4
+ description: INodeTypeDescription;
5
+ constructor(baseDescription: INodeTypeBaseDescription);
6
+ methods: {
7
+ loadOptions: {
8
+ getCustomFields: typeof getCustomFields;
9
+ };
10
+ };
11
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
12
+ }