Day 059 / n8n / Workflow Automation

Notification Template Lab

View source ↗Scroll to explore ↓
Notification Template Lab project cover
/ Overview

A dependency-free Python CLI that validates placeholders, flags missing or unused variables, and previews complete notification templates locally.

NameNotification Template Lab

ClientIndependent daily build

IndustriesWorkflow automation tooling

DateDay 059 · October 28, 2026

/ Challenge

Notification text often moves from a document into an automation with placeholders that are easy to miss, mistype or leave unused. Testing by sending a real message adds avoidable risk, while error logs can expose sample values.

/ Provided services

Clear thinking.
Practical delivery.

01

Template validation

The CLI checks IDs, channels, optional subjects, bodies and flat sample data before any delivery step exists.

02

Safe preview gate

A preview appears only when every referenced variable has a supplied value; blocked reports list variable names without their values.

03

Defensive input

Duplicate JSON keys, unknown fields, nested values, duplicate IDs and bounded-size violations fail with a clear validation error.

Notification Template Lab feature visual
/ Solution

Notification Template Lab reads one bounded local JSON plan, extracts explicit double-brace placeholders, checks them against flat string or number data, and renders only complete templates. It reports missing and unused variable names, rejects duplicate keys, duplicate IDs, unknown fields and oversized input, and returns distinct exit codes for ready, blocked and invalid plans. It does not send messages, connect to n8n, fetch secrets or certify a production workflow.

/ Impact

Stable placeholder extraction

Blocked partial previews

Unused-variable checks

Value-free diagnostics

Three meaningful exit states

/ Tech stack

Python standard library

Argparse, dataclasses, JSON, regular expressions and unittest keep the build dependency-free.

Text and JSON output

Human-readable and machine-readable reports support local review and later workflow integration.

Eleven tests

Tests cover rendering, token order, missing and unused data, duplicate keys and IDs, invalid fields and exit behavior.

Next project

Lead Routing Simulator

View case study ↗