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

By General Input

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

Integrations

  • Metabase
  • HubSpot

Type

Agentic Task

Categories

  • Customer Support
  • Sales

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.

Related prompts

Explore more prompts
Turn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it