AffZeroAffZero Docs

Building Your First Automation

A step-by-step walkthrough of building a weekly affiliate performance email automation.

What We're Building

By the end of this guide, you'll have a working automation that:

  1. Pulls affiliate stats from your tracker every week
  2. Sends a personalized email to each of your top affiliates with their individual numbers

This is the most common AffZero use case. The same pattern scales to more complex flows — invoices, conditions, multiple recipients — once you understand the basics.


Before You Start

Make sure you have:


Step 1 — Create the Automation

  1. Go to Automations in the left sidebar
  2. Click New Automation — a modal appears with three options: Describe It, preset cards, and Start from scratch
  3. Click Start from scratch → name it something like Weekly Affiliate Performance Email

You're now in the visual automation builder with an empty canvas.

Want to skip the manual setup? Use the Weekly Performance Summary preset instead — it creates this exact automation with the steps already in place. Or try Describe It to generate it by typing a description.


Step 2 — Add a Pull Stats Step

Click + to add the first step and select Pull Stats.

Configure it:

FieldWhat to select
ConnectionYour Affise / CAKE / Binom connection
Stat TypeBy Affiliate
Date PresetLast 7 Days
TimezoneMatch your tracker's timezone

Then click Test Pull. AffZero will fetch real data from your tracker, display it in a preview table, and automatically register every column as a variable — there's nothing to select.

Check the variables that were created

Open the Variables Available panel on the left side of the step editor. You'll see entries like:

  • {stats_1_affiliate_name} — affiliate name from the first row
  • {stats_1_revenue}, {stats_1_total_revenue} — revenue for the first row, and summed across all rows
  • {stats_1_payout}, {stats_1_total_payout} — same for payout
  • {stats_1_data_table} — the whole result set as a ready-to-use HTML table

Click any variable in the panel to copy it, or use the Insert button to place it at the cursor when you're editing an email or invoice later. If you only need the top row's numbers, use the {stats_1_...} forms above; if you want every affiliate in the email, use {stats_1_data_table} instead of picking individual rows.


Step 3 — Add a Send Email Step

Click + again and select Send Email.

Set up recipients

For this walkthrough we'll send a single summary email listing every affiliate. Enter the recipient address (yourself, or a manager's address).

If you want an individual email per affiliate instead of one summary email, reference a specific row's variables (e.g. {affiliate_name_1_stats_1}, {payout_1_stats_1} — see Variables for the legacy row-indexed naming) and create one Send Email step per affiliate, or use an AI Analyze step to prepare a per-affiliate breakdown.

Write the subject

Your weekly stats: {stats_1_affiliate_name}

Write the email body

Use the email editor to write your message, and insert variables from the Variables Available panel on the left. For example, a top-performer highlight plus the full table:

Hi there,

Here's the performance summary for last week:

Top affiliate: {stats_1_affiliate_name}
Their revenue: {stats_1_revenue}
Total payout across all affiliates: {stats_1_total_payout}

Full breakdown:
{stats_1_data_table}

Thanks for your work — keep it up!

Best,
Your Team

Choose which email account to send from

In the Send From dropdown, select your configured Gmail account.


Step 4 — Set the Schedule

At the top of the automation builder, set:

  • Schedule: Weekly
  • Day: Monday (or whichever day makes sense for your workflow)
  • Time: Choose a time before business hours — stats sent first thing in the morning tend to perform well

Step 5 — Save and Test

  1. Click Save to activate the automation
  2. Go back to the Automations list
  3. Click Run Now next to your automation

AffZero will immediately execute the workflow. After it finishes, go to Runs & Logs to see what happened — the step outputs, variable values, and confirmation that the email was sent.

Check your inbox to see the personalized email with live data.


What's Next?

Now that your basic automation works, you can extend it: