n8n-resend 1.0.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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +256 -0
  3. package/dist/credentials/ResendApi.credentials.d.ts +10 -0
  4. package/dist/credentials/ResendApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/ResendApi.credentials.js +40 -0
  6. package/dist/credentials/ResendApi.credentials.js.map +1 -0
  7. package/dist/nodes/Resend/Resend.node.d.ts +14 -0
  8. package/dist/nodes/Resend/Resend.node.d.ts.map +1 -0
  9. package/dist/nodes/Resend/Resend.node.js +55 -0
  10. package/dist/nodes/Resend/Resend.node.js.map +1 -0
  11. package/dist/nodes/Resend/ResendTrigger.node.d.ts +13 -0
  12. package/dist/nodes/Resend/ResendTrigger.node.d.ts.map +1 -0
  13. package/dist/nodes/Resend/ResendTrigger.node.js +210 -0
  14. package/dist/nodes/Resend/ResendTrigger.node.js.map +1 -0
  15. package/dist/nodes/Resend/constants.d.ts +12 -0
  16. package/dist/nodes/Resend/constants.d.ts.map +1 -0
  17. package/dist/nodes/Resend/constants.js +15 -0
  18. package/dist/nodes/Resend/constants.js.map +1 -0
  19. package/dist/nodes/Resend/resend.svg +3 -0
  20. package/dist/nodes/Resend/resources/broadcasts.d.ts +3 -0
  21. package/dist/nodes/Resend/resources/broadcasts.d.ts.map +1 -0
  22. package/dist/nodes/Resend/resources/broadcasts.js +330 -0
  23. package/dist/nodes/Resend/resources/broadcasts.js.map +1 -0
  24. package/dist/nodes/Resend/resources/contacts.d.ts +3 -0
  25. package/dist/nodes/Resend/resources/contacts.d.ts.map +1 -0
  26. package/dist/nodes/Resend/resources/contacts.js +269 -0
  27. package/dist/nodes/Resend/resources/contacts.js.map +1 -0
  28. package/dist/nodes/Resend/resources/emails.d.ts +3 -0
  29. package/dist/nodes/Resend/resources/emails.d.ts.map +1 -0
  30. package/dist/nodes/Resend/resources/emails.js +417 -0
  31. package/dist/nodes/Resend/resources/emails.js.map +1 -0
  32. package/dist/nodes/Resend/resources/index.d.ts +7 -0
  33. package/dist/nodes/Resend/resources/index.d.ts.map +1 -0
  34. package/dist/nodes/Resend/resources/index.js +16 -0
  35. package/dist/nodes/Resend/resources/index.js.map +1 -0
  36. package/dist/nodes/Resend/resources/segments.d.ts +3 -0
  37. package/dist/nodes/Resend/resources/segments.d.ts.map +1 -0
  38. package/dist/nodes/Resend/resources/segments.js +137 -0
  39. package/dist/nodes/Resend/resources/segments.js.map +1 -0
  40. package/dist/nodes/Resend/resources/templates.d.ts +3 -0
  41. package/dist/nodes/Resend/resources/templates.d.ts.map +1 -0
  42. package/dist/nodes/Resend/resources/templates.js +48 -0
  43. package/dist/nodes/Resend/resources/templates.js.map +1 -0
  44. package/dist/nodes/Resend/resources/topics.d.ts +3 -0
  45. package/dist/nodes/Resend/resources/topics.d.ts.map +1 -0
  46. package/dist/nodes/Resend/resources/topics.js +210 -0
  47. package/dist/nodes/Resend/resources/topics.js.map +1 -0
  48. package/dist/nodes/Resend/types.d.ts +146 -0
  49. package/dist/nodes/Resend/types.d.ts.map +1 -0
  50. package/dist/nodes/Resend/types.js +3 -0
  51. package/dist/nodes/Resend/types.js.map +1 -0
  52. package/dist/nodes/Resend/utils/attachmentHelpers.d.ts +15 -0
  53. package/dist/nodes/Resend/utils/attachmentHelpers.d.ts.map +1 -0
  54. package/dist/nodes/Resend/utils/attachmentHelpers.js +91 -0
  55. package/dist/nodes/Resend/utils/attachmentHelpers.js.map +1 -0
  56. package/dist/nodes/Resend/utils/commonFields.d.ts +9 -0
  57. package/dist/nodes/Resend/utils/commonFields.d.ts.map +1 -0
  58. package/dist/nodes/Resend/utils/commonFields.js +82 -0
  59. package/dist/nodes/Resend/utils/commonFields.js.map +1 -0
  60. package/dist/nodes/Resend/utils/fieldBuilders.d.ts +8 -0
  61. package/dist/nodes/Resend/utils/fieldBuilders.d.ts.map +1 -0
  62. package/dist/nodes/Resend/utils/fieldBuilders.js +226 -0
  63. package/dist/nodes/Resend/utils/fieldBuilders.js.map +1 -0
  64. package/dist/nodes/Resend/utils/loadOptionsHelpers.d.ts +18 -0
  65. package/dist/nodes/Resend/utils/loadOptionsHelpers.d.ts.map +1 -0
  66. package/dist/nodes/Resend/utils/loadOptionsHelpers.js +128 -0
  67. package/dist/nodes/Resend/utils/loadOptionsHelpers.js.map +1 -0
  68. package/dist/nodes/Resend/utils/nodeBuilder.d.ts +4 -0
  69. package/dist/nodes/Resend/utils/nodeBuilder.d.ts.map +1 -0
  70. package/dist/nodes/Resend/utils/nodeBuilder.js +44 -0
  71. package/dist/nodes/Resend/utils/nodeBuilder.js.map +1 -0
  72. package/dist/nodes/Resend/utils/requestBuilders.d.ts +18 -0
  73. package/dist/nodes/Resend/utils/requestBuilders.d.ts.map +1 -0
  74. package/dist/nodes/Resend/utils/requestBuilders.js +55 -0
  75. package/dist/nodes/Resend/utils/requestBuilders.js.map +1 -0
  76. package/dist/nodes/Resend/utils/templateHelpers.d.ts +17 -0
  77. package/dist/nodes/Resend/utils/templateHelpers.d.ts.map +1 -0
  78. package/dist/nodes/Resend/utils/templateHelpers.js +63 -0
  79. package/dist/nodes/Resend/utils/templateHelpers.js.map +1 -0
  80. package/package.json +65 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Carlos Martínez García-Villarrubia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,256 @@
1
+ <div align="center">
2
+ <img src="./nodes/Resend/resend.svg" alt="Resend Logo" width="120" height="120">
3
+
4
+ # n8n-nodes-resend
5
+
6
+ **Modern Email API Integration for n8n**
7
+
8
+ [![npm version](https://img.shields.io/npm/v/n8n-resend.svg)](https://www.npmjs.com/package/n8n-resend)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![CI](https://github.com/carlosmgv02/n8n-nodes-resend/actions/workflows/ci.yml/badge.svg)](https://github.com/carlosmgv02/n8n-nodes-resend/actions/workflows/ci.yml)
11
+
12
+ [Installation](#installation) • [Features](#key-features) • [Usage](#usage-examples) • [Contributing](CONTRIBUTING.md)
13
+ </div>
14
+
15
+ ---
16
+
17
+ This is an n8n community node for [Resend](https://resend.com) - a modern email API for developers. It lets you send transactional emails, manage contacts and segments, and send marketing broadcasts directly from your n8n workflows.
18
+
19
+ [n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.
20
+
21
+ ## Installation
22
+
23
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
24
+
25
+ ### Community Nodes (Recommended)
26
+
27
+ 1. Go to **Settings > Community Nodes**
28
+ 2. Click **Install**
29
+ 3. Enter `n8n-resend` in the npm Package Name field
30
+ 4. Click **Install**
31
+
32
+ ### Manual Installation
33
+
34
+ ```bash
35
+ npm install n8n-resend
36
+ ```
37
+
38
+ ## Configuration
39
+
40
+ 1. Get your API key from [Resend Dashboard](https://resend.com/api-keys)
41
+ 2. In n8n, create new Resend API credentials
42
+ 3. Paste your API key
43
+
44
+ ## Nodes Included
45
+
46
+ This package includes two nodes:
47
+
48
+ 1. **Resend** - Main node for sending emails, managing contacts, segments, broadcasts, topics, and templates
49
+ 2. **Resend Trigger** - Webhook trigger to react to Resend events in real-time
50
+
51
+ ## Resources & Operations
52
+
53
+ ### Resend Node
54
+
55
+ #### Email
56
+ - **Send** - Send a transactional email with attachments, templates, headers, and tags
57
+ - **Send Batch** - Send up to 100 emails in a single request
58
+ - **List** - List all sent emails with pagination
59
+ - **Get** - Retrieve a specific email by ID
60
+ - **Cancel** - Cancel a scheduled email
61
+ - **Update** - Update a scheduled email
62
+
63
+ ### Contact
64
+ - **Create** - Create a new contact with custom properties
65
+ - **List** - List all contacts with pagination
66
+ - **Get** - Get a contact by ID or email
67
+ - **Update** - Update contact information
68
+ - **Delete** - Delete a contact
69
+ - **Add to Segment** - Assign a contact to a segment
70
+ - **Remove from Segment** - Remove a contact from a segment
71
+
72
+ ### Segment
73
+ - **Create** - Create a new segment for organizing contacts
74
+ - **List** - List all segments
75
+ - **Get** - Get a specific segment
76
+ - **Update** - Update segment details
77
+ - **Delete** - Delete a segment
78
+
79
+ ### Broadcast
80
+ - **Create** - Create a new broadcast email campaign
81
+ - **List** - List all broadcasts
82
+ - **Get** - Get a specific broadcast
83
+ - **Update** - Update broadcast content
84
+ - **Send** - Send a broadcast immediately or schedule for later
85
+ - **Delete** - Delete a broadcast (draft only)
86
+
87
+ ### Topic
88
+ - **Create** - Create a new topic for email preferences
89
+ - **List** - List all topics
90
+ - **Get** - Get a specific topic
91
+ - **Update** - Update topic details
92
+ - **Delete** - Delete a topic
93
+
94
+ #### Template
95
+ - **List** - List all email templates
96
+ - **Get** - Get a specific template by ID or alias
97
+
98
+ ### Resend Trigger Node
99
+
100
+ The Resend Trigger node allows you to react to events from Resend in real-time using webhooks.
101
+
102
+ #### Supported Events
103
+
104
+ **Email Events:**
105
+ - **Email Sent** - When an email is successfully sent
106
+ - **Email Delivered** - When an email is delivered to the recipient
107
+ - **Email Delivery Delayed** - When email delivery is delayed
108
+ - **Email Opened** - When a recipient opens an email
109
+ - **Email Clicked** - When a recipient clicks a link in an email
110
+ - **Email Bounced** - When an email bounces
111
+ - **Email Complained** - When a recipient marks an email as spam
112
+
113
+ **Contact Events:**
114
+ - **Contact Created** - When a new contact is created
115
+ - **Contact Updated** - When a contact is updated
116
+ - **Contact Deleted** - When a contact is deleted
117
+
118
+ **Domain Events:**
119
+ - **Domain Created** - When a new domain is created
120
+ - **Domain Updated** - When a domain is updated
121
+ - **Domain Deleted** - When a domain is deleted
122
+
123
+ #### Setup
124
+
125
+ 1. Add the Resend Trigger node to your workflow
126
+ 2. Copy the webhook URL from the node
127
+ 3. Go to your [Resend Webhooks settings](https://resend.com/webhooks)
128
+ 4. Create a new webhook and paste the URL
129
+ 5. Copy the **Webhook Signing Secret** (starts with `whsec_`)
130
+ 6. Paste the signing secret in the node configuration
131
+ 7. Select the events you want to listen for
132
+ 8. Activate your workflow
133
+
134
+ #### Security
135
+
136
+ The trigger automatically verifies webhook signatures using Svix to ensure requests come from Resend. This prevents unauthorized webhook calls.
137
+
138
+ ## Key Features
139
+
140
+ ### Dynamic Dropdowns
141
+ The node provides smart dropdowns that automatically load:
142
+ - **Segments** - Select from your existing segments
143
+ - **Domains** - Choose from verified domains
144
+ - **Topics** - Pick topics for preference management
145
+ - **Templates** - Use your saved email templates
146
+
147
+ ### Email Attachments
148
+ Full support for email attachments:
149
+ - Binary data from previous nodes
150
+ - Inline images with Content-ID (CID) for embedding in HTML
151
+ - Multiple attachments per email
152
+ - Automatic base64 encoding
153
+ - Size validation (40MB limit)
154
+
155
+ ### Template Variables
156
+ Dynamic template variable injection:
157
+ - Key-value pairs for template variables
158
+ - Automatic type detection (string/number)
159
+ - Support for Resend's variable syntax `{{{VARIABLE_NAME}}}`
160
+
161
+ ### Custom Headers & Tags
162
+ - Add custom email headers for advanced use cases
163
+ - Tag emails for tracking and categorization
164
+ - Support for List-Unsubscribe headers
165
+
166
+ ### Scheduling
167
+ Schedule emails and broadcasts:
168
+ - Natural language: "in 1 hour", "tomorrow at 9am"
169
+ - ISO 8601 format: "2024-12-25T09:00:00Z"
170
+
171
+ ## Usage Examples
172
+
173
+ ### Send a Simple Email
174
+ 1. Add Resend node to your workflow
175
+ 2. Select **Email** resource
176
+ 3. Select **Send** operation
177
+ 4. Fill in From, To, Subject, and HTML fields
178
+
179
+ ### Send Email with Template
180
+ 1. Select **Email** > **Send**
181
+ 2. Enable **Use Template**
182
+ 3. Select your template from the dropdown
183
+ 4. Add template variables as needed
184
+
185
+ ### Send Email with Attachments
186
+ 1. Use HTTP Request or Read Binary File node before Resend
187
+ 2. In Resend node: **Email** > **Send**
188
+ 3. Add **Attachments**
189
+ 4. Set **Binary Property** to the name of your binary data (e.g., "data")
190
+ 5. Optionally set filename and Content-ID for inline images
191
+
192
+ ### Create and Send a Broadcast
193
+ 1. **Segment** > **Create** - Create your audience segment
194
+ 2. **Contact** > **Create** - Add contacts to your list
195
+ 3. **Contact** > **Add to Segment** - Assign contacts to the segment
196
+ 4. **Broadcast** > **Create** - Create your broadcast email
197
+ 5. **Broadcast** > **Send** - Send to your segment
198
+
199
+ ### Manage Contact Preferences with Topics
200
+ 1. **Topic** > **Create** - Create topics (e.g., "Newsletter", "Product Updates")
201
+ 2. **Email** > **Send** - Include `topicId` when sending
202
+ 3. Contacts can manage their preferences via unsubscribe page
203
+
204
+ ### React to Email Events with Trigger
205
+ 1. **Resend Trigger** - Configure webhook to listen for "Email Opened" events
206
+ 2. **IF Node** - Check if email was opened more than once
207
+ 3. **Resend** > **Contact** > **Update** - Tag contact as "highly engaged"
208
+ 4. Automatically segment your most engaged subscribers
209
+
210
+ ## API Limits
211
+
212
+ - **Attachments**: Maximum 40MB total per email
213
+ - **Batch Emails**: Up to 100 emails per batch request
214
+ - **Rate Limits**: Varies by Resend plan
215
+
216
+ ## Resources
217
+
218
+ - [Resend Documentation](https://resend.com/docs)
219
+ - [Resend API Reference](https://resend.com/docs/api-reference)
220
+ - [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)
221
+
222
+ ## License
223
+
224
+ MIT
225
+
226
+ ## Contributing
227
+
228
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on:
229
+ - Development setup
230
+ - Code standards
231
+ - Pull request process
232
+ - Release workflow
233
+
234
+ ## Development
235
+
236
+ ```bash
237
+ # Install dependencies
238
+ npm install
239
+
240
+ # Build
241
+ npm run build
242
+
243
+ # Lint
244
+ npm run lint
245
+
246
+ # Watch mode
247
+ npm run dev
248
+ ```
249
+
250
+ ## Support
251
+
252
+ For bugs and feature requests, please [create an issue](https://github.com/carlosmgv02/n8n-nodes-resend/issues).
253
+
254
+ ## Compatibility
255
+
256
+ This node has been tested with n8n version 1.0.0 and above.
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class ResendApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=ResendApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResendApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/ResendApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,eAAe;IAChD,IAAI,SAAe;IACnB,WAAW,SAAgB;IAC3B,gBAAgB,SAAwD;IACxE,UAAU,EAAE,eAAe,EAAE,CAY3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResendApi = void 0;
4
+ class ResendApi {
5
+ constructor() {
6
+ this.name = 'resendApi';
7
+ this.displayName = 'Resend API';
8
+ this.documentationUrl = 'https://resend.com/docs/api-reference/introduction';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: {
15
+ password: true,
16
+ },
17
+ default: '',
18
+ required: true,
19
+ description: 'Your Resend API key. Get it from https://resend.com/api-keys',
20
+ },
21
+ ];
22
+ this.authenticate = {
23
+ type: 'generic',
24
+ properties: {
25
+ headers: {
26
+ Authorization: '=Bearer {{$credentials.apiKey}}',
27
+ },
28
+ },
29
+ };
30
+ this.test = {
31
+ request: {
32
+ baseURL: 'https://api.resend.com',
33
+ url: '/domains',
34
+ method: 'GET',
35
+ },
36
+ };
37
+ }
38
+ }
39
+ exports.ResendApi = ResendApi;
40
+ //# sourceMappingURL=ResendApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResendApi.credentials.js","sourceRoot":"","sources":["../../credentials/ResendApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,oDAAoD,CAAC;QACxE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,8DAA8D;aAC3E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAlCD,8BAkCC"}
@@ -0,0 +1,14 @@
1
+ import { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ import { getSegments, getTopics, getTemplates, getTemplateVariables } from './utils/loadOptionsHelpers';
3
+ export declare class Resend implements INodeType {
4
+ description: INodeTypeDescription;
5
+ methods: {
6
+ loadOptions: {
7
+ getSegments: typeof getSegments;
8
+ getTopics: typeof getTopics;
9
+ getTemplates: typeof getTemplates;
10
+ getTemplateVariables: typeof getTemplateVariables;
11
+ };
12
+ };
13
+ }
14
+ //# sourceMappingURL=Resend.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resend.node.d.ts","sourceRoot":"","sources":["../../../nodes/Resend/Resend.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,oBAAoB,EAGpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,WAAW,EACX,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,MAAM,4BAA4B,CAAC;AAUpC,qBAAa,MAAO,YAAW,SAAS;IACvC,WAAW,EAAE,oBAAoB,CAkC/B;IAEF,OAAO;;;;;;;MAOL;CACF"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Resend = void 0;
4
+ const nodeBuilder_1 = require("./utils/nodeBuilder");
5
+ const loadOptionsHelpers_1 = require("./utils/loadOptionsHelpers");
6
+ const resources_1 = require("./resources");
7
+ class Resend {
8
+ constructor() {
9
+ this.description = {
10
+ displayName: 'Resend',
11
+ name: 'resend',
12
+ icon: 'file:resend.svg',
13
+ group: ['transform'],
14
+ version: 1,
15
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
16
+ description: 'Interact with Resend API - Email marketing and transactional emails',
17
+ defaults: {
18
+ name: 'Resend',
19
+ },
20
+ inputs: ['main'],
21
+ outputs: ['main'],
22
+ credentials: [
23
+ {
24
+ name: 'resendApi',
25
+ required: true,
26
+ },
27
+ ],
28
+ requestDefaults: {
29
+ baseURL: 'https://api.resend.com',
30
+ headers: {
31
+ Accept: 'application/json',
32
+ 'Content-Type': 'application/json',
33
+ },
34
+ },
35
+ properties: (0, nodeBuilder_1.buildResendNode)([
36
+ resources_1.emailsResource,
37
+ resources_1.contactsResource,
38
+ resources_1.segmentsResource,
39
+ resources_1.broadcastsResource,
40
+ resources_1.topicsResource,
41
+ resources_1.templatesResource,
42
+ ]),
43
+ };
44
+ this.methods = {
45
+ loadOptions: {
46
+ getSegments: loadOptionsHelpers_1.getSegments,
47
+ getTopics: loadOptionsHelpers_1.getTopics,
48
+ getTemplates: loadOptionsHelpers_1.getTemplates,
49
+ getTemplateVariables: loadOptionsHelpers_1.getTemplateVariables,
50
+ },
51
+ };
52
+ }
53
+ }
54
+ exports.Resend = Resend;
55
+ //# sourceMappingURL=Resend.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resend.node.js","sourceRoot":"","sources":["../../../nodes/Resend/Resend.node.ts"],"names":[],"mappings":";;;AAOA,qDAAsD;AACtD,mEAKoC;AACpC,2CAOqB;AAErB,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,QAAQ;YACrB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE;gBACT,IAAI,EAAE,QAAQ;aACd;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,wBAAwB;gBACjC,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE,IAAA,6BAAe,EAAC;gBAC3B,0BAAc;gBACd,4BAAgB;gBAChB,4BAAgB;gBAChB,8BAAkB;gBAClB,0BAAc;gBACd,6BAAiB;aACjB,CAAC;SACF,CAAC;QAEF,YAAO,GAAG;YACT,WAAW,EAAE;gBACZ,WAAW,EAAX,gCAAW;gBACX,SAAS,EAAT,8BAAS;gBACT,YAAY,EAAZ,iCAAY;gBACZ,oBAAoB,EAApB,yCAAoB;aACpB;SACD,CAAC;IACH,CAAC;CAAA;AA7CD,wBA6CC"}
@@ -0,0 +1,13 @@
1
+ import { IHookFunctions, IWebhookFunctions, IWebhookResponseData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class ResendTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
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
+ }
13
+ //# sourceMappingURL=ResendTrigger.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResendTrigger.node.d.ts","sourceRoot":"","sources":["../../../nodes/Resend/ResendTrigger.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AA6CtB,qBAAa,aAAc,YAAW,SAAS;IAC9C,WAAW,EAAE,oBAAoB,CA0H/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAyErE,cAAc;;8BAEY,cAAc,GAAG,QAAQ,OAAO,CAAC;yBAGtC,cAAc,GAAG,QAAQ,OAAO,CAAC;yBAGjC,cAAc,GAAG,QAAQ,OAAO,CAAC;;MAIpD;CACF"}
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResendTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ /**
6
+ * Verify Svix webhook signature using Web Crypto API
7
+ * Resend uses Svix for webhook signing
8
+ */
9
+ async function verifySvixSignature(payload, svixId, svixTimestamp, svixSignature, webhookSigningSecret) {
10
+ const secret = webhookSigningSecret.replace(/^whsec_/, '');
11
+ const secretBytes = Uint8Array.from(atob(secret), (c) => c.charCodeAt(0));
12
+ const signedPayload = `${svixId}.${svixTimestamp}.${payload}`;
13
+ const payloadBytes = new TextEncoder().encode(signedPayload);
14
+ const key = await globalThis.crypto.subtle.importKey('raw', secretBytes, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
15
+ const signatureBuffer = await globalThis.crypto.subtle.sign('HMAC', key, payloadBytes);
16
+ const expectedSignature = btoa(String.fromCharCode(...new Uint8Array(signatureBuffer)));
17
+ const signatures = svixSignature.split(' ');
18
+ for (const sig of signatures) {
19
+ const [version, signature] = sig.split(',');
20
+ if (version === 'v1' && signature === expectedSignature) {
21
+ return;
22
+ }
23
+ }
24
+ throw new n8n_workflow_1.NodeOperationError({}, 'Invalid webhook signature - ensure your signing secret is correct');
25
+ }
26
+ class ResendTrigger {
27
+ constructor() {
28
+ this.description = {
29
+ displayName: 'Resend Trigger',
30
+ name: 'resendTrigger',
31
+ icon: 'file:resend.svg',
32
+ group: ['trigger'],
33
+ version: 1,
34
+ description: 'Trigger workflows on Resend webhook events (email sent, delivered, opened, clicked, bounced, etc.)',
35
+ subtitle: '={{$parameter["events"].join(", ")}}',
36
+ defaults: {
37
+ name: 'Resend Trigger',
38
+ },
39
+ triggerPanel: {
40
+ header: 'Copy the webhook URL below and configure it in your Resend dashboard',
41
+ executionsHelp: {
42
+ inactive: 'Webhooks have two modes: test and production.<br><br><b>Test mode:</b> Click "Listen for test event", then configure the test URL in Resend. Executions appear in the editor.<br><br><b>Production mode:</b> Activate the workflow, then configure the production URL in Resend. Executions appear in the executions list.',
43
+ active: 'Webhooks have two modes: test and production.<br><br><b>Test mode:</b> Click "Listen for test event", then configure the test URL in Resend. Executions appear in the editor.<br><br><b>Production mode:</b> The workflow is active. Configure the production URL in Resend. Executions appear in the executions list.',
44
+ },
45
+ activationHint: 'Activate the workflow to use the production webhook URL in Resend.',
46
+ },
47
+ inputs: [],
48
+ outputs: ['main'],
49
+ webhooks: [
50
+ {
51
+ name: 'default',
52
+ httpMethod: 'POST',
53
+ responseMode: 'onReceived',
54
+ path: 'webhook',
55
+ },
56
+ ],
57
+ properties: [
58
+ {
59
+ displayName: 'Webhook Signing Secret',
60
+ name: 'webhookSigningSecret',
61
+ type: 'string',
62
+ typeOptions: {
63
+ password: true,
64
+ },
65
+ default: '',
66
+ required: true,
67
+ placeholder: 'whsec_...',
68
+ description: 'Webhook signing secret from your Resend webhook configuration. Required for security.',
69
+ },
70
+ {
71
+ displayName: 'Events',
72
+ name: 'events',
73
+ type: 'multiOptions',
74
+ required: true,
75
+ default: ['email.sent'],
76
+ options: [
77
+ {
78
+ name: 'Email Sent',
79
+ value: 'email.sent',
80
+ description: 'Triggered when an email is successfully sent',
81
+ },
82
+ {
83
+ name: 'Email Delivered',
84
+ value: 'email.delivered',
85
+ description: 'Triggered when an email is delivered to the recipient',
86
+ },
87
+ {
88
+ name: 'Email Delivery Delayed',
89
+ value: 'email.delivery_delayed',
90
+ description: 'Triggered when email delivery is delayed',
91
+ },
92
+ {
93
+ name: 'Email Bounced',
94
+ value: 'email.bounced',
95
+ description: 'Triggered when an email bounces',
96
+ },
97
+ {
98
+ name: 'Email Opened',
99
+ value: 'email.opened',
100
+ description: 'Triggered when a recipient opens an email',
101
+ },
102
+ {
103
+ name: 'Email Clicked',
104
+ value: 'email.clicked',
105
+ description: 'Triggered when a recipient clicks a link in an email',
106
+ },
107
+ {
108
+ name: 'Email Complained',
109
+ value: 'email.complained',
110
+ description: 'Triggered when a recipient marks an email as spam',
111
+ },
112
+ {
113
+ name: 'Contact Created',
114
+ value: 'contact.created',
115
+ description: 'Triggered when a new contact is created',
116
+ },
117
+ {
118
+ name: 'Contact Updated',
119
+ value: 'contact.updated',
120
+ description: 'Triggered when a contact is updated',
121
+ },
122
+ {
123
+ name: 'Contact Deleted',
124
+ value: 'contact.deleted',
125
+ description: 'Triggered when a contact is deleted',
126
+ },
127
+ {
128
+ name: 'Domain Created',
129
+ value: 'domain.created',
130
+ description: 'Triggered when a new domain is created',
131
+ },
132
+ {
133
+ name: 'Domain Updated',
134
+ value: 'domain.updated',
135
+ description: 'Triggered when a domain is updated',
136
+ },
137
+ {
138
+ name: 'Domain Deleted',
139
+ value: 'domain.deleted',
140
+ description: 'Triggered when a domain is deleted',
141
+ },
142
+ ],
143
+ description: 'Select the Resend events to listen for. Multiple events can be selected.',
144
+ },
145
+ ],
146
+ };
147
+ this.webhookMethods = {
148
+ default: {
149
+ async checkExists() {
150
+ return true;
151
+ },
152
+ async create() {
153
+ return true;
154
+ },
155
+ async delete() {
156
+ return true;
157
+ },
158
+ },
159
+ };
160
+ }
161
+ async webhook() {
162
+ const bodyData = this.getBodyData();
163
+ const headers = this.getHeaderData();
164
+ const subscribedEvents = this.getNodeParameter('events');
165
+ const webhookSigningSecret = this.getNodeParameter('webhookSigningSecret');
166
+ if (webhookSigningSecret && webhookSigningSecret.trim() !== '') {
167
+ try {
168
+ const payload = JSON.stringify(bodyData);
169
+ const svixId = (Array.isArray(headers['svix-id']) ? headers['svix-id'][0] : headers['svix-id']) ||
170
+ (Array.isArray(headers['Svix-Id']) ? headers['Svix-Id'][0] : headers['Svix-Id']) ||
171
+ '';
172
+ const svixTimestamp = (Array.isArray(headers['svix-timestamp'])
173
+ ? headers['svix-timestamp'][0]
174
+ : headers['svix-timestamp']) ||
175
+ (Array.isArray(headers['Svix-Timestamp'])
176
+ ? headers['Svix-Timestamp'][0]
177
+ : headers['Svix-Timestamp']) ||
178
+ '';
179
+ const svixSignature = (Array.isArray(headers['svix-signature'])
180
+ ? headers['svix-signature'][0]
181
+ : headers['svix-signature']) ||
182
+ (Array.isArray(headers['Svix-Signature'])
183
+ ? headers['Svix-Signature'][0]
184
+ : headers['Svix-Signature']) ||
185
+ '';
186
+ if (!svixId || !svixTimestamp || !svixSignature) {
187
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Missing required Svix headers for webhook verification');
188
+ }
189
+ await verifySvixSignature(payload, svixId, svixTimestamp, svixSignature, webhookSigningSecret);
190
+ }
191
+ catch (error) {
192
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Webhook signature verification failed: ${error.message}`);
193
+ }
194
+ }
195
+ if (!bodyData || typeof bodyData !== 'object' || !('type' in bodyData)) {
196
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid webhook payload - expected JSON object with "type" field');
197
+ }
198
+ const eventType = bodyData.type;
199
+ if (!subscribedEvents.includes(eventType)) {
200
+ return {
201
+ workflowData: [[]],
202
+ };
203
+ }
204
+ return {
205
+ workflowData: [this.helpers.returnJsonArray([bodyData])],
206
+ };
207
+ }
208
+ }
209
+ exports.ResendTrigger = ResendTrigger;
210
+ //# sourceMappingURL=ResendTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResendTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Resend/ResendTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB;;;GAGG;AACH,KAAK,UAAU,mBAAmB,CACjC,OAAe,EACf,MAAc,EACd,aAAqB,EACrB,aAAqB,EACrB,oBAA4B;IAE5B,MAAM,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC3D,MAA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EAAE,CAAC;aAClB,CAAC;QACH,CAAC;QAED,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;SACxD,CAAC;IACH,CAAC;CAeD;AAnND,sCAmNC"}
@@ -0,0 +1,12 @@
1
+ export declare const PAGINATION: {
2
+ readonly DEFAULT_LIMIT: 20;
3
+ readonly MAX_LIMIT: 100;
4
+ };
5
+ export declare const ATTACHMENT: {
6
+ readonly MAX_SIZE_BYTES: number;
7
+ readonly MAX_SIZE_MB: 40;
8
+ };
9
+ export declare const BATCH_EMAIL: {
10
+ readonly MAX_COUNT: 100;
11
+ };
12
+ //# sourceMappingURL=constants.d.ts.map