Weekly at-risk customer follow-ups from Metabase to HubSpot

Every Monday at 8am, pull at-risk accounts from your Metabase health-score question and create prioritized HubSpot tasks for the right account owner.

Agentic Task
MetabaseHubSpotCustomer SupportSalesData SyncNotifications & AlertsAI Reports

Build me a weekly at-risk customer playbook for our CS team. It should run as an agent workflow on a cron trigger, every Monday at 8am in our team's timezone.

At the start of each run, the agent should call Metabase Run Card Query against a saved question I will choose (let me configure the card ID and any parameter values). The question returns one row per at-risk account with columns like customer email, account owner email or owner ID, risk score, primary risk reason, and last-touched date. The exact column names can vary, so the agent should be flexible about matching them.

For each row in the result, the agent should do the following:

1. Look up the contact in HubSpot with Get Contact using idProperty=email. If no contact is found, skip the row and add a note to the final summary.

2. Before creating anything new, check the contact's recent tasks. If there is an open task on this contact that was created in the last 7 days, skip this row so we do not duplicate nags. The dedupe window should be configurable.

3. Update the contact via HubSpot Update Contact and write the latest risk-tracking properties. The defaults are churn_risk_score (numeric from the query) and last_risk_review (today's date in ISO format), but let me map these to the property names we actually use.

4. Create a follow-up task with HubSpot Create Task. Associate it with the contact, assign it to the account owner from the row (resolve the owner by email or ID), set a due date a few days out (configurable, default 3 business days), and set priority based on risk score (HIGH for top tier, MEDIUM otherwise). The task subject should be short and concrete, for example 'Save play: <customer> (risk <score>)'. The task body should be a short personalized outreach plan, 4 to 6 sentences, drafted from the primary risk reason and any context the row carries about recent activity. The plan should suggest a specific opening line, one question to ask, and one next step the CSM can take.

After processing all rows, the agent should reply with a one-line summary: how many tasks were created, how many rows were skipped due to dedupe, how many contacts were not found, and a short breakdown of tasks per account owner (e.g. 'Created 7 tasks: 3 to Alex, 2 to Sam, 2 to Priya').

Constraints and preferences:

- Stick to standard HubSpot CRM contact and task scopes. Do not request sensitive or v2 scopes.

- If a row is missing critical fields (no email, no risk score), skip it and note it in the summary instead of failing the whole run.

- Keep the personalization grounded in what the row and the contact's HubSpot record actually say. Do not invent customer details.

- Expose these as workflow inputs I can edit later without rewriting the agent: Metabase card ID, Metabase parameter values, dedupe window in days, default task due offset in business days, the HubSpot property names for risk score and last review, and the high-priority risk-score threshold.

Additional information

What does this prompt do?
  • Runs your saved Metabase health-score question every Monday morning so the at-risk list is always fresh.
  • Looks up each at-risk customer in HubSpot by email and updates their risk score and last-reviewed date on the contact.
  • Creates a personalized follow-up task for each at-risk contact, assigned to their account owner, with a short outreach plan written from the risk reason.
  • Skips any contact that already has an open task from the last seven days, so your CSMs never get duplicate nags.
  • Posts a one-line summary at the end showing how many tasks were created and who they went to.
What do I need to use this?
  • A Metabase account with a saved question (card) that returns your at-risk customers. Useful columns are customer email, account owner, risk score, primary risk reason, and last-touched date.
  • A HubSpot login with permission to read and update contacts and to create tasks.
  • Risk-tracking properties on your HubSpot contact record (for example churn risk score and last risk review date). The agent can use your existing property names.
  • Account owners in HubSpot who can be assigned tasks.
How can I customize it?
  • Change the schedule. Run it daily, every other Monday, or on the first of the month instead of weekly.
  • Swap in a different Metabase question. Any saved question that returns one row per at-risk customer with an email column works.
  • Tune the task due date, priority, and outreach tone. Soften it for high-touch enterprise accounts or sharpen it for SMB save plays.
  • Change the dedupe window. Seven days is the default, but you can stretch it to two weeks or shrink it for hot accounts.
  • Adjust which HubSpot properties get written, or send the summary to Slack instead of as a reply.

Frequently asked questions

Do I need to know SQL or use the Metabase API?
No. As long as your at-risk list is a saved question in Metabase, the agent runs it for you. Editing the question itself still happens in Metabase the way your team is used to.
What if my Metabase question has parameters or filters?
That works. Tell the agent which parameter values to pass in (for example a tier filter or a region), and it will run the question with those values each Monday.
Will it work with HubSpot's free or starter plans?
Yes. Tasks, contacts, and contact properties are available on every HubSpot tier. You just need a property to store the risk score and a way to identify the account owner.
How does it avoid spamming my CSMs with duplicate tasks?
Before creating a task, the agent checks the contact's recent tasks. If there is an open follow-up from the last seven days, it skips that contact for this run. You can change the window.
What happens if a customer in the at-risk list is not in HubSpot?
The agent skips that row, notes it in the summary, and moves on. Nothing is created or modified for contacts it cannot find.
Can it post the summary to Slack or email it instead of replying in the workflow?
Yes. After the first run you can ask the agent to send the summary to a Slack channel, an email address, or both.

Stop chasing churn signals across tabs.

Connect Metabase and HubSpot once, and Geni runs your at-risk playbook every Monday morning.