Files
jetour-bi/n8n/wf_email_monthly.ts
Jetour BI e56d72c644 Add n8n service to docker-compose
- docker-compose: n8n container (port 5678) with PostgreSQL backend
- n8n/: 7 TypeScript workflow files + import script + README
- Workflows: 4 CMS BI data ingestion + 3 email reports
- README: updated with n8n env vars and port
- .dockerignore: exclude import.sh from container
2026-06-18 20:52:36 +00:00

15 lines
773 B
TypeScript

import { workflow, node, trigger, expr } from '@n8n/workflow-sdk';
const cron = trigger({ type: 'n8n-nodes-base.scheduleTrigger', version: 1.3,
config: { name: 'Monthly 1st 05:00 UTC', parameters: { rule: { interval: [{ field: 'cronExpression', expression: '0 5 1 * *' }] } } } });
const sendReport = node({ type: 'n8n-nodes-base.httpRequest', version: 4.4,
config: { name: 'Send Monthly Report', parameters: {
method: 'POST', url: 'http://100.91.25.139:8765/api/send-report/monthly',
sendBody: false, sendHeaders: false,
options: { timeout: 60000, redirect: { redirect: {} }, response: { response: { responseFormat: 'json' } } }
} } });
export default workflow('CMS_BI_EMAIL_MONTHLY', '📧 CMS BI: Monthly Email Report')
.add(cron).to(sendReport);