# n8n Workflows Included in the Docker deployment. Workflows mount at `/workflows/`. ## After first boot 1. Open http://localhost:5678 and create your owner account 2. Go to **Settings → n8n API** → Generate an API key 3. Create these credentials in n8n: | Credential Name | Type | Config | |-----------------|------|--------| | `jetour-bi-remote` | PostgreSQL | Host: `db`, Port: `5432`, DB: `jetour-bi`, User: `jetour`, Password: (your DB_PASSWORD) | | `jetour-smtp` | SMTP | Your email server details | 4. Import workflows: ```bash docker compose exec n8n sh /workflows/import.sh ``` ## Workflows | File | Trigger | What it does | |------|---------|-------------| | `wf1_prospects_created.ts` | 02:00 SAST | Fetch new prospects from CMS BI API | | `wf2_prospects_updated.ts` | 02:10 SAST | Fetch prospect changes from CMS BI | | `wf3_otps_created.ts` | 02:20 SAST | Fetch new OTPs from CMS BI | | `wf4_otps_updated.ts` | 02:50 SAST | Fetch OTP changes from CMS BI | | `wf_email_daily.ts` | 07:00 SAST | POST /api/send-report/daily → email | | `wf_email_weekly.ts` | Mon 07:00 | POST /api/send-report/weekly → email | | `wf_email_monthly.ts` | 1st 07:00 | POST /api/send-report/monthly → email | ## Manual import (alternative) If the script fails, use n8n's built-in import in the UI: 1. Go to **Workflows → Import from File** 2. Select each `.ts` file in this directory