Day 052 / n8n / Workflow Automation

Webhook Payload Sanitizer

View source ↗Scroll to explore ↓
Webhook Payload Sanitizer project cover
/ Overview

A dependency-free Python CLI that masks or removes credential-like values from local webhook JSON while preserving useful payload structure.

NameWebhook Payload Sanitizer

ClientIndependent daily build

IndustriesWorkflow automation tooling

DateDay 052 · October 21, 2026

/ Challenge

Webhook payloads are useful when debugging automations, but they can also contain tokens, passwords, cookies or other credentials that should not be copied into logs, tickets or examples. A small offline tool needs to reduce that risk without transmitting the payload or destroying its useful shape.

/ Provided services

Clear thinking.
Practical delivery.

01

Local payload preflight

Processes one JSON payload offline before it is shared in debugging notes, tickets or workflow examples.

02

Two sanitizing strategies

Masks sensitive values to preserve structure or removes matched key-value pairs entirely.

03

Data-minimized audit

Reports only matched paths and counts while keeping every redacted value out of the report.

Webhook Payload Sanitizer feature visual
/ Solution

Webhook Payload Sanitizer reads one bounded local JSON file, rejects duplicate keys, recursively visits objects and arrays, normalizes camelCase and punctuated field names, and masks or removes conservative credential-like keys. Optional custom keys extend the policy. The separate report contains only redacted paths, counts and processing metadata. It does not call a webhook, detect secrets inside free text or guarantee that every sensitive value has been found, so human review remains required.

/ Impact

Recursive object and array traversal

Mask and remove strategies

Conservative credential-key matching

CamelCase and punctuated-key normalization

Repeatable custom sensitive keys

Value-free path and count report

Bounded file, depth and node limits

Ten standard-library tests

/ Tech stack

Python standard library

Argparse, JSON, pathlib, regular expressions and dataclasses provide a dependency-free command-line tool.

Conservative key policy

Normalized exact keys and credential-related key parts identify common secret-bearing fields without claiming full secret detection.

Unittest

Ten tests cover nested data, arrays, both strategies, custom keys, value-free reports, duplicate keys and depth limits.

Next project

Incident Timeline Builder

View case study ↗