Marketing Automation Flow: Food Tracker App

Marketing Automation Flow: Food Tracker App

Company
šŸ“± GutDiaries
Skill Area
šŸ“Š Data & Analytics
Tool Stack
BrevoSupabasePostman (APIs)PostgreSQL
šŸ“‹

Overview

šŸ” Context
Developed an automated email sequence for GutDiaries (food symptom tracker app for GERD/IBS patients). The flow sequence personalizes user guidance via email based on actual app behavior to maximize engagement and user retention.
šŸ‘Øā€šŸ’» Key Role
• Creating relevant touchpoints without overwhelming new users • Determining optimal timing for each intervention • Integrating behavior tracking with email automation platform
šŸš€ Objective
• Increase user activation and retention through personalized guidance • Boost engagement based on personal usage patterns • Provide value-driven content that helps users succeed with tracking

Implemented a 5-step automated sequence that adapts based on user activity within the app. The system analyzes tracking behavior and sends targeted guidance to encourage complete usage of both meal and symptom tracking features.

Key Features:

  • Personalized welcome with individual Severity Index Summary
  • Dynamic content branching based on 2-day usage patterns
  • Progressive feature introduction (tracking → analysis → insights)
  • Behavior-triggered emails rather than fixed time intervals
šŸ’”

Implementation and Flow

image

Backend: Supabase Architecture

  • Database: PostgreSQL tables storing user profiles, meal logs, symptom entries, and tracking events
  • Edge Functions: Custom functions to fetch backend data captured during onboarding
  • Row Level Security: Implemented to ensure user data privacy and proper access controls
  • Triggers: Database triggers that fire on INSERT operations to user activity tables
  • Real-time subscriptions: Monitors user actions for immediate webhook firing

Email Platform: Brevo Configuration

  • Contact Management: Dynamic contact creation with custom attributes (tracking_behavior, registration_date, last_activity, gut_condition)
  • Workflow Builder: Visual automation editor for creating conditional email paths
  • Templates: Responsive email templates with dynamic content placeholders such as gut_condition, recommended_action, severity_score (information learned from app usage / onboarding)
  • Segmentation: Contact lists automatically updated based on behavior triggers as communicated from Supabase webhook

Integration: Webhook Implementation

  • Webhook Endpoint: Secured HTTPS endpoint in Supabase Edge Functions
  • Authentication: API key validation to ensure secure communication
  • Payload Structure: JSON objects containing user ID, event type, and behavior data
  • Retry Logic: Exponential backoff for failed webhook calls with 3 retry attempts
  • Event Types:
    • user_registered: Triggers welcome email sequence
    • tracking_behavior_check: Fires on day 2 for behavior analysis
    • milestone_reached: Day 6 and 10 touchpoints

Personalization: Dynamic E-mail Contents

  • Behavior Analysis: SQL queries analyzing meal/symptom tracking frequency
  • Content Variables: Dynamic placeholders in email templates ({{severity_score}}, {{recommended_action}})
  • Conditional Logic: Brevo's automation builder to route users to appropriate email variants
  • Contact Attributes: Real-time updates including:
    • meals_tracked: Count of logged meals
    • symptoms_tracked: Count of symptom entries
    • days_active: Number of days with app activity
    • severity_index: Calculated score from onboarding
  • Template Variations: Single template with conditional blocks showing/hiding content based on attributes