How We Fix Gmail Open Rates Now (Claude Code + Klaviyo)
A client of ours recently moved to a new sending domain. Click rates held up fine, but open rates lagged, and when we broke performance down by inbox provider in Klaviyo, the problem wasn't everywhere. It was Gmail and Yahoo. Every other provider looked healthy.
That distinction matters, because sender reputation is scored per provider. Gmail decides where your emails land based on how Gmail users treat them. If you respond to a Gmail problem by tightening your entire send, you shrink revenue from providers that were never the issue. The right move is surgical: keep sending to your full engaged audience everywhere else, and only tighten on the providers that are punishing you.
This post covers the exclusion segment that does that, and how we built it with Claude Code in a few minutes instead of hand-assembling conditions in the segment editor. It's part of how we run Klaviyo accounts now: the same setup that writes campaign copy and talks to the Klaviyo API also builds audiences.
The Play: Exclude, Don't Shrink
The account was already sending campaigns to a 30-day engaged segment, plus some browser and buyer segments on longer windows. Standard deliverability rebuild stuff. The temptation at this point is to cut to 14-day engaged for everyone, but that punishes the whole list for two providers' problem.
Instead, you build one exclusion segment: people on the problem providers who show no recent engagement anywhere. Then you keep including the full 30-day engaged audience and exclude that segment on top. Everyone on healthy providers is untouched. On Gmail and Yahoo, only the people actively opening, clicking, browsing, or buying still get mail. Those are exactly the signals that rebuild your reputation with that provider, so over time you loosen the exclusion and broaden back out.
Two Ways Klaviyo Can Target an Inbox Provider
Klaviyo gives you two mechanisms, and it's worth knowing both:
- The Inbox Provider dimension. Conditions like "Received Email... where Inbox Provider equals Gmail" use Klaviyo's own provider classification. This catches Gmail-hosted inboxes even on custom domains (Google Workspace), which a domain match misses.
- Email domain string match. "Properties about someone > Email contains gmail.com." Simpler and works for any profile whether or not they've received email yet. Two gotchas: values are case sensitive (gmail.com, not Gmail.com), and Microsoft is several domains, so you need hotmail.com, outlook.com, live.com, and msn.com to cover it.
We used the domain match for this build. It's transparent in the segment editor and easy for anyone on the team to read six months from now.
The Exclusion Segment
The logic: someone is on a problem provider AND shows no engagement on any channel we can see. One OR group for the providers, then AND conditions for the engagement checks:
- Email contains gmail.com OR hotmail.com OR outlook.com (add your own problem providers; use live.com and msn.com for full Microsoft coverage). This scopes the exclusion so nobody on a healthy provider is ever touched.
- Opened Email zero times in the last 30 days. The core signal, but never the only one. Opens are noisy: privacy features auto-fire them for some users and suppress them for others.
- Clicked Email zero times in the last 30 days. Catches people whose opens don't track but who still click. You never want to exclude a clicker.
- Active on Site zero times in the last 14 days. Someone browsing your store this week is not disengaged, whatever their open column says.
- Placed Order zero times in the last 30 days. Buyers stay in. Always.
On this account that segment came out to roughly 85,000 profiles. That sounds like a lot to stop mailing, but every one of them is a person on a problem provider who hasn't opened, clicked, visited, or bought in weeks. Continuing to mail them is what tanked Gmail opens in the first place.
Building It with Claude Code
Here's the AI part, and why this took minutes instead of an afternoon.
Each client we manage has a folder we treat as that client's brain: API access to their Klaviyo account, plus a strategy doc describing how we send for them. Claude Code works inside that folder. So the build went like this:
- Research. We described the goal (isolate unengaged Gmail and Yahoo profiles for exclusion) and had Claude pull Klaviyo's documentation. It came back with the two mechanisms above and a recommended structure. No digging through help-center tabs.
- Build. Claude found the account's metric IDs, sampled events to confirm everything tracked correctly, assembled the segment definition, and created it in the account through the API. The condition-builder clicking, the most error-prone part of any segment like this, never happened.
- Verify. The segment shows up in Klaviyo like any other. We opened it, checked the logic read exactly as designed, and sanity-checked the 85K count against the list size.
The part that compounds: the strategy doc. The exclusion rules live in the client's folder, so when we schedule campaigns with Claude in the loop, it flags which sends should carry the exclusion. The segment is a one-time build. The strategy applies itself every week after that.
How to Actually Use It
Don't exclude this audience on every campaign. It cuts your reachable audience meaningfully, and some sends are worth the full list. Our rules for this account:
- Apply it on roughly every other send, and on non-critical sends. Consistent positive signals reach Gmail and Yahoo without going fully dark to the excluded group.
- Skip it for sales and launches. A promo is your best shot at re-engaging a quiet profile. Excluding them from it costs real revenue for marginal reputation gain.
- Broaden as opens recover. This is a rehab window, not a permanent state. Klaviyo's own per-provider guidance is the same shape: start with your most engaged, expand in stages as the provider's trust comes back. Watch the per-provider breakdown, not the blended open rate.
If your problem is list-wide rather than provider-specific, start with the full deliverability guide and a sunset flow. This play is for the case where the breakdown shows one or two providers dragging everything down.
Why This Is the Pattern
Strip away the deliverability specifics and the workflow is the same one behind everything else in this series: give the AI real access (the Klaviyo API), real context (the strategy doc), and a real task. Research the mechanism, build the thing in the account, encode the decision so it applies itself going forward. We've used the identical loop to ship landing pages from Figma and to automate suppression reversal.
If your per-provider breakdown looks like this client's did, and you want the segment, the sending strategy, and the rebuild managed for you, reach out. Or build it yourself from the definition above. It's five conditions.