provisioning-outreach/presentations/rust-laspalmas-250926/docs/sendy-n8n-integration-guide.md

1 line
30 KiB
Markdown
Raw Normal View History

# Sendy + n8n Integration Guide for Rust Meetup 2025\n\n## Overview\n\nComplete integration guide for connecting Sendy (self-hosted email marketing) with your event management stack using n8n for workflow automation on Kubernetes.\n\n## Architecture Overview\n\n```plaintext\nEvent Registration Flow:\nQR Code/Landing Page → Typebot → n8n → Sendy + Baserow + Formbricks\n ↓\nLive Event Polls → Claper → n8n → Sendy Segments + Analytics\n ↓\nPost-Event Follow-up → Automated Email Sequences + Survey Distribution\n```\n\n## Sendy API Integration\n\n### Authentication & Setup\n\n```bash\n# Sendy API Configuration\nSENDY_API_KEY="your-api-key"\nSENDY_INSTALLATION_URL="https://sendy.yourdomain.com"\nSENDY_LIST_ID="your-list-id"\n```\n\n### Key API Endpoints\n\n```javascript\n// Subscribe endpoint\nPOST /api/subscribe.php\n{\n "api_key": "your-api-key",\n "email": "attendee@example.com",\n "list": "list-id",\n "name": "Attendee Name",\n "custom_fields": {\n "registration_source": "rust-meetup-2025",\n "interest_level": "high",\n "experience": "intermediate"\n }\n}\n\n// Unsubscribe endpoint\nPOST /api/unsubscribe.php\n\n// Get subscriber status\nPOST /api/subscriber-status.php\n\n// Create campaign\nPOST /api/create-send.php\n```\n\n## n8n Kubernetes Deployment\n\n### Namespace and ConfigMap\n\n```yaml\n# n8n-namespace.yaml\napiVersion: v1\nkind: Namespace\nmetadata:\n name: n8n-automation\n labels:\n name: n8n-automation\n app: event-automation\n\n---\n# n8n-config.yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: n8n-config\n namespace: n8n-automation\ndata:\n N8N_BASIC_AUTH_ACTIVE: "true"\n N8N_BASIC_AUTH_USER: "admin"\n N8N_HOST: "n8n.rust-meetup.local"\n N8N_PORT: "5678"\n N8N_PROTOCOL: "https"\n WEBHOOK_URL: "https://n8n.rust-meetup.local"\n GENERIC_TIMEZONE: "Europe/Madrid"\n N8N_METRICS: "true"\n N8N_LOG_LEVEL: "info"\n N8N_EDITOR_BASE_URL: "https://n8n.rust-meetup.local"\n N8N_DISABLE_UI: "false"\n N8N_PERSONALIZATION_ENABLED: "false"\n N8N_VERSION_NOTIFICATIONS_ENABLED: "false"\n N8N_DIAGNOSTICS_ENABLED: "false"\n N8N_PUBLIC_API_DISABLED: "false"\n EXECUTIONS_PROCESS: "main"\n EXECUTIONS_MODE: "regular"\n QUEUE_BULL_REDIS_HOST: "redis-cluster"\n QUEUE_BULL_REDIS_PORT: "6379"\n DB_TYPE: "postgresdb"\n DB_POSTGRESDB_HOST: "postgresql-ha-primary"\n DB_POSTGRESDB_PORT: "5432"\n DB_POSTGRESDB_DATABASE: "n8n"\n DB_POSTGRESDB_USER: "n8n"\n```\n\n### Secrets\n\n```yaml\n# n8n-secrets.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n name: n8n-secrets\n namespace: n8n-automation\ntype: Opaque\nstringData:\n N8N_BASIC_AUTH_PASSWORD: "secure-password-here"\n DB_POSTGRESDB_PASSWORD: "postgres-password"\n ENCRYPTION_KEY: "your-encryption-key-32-chars-long"\n # Sendy Configuration\n SENDY_API_KEY: "your-sendy-api-key"\n SENDY_INSTALLATION_URL: "https://sendy.yourdomain.com"\n SENDY_LIST_ID: "rust-meetup-list-id"\n # Integration Keys\n TYPEBOT_API_KEY: "your-typebot-api-key"\n FORMBRICKS_API_KEY: "your-formbricks-api-key"\n BASEROW_API_KEY: "your-baserow-api-key"\n CLAPER_WEBHOOK_SECRET: "claper-webhook-secret"\n```\n\n### PersistentVolumeClaim\n\n```yaml\n# n8n-storage.yaml\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n name: n8n-data\n namespace: n8n-automation\nspec:\n accessModes:\n - ReadWriteOnce\n resources:\n requests:\n storage: 10Gi\n storageClassName: fast-ssd\n```\n\n### Deployment\n\n```yaml\n# n8n-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: n8n\n namespace: n8n-automation\n labels:\n app: n8n\n version: v1\nspec:\n replicas: 1\n selector:\n matchLabels:\n app: n8n\n version: v1\n template:\n metadata:\n labels:\n app: n8n\n version: v1\n spec:\n containers:\n - name: n8n\n image: n8nio/n8n:1.57.0\n ports:\n - containerPort: 5678\n name: http\n envFrom:\n - configMapRef:\n name: n8n-config\n - secretRe