Browse the docs

Agent setup guide

Salesforce Pipeline Hygiene

Every Monday, a cleanup list per owner for opportunities with past close dates, no activity or missing fields.

Available About 15 min to set up

What it does

Every Monday, a cleanup list per owner for opportunities with past close dates, no activity or missing fields.

  • Every Monday, queries Salesforce for open opportunities with a past close date, no activity in 14 days, no amount or no next step (up to 200).
  • Days are worked out in code, never by the AI: how long ago each close date passed, the days since the last activity and how new each opportunity is, in your trigger's time zone.
  • AI checks each one against your stage rules and names the exact fix (move the close date, log the activity, add the amount, write the next step).
  • Groups them into one cleanup list per owner, largest deals first.
  • Posts a team summary to your sales channel in Slack, with each owner's list as a reply in its thread. On a clean week it posts nothing.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Salesforce (with API access) and Slack, connected in Settings → Integrations.

What it doesn't do

  • It reports only: it never edits, closes or reassigns opportunities.
  • It checks up to 200 flagged opportunities per run (the largest pipelines may need the query narrowed, e.g. by team).
  • It posts in a channel thread; it doesn't DM each owner.
  • It doesn't draft follow-up emails (for HubSpot deals, see the Sales Follow-Up agent).

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: Salesforce and Slack.
  • Nothing to send: the agent runs on a schedule.
  • About 15 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 Salesforce

Connect your Salesforce org (Settings → Integrations → Salesforce). It needs API access (Enterprise edition or above).

3. Connect Slack

Connect the Slack workspace your sales team uses (Settings → Integrations → Slack).

4. Describe your hygiene rules

Open “Build each owner's cleanup list” and replace the placeholder with your stages and rules.

SettingWhat to enterIn step
Your stages and hygiene rulesReplace the placeholder with your opportunity stages, the fields each stage must have, and how many days without activity is too long (per stage if you like). It starts as “[DESCRIBE YOUR STAGES, THE FIELDS EACH STAGE MUST HAVE AND HOW MANY DAYS WITHOUT ACTIVITY IS TOO LONG HERE]” until you replace it.“Build each owner's cleanup list”

5. Pick your Salesforce account

Open “Find opportunities needing cleanup” and pick your connected org.

SettingWhat to enterIn step
Salesforce accountThe Salesforce org whose opportunities are checked. The connected user must be able to see all opportunities you want reported. Pick your connected Salesforce account.“Find opportunities needing cleanup”

6. Pick the Slack account and channel

Open “Post the team summary” and pick your account and channel, then pick the same account in “Post the owner's cleanup list”. Invite the app to private channels first (/invite @Fluxo Flow).

SettingWhat to enterIn step
Slack accountThe Slack workspace the report is posted to. Pick your connected Slack account.“Post the team summary”
Sales channelThe channel your sales team and managers watch, e.g. #sales.“Post the team summary”
Slack accountThe same Slack workspace, used to post each owner's list in the thread. Pick your connected Slack account.“Post the owner's cleanup list”

7. Test it with Dry Run

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

8. Switch the trigger on

Open the trigger, set your time zone and switch the schedule on. It runs every Monday at 7:30.

How it works

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

  • Mondays at 7:30 — Runs on a schedule (cron 30 7 * * 1, UTC — change it in the trigger's settings). Runs every Monday morning before the pipeline meeting. Set your time zone on the trigger.
  • Find opportunities needing cleanup — Salesforce: Run a SOQL query. Reads up to 200 open opportunities with a past close date, no activity in 14 days, no amount or no next step.
  • Check the dates — Step. In code, not AI: for each opportunity, how many days ago its close date passed, the days since its last activity (and whether that's 14 or more) and whether it was created in the last 3 days, in your time zone. Change the 14 days here (activity within.max: -14).
  • Build each owner's cleanup list — AI step (runs on your AI provider key). AI checks every opportunity against your rules, names the exact fixes and groups them into one cleanup list per owner plus a team summary; the days were worked out in code.
  • Anything to clean up? — Decision: picks the branch to follow. When the pipeline is clean, nothing is posted.
  • Pipeline clean — Kept in the run history. Branch: Clean. Nothing needed cleanup; the run history keeps the check.
  • Post the team summary — Slack: Post a message. Branch: Needs cleanup. Posts the week's hygiene summary to your sales channel; each owner's list goes in its thread.
  • Each owner — Repeats the steps below for each item (up to 50 per run). Repeats once per owner with something to clean up (up to 50 owners).
  • [For each item — “Each owner”] Post the owner's cleanup list — Slack: Reply in a thread. Replies in the summary's thread with this owner's opportunities and the fix for each.
  • Report posted — Kept in the run history. The run history keeps the summary and how many owner lists were posted.

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.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • For-each loops repeat only the first 3 items.

Go live

  • Open the trigger, set your time zone and switch the schedule on. It runs every Monday at 7:30.
  • Scheduled runs start only once the schedule is activated, and can't repeat faster than your plan's minimum interval.
  • 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

Does it update opportunities?

No. It reports the issues and the fix for each; owners clean up in Salesforce.

Can I change the 14-day threshold?

Yes: state your threshold in the rules (per stage if you like), change LAST_N_DAYS:14 in the query step, and the 14 days in “Check the dates” (activity within.max). The days themselves are always counted in code, never by the AI.

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.
  • Slack says the app isn't in the channel: in Slack, type /invite @Fluxo Flow in that channel (always needed for private channels).
  • It didn't run at the expected time: the schedule must be activated, and its time is in the trigger's timezone.
  • 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 .