Skip to content

Rate customer accounts each week

Each Friday, this workflow reads the mails of the last two weeks about each of your customer accounts. It rates each account at risk, healthy or ready to grow, writes the rating and a reason to HubSpot, and saves a draft mail to the owner of each account at risk.

  1. It finds your customer accounts in HubSpot: the companies of one set, each with its plan, seats, monthly amount, renewal date, owner and main contact.
  2. It finds the mails about these accounts from the last two weeks. The mails come from customers and from your own billing, usage, support and survey systems.
  3. Code gives each account its own mails. A mail that is about no account stays out.
  4. One AI step rates each account, with a one-line reason. The step makes one model call for each account.
    • At risk: signs that the customer may leave, cut seats or plan, or not pay.
    • Ready to grow: signs that the customer wants more seats, a bigger plan or an add-on.
    • Healthy: neither, or no mails.
  5. The workflow writes the rating and the reason to each company in HubSpot. For each account at risk, it saves a Gmail draft to the account owner: why the account is at risk, and one next step.

The workflow has 11 steps. Only the step that rates each account uses an AI model. It saves drafts and never sends them.

  • the mail address that the account mails come to;
  • the set of companies in HubSpot that the review covers.

The fields “Health rating” and “Health reason” of each company in HubSpot, and a draft in your Gmail for the owner of each account at risk.

Each week brings new mails about each account, and a sign of risk is easy to miss in a full inbox. On a schedule, the ratings are in HubSpot and the drafts are ready each Friday morning. What starts a run shows how to set the schedule. In the build below, the person kept the schedule off for the first weeks and started each run by hand.

One chat in claude.ai with the Toolscaled connector: 5 messages from the person, 18.5 minutes. The person typed these messages. We replaced the mail addresses with brackets. The [bench] tags mark the test data.

  1. Use Toolscaled. Every week I review our customer accounts, and I want this done for me each Friday. Here is what I do now:

    Our 30 accounts are companies in HubSpot whose “Benchmark set” is [bench] setup. Each company has its plan, seats, seats in use, monthly amount, renewal date, the account owner and the customer’s main contact.

    The mails about these accounts from the last two weeks (16 to 29 October 2026) are in Gmail, sent to [accounts address], and each subject starts with “[bench accounts]”. They come from customers and from our own billing, usage report, support desk, survey and CRM systems. All of them were sent from [one address], so the signature or the text says who wrote and which account a mail is about. Some mails are about no account: ignore them. Some accounts have two similar names, so read the whole name.

    For each account:

    1. Find its mails.
    2. Rate it at risk, healthy or ready to grow:
      • at risk: signs that the customer may leave, cut seats or plan, or not pay;
      • ready to grow: signs that the customer wants more seats, a bigger plan or an add-on;
      • healthy: neither, or no mails.
    3. Set the company’s “Health rating” in HubSpot (At risk, Healthy or Ready to grow) and write a one-line reason in its “Health reason”.

    Then, for each account at risk, save a Gmail draft (do not send it) to the account owner (“Account owner email”), with the account name in the subject, why it is at risk in two or three sentences, and one next step.

    Please do it for this week first, so I can see it. Then make it something that runs by itself. Other weeks the mails can come to another address and the companies can have another Benchmark set, so I need to be able to change those two.

  2. Looks good. Yes, please go ahead.

  3. Every Friday morning is right, but for the first weeks I want to start it myself. Leave the schedule off. And yes, it can write to HubSpot and save the drafts without asking me, as long as it only saves drafts.

  4. Continue.

  5. Continue.

Claude rated the 30 accounts once in the chat and showed the ratings. After the person’s yes, it wrote them to HubSpot, saved the drafts, and saved the workflow. Then it tested the workflow by itself on the week’s data, fixed the two problems that the test found, and tested it again.

This was the second build of this task. The first build rated all 30 accounts in one model call, and that call ran past its time limit. The second build rates each account in its own call.

We ran the workflow on a test set that the build chat never saw: 30 accounts and 60 mails, with other names, amounts and dates. The grade has 19 clear cases and 11 cases where more than one rating is right. We compare it with an agent that did the same task from the same request. How we measured gives the method.

Workflow Agent
Time a run 30 s 140 s
Cost a run 52 credits, about $0.10 about $0.17
Tool calls 50 54
Accounts right, of 30 30 in every run 29
Same rating in 5 runs 29 of 30 accounts one run

The build chat cost about $5.17 at list price, and your chat plan pays for it. At these numbers the build pays back after about 73 runs.