PDF extraction
How to send Slack alerts for finished PDF processing
Post PDF ready and failed notifications into Slack using okraPDF events, incoming webhooks, Zapier, Make, n8n, or a small adapter.
Slack is a notification destination, not a document database. Use it to tell the right channel that a PDF is ready, failed, or needs review. Keep the actual source document and extraction payload in okraPDF or your system of record.
This is API-feasible today. Slack incoming webhooks let apps post messages into Slack channels by sending JSON to a channel-specific webhook URL. Slack also has Web API methods such as chat.postMessage for OAuth app flows. The practical detail is that Slack expects a Slack-shaped payload, so a raw okraPDF event should be transformed before it is posted to Slack.
Choose the Slack path
| Path | Use when | Notes |
|---|---|---|
| Zapier Slack action | Fastest no-code setup | Maps okraPDF fields to Slack message text |
| Make or n8n | Better control over formatting | Can branch on ready vs failed |
| Small adapter endpoint | Product or internal engineering setup | Verifies okraPDF signature, posts Slack payload |
| Native Slack app | Best long-term UX | Requires OAuth install and channel selection |
Do not paste a raw okraPDF webhook directly into Slack unless the okraPDF connector is formatting the Slack message for you. Slack webhooks require fields such as text or blocks.
Recommended message design
Keep Slack messages short and action-oriented.
For document.processed:
PDF ready: invoice-1042.pdf
Vendor: Acme Supply
Total: 4,820.19 USD
Open: https://...
Review status: needs review
For document.failed:
PDF failed: invoice-1042.pdf
Reason: password protected PDF
Job: job_...
Open source: https://...
Put long extracted JSON in a destination that is built for data. Slack should link to the document or review queue.
Zapier setup
- Trigger: okraPDF PDF Ready, or Webhooks by Zapier Catch Hook.
- Action: Slack Send Channel Message.
- Channel: pick the intake or operations channel.
- Message: map filename, status, hosted URL, and key extracted fields.
- Add a second Zap for PDF Failed.
This path is best when a non-engineering team owns the workflow.
Make or n8n setup
Use an okraPDF webhook as the trigger, then transform the payload.
Make:
- Webhooks > Custom webhook.
- okraPDF sends
document.processedanddocument.failed. - Router splits ready and failed events.
- Slack module posts a formatted message.
n8n:
- Webhook node receives okraPDF.
- IF node checks
body.type. - Set node formats text or blocks.
- Slack node posts the message.
This path is better when you need different channels per document type or customer.
Adapter endpoint setup
For engineering teams, write a tiny endpoint:
- Receive okraPDF webhook.
- Verify
X-Okra-Signature. - Check idempotency by event ID.
- Convert the event into Slack
textor Block Kit. - POST to the Slack webhook URL.
- Return 2xx only after Slack accepts the message.
Store the Slack webhook URL encrypted. Treat it like a secret because anyone with the URL can post to that channel.
Good routing rules
Route ready events by workflow:
- Invoices ->
#ap-intake - Bank statements ->
#finance-ops - Failed processing ->
#document-alerts - VIP customers -> customer-specific channel
Avoid high-volume log streams. Slack is for exceptions and human handoffs. If every PDF creates five Slack messages, the channel will be ignored.