---
title: "Sync New CRM Leads to a Daily AI Sales Digest with n8n"
description: "Build a scheduled n8n workflow that turns yesterday's HubSpot or Pipedrive leads into a concise AI sales briefing — posted to Slack every morning."
canonical: https://agentroost.app/en/blog/crm-daily-ai-sales-digest-n8n
date: 2026-06-04T04:00:00Z
---

[Canonical URL](https://agentroost.app/en/blog/crm-daily-ai-sales-digest-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:

1. **Schedule Trigger** fires at 7:45 AM on weekdays
2. **HTTP Request node** calls the HubSpot or Pipedrive API to pull contacts and deals created/updated in the last 24 hours
3. **Set node** shapes the raw JSON into a clean prompt string
4. **AI/LLM node** summarises activity, flags priorities and risks
5. **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):
```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

1. [Sign up at agentroost.app](/en/pricing) — takes about two minutes
2. Choose **n8n** as your framework, name your instance
3. Your private n8n editor opens at `https://<your-id>.agentroost.app` — it's yours, single-tenant, your login
4. Build the workflow above using the canvas: Schedule Trigger → HTTP Request → Set → AI node → Slack
5. 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 →](/en/pricing)

---

## 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.
