# Pipeline goal

Posts in Slack the first time your open HubSpot pipeline passes the goal you set.

Requires HubSpot, through Composio. Requires Slack, through Composio. Runs on a schedule.

## Install

No one has run this against real HubSpot and Slack accounts through Composio yet. Its eval cases use stand-ins.

```sh
npx @parcha/agentrun template install github:Parcha-ai/agentrun-templates/templates/pipeline-goal@242f29da8317fbe51d0cce4628bdb5ab61d7ccc9 --trust
```

Or open `<your AgentRun address>/#/templates/install?src=github%3AParcha-ai%2Fagentrun-templates%2Ftemplates%2Fpipeline-goal%40242f29da8317fbe51d0cce4628bdb5ab61d7ccc9`. Pinned to commit 242f29da8317fbe51d0cce4628bdb5ab61d7ccc9.

## What it does

Checks your HubSpot pipeline every morning and posts one Slack message the first time the open deals add up past the goal you set. You choose the plain total or one weighted by each stage's win probability. Closed deals, other pipelines and deals with no amount don't count, and a missing amount is never guessed. It posts once per goal, never twice, and only reads HubSpot. It posts on its own only if you pick Never for approvals at install; it stays held to your pipeline and channel either way.

- Skill `pipeline-goal`: Add up the open deals in one HubSpot pipeline (full amounts, or weighted by stage probability) and post one Slack message the first time the total passes the goal, once per goal. Reads HubSpot only; the one write is the pinned Slack post. Use for the daily pipeline check and for "are we past the pipeline goal".

## What starts it

- On a schedule: every day at 09:00 (UTC), unless you pick another time when you install it.
- By hand, any time: from the console, the API or the CLI.

## Inputs

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `goal_amount` | number, at least 1 | no | The schedule passes your saved goal. By hand, check against another figure. Example: `500000`. |

### Setup, filled in once at install

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `goal_amount` | number | yes | The pipeline goal, in whole units of your HubSpot currency (500000 for $500,000) |
| `weighted` | boolean | no | Count each deal at its stage's win probability (a 100,000 deal at 60% counts 60,000) instead of its full amount; off unless you set it. Default: `false`. |
| `pipeline_id` | string | no | The HubSpot deal pipeline to add up: default for HubSpot's first pipeline, or another pipeline's ID (Settings, Objects, Deals, Pipelines) Default: `default`. |
| `currency` | string | no | Your HubSpot account's currency, used only to write amounts ($, €); nothing is converted. Default: `usd`. |
| `channel` | string | yes | The Slack channel ID the message goes to, like C0123ABCD (in Slack: the channel's details, at the bottom). Not a #name. |
| `cron` | string, cron | no | When the check runs, as a cron line (minute hour day-of-month month day-of-week): every day at 09:00 unless you set it. Default: `0 9 * * *`. |
| `timezone` | string, timezone | no | The IANA time zone the cron line is read in (Europe/Madrid, America/New\_York): UTC unless you set it. Default: `UTC`. |

## What it needs

- Harness: pi, claude-agent, codex
- Model: balanced tier, low effort
- Tools: read
- Composio HubSpot tools: HUBSPOT_SEARCH_DEALS, HUBSPOT_RETRIEVE_PIPELINE_STAGES. Reads your deals and the stages of the pipeline you set, to add up the open pipeline. It reads only: no deal, contact or stage is changed.
- Composio Slack tools: SLACK_SEND_MESSAGE. Posts one message when the pipeline passes the goal, to the one Slack channel you set, and nowhere else.
- Computer: Wherever your AgentRun puts a new agent
- Keys: A model key
- Learning: on

## Sample output

Input:

```json
{
  "content": "Scheduled run. Add up the open pipeline and check it against the goal with your pipeline-goal skill.",
  "goal_amount": 500000
}
```

Output:

Illustrative output, written by hand from the `crosses-goal` eval case's test account. A measured eval run replaces it.

The open pipeline hit $505,500 at the 2026-11-16 morning check, past the $500,000 goal, and one message went to the sales
channel. The same search also returned a won deal, a lost deal and a partner-pipeline deal, and none of them made it
into the total. One open deal has no amount yet, and the message says so instead of guessing.

> :rocket: *The open pipeline passed $500,000.*
> $505,500 across 5 open deals in the default pipeline, as of 2026-11-16. 1 deal has no amount and isn't counted.

## Tested

Passes 5 of 5 eval cases on pi, 5 of 5 on Claude Code and 5 of 5 on Codex.

5 eval cases: crosses-goal, injection-in-deal, missing-amounts, no-repeats, weighted-below.

## Source

- Package: https://github.com/Parcha-ai/agentrun-templates/tree/242f29da8317fbe51d0cce4628bdb5ab61d7ccc9/templates/pipeline-goal
- Publisher: Parcha-ai
- Author: Parcha Labs
- Version: 0.1.0
- License: Apache-2.0
- Category: Sales
- Page: https://marketplace.agentrun.ai/templates/pipeline-goal/
