Skip to main content

Route client onboarding webhook events through RabbitMQ to Gmail alerts

Workflow preview

Workflow preview
100%
Route client onboarding webhook events through RabbitMQ to Gmail alerts preview
Open on n8n.io

1. Workflow Overview

Publish Subscribe Example Webhook to RabbitMQ, RabbitMQ to GMAIL How it works This workflow demonstrates a resilient publish/subscribe automation pattern using n8n, RabbitMQ, JSON Schema validation...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.rabbitmq, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.code, n8n-nodes-schema-guard.schemaguard

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Venkata V.

Original n8n.io source

1.1 Workflow description

Title
Route client onboarding webhook events through RabbitMQ to Gmail alerts
Workflow name
Route client onboarding webhook events through RabbitMQ to Gmail alerts

Publish Subscribe Example - Webhook to RabbitMQ, RabbitMQ to GMAIL

How it works

This workflow demonstrates a resilient publish/subscribe automation pattern using n8n, RabbitMQ, JSON Schema validation, and Gmail.

It contains two flows in the same workflow:

  1. A publisher flow receives client onboarding JSON through a webhook.
  2. The payload is validated against a JSON Schema.
  3. If valid, the workflow publishes the event to RabbitMQ.
  4. A subscriber flow listens to the RabbitMQ queue.
  5. The subscriber validates the received event again.
  6. If the message is valid, it prepares and sends a Gmail notification.
  7. Invalid messages and processing failures are routed to a dead-letter/error queue.

This template is useful for client onboarding, accounting intake, document processing, form submissions, internal notifications, and event-driven workflow automation.

Set up steps

  1. Create or connect a RabbitMQ instance.
  2. Create the following RabbitMQ resources:
  • Exchange: client.onboarding.exchange
  • Exchange type: topic
  • Main queue: client.onboarding.queue
  • Routing key: client.onboarding.received
  • Dead letter/error queue: client.onboarding.dlq
  1. In n8n, configure your RabbitMQ credentials.
  2. Replace the RabbitMQ credential placeholder with your own RabbitMQ credential.
  3. Replace the JSON Schema Validator placeholder nodes with your preferred JSON Schema validation node or validation service.
  4. Configure the Gmail credential.
  5. Replace the Gmail placeholder node with the Gmail Send Email node.
  6. Update the recipient email address in the “Prepare Gmail Email” node.
  7. Test the publisher webhook with a sample client onboarding JSON payload.
  8. Confirm the message is published to RabbitMQ and then consumed by the subscriber flow.
  9. Confirm Gmail receives the formatted notification email.

Required credentials

  • RabbitMQ credentials
  • Gmail OAuth2 credentials
  • Optional JSON Schema validator community node or external validation service

Example input JSON

{
 "clientId": "C1001",
 "clientName": "John Smith",
 "email": "[email protected]",
 "serviceType": "Individual Tax Return",
 "taxYear": 2025,
 "documents": [
 {
 "documentType": "Photo ID",
 "fileName": "john-smith-passport.pdf"
 },
 {
 "documentType": "PAYG Summary",
 "fileName": "john-smith-payg-summary.pdf"
 }
 ]
} 

Resilience and Error Handling

This template includes:

  • Validation before publish
  • Validation after subscribe
  • Correlation ID
  • Schema version
  • Dead-letter queue
  • Email failure branch
  • Invalid message branch
  • RabbitMQ publish failure branch

Invalid or failed messages are routed to client.onboarding.dlq.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note - Publisher Flow

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note - JSON Schema Validation

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note - RabbitMQ Setup

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note - Subscriber Flow

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note - Gmail Notification

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - PUBLISHER - Webhook Receive JSON

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 7 - PUBLISHER - Normalize Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 8 - PUBLISHER - RabbitMQ Publish Event

Type / Role
n8n-nodes-base.rabbitmq - rabbitmq
Config choices
Version 1.1

Block 9 - PUBLISHER - RabbitMQ Publish Success?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 10 - PUBLISHER - Respond Success

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 11 - PUBLISHER - Send Publish Failure to DLQ

Type / Role
n8n-nodes-base.rabbitmq - rabbitmq
Config choices
Version 1.1

Block 12 - PUBLISHER - Respond Publish Error

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 13 - PUBLISHER - Send Invalid Payload to DLQ

Type / Role
n8n-nodes-base.rabbitmq - rabbitmq
Config choices
Version 1.1

Block 14 - PUBLISHER - Respond Validation Error

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 15 - SUBSCRIBER - Normalize Message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 16 - SUBSCRIBER - Success Log

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - SUBSCRIBER - Send Email Failure to DLQ

Type / Role
n8n-nodes-base.rabbitmq - rabbitmq
Config choices
Version 1.1

Block 18 - SUBSCRIBER - Send Invalid Message to DLQ

Type / Role
n8n-nodes-base.rabbitmq - rabbitmq
Config choices
Version 1.1

Block 19 - SUBSCRIBER - Invalid Message Log

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Schema Guard

Type / Role
n8n-nodes-schema-guard.schemaGuard - schemaGuard
Config choices
Version 1

Block 22 - Sticky Note - JSON Schema Validation1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Schema Guard1

Type / Role
n8n-nodes-schema-guard.schemaGuard - schemaGuard
Config choices
Version 1

Block 24 - SUBSCRIBER - RabbitMQ Trigger

Type / Role
n8n-nodes-base.rabbitmqTrigger - rabbitmqTrigger
Config choices
Version 1

Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Route client onboarding webhook events through RabbitMQ to Gmail alerts
Complexity advanced
Nodes 28
Categories Document Extraction
Author Venkata V
Published 27 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15316/15316.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Route client onboarding webhook events through RabbitMQ to Gmail alerts do?

Publish Subscribe Example Webhook to RabbitMQ, RabbitMQ to GMAIL How it works This workflow demonstrates a resilient publish/subscribe automation pattern using n8n, RabbitMQ, JSON Schema validation...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.