MAHMOUD ABDELNABY
Automation · CLI SCRIPT · 2

WhatsApp Business Template Rejection Guard & Compliance Linter

Check selected WhatsApp template structure and flag possible policy issues before submission. Meta reviews and approves templates; this linter cannot guarantee acceptance.

Problem it addresses

Build an open-source WhatsApp Business template compliance checker: 1) Python linter (wa_template_linter.py) scanning template text for disallowed promotional trigger words, sequential variable constraints ({{1}}, {{2}}), and required unsubscribe/opt-out phrasing, 2) Four illustrative template examples; they are not pre-tested or Meta-approved (Order Updates, COD Verification, Cart Abandonment, Back-in-Stock), 3) Meta policy cheat sheet.

Who it is for

BOTH operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.

What is inside

Key files listed in the README repository architecture:

  • config/meta_rejection_rules.json
  • data/illustrative_templates.json
  • examples/valid_and_rejected_templates.json
  • LICENSE
  • policies/meta-whatsapp-policy-summary.md
  • README.md
  • reports/linter_results.csv
  • src/template_guard.py
  • src/wa_template_linter.py
  • templates/illustrative_templates_ar.json
  • tests/test_guard.py
  • tests/test_linter.py

How to evaluate and use it

  1. Read the README first and confirm that the documented problem matches your use case.
  2. Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
  3. Follow the repository’s Quick Start and check prerequisites before running commands.
  4. Compare outputs with documented examples and review limitations before using them in a decision or client workflow.

Quick Start from the README: python -m unittest discover -s tests · python src/template_guard.py --help

Scope and limitations

  • Variable Parameter Spacing: Flags templates where dynamic variables (e.g. {{1}}) lack surrounding space or contain trailing punctuation that causes Meta API rejections.
  • Category Classification Alignment: Audits template text to ensure Marketing, Utility, and Authentication templates are correctly declared per Meta pricing tiers.
  • Prohibited Content Screening: Screens text against Meta commercial policies prohibiting deceptive promises, sensitive health claims, and gambling terms.

This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.

Related repositories