My workflow 2
This workflow achieves the automatic synchronization of the Dartagnan marketing project with Braze email templates. It regularly retrieves project and campaign data, automatically identifies templates that need to be updated or added, and replaces image references in the HTML content to ensure that resources are complete and accurate. It is triggered automatically every 5 minutes to ensure real-time data synchronization, reducing manual operation costs, improving operational efficiency, and preventing template data desynchronization and resource loading failures. It is suitable for use by digital marketing teams and technical teams.

Workflow Name
My workflow 2
Key Features and Highlights
This workflow enables automatic synchronization between Dartagnan marketing projects and Braze email templates. It supports scheduled retrieval of project and campaign data from Dartagnan, intelligently compares them with existing email templates in Braze, automatically identifies templates that need to be updated or created, and replaces image references within the HTML content to ensure completeness and correctness of email template assets. The workflow triggers automatically every 5 minutes, ensuring real-time data synchronization while adhering to API rate limits.
Core Problems Addressed
- Resolves the issue of template data inconsistency between the marketing system Dartagnan and the email delivery platform Braze.
- Automatically handles the replacement of image URLs within email template HTML content to prevent resource loading failures.
- Uses intelligent comparison to avoid duplicate template creation and unnecessary updates, improving operational efficiency.
- Reduces manual intervention costs and minimizes the risk of synchronization errors.
Use Cases
- Marketing teams needing to synchronize marketing campaign templates from Dartagnan to Braze for email delivery.
- Scenarios requiring periodic updates of email template content to maintain consistency with marketing campaigns.
- Automated management of email content and assets across multiple enterprise systems.
Main Workflow Steps
- Authentication Setup: Configure and assign API credentials for Dartagnan and Braze.
- Access Token Retrieval: Request an OAuth access token from Dartagnan (valid for 60 minutes).
- Fetch Project and Campaign Data: Retrieve project lists and corresponding campaign details via Dartagnan API.
- Retrieve Braze Email Template List: Call Braze API to obtain all existing email templates.
- Data Filtering and Merging:
- Compare Dartagnan campaigns with Braze templates to categorize data into “Existing in Braze” and “Not Existing in Braze.”
- Template Content Processing:
- Extract HTML and media assets from Dartagnan campaigns.
- Use a Code node to process HTML, replacing all image references with directly accessible URLs.
- JSON-encode the template content to prepare for Braze API submission.
- Template Synchronization:
- For “Existing” templates, check for updates and call Braze update API if needed.
- For “Not Existing” templates, call Braze create API to add new templates.
- Scheduled Trigger: Use a scheduler node to automatically execute the above process every 5 minutes, maintaining data synchronization.
Involved Systems and Services
- Dartagnan: Provides APIs for marketing projects and campaign data.
- Braze: Email delivery platform managing creation and updates of email templates.
- n8n Automation Platform: Orchestrates and executes the entire workflow through node-based automation.
- Utilizes HTTP request nodes, code nodes (JavaScript for HTML processing), and scheduling nodes.
Target Users and Value
- Digital marketing teams and operations personnel: Simplify multi-platform email template management and ensure consistency of marketing campaign content.
- Technical teams and automation engineers: Implement complex API data synchronization and content processing with low-code solutions.
- Enterprise clients: Enhance marketing efficiency, reduce errors caused by manual operations, and ensure a high-quality, stable email delivery experience.
This workflow automates seamless integration between marketing campaign templates and the email delivery platform, significantly optimizing daily content management and update processes. It is a powerful tool for digital marketing automation.