Replace Resend with n8n webhook relay for emails

- email.ts: POST to N8N_EMAIL_WEBHOOK_URL instead of Resend API
- env.ts: replace RESEND_API_KEY with N8N_EMAIL_WEBHOOK_URL
- .env.example: document new env var
- Add n8n workflow JSON (Webhook -> Gmail -> Respond) ready to import
This commit is contained in:
2026-04-30 12:02:04 +01:00
parent adcedb7cfd
commit 5912955b9c
4 changed files with 89 additions and 24 deletions

View File

@@ -0,0 +1,71 @@
{
"name": "Naturcalabacera - Email Relay",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "naturcalabacera-email",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-naturcalabacera",
"name": "Webhook (POST email)",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [240, 300]
},
{
"parameters": {
"sendTo": "={{ $json.body.to }}",
"subject": "={{ $json.body.subject }}",
"emailType": "html",
"message": "={{ $json.body.html }}",
"options": {}
},
"id": "gmail-send",
"name": "Gmail — Enviar",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [520, 300]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ { success: true, id: $json.id } }}",
"options": {}
},
"id": "respond-ok",
"name": "Responder OK",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [800, 300]
}
],
"connections": {
"Webhook (POST email)": {
"main": [
[
{
"node": "Gmail — Enviar",
"type": "main",
"index": 0
}
]
]
},
"Gmail — Enviar": {
"main": [
[
{
"node": "Responder OK",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}