infra/stacks/n8n/workflows/job-hunter-weekly-digest.json
Viktor Barzin e7ce545da2 [job-hunter] Add infra stack + Grafana dashboard + n8n digest workflow
New service stack at stacks/job-hunter/ mirroring the payslip-ingest
pattern: per-service CNPG database + role (via dbaas null_resource),
Vault static role pg-job-hunter (7d rotation), ExternalSecrets for app
secrets and DB creds, Deployment with alembic-migrate init container,
ClusterIP Service, Grafana datasource ConfigMap.

Grafana dashboard job-hunter.json in Finance folder: new roles per
day, source breakdown, top companies, GBP salary distribution, recent
roles table (sorted by parse confidence then salary).

n8n weekly-digest workflow calls POST /digest/generate with bearer
auth every Monday 07:00 London; digest_runs table provides
idempotency.

Refs: code-snp

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 17:09:29 +00:00

49 lines
1.5 KiB
JSON

{
"name": "Job Hunter Weekly Digest",
"active": false,
"nodes": [
{
"parameters": {
"rule": {
"interval": [{"field": "weeks", "triggerAtDay": [1], "triggerAtHour": 7, "triggerAtMinute": 0}]
}
},
"id": "cron-weekly",
"name": "Weekly Monday 07:00 London",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.1,
"position": [250, 300]
},
{
"parameters": {
"method": "POST",
"url": "http://job-hunter.job-hunter.svc.cluster.local:8080/digest/generate",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{"name": "Authorization", "value": "=Bearer {{ $env.JOB_HUNTER_WEBHOOK_TOKEN }}"},
{"name": "Content-Type", "value": "application/json"}
]
},
"sendBody": true,
"contentType": "json",
"jsonBody": "={\"window_days\":7,\"limit\":50,\"dry_run\":false}",
"options": {"timeout": 120000}
},
"id": "digest-generate",
"name": "Call /digest/generate",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [500, 300]
}
],
"connections": {
"Weekly Monday 07:00 London": {
"main": [[{"node": "Call /digest/generate", "type": "main", "index": 0}]]
}
},
"settings": {"executionOrder": "v1", "saveExecutionProgress": false, "saveManualExecutions": true},
"staticData": null,
"meta": {"templateCredsSetupCompleted": false},
"pinData": {}
}