RecipesHubSpot
HubSpot pipeline
FreePipeline value, deals by stage, reps, and won this week. Your agent holds a HubSpot token with read scopes. Botopticon is not affiliated with HubSpot.
Access
HubSpot private app token, CRM read scopes
Required. Env HUBSPOT_ACCESS_TOKEN, HUBSPOT_PIPELINE. Mode api_key.
- crm.objects.deals.read
- crm.schemas.deals.read
- crm.objects.owners.read
You need to be a HubSpot super admin. Open Development > Legacy apps > Create legacy app > Private. Name it Botopticon board. On the Scopes tab add only crm.objects.deals.read, crm.schemas.deals.read, and crm.objects.owners.read. All three are read scopes; add no write or sensitive-data scope. Create the app and copy the access token from the Auth tab. The token can only do what its scopes allow. HubSpot asks super admins to rotate it every 6 months. Put the pipeline id in HUBSPOT_PIPELINE (the main sales pipeline's id is default).
HubSpot MCP is fine if the agent already has it. Ask it only to read deals and owners.
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
Board
Sample · not your account.
Pipeline value
By stage
- QualifiedOpen44.4% deals
- ProposalOpen33.3% deals
- NegotiationOpen22.2% deals
Reps
- 1Jordan P82,000USD
- 2Avery K61,000USD
- 3Casey M43,000USD
Won this week
- Tue$12,000 · Deal #18234
- Mon$2,400 · Deal #18190
Command Tiles
ProSample · not your account. The agent puts the ask on the board. You answer there. How Command Tiles work
Weight pipeline by stage
Needs youApproval · HubSpot
Weight Pipeline value by each stage's win probability instead of the raw sum?
Today it sums amount on every open deal.
Won this week from when?
Needs youQuestion · HubSpot
Should Won this week start on Monday, on Sunday, or cover the last 7 days?
Tiles
- Pipeline value
- By stage
- Reps
- Won this week
- Pipeline value. Sum of amount on open deals in HUBSPOT_PIPELINE.
State map
- Pipeline value. value = sum of amount on open deals (home currency when there is more than one). Subtitle counts deals without amount. needs_you stays false, except 401 -> needs kind "blocker": Replace HUBSPOT_ACCESS_TOKEN.
- By stage. One row per open stage, max = all open deals (at least 1). First stage "queued", later stages "building". Never done, verified, merged, or live. No open deals: one row {"label":"No open deals","value":0,"max":1}.
- Reps. Rank owners by open amount, first name and last initial, plus Unassigned. Ranking only.
- Won this week. Label "<amount> · Deal #<deal id>", amount with one currency symbol (e.g. "$12,000"). Never a deal name, contact name, or email. Time as the weekday. tone "ok". props.state "idle". An empty week posts an empty list.
Verify
The agent runs these on the first run, then reports.
- GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
- POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
- Post for real. Each reply has ok true, a pane_id, and board_name "HubSpot pipeline".
- Call list_tiles (or open the board): 4 tiles on "HubSpot pipeline", none stale.
- Then tell me those four results in one short message.
Keep it current
A small script, not an LLM loop. It runs every 15 minutes. It posts to “HubSpot pipeline” only when a tile changes, and reads BOTOPTICON_TOKEN and HUBSPOT_ACCESS_TOKEN and HUBSPOT_PIPELINE from the environment.
An LLM routine every few minutes spends your usage and adds nothing new.
Setup
01
Make a HubSpot read token
HubSpot (super admin) > Development > Legacy apps > Create legacy app > Private. Add only crm.objects.deals.read, crm.schemas.deals.read, and crm.objects.owners.read, then copy the token from the Auth tab. Keep it in HUBSPOT_ACCESS_TOKEN and the pipeline id in HUBSPOT_PIPELINE (default for the main sales pipeline). Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
02
Create a Botopticon token
In the app, open Connection tokens and create one named after this board. It starts with bot_ and is shown once. Save it as BOTOPTICON_TOKEN where the agent runs. It posts to Botopticon. It is not the HubSpot key.
03
Paste the prompt into your agent
Open the tab for Grok Bot, Muse, MCP, Cursor, Claude, or curl. The agent checks the token, dry-runs every tile, posts to the HubSpot pipeline board, and reports back.
04
Let the script keep it current
The agent writes a small script that checks every 15 minutes and posts only what changed. A quiet tile overnight is normal.
Snippets
Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.
Same recipe, one tab per platform. The prompt fetches the source and posts. Do not paste the sample numbers as live data.
Click Use this recipe first so the board exists.
Paste this into Grok Bot. Set BOTOPTICON_TOKEN in its environment or secret store first.
1. Goal
Keep my Botopticon board "HubSpot pipeline" current with live HubSpot data.
Any agent that can make HTTPS calls can do this. You report; I decide.
2. Connect
- Botopticon token (starts with bot_): Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.
- HTTP (works everywhere): POST https://www.botopticon.com/api/ingest
Headers: Authorization: Bearer <token>, Content-Type: application/json
- MCP (optional, same token): https://www.botopticon.com/api/mcp, tool post_tile. If an MCP tool returns HTML or an error, use HTTP.
3. Source access
HubSpot: read HUBSPOT_ACCESS_TOKEN, HUBSPOT_PIPELINE from your environment (HubSpot private app token, CRM read scopes). If one isn't set, ask me.
You need to be a HubSpot super admin. Open Development > Legacy apps > Create legacy app > Private. Name it Botopticon board. On the Scopes tab add only crm.objects.deals.read, crm.schemas.deals.read, and crm.objects.owners.read. All three are read scopes; add no write or sensitive-data scope. Create the app and copy the access token from the Auth tab. The token can only do what its scopes allow. HubSpot asks super admins to rotate it every 6 months. Put the pipeline id in HUBSPOT_PIPELINE (the main sales pipeline's id is default).
Scopes: crm.objects.deals.read, crm.schemas.deals.read, crm.objects.owners.read.
HubSpot MCP is fine if the agent already has it. Ask it only to read deals and owners.
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
4. Board
Send "board": "HubSpot pipeline" on every post. On a Free workspace with one board, posts land on that board, and the reply warns board_ignored_free when the names differ.
5. Tiles
Bot "HubSpot" on every tile. Never change the tile keys.
- pipe-value, kpi, "Pipeline value". Sum of amount on open deals in HUBSPOT_PIPELINE. States: value = sum of amount on open deals (home currency when there is more than one). Subtitle counts deals without amount. needs_you stays false, except 401 -> needs kind "blocker": Replace HUBSPOT_ACCESS_TOKEN. ttl_seconds 43200.
- by-stage, progress, "By stage". States: One row per open stage, max = all open deals (at least 1). First stage "queued", later stages "building". Never done, verified, merged, or live. No open deals: one row {"label":"No open deals","value":0,"max":1}. ttl_seconds 43200. needs_you stays false.
- reps-now, leaderboard, "Reps". States: Rank owners by open amount, first name and last initial, plus Unassigned. Ranking only. ttl_seconds 43200. needs_you stays false.
- won-week, feed, "Won this week". States: Label "<amount> · Deal #<deal id>", amount with one currency symbol (e.g. "$12,000"). Never a deal name, contact name, or email. Time as the weekday. tone "ok". props.state "idle". An empty week posts an empty list. ttl_seconds 43200. needs_you stays false.
6. Fetch notes
Read the current HubSpot CRM API docs. Base https://api.hubapi.com, header Authorization: Bearer <HUBSPOT_ACCESS_TOKEN>. Objects: Deal (amount, dealstage, pipeline, closedate, hubspot_owner_id, hs_lastmodifieddate, hs_is_closed_won), pipeline stages (label, displayOrder, metadata.isClosed), Owner (firstName, lastName). Scope everything to HUBSPOT_PIPELINE.
Pipeline value. Sum amount on open deals (stages whose metadata.isClosed is false). Use amount_in_home_currency if the account has more than one currency. A deal with no amount counts 0; say it in the subtitle, e.g. "18 open deals · 2 without amount".
By stage. Progress rows, one per open stage in displayOrder: value = deals in that stage, max = all open deals (at least 1). The first stage is state "queued", later open stages "building". Never use done, verified, merged, or live. With no open deals, post one row {"label":"No open deals","value":0,"max":1,"stage":"None"}.
Reps. Rank owners by open amount. Label "<first name> <last initial>", plus an "Unassigned" row. Ranking only.
Won this week. Deals with hs_is_closed_won true and closedate since Monday 00:00 in my timezone, newest first, up to 10. Label "<amount> · Deal #<deal id>", e.g. "$12,000 · Deal #18234". Format the amount once, with one currency symbol. Deal names are often customer names, so never print a deal name, contact name, or email. Time as the weekday. tone "ok". props.state "idle". An empty week posts an empty list.
No tile here asks a person to act. If HubSpot answers 401, post Pipeline value with needs_you true and needs {"who":"HubSpot","kind":"blocker","ask":"Replace HUBSPOT_ACCESS_TOKEN"} and keep the last value.
- Stages: GET /crm/v3/pipelines/deals/{HUBSPOT_PIPELINE}/stages (label, displayOrder, metadata.isClosed), once an hour.
- Open deals: POST /crm/v3/objects/deals/search, filters pipeline EQ HUBSPOT_PIPELINE and dealstage IN <open stage ids>, limit 200; follow paging.next.after.
- Won this week: the same search with hs_is_closed_won EQ true and closedate GTE <Monday 00:00 in ms>.
- Owners: GET /crm/v3/owners?limit=100 once an hour.
- Look-back: Each run, search deals with hs_lastmodifieddate since your last run, so a deal won or moved between checks still lands in Won this week and By stage; recount totals only when something changed. Search allows 5 requests a second and 10,000 results per query.
7. Posting rules
Fields: bot, tile, type, title, subtitle, props, needs_you, needs, ttl_seconds, board, brief (link optional). Send the full body each time; a post without needs or link clears it.
needs is required whenever needs_you is true: {"who","kind":"task|issue|question|blocker|approval","ask"} (link and detail optional).
Limits: title shows 24 characters (max 80). Subtitle shows 48 (cut at 80). Row labels 64. Feed labels 280. needs.ask 140 on one line. needs.who 48.
Post a tile only when its body changes. Do not invent numbers. Do not post the same body again just to keep a tile fresh.
8. Verify on the first run
a) GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
b) POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
c) Post for real. Each reply has ok true, a pane_id, and board_name "HubSpot pipeline".
d) Call list_tiles (or open the board): 4 tiles on "HubSpot pipeline", none stale.
e) Then tell me those four results in one short message.
9. Keep it current
Write a small script (no LLM in the loop). Run it every 15 minutes. Use cron or a loop that holds a lock. It keeps a hash of each body, posts only the tiles that changed, retries once on 429 or 5xx, stops re-posting a body that got a 4xx, reads BOTOPTICON_TOKEN and HUBSPOT_ACCESS_TOKEN and HUBSPOT_PIPELINE from the environment, never logs them, and has a --dry flag.
Don't set up an LLM routine that runs every few minutes; it spends my usage and adds nothing.
On the board, a quiet tile with an old "updated" time is normal. A stale tile means your script stopped.
10. Report back
One short message: the token check, the dry-run result, each pane_id, the board name, and the schedule you chose.
FAQ
- Which pane turns amber?
- None for normal numbers. Pipeline value turns amber only if HubSpot rejects the token. By stage keeps one open row, so it never leaves the board for being finished. Won this week shows amounts and deal ids, never deal or contact names.
- Does this run on the Free plan?
- Yes. Every tile in this recipe is a Free type. A Free workspace still has one board and 8 live tiles. Using this recipe adds the sample tiles to that board.
- Does Botopticon store the HubSpot key?
- Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
- How does the board stay current?
- A small script fetches the source and posts a tile only when its body changes. A quiet tile is fine: nothing changed. A stale tile means the agent stopped checking. Fifteen minutes after a tile goes stale it leaves the board, and it comes back on the next post.
- Why did a tile leave the board?
- Three reasons. A progress tile with every row finished leaves 5 minutes later. A status tile set to done leaves 5 minutes later. A stale tile leaves 15 minutes after it goes stale. The next post brings it back.