File size: 862 Bytes
0566772
6545a36
0566772
6545a36
0566772
 
6545a36
20919fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: pdf-trainer-worker
sdk: docker
app_port: 7860
---

Worker + health API.

## Local run

```sh
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

set -a; source .env; set +a
./start.sh
```

## Trainer “Save configuration” webhook

The health API exposes a webhook that the Trainer UI can call when a rep clicks **Save configuration**.

- Endpoint: `POST /api/trainer/save-config`
- Header: `X-Webhook-Secret: $PDF_PIPELINE_WEBHOOK_SECRET`
- Body JSON:
  - `pdf_id` (string)
  - `template_id` (string)
  - `config` (object)
  - `notify_to` (string, optional override)

Required env vars for the webhook to send the confirmation email:

- `PDF_PIPELINE_WEBHOOK_SECRET`
- `PDF_PIPELINE_NOTIFY_FROM` (must be the same Gmail account you authorized)
- `PDF_PIPELINE_PIPELINE_NOTIFY_TO` (recipient for the confirmation email)