Skip to content

๐Ÿ—๏ธ Template #22361: Sync GitHub PR Architecture Diagrams with DevDeskApp, Slack and Notion โ€‹

Published on n8n.ioTemplate ID: 22361

๐Ÿ”— Template on n8n.io: n8n.io/workflows/22361

Template 22361 GitHub PR Mermaid architecture diagram sync workflow on the n8n canvas
Figure 1: The template on the n8n canvas.

๐ŸŽฏ Overview โ€‹

Code reviewers frequently struggle to visualize database migrations, system workflows, and service interactions from raw git code diffs. Furthermore, software teams often forget to update architectural documentation in Notion wikis when merging pull requests.

This template automates continuous architecture reviews on every Pull Request:

  1. Intakes GitHub PR Events: Triggers on pull request submissions or schema file changes (schema.prisma, migrations.sql, or .mermaid definitions).
  2. In-Memory Base64 & Slug Encoding: Encodes raw Mermaid diagram definitions into URL-safe strings for real-time SVG rendering with DevDeskApp Base64 Converter and Slugify String.
  3. Cryptographic Schema Fingerprinting: Computes a SHA-256 hash of the schema to detect architectural drift and generates a UUID v4 execution audit token.
  4. Multi-Channel Architecture Sync: Posts visual diagram previews directly into engineering Slack channels and updates the Notion architecture documentation wiki.

Deterministic In-Memory Processing

All Base64 encoding, SHA-256 schema hashing, and slugification execute 100% in-memory within n8n-nodes-devdeskapp. Your proprietary codebase schemas and PR diffs never touch external third-party API converters.


๐Ÿ“ธ Pipeline โ€‹

Template 22361 pipeline: GitHub PR trigger, DevDeskApp converter and crypto nodes, validation gate, Slack and Notion branches
Figure 2: Node order and branches in the published template.
NodeResource ยท OperationPurpose
GitHub PR Trigger / Manual Testtrigger ยท manualTrigger / githubIngests new PR event containing schema or system diffs
DevDeskApp: Base64 Encoderconverters ยท base64Encodes raw Mermaid definitions into safe data strings for SVG preview
DevDeskApp: SHA-256 Hashercrypto ยท hash (sha256)Checksum of the schema to detect drift between branches
DevDeskApp: Trace UUID Generatorcrypto ยท uuidRFC 4122 v4 unique audit identifier for CI/CD tracking
DevDeskApp: PR Slugifiertext ยท slugifyBuilds a clean URL slug from PR title and branch name
If: Valid Architecture PRifVerifies non-empty schema and validates diagram syntax
Slack: Architecture AlertSlack nodeSends rich Slack blocks with rendered diagram link to engineers
Notion: Architecture HubNotion nodeAppends visual architecture diagrams to team engineering documentation

โšก Execution sample โ€‹

json
{
  "status": "ARCHITECTURE_SYNCED",
  "auditToken": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "prNumber": 142,
  "repository": "DevdeskApp/enterprise-core",
  "prSlug": "pr-142-feat-distributed-order-state-machine",
  "schemaFingerprint": {
    "algorithm": "sha256",
    "hash": "7a3b8c9d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b"
  },
  "mermaid": {
    "type": "stateDiagram-v2",
    "base64Encoded": "c3RhdGVEaWFncmFtLXYyCiAgICBbKl0gLS0+IFBlbmRpbmcKICAgIFBlbmRpbmcgLS0+IFByb2Nlc3NpbmcKICAgIFByb2Nlc3NpbmcgLS0+IENvbXBsZXRlZAo=",
    "previewUrl": "https://mermaid.ink/svg/c3RhdGVEaWFncmFtLXYyCiAgICBbKl0gLS0+IFBlbmRpbmcKICAgIFBlbmRpbmcgLS0+IFByb2Nlc3NpbmcKICAgIFByb2Nlc3NpbmcgLS0+IENvbXBsZXRlZAo="
  },
  "channelsUpdated": [
    "#engineering-architecture",
    "Notion: System Architecture Wiki"
  ]
}

๐Ÿ“ฅ Import it โ€‹

  1. Make sure n8n-nodes-devdeskapp is installed (installation guide).
  2. Open the template on n8n.io and click Use for free, or copy the workflow JSON.
  3. Paste it onto a new workflow canvas with Ctrl + V (Cmd + V on macOS).
  4. Configure your GitHub App / Personal Access Token in the GitHub Trigger node.
  5. Connect Slack and Notion credentials, then click Test workflow.

Released under the MIT License.