This project automates the creation and configuration of campaigns, messages, and related assets inside Braze. It streamlines the manual setup process by taking structured content inputs—copy, design references, and message parameters—and pushing them directly into the Braze platform. The goal is to eliminate repetitive setup work and ensure consistency across large-scale automation workflows.
Created by Bitbash, built to showcase our approach to Scraping and Automation!
If you are looking for braze-campaign-setup-automation-bot you've just found your team — Let’s Chat. 👆👆
Marketing teams often spend a surprising amount of time manually recreating messages, templates, and campaign structures inside Braze. Every small detail needs to be copied over correctly, and doing this by hand slows teams down while opening the door to mistakes. This automation handles the heavy lifting by using the Braze API to turn prepared content into deployed assets, fast and reliably.
- Reduces manual build time for campaigns, canvases, and message templates.
- Ensures consistent formatting when using external copywriting or design assets.
- Helps teams launch faster without waiting on platform specialists.
- Gives marketing operations more control over bulk or repetitive deployments.
- Cuts down configuration errors by validating inputs before publishing.
| Feature | Description |
|---|---|
| Automated Campaign Creation | Generates Braze campaigns directly from structured inputs. |
| Message Template Builder | Converts copy and design data into email, push, or in-app message templates. |
| Content Validation Layer | Ensures required fields like subject lines, images, and links meet Braze API requirements. |
| Asset Upload Support | Handles image or media asset ingestion into Braze’s content library. |
| Multi-Channel Configuration | Supports push, email, in-app, SMS, and webhooks. |
| Error & Retry Handling | Detects API failures, retries transient issues, and logs problematic payloads. |
| Bulk Deployment Mode | Creates multiple campaigns or templates in batch when needed. |
| Environment Configuration | Safely manages API keys and endpoints for production vs. sandbox. |
| Campaign Parameter Mapping | Maps audience, tags, scheduling rules, and message options automatically. |
| Audit Logging | Creates detailed logs for every API call and operation. |
| Extended Customization Options | Lets teams override defaults for targeting, variations, or message settings. |
| Integration Hooks | Supports optional upstream systems for content ingestion. |
| Step | Description |
|---|---|
| Input or Trigger | The automation begins when content files, metadata, or message configuration details are placed into the input directory or passed via API call. |
| Core Logic | Validates all content, transforms assets into Braze-compatible payloads, and executes the required Braze API endpoints for campaign or template creation. |
| Output or Action | Creates live or draft campaigns, templates, or content blocks directly in the Braze dashboard. |
| Other Functionalities | Offers automated retries, structured debug logs, fallback logic for partial completion, and parallel processing for large content batches. |
| Safety Controls | Includes API rate limiting, cooldown delays, environment isolation, and schema validation to prevent malformed payloads. |
| ... | ... |
| Component | Description |
|---|---|
| Language | Python |
| Frameworks | FastAPI for optional API triggers |
| Tools | Braze REST API, Pydantic for validation |
| Infrastructure | Docker, GitHub Actions |
braze-campaign-setup-automation-bot/
├── src/
│ ├── main.py
│ ├── automation/
│ │ ├── braze_client.py
│ │ ├── campaign_builder.py
│ │ ├── template_builder.py
│ │ ├── asset_uploader.py
│ │ └── utils/
│ │ ├── logger.py
│ │ ├── validators.py
│ │ └── config_loader.py
├── config/
│ ├── settings.yaml
│ ├── credentials.env
├── logs/
│ └── activity.log
├── output/
│ ├── results.json
│ └── report.csv
├── tests/
│ └── test_automation.py
├── requirements.txt
└── README.md
- Marketing operations teams use it to generate campaign structures so they can go from copy/design files to ready-to-launch automations with less effort.
- CRM specialists use it to deploy multi-channel message templates quickly, improving delivery timelines for complex journeys.
- Agencies rely on it to produce consistent, error-free Braze setups from client-provided content.
- Product teams automate lifecycle messaging updates at scale without manually recreating templates each cycle.
- Growth teams deploy variations of campaigns rapidly for testing without touching the Braze UI repeatedly.
How do I authenticate with Braze? You simply place your REST API key and endpoint cluster in the credentials file. The automation loads them securely at runtime.
Can it create multiple campaigns at once? Yes. You can batch content files, and the system will produce multiple campaigns or templates in a single execution.
Does it support custom fields or metadata? It supports arbitrary key-value pairs, as long as they’re accepted by Braze’s API. Validation helps ensure nothing invalid gets submitted.
Is message formatting preserved? Structured input fields, HTML blocks, and content references are processed without stripping formatting, helping preserve the original design intent.
Execution Speed: Processes 15–30 Braze API operations per minute depending on asset sizes and network latency.
Success Rate: Maintains a stable 92–94% success rate across parallel runs with automatic retries enabled.
Scalability: Handles 100–300 campaign or template deployments per batch through parallel workers.
Resource Efficiency: Each worker typically uses 150–250MB RAM and minimal CPU except during JSON payload generation or asset compression.
Error Handling: Supports exponential backoff, detailed structured logging, retry queues, and recovery workflows that resume incomplete batches without duplicating content.
