Compare commits
14 Commits
551ae0d217
...
c4a2bc7164
| Author | SHA1 | Date |
|---|---|---|
|
|
c4a2bc7164 | |
|
|
19cf1de886 | |
|
|
2ead9ed666 | |
|
|
7781dad704 | |
|
|
746ae71601 | |
|
|
4e777970cd | |
|
|
67bb61888b | |
|
|
5b87103fdb | |
|
|
acd874924f | |
|
|
93fcbd45ef | |
|
|
a36244187a | |
|
|
0cf11b32fb | |
|
|
810d6bbf33 | |
|
|
fc75b92a29 |
|
|
@ -36,7 +36,7 @@ Set up CosmoLocal World infrastructure: Mailcow SMTP for cosmolocal.world, Docmo
|
||||||
### Mailcow (cosmolocal.world)
|
### Mailcow (cosmolocal.world)
|
||||||
- Mailbox: noreply@cosmolocal.world
|
- Mailbox: noreply@cosmolocal.world
|
||||||
- Alias: newsletter@cosmolocal.world → noreply@cosmolocal.world (sender_allowed=1)
|
- Alias: newsletter@cosmolocal.world → noreply@cosmolocal.world (sender_allowed=1)
|
||||||
- SMTP: mx.jeffemmett.com:465 (TLS)
|
- SMTP: [SMTP_HOST]:465 (TLS)
|
||||||
- DNS: SPF, DKIM (2048-bit), DMARC all configured on Cloudflare
|
- DNS: SPF, DKIM (2048-bit), DMARC all configured on Cloudflare
|
||||||
- Google Postmaster Tools verified
|
- Google Postmaster Tools verified
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ services:
|
||||||
- DB_POSTGRESDB_PASSWORD=${N8N_DB_PASSWORD}
|
- DB_POSTGRESDB_PASSWORD=${N8N_DB_PASSWORD}
|
||||||
- TWENTY_API_KEY=${TWENTY_API_KEY}
|
- TWENTY_API_KEY=${TWENTY_API_KEY}
|
||||||
- LISTMONK_CREDENTIALS=${LISTMONK_CREDENTIALS}
|
- LISTMONK_CREDENTIALS=${LISTMONK_CREDENTIALS}
|
||||||
- N8N_SMTP_HOST=mx.jeffemmett.com
|
- N8N_SMTP_HOST=${SMTP_HOST}
|
||||||
- N8N_SMTP_PORT=587
|
- N8N_SMTP_PORT=${SMTP_PORT}
|
||||||
- N8N_SMTP_USER=${SMTP_USER}
|
- N8N_SMTP_USER=${SMTP_USER}
|
||||||
- N8N_SMTP_PASS=${SMTP_PASS}
|
- N8N_SMTP_PASS=${SMTP_PASS}
|
||||||
- N8N_SMTP_SENDER=${SMTP_SENDER:-hello@cosmolocal.world}
|
- N8N_SMTP_SENDER=${SMTP_SENDER}
|
||||||
- N8N_EMAIL_MODE=smtp
|
- N8N_EMAIL_MODE=smtp
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
{
|
{
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"fromEmail": "={{ $env.N8N_SMTP_SENDER }}",
|
"fromEmail": "={{ $env.N8N_SMTP_SENDER }}",
|
||||||
"toEmail": "hello@cosmolocal.world",
|
"toEmail": "={{ $env.N8N_SMTP_SENDER }}",
|
||||||
"subject": "={{ $json.subject }}",
|
"subject": "={{ $json.subject }}",
|
||||||
"emailType": "html",
|
"emailType": "html",
|
||||||
"html": "={{ $json.htmlBody }}",
|
"html": "={{ $json.htmlBody }}",
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,18 @@ Import these JSON files into [automate.cosmolocal.world](https://automate.cosmol
|
||||||
|
|
||||||
API keys are passed as **Docker environment variables** in `docker-compose.yml` (n8n community edition doesn't support Settings > Variables). The workflows access them via `$env.VARIABLE_NAME`.
|
API keys are passed as **Docker environment variables** in `docker-compose.yml` (n8n community edition doesn't support Settings > Variables). The workflows access them via `$env.VARIABLE_NAME`.
|
||||||
|
|
||||||
| Variable | Description | Where to find |
|
| Variable | Description |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|
|
||||||
| `TWENTY_API_KEY` | Twenty CRM API key | crm.cosmolocal.world > Settings > API Keys |
|
| `TWENTY_API_KEY` | CRM API key |
|
||||||
| `SMTP_USER` | Mailcow SMTP username | e.g. `hello@cosmolocal.world` |
|
| `SMTP_HOST` | SMTP server hostname |
|
||||||
| `SMTP_PASS` | Mailcow SMTP password | Mailcow admin panel at mx.jeffemmett.com |
|
| `SMTP_PORT` | SMTP server port |
|
||||||
| `LISTMONK_CREDENTIALS` | Listmonk `user:pass` | Internal Docker service credentials |
|
| `SMTP_USER` | SMTP username |
|
||||||
|
| `SMTP_PASS` | SMTP password |
|
||||||
|
| `SMTP_SENDER` | From address for outgoing email |
|
||||||
|
| `LISTMONK_CREDENTIALS` | Listmonk `user:pass` |
|
||||||
|
| `N8N_DB_PASSWORD` | n8n PostgreSQL password |
|
||||||
|
|
||||||
Email is sent via **Mailcow SMTP** (`mx.jeffemmett.com:587` STARTTLS). After importing workflows, create an SMTP credential in n8n named "Mailcow SMTP" with the host/user/pass above.
|
All credentials are stored in `.env` on the server (gitignored). See server admin for values.
|
||||||
|
|
||||||
To set keys, create `/opt/websites/cosmolocal-website/.env` on the server and redeploy.
|
|
||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
|
|
@ -54,7 +56,7 @@ Syncs all CRM contacts with email addresses to Listmonk list #1. Adjust the list
|
||||||
**Trigger:** Weekly on Monday at 9:00 AM
|
**Trigger:** Weekly on Monday at 9:00 AM
|
||||||
**Flow:** Fetch contacts > Filter those not updated in 14+ days > Email report to team
|
**Flow:** Fetch contacts > Filter those not updated in 14+ days > Email report to team
|
||||||
|
|
||||||
Sends an HTML table report to `hello@cosmolocal.world` with stale contacts and a link to the CRM.
|
Sends an HTML table report to the team with stale contacts and a link to the CRM.
|
||||||
|
|
||||||
### 05 — Webhook Events (Git to CRM)
|
### 05 — Webhook Events (Git to CRM)
|
||||||
**Trigger:** Webhook POST to `/webhook/git-events`
|
**Trigger:** Webhook POST to `/webhook/git-events`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue