n8n-nodes-starter/credentials/ResendApi.credentials.ts
google-labs-jules[bot] 30fca2b5d5 feat: Add Resend node and trigger
Adds a new integration for Resend, an email sending service.

Includes:
- Resend API credential (`ResendApi.credentials.ts`) for API key authentication.
- Resend action node (`nodes/Resend/Resend.node.ts`):
  - Supports "Send Email" operation with parameters for to, from, subject, html, text, cc, bcc, reply_to, and tags.
  - Uses Resend API `https://api.resend.com/emails`.
- Resend trigger node (`nodes/Resend/ResendTrigger.node.ts`):
  - Handles Resend webhooks for various event types (email.sent, email.delivered, etc.).
  - Implements webhook signature verification using Svix and a user-provided signing secret.
  - Allows you to select which events to listen for.
- Official Resend SVG icon (`nodes/Resend/Resend.svg`).
- Adds `svix` as a dependency for webhook verification.
2025-05-26 19:15:32 +00:00

27 lines
554 B
TypeScript

import {
ICredentialType,
INodeProperties,
IAuthData,
} from 'n8n-workflow';
export class ResendApi implements ICredentialType {
name = 'resendApi';
displayName = 'Resend API';
documentationUrl = 'https://resend.com/docs/api-reference/introduction';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
default: '',
required: true,
},
];
// Use IAuthData for authentication
authenticate: IAuthData = {
type: 'apiToken',
properties: {
token: '={{$credentials.apiKey}}'
}
};
}