mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-12-16 17:33:01 -06:00
Add Autosend node with Mail and Contact resources
Implement n8n node for Autosend API with support for: - Mail resource: Send single and bulk emails with template or custom content - Contact resource: Create/update contacts (upsert) and get contacts by ID or email - API key authentication - Declarative routing following n8n best practices - Full TypeScript support with proper typing - Passing all linting checks
This commit is contained in:
parent
2e9e5c61ed
commit
2f1ffde4a5
15 changed files with 1142 additions and 7 deletions
53
credentials/AutosendApi.credentials.ts
Normal file
53
credentials/AutosendApi.credentials.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class AutosendApi implements ICredentialType {
|
||||
name = 'autosendApi';
|
||||
|
||||
displayName = 'Autosend API';
|
||||
|
||||
documentationUrl = 'https://docs.autosend.com/';
|
||||
|
||||
icon = 'file:../icons/autosend.svg' as const;
|
||||
|
||||
httpRequestNode = {
|
||||
name: 'Autosend',
|
||||
docsUrl: 'https://docs.autosend.com/',
|
||||
apiBaseUrl: 'https://api.autosend.com/',
|
||||
};
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'API Key',
|
||||
name: 'apiKey',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'API key from your Autosend account settings',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '=Bearer {{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.autosend.com',
|
||||
url: '/contacts',
|
||||
method: 'GET',
|
||||
},
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue