AI & RAG
Index Closed-Lost Salesforce Deals into the Battlecard Knowledge Base
On every closed-lost opportunity in Salesforce, this workflow extracts the loss reason and competitor, summarizes the notes, and writes a clean.
How it runs
The automated pipeline, trigger to output.
- TriggerOpportunity set to Closed Lost in SalesforceSalesforce
- LogicSkip if competitor or loss reason missing
- ActionSummarize notes into structured win-loss recordOpenAI
- ActionEmbed and upsert into knowledge basePostgres
- OutputPost capture digest to SlackSlack
What it does
Whenever a deal is marked closed-lost in Salesforce, it captures the loss reason, the winning competitor, and the free-text notes, distills them into a structured win-loss entry, and stores it as an embedded record so your answerbot can retrieve it later.
When to use it
Use it to keep your battlecard knowledge base fresh automatically instead of relying on someone to manually copy CRM notes. Ideal once you have a Slack or chat answerbot that reads from the same Postgres vector store.
How it works
- 1A Salesforce opportunity moves to Closed Lost, firing the trigger.
- 2A filter confirms a competitor and loss reason are present; deals without them are skipped.
- 3The opportunity notes are summarized by an LLM into a structured win-loss record (competitor, objection, what we missed).
- 4The summary is embedded and upserted into the Postgres knowledge base keyed by competitor.
- 5A short digest is posted so the team knows a new loss was captured.
Set it up
What you configure once, before turning it on.
- 1Connect SalesforceAccounts, opportunities, cases.
- 2Connect PostgresAny Postgres URL — query, write, migrate.
- 3Connect OpenAIModels, embeddings, files.
- 4Connect SlackChannels, DMs, threads, mentions.
- 5Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 6Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 7Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More AI & RAG workflows
Coda-grounded sales answer bot with citations in Slack
Reps ask product, pricing, or competitive questions in Slack and get an answer drawn only from your Coda knowledge hub, with links to the exact docs and rows it pulled from.
Weekly knowledge-gap digest from unanswered rep questions
Each week, scans rep questions the answer bot couldn't ground in Coda, clusters the recurring gaps.
Pre-meeting prep brief grounded in Coda and CRM
Before each booked sales meeting, builds a one-page prep brief by combining the account's HubSpot context with grounded talking points and objection responses pulled from your…
Publish a Grounded API FAQ Page to Confluence Weekly
Each week, clusters the top unanswered or repeated API questions, generates spec-grounded answers with citations.
Detect Breaking API Changes from Spec Diffs and Alert Owners
Compares the new OpenAPI spec against the previous version on each GitLab merge, uses retrieval over the changelog to classify whether changes are breaking.
Re-Index API Specs on GitLab Merge to Keep the Answer Bot Fresh
Watches GitLab merges to your API repo, detects changed OpenAPI specs and changelog files, re-chunks and re-embeds only what changed.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
