Send regulatory incident emails from webhook payloads and Gotenberg PDF reports

Go to Workflow
0 views
Built by AI Solutions AI Solutions
Created on August 06, 2026

Description

Quick overview
This workflow receives a regulatory notification request via webhook, validates a CSV/XLSX recipient file, sends personalized notification emails in throttled batches, then generates a branded PDF delivery report using Gotenberg and emails the report to a designated recipient.

How it works
Receives a POST webhook request containing notification details, a recipients CSV/XLSX file, and a shared secret.
Verifies the secret and immediately returns a 401 response when the request is unauthorized.
Normalizes and validates required form fields, decodes the uploaded file, and extracts recipient rows from CSV or Excel.
Validates email addresses, removes duplicates, optionally limits recipients in test mode, and responds to the webhook with an “accepted” summary.
Sends a personalized email to each recipient (based on the selected notification type or custom templates), processing recipients in configurable batches with a wait-based throttle and recording sent/failed outcomes.
Aggregates send metrics, builds a branded HTML compliance report, converts it to PDF via a Gotenberg HTTP request, and emails the PDF report to the configured report recipient.

Setup
Copy the webhook URL from the workflow and configure your source system to POST to it with the recipients_file payload and the x-notification-secret header (or webhook_secret in the body).
Update the configuration values in the workflow, including the webhook secret, batch size, wait seconds, test mode limit, and the Gotenberg service URL.
Configure an EmailSend credential/service in n8n and set appropriate sender/reply-to addresses (sender_email/contact_email) to allow sending recipient notifications and the final report email.
Ensure your uploaded CSV/XLSX includes an email column (and optionally name/id) so recipients can be validated, deduplicated, and personalized.

Requirements
n8n instance
SMTP credentials for all email steps
PDF service endpoint (e.g., Gotenberg at YOUR_SERVICE_URL)
Valid webhook secret

Customization
Update the notification email and final report templates by editing respective node content and layout settings.
Adjust tokens, branding (logo and color URLs), and change batching parameters to meet your organization’s requirements.

Additional info
For support, contact: [email protected] (AI Solutions, Inc.)

Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Send Email
n8n-nodes-base.emailSend