Webhooks and variables
Dantai talks to n8n, GitHub and WhatsApp through webhooks. Each address has a default for local work and a variable to change it.
n8n webhooks
The website calls these from the browser. Locally they default to http://localhost:5678/webhook/<name>.
| Variable | Path | What it does |
|---|---|---|
| VITE_N8N_WEBHOOK | smartaudit | Serves chat, scans and repository files. |
| VITE_N8N_IMPORT | import-tasks | Reads an Excel, CSV or public Google Sheet and creates the rows as tasks. |
| VITE_N8N_TICKET_CREATE | ticket-create | New ticket (Slack): saves it and posts it to Slack. |
| VITE_N8N_TICKET_CREATE_JIRA | ticket-create-jira | New ticket when Jira is the destination: creates the issue and saves it. |
| VITE_N8N_TICKET_CREATE_CLICKUP | ticket-create-clickup | New ticket when ClickUp is the destination. |
| VITE_N8N_TICKET_CLOSE | ticket-close | Replies on the Jira, ClickUp or Slack ticket and closes it when its task is done. |
| VITE_N8N_SLACK_SYNC | slack-sync | The Tickets Refresh button: pulls Slack channel messages in. |
| VITE_N8N_JIRA_SYNC | jira-sync | The Tickets Refresh button: pulls Jira issues in. |
| VITE_N8N_CLICKUP_SYNC | clickup-sync | The Tickets Refresh button: pulls ClickUp tasks in. |
Change an address
Put the real address in .env.local, which git ignores. For a deployed site, set the same names as build variables instead: see Self-hosting.
Point the site at another n8n
Add only the lines you need to .env.local, then restart npm run dev.
VITE_N8N_WEBHOOK=https://your-n8n.example.com/webhook/smartaudit VITE_N8N_TICKET_CREATE=https://your-n8n.example.com/webhook/ticket-create VITE_N8N_SLACK_SYNC=https://your-n8n.example.com/webhook/slack-sync
GitHub push webhook
This is how a push reaches Dantai. GitHub calls PocketBase, which checks the signature and queues the push.
Set a secret on PocketBase
Generate a long random string and set it as
LYNX_GITHUB_WEBHOOK_SECRET. Without it the webhook answers 503.Add the webhook in GitHub
Repository → Settings → Webhooks → Add webhook, with these values:
Field Value Payload URL <your PocketBase address>/api/lynx/github-webhook Content type application/json Secret The same string as LYNX_GITHUB_WEBHOOK_SECRET Events Just the push event For the Pipelines page, add more events
Choose Let me select individual events and tick Pushes, Workflow runs and Workflow jobs. A job event only says which run changed: the steps are always read from the GitHub API, so the saved GitHub token must be able to read Actions.
WhatsApp is a separate service with its own variables, because it runs next to n8n, not in the website.
| Where | Variable | Meaning |
|---|---|---|
| WhatsApp API | WEBHOOK_URL | The n8n whatsapp-comms webhook that receives messages and delivery receipts. |
| WhatsApp API | WEBHOOK_SECRET | Sent as the x-webhook-secret header so n8n can refuse anyone else. |
| WhatsApp API | API_KEY | Callers send it as the x-api-key header. |
| PocketBase | LYNX_WHATSAPP_SEND_URL | The n8n whatsapp-comms-send webhook, used to send replies. |
| PocketBase | LYNX_WHATSAPP_API_URL | Where the WhatsApp API is. |
| PocketBase | LYNX_WHATSAPP_API_KEY | Must equal the API's API_KEY. |
| PocketBase | LYNX_COMMS_SECRET | Shared with the n8n WhatsApp workflows. |
Check it works
Is PocketBase up?
Answers with a short JSON message when it is healthy.
curl -i http://127.0.0.1:8090/api/healthIs n8n up?
Any answer means n8n is listening. Open it in a browser to see your workflows.
curl -I http://localhost:5678Watch the hooks while you try something
A webhook that does nothing usually says why here.
docker compose logs -f pocketbase n8n