Sync New CRM Leads to a Daily AI Sales Digest with n8n
Most sales teams start the day the same way: logging into HubSpot or Pipedrive, squinting at a list of new contacts, filtering by date, skimming deal stages. By the time the standup starts, half the team is still catching up. The information was always there — the problem is the friction of turning raw CRM activity into a usable picture.
This guide shows you how to build a scheduled n8n workflow that handles that translation automatically. At 7:45 AM every weekday, it pulls everything that happened in your CRM in the last 24 hours, passes it through an AI node, and posts a structured digest to Slack — deals at risk, hot leads to call first, deals that moved forward, anything that stalled.
No laptop needs to be open. No Zapier step limit. No "who's going to run this?" The workflow runs on its own.
What the Workflow Does
At a high level, the flow is:
- Schedule Trigger fires at 7:45 AM on weekdays
- HTTP Request node calls the HubSpot or Pipedrive API to pull contacts and deals created/updated in the last 24 hours
- Set node shapes the raw JSON into a clean prompt string
- AI/LLM node summarises activity, flags priorities and risks
- Slack node posts the digest to
#sales-digest(or wherever)
The whole thing runs in under 20 seconds.
Building the Workflow, Step by Step
1. Schedule Trigger
Open your n8n canvas and drop a Schedule Trigger node. Set it to:
- Mode: Cron
- Cron expression:
45 7 * * 1-5(7:45 AM, Monday–Friday)
This fires the workflow automatically on weekdays without any manual input.
2. Pull Yesterday's CRM Data
Add an HTTP Request node. The exact URL depends on your CRM.
HubSpot — fetch recently created contacts:
GET https://api.hubapi.com/crm/v3/objects/contacts/search
Body (JSON):
{
"filterGroups": [{
"filters": [{
"propertyName": "createdate",
"operator": "GTE",
"value": "{{$now.minus({days: 1}).startOf('day').toMillis()}}"
}]
}],
"properties": ["firstname", "lastname", "email", "hs_lead_status", "lifecyclestage"],
"limit": 50
}
Pipedrive — fetch recently updated deals:
GET https://api.pipedrive.com/v1/deals?since={{$now.minus({days:1}).toISO()}}&api_token={{$credentials.pipedriveApi}}
Set your API key in n8n's Credentials vault once — it gets referenced securely from there in every run.
Tip: If you have both contacts and deals to pull, add two HTTP Request nodes in parallel using n8n's Merge node to combine the outputs before the next step.
3. Shape the Data with a Set Node
Raw API responses are noisy. Add a Set node to extract only what the AI actually needs. Map these fields:
| Output field | Source expression |
|---|---|
leads_summary |
{{ $json.results.map(c => c.properties.firstname + ' ' + c.properties.lastname + ' (' + c.properties.lifecyclestage + ')').join('\n') }} |
count |
{{ $json.total }} |
date |
{{ $now.minus({days:1}).toFormat('yyyy-MM-dd') }} |
This produces a compact string list that fits cleanly into an LLM prompt without burning tokens on JSON structure.
4. AI / LLM Node — Write the Digest
Add an AI node (or OpenAI Message Model node in older n8n builds — both work the same way in your AgentRoost instance). Set the prompt to something like:
You are a sales operations assistant. Below is yesterday's CRM activity for {{date}}.
NEW LEADS AND UPDATED DEALS ({{count}} total):
{{leads_summary}}
Write a concise morning digest for the sales team. Include:
- 3–5 leads to prioritise today and why
- Any deals that appear stalled or at risk
- A one-sentence overall picture of yesterday's pipeline health
Be direct. Skip pleasantries. Max 250 words.
Choose whatever model fits your preference — your AgentRoost instance has access to 350+ LLM models and you can switch in the node dropdown at any time. No API key to configure: the credits are already included in your subscription.
5. Post to Slack
Add a Slack node, connect it to your workspace, and set:
- Channel:
#sales-digest - Message:
{{ $json.message }}(the AI node's output) - Username:
Sales Bot
You can also prepend a header with an Edit Fields node:
*Daily Sales Digest — {{ $now.minus({days:1}).toFormat('EEE d MMM') }}*
{{ $json.message }}
6. Optional: Error Handling
Wrap the entire chain in an Error Trigger node. If the HubSpot API is down or the Slack token expires, n8n can notify you on a separate Slack channel (or send an email) instead of silently skipping a day.
Add an Error Trigger node on the canvas, connect it to a second Slack node pointed at #infra-alerts, and set the message to {{ $json.message }}.
Why Always-On Hosting Matters Here
A workflow that fires at 7:45 AM only works if something is running at 7:45 AM.
If you set this up locally and your laptop is closed, the digest doesn't fire. If you spin up a VPS, you're managing uptime, Docker, SSL, and renewals. If you use n8n Cloud, the AI nodes require you to bring your own OpenAI key — you're paying n8n AND paying OpenAI separately.
On AgentRoost, your own n8n instance runs on dedicated hardware and stays online around the clock. The Schedule Trigger fires on time every weekday, whether or not you're at your desk. The AI nodes work immediately — no API key to add, no spending cap to configure, no surprise month-end bills from your AI provider. The credits are bundled into your plan.
How to Set This Up on AgentRoost
- Sign up at agentroost.app — takes about two minutes
- Choose n8n as your framework, name your instance
- Your private n8n editor opens at
https://<your-id>.agentroost.app— it's yours, single-tenant, your login - Build the workflow above using the canvas: Schedule Trigger → HTTP Request → Set → AI node → Slack
- Activate the workflow (toggle top-right) — it runs every weekday from that moment
The AI nodes are pre-wired to included credits. The public HTTPS URL for webhooks is provisioned automatically. No DevOps required.
Starting at $19.99/mo all-in — one price covers compute, hosting, and AI usage. 14-day money-back guarantee. Cancel anytime.
See what's included in each plan →
Tips and Pitfalls
- Date math in n8n: Always use
$now.minus({days:1}).startOf('day')not a hardcoded timestamp. n8n uses Luxon — the expressions above are Luxon syntax. - API rate limits: HubSpot's v3 search endpoint allows 4 requests/second. For large teams with 200+ contacts per day, add a Wait node between paginated requests.
- Token count: If you have 100+ leads, the prompt can get long. Add a Limit node before the Set node to cap at the 20 most-recently-updated records, or summarise in batches and merge.
- Customising the digest: Swap the Slack node for an Email (SMTP) node or a Microsoft Teams node — the rest of the workflow stays identical.
- Multiple CRMs: Run parallel branches (one HTTP Request per CRM), merge with a Merge node set to Combine, then pass the combined string into one AI node. One digest, all your pipelines.
Frequently asked questions
Do I need an OpenAI API key to use the AI node in n8n on AgentRoost?
No. AgentRoost includes AI/LLM credits in every subscription plan. When you open your n8n instance, the AI node is already pre-wired — you pick a model from the dropdown and start building. You do not connect an external API key or manage a separate AI account.
Which CRMs work with this workflow?
Any CRM with a REST API works. HubSpot and Pipedrive are covered in this guide. Salesforce, Zoho, Attio, and Close all have REST or GraphQL APIs you can reach with n8n's HTTP Request node. n8n also has dedicated HubSpot and Pipedrive nodes with built-in OAuth credential management if you prefer those over raw HTTP calls.
What happens if the CRM API is down and the workflow fails?
Add an Error Trigger node connected to a Slack or email notification. If any node in your workflow throws an error, the Error Trigger fires and sends an alert instead of silently skipping the digest. This way the team knows immediately that the briefing didn't run, rather than assuming there was no CRM activity.
Can I cancel my AgentRoost plan if I decide this workflow isn't useful?
Yes. Plans are monthly, cancel anytime from the account dashboard. There's also a 14-day money-back guarantee, so if you build the workflow and it doesn't fit your team's process, you can get a full refund within the first two weeks.
Is my CRM data stored by AgentRoost?
No. The data passes through your n8n instance (which runs on hardware dedicated to your workspace) during workflow execution and is not persisted by AgentRoost. n8n itself logs execution data in your instance's own database — you can configure n8n's execution data retention settings inside your editor under Settings → Execution Data.