Browse the docs

Agent setup guide

Capsule Milestone Follow-up Task

When a Capsule opportunity moves to a milestone, the next task from your playbook is created for its owner.

Available About 5 min to set up

What it does

When a Capsule opportunity moves to a milestone, the next task from your playbook is created for its owner.

  • Starts when a Capsule opportunity moves to another milestone (or only the one you pick).
  • AI writes the next task from your playbook, or decides there is none.
  • Code checks the task and works out the due date: 2 business days.
  • The task is created on the opportunity for its owner.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Capsule CRM, connected with a personal access token (My Preferences → API Authentication Tokens).

What it doesn't do

  • It doesn't contact customers.
  • It doesn't change the opportunity.
  • An opportunity created straight into a milestone counts as reaching it.

Availability and plans

Available

Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Capsule CRM.
  • The app it watches, connected in Settings → Integrations (the agent starts from an app event).
  • About 5 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Capsule CRM

Connect Capsule CRM with a personal access token (Settings → Integrations → Capsule CRM).

3. Pick your Capsule account

Open the trigger and “Create the task” and pick your Capsule connection.

SettingWhat to enterIn step
Capsule accountThe Capsule account whose opportunities are followed. Pick your connected Capsule CRM account.“Opportunity reached a milestone”
Capsule account (same one)The same Capsule connection. Pick your connected Capsule CRM account.“Create the task”

4. Write your playbook

Open “Write the next task” and replace the placeholder.

SettingWhat to enterIn step
Your sales playbookReplace the placeholder with the next task for each milestone. It starts as “[YOUR SALES PLAYBOOK: FOR EACH MILESTONE (E.G. NEW, BID, NEGOTIATION, WON, LOST) THE NEXT TASK YOUR TEAM DOES, OR “NO TASK”]” until you replace it.“Write the next task”

5. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

6. Switch the trigger on

Open the trigger and click “Activate app trigger”: milestone changes are checked on the workflow's schedule.

How it works

The agent is a normal workflow with 8 steps (1 AI step). You can open, edit and monitor it like any other workflow.

  • Opportunity reached a milestone — Starts on “Opportunity milestone changed” in Capsule CRM (an app event). Starts a run when a Capsule opportunity moves to another milestone (checked on the workflow's schedule).
  • Work out the due date — Step. In code, not AI: the task is due in 2 business days (your time zone on this step, UTC otherwise).
  • Write the next task — AI step (runs on your AI provider key). AI reads the opportunity and your playbook and writes the next task for the owner, or says that no task is needed.
  • Task to create? — Step. In code: the playbook gives a task, and the task text is there without leftover placeholders.
  • Create it? — Decision: picks the branch to follow. No task in the playbook for this milestone: nothing is created.
  • No task — Kept in the run history. Branch: No task. The playbook has no task for this milestone.
  • Create the task — Capsule CRM: Create a task. Branch: Create. Creates the task on the opportunity for its owner in Capsule, due in 2 business days.
  • Task created — Kept in the run history. The owner has the next task on the opportunity.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. The sample has the same shape as a real event from the app.

Sample data fields

id, name, milestone_id, milestone, value, currency, party_id, party_name, owner_id, owner_name, expected_close_on, probability, description, updated_at, opportunity.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.

Go live

  • Open the trigger and click “Activate app trigger”: milestone changes are checked on the workflow's schedule.
  • Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Which milestones does it react to?

All of them by default; pick one on the trigger (e.g. Bid) to react only to that. Milestones your playbook gives no task get none.

Who gets the task?

The opportunity's owner in Capsule.

Does it contact the customer?

No. It only creates a task for your team.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .