Alert owners about stale deals
A daily workflow that finds deals with no updates for a week and emails a summary.
Deals that sit untouched go cold and make the forecast unreliable. This workflow checks every morning and tells the team which deals need attention.
1. Create the workflow
Go to Workflows, click + New workflow and name it Stale deal alert.
2. Set the trigger
Choose On a schedule and set it to run every day at 8:00.
3. Find the stale deals
Add a Search records step:
| Setting | Value |
|---|---|
| Object | Opportunities |
| Filter | Updated at is before 7 days ago |
| Filter | Stage is not Won and not Lost |
| Limit | 100 |
4. Stop when there is nothing to report
Add a Branch step: continue only if the search returned at least one record.
5. Write the summary
Add a Code step that groups the deals by owner:
export const main = async ({ opportunities }) => {
const byOwner = {};
for (const deal of opportunities) {
const owner = deal.owner?.email ?? 'unassigned';
(byOwner[owner] ??= []).push(`- ${deal.name} (${deal.stage})`);
}
const lines = Object.entries(byOwner).map(([owner, deals]) => `${owner}\n${deals.join('\n')}`);
return { summary: `Deals with no update in 7 days:\n\n${lines.join('\n\n')}` };
};6. Send it
Add a Send email step to the sales manager, with the summary from the previous step as the body. Turn the workflow on.
Want each owner to get only their own deals? Replace step 6 with an Iterator over the owners and send one email per owner.