How-to guide
How to email PDFs via webhook
Connect generated PDFs to an email or workflow system by sending completion data to a webhook endpoint.
What you'll need
Supplies
- Generated PDF workflow
- Webhook endpoint URL
- Recipient and message fields
Tools
- DocForge
- Webhook receiver
- Email service
Steps
- 1
Decide what the webhook should send
List the fields your downstream system needs before configuring the endpoint. Most email workflows need a recipient address, subject, message copy, document name, generated PDF URL or attachment reference, and a stable record identifier. Keeping the payload explicit makes it easier to retry failed sends without guessing which file belonged to which recipient.
- 2
Prepare the PDF generation source
Make sure the template and CSV include all delivery fields required by the email step. For a delivery note, that may include recipient_name, tracking_reference, delivery_date, and handling_notes. For invoices or statements, it may include billing_contact and due_date. Preview the PDFs first so you do not automate distribution of files that still have layout or data issues.
- 3
Configure the webhook receiver
Create or choose an endpoint in your workflow tool, integration service, or internal app. Confirm it accepts the payload format DocForge sends and returns a clear success response. Add basic logging for record identifiers and document names so your team can trace whether a generated PDF was handed off to the email system.
- 4
Test one recipient before the batch
Run a single row through the full flow and verify that the email arrives with the right attachment, subject, body, and recipient. Check the webhook logs as well as the email inbox. Once the single-record path is reliable, run the larger batch and watch for row-level failures that need a retry.