A Unified Campaign Automation Stack

Introduction: Automation Is Not a Tool, It Is a Stack

The biggest misconception I see about automation is that it can be solved with a single tool. People think Zapier will fix their flows, or that plugging Segment into a CRM means jobs are done. But true marketing automation is a system, a tightly orchestrated stack of APIs, low code logic, data routing, and custom scripts that respond to signals across your entire business.

I do not automate campaigns in isolation. I build campaign engines. These engines combine product feeds, CRM state, behavioural events, pricing or stock data and layer those into an adaptive system that creates or updates campaigns based on what the customer is doing and what the business needs to push.

This article breaks down the components of that system and how I glue them together, from Zapier to Python, Segment to Shopify API, and Google Ads to Postmark.


Zapier or n8n for Fast Integration

For fast connections between tools that expose decent APIs (like Typeform, Airtable, Slack, HubSpot), I often use Zapier or n8n. These tools give you triggers and actions without writing boilerplate code.

Example use cases:

  • New signup in Typeform → enrich in Clearbit → send Slack alert
  • Stripe charge succeeds → check product → add to Klaviyo segment
  • New subscriber in Intercom → push user to Google Ads remarketing list

Even in complex setups, Zapier and n8n serve as glue layers between high-value systems that do not justify full server-side code. I use them to orchestrate non-critical reactions that do not require high-frequency or millisecond timing.


Python and Node.js for Core Logic

When logic becomes non-trivial, e.g. checking profit margin before emailing a discount, filtering by recent user events, or batching data for ads API payloads, I write Python or Node functions.

In one ecommerce client, we wanted to only send win-back emails to users who:

  • Had not ordered in 45 days
  • Had LTV > 100
  • Did not return their last item

This could not be done in Klaviyo alone. So we built a Python job that queries BigQuery, filters users by logic, and sends custom JSON payloads to Postmark.

Example:

import requests

def send_winback_email(user):
    payload = {
        "key": "YOUR_API_KEY",
        "message": {
            "to": [{"email": user["email"]}],
            "subject": "Come back and get 10 percent off",
            "html": f"<p>Your last order looked great. We have more like it.</p>"
        }
    }
    requests.post("https://Postmarkapp.com/api/1.0/messages/send.json", json=payload)

This code is triggered by a scheduled Cloud Function. No UI, no manual checking, full logic, full automation.


Event Routing with Segment or RudderStack

To make automation smart, it must know what users are doing. I use Segment or RudderStack to capture real-time behavioural events and route them to tools that act.

Example event:

{
  "event": "Product Viewed",
  "userId": "12345",
  "properties": {
    "product_id": "SKU123",
    "price": 89,
    "category": "headphones"
  }
}

This event can flow to:

  • Google Analytics for analytics
  • BigQuery for later cohorting
  • Customer.io to trigger a drip campaign
  • Facebook CAPI to register the event for retargeting

Segment becomes the nervous system. The key is that all actions stem from a single source of truth, not a patchwork of tags.


Real Campaign Impact via Platform APIs

Where it matters most, actually creating, pausing or editing campaigns, I use platform APIs directly. This gives me full control over budget, creative, and logic.

Example: creating a new Google Ads RSA when a product is added to Shopify.

Shopify Webhook → Lambda → Google Ads API

The flow:

  1. Shopify webhook fires on product create
  2. AWS Lambda function extracts product title, description, price
  3. Google Ads API creates a new RSA in a specified ad group

Sample Node.js call:

const ad = {
  responsiveSearchAd: {
    headlines: [
      { text: "Introducing " + product.title },
      { text: "Now available for £" + product.price }
    ],
    descriptions: [
      { text: product.description.slice(0, 90) }
    ]
  },
  finalUrls: [product.url]
};

This is wrapped in Google Ads API operations and sent using an OAuth client. The result: a new product appears in the store and in the search ads within 90 seconds.


A Real Stack: What It Looks Like

For a typical ecommerce or SaaS client, here is how I build the automation stack:

  • Segment collects behavioural and referral data
  • Zapier triggers light enrichment or alerts
  • Python jobs handle LTV logic and ad feed filtering
  • Google Ads API receives product or offer updates
  • Postmark sends transactional or segmented emails
  • Shopify feeds product data and stock changes
  • BigQuery joins everything together every hour

The glue is not in the tools. It is in the orchestration. Each tool does what it does best, and nothing more.


Final Thought: Build Your Engine, Not Just Flows

You do not need a thousand tools. You need the right handful, wired together by intent. When I build automation stacks, the goal is not to save time. It is to create a system that thinks in real time, adapts faster than competitors, and puts business signals at the heart of campaign logic.

If your campaigns, emails or ads are still scheduled manually or built in silos, I can help you unify them. I will help you wire your stack so marketing reflects what your business is doing, not what someone scheduled last week.