Skip to main content

Send daily CRM summary reports to Mattermost from HubSpot

Workflow preview

Workflow preview
100%
Send daily CRM summary reports to Mattermost from HubSpot preview
Open on n8n.io

1. Workflow Overview

Daily Report Generator with Mattermost and HubSpot This workflow automatically compiles key metrics from HubSpot (and optional internal data sources) into a concise daily summary and posts it to a ...

Best for

  • CRM automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.merge, n8n-nodes-base.code, n8n-nodes-base.hubspot

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by vinci-king-01.

Original n8n.io source

1.1 Workflow description

Title
Send daily CRM summary reports to Mattermost from HubSpot
Workflow name
Send daily CRM summary reports to Mattermost from HubSpot

Daily Report Generator with Mattermost and HubSpot

This workflow automatically compiles key metrics from HubSpot (and optional internal data sources) into a concise daily summary and posts it to a designated Mattermost channel. It helps sales and marketing teams stay informed without manually pulling reports or navigating multiple dashboards.

Pre-conditions/Requirements

Prerequisites

  • An n8n instance (self-hosted or n8n Cloud)
  • HubSpot account with a Private App token
  • Mattermost workspace with an incoming webhook enabled
  • (Optional) Internal REST API or database endpoint for additional data

Required Credentials

  • HubSpot Private App Token – Grants API access to Deals, Contacts, Activities, etc.
  • Mattermost Personal Access Token (or Incoming Webhook URL) – Permits message posting to channels
  • n8n User Management – Ensure the workflow has network access to HubSpot and Mattermost

Specific Setup Requirements

Component Requirement Example/Notes
Mattermost Create an Incoming Webhook or generate a PAT System Console → Integrations
HubSpot Create a Private App → Scopes: crm.objects.deals.read Settings → Integrations → Private Apps
Scheduler External cron job or n8n’s internal trigger* curl https://n8n.yourdomain.com/webhook/daily_report

*The provided template uses a Webhook node so you can trigger it via any scheduler (e.g., crontab, Zapier, GitHub Actions). Replace with the Cron node if preferred.

How it works

This workflow automatically compiles key metrics from HubSpot (and optional internal data sources) into a concise daily summary and posts it to a designated Mattermost channel. It helps sales and marketing teams stay informed without manually pulling reports or navigating multiple dashboards.

Key Steps:

  • Webhook Trigger: Waits for a daily call from an external scheduler.
  • HubSpot Node: Retrieves deal statistics, new contacts, and other CRM metrics.
  • HTTP Request Node: (Optional) Pulls supplementary data from an internal API.
  • Merge Node: Consolidates HubSpot and optional data sources.
  • Code / Set Nodes: Formats numbers, calculates KPIs, and builds a markdown message.
  • If Node: Guards against empty datasets or API failures.
  • Mattermost Node: Posts the formatted report to the chosen channel.
  • Respond to Webhook: Returns a JSON confirmation to the scheduler.

Set up steps

Setup Time: 15-20 minutes

  1. Import Template: In n8n, go to “Workflows → Import from File” and select the JSON template.
  2. Add Credentials: a. HubSpot → New credential → Paste Private App token b. Mattermost → New credential → Paste PAT or Webhook URL
  3. Configure Webhook URL: Copy the production URL of the Webhook node and add it to your external scheduler (e.g., crontab, Zapier).
  4. Adjust Query Parameters (HubSpot node): Modify filters (e.g., deal stage, create date) as needed.
  5. Edit Message Template (Code node): Update markdown formatting, include/exclude sections.
  6. Test Run: Manually execute the workflow. Verify the JSON response and Mattermost post.
  7. Activate: Toggle workflow to “Active”. Confirm your scheduler triggers it at the desired time.

Node Descriptions

Core Workflow Nodes:

  • stickyNote – Contains inline documentation and instructions.
  • Webhook – Primary trigger, receives the daily HTTP call.
  • HubSpot – Pulls deals, contacts, and engagement data.
  • HTTP Request – Fetches optional internal statistics (e.g., support tickets).
  • Merge – Combines HubSpot and HTTP results into one object.
  • Set – Selects and renames fields for clarity.
  • Code – Calculates KPIs (e.g., conversion rate) and assembles a markdown summary.
  • If – Checks for empty data arrays or API errors.
  • Mattermost – Sends the final message to a channel.
  • Respond to Webhook – Returns a success/failure payload to the caller.

Data Flow:

  1. WebhookHubSpot
  2. WebhookHTTP Request
  3. HubSpot + HTTP RequestMergeSetCodeIfMattermostRespond to Webhook

Customization Examples

Change Report Time Range

// HubSpot Node → Additional Fields
{
 "filterGroups": [{
 "filters": [{
 "propertyName": "createdate",
 "operator": "BETWEEN",
 "highValue": Date.now(),
 "value": Date.now() - 24 * 60 * 60 * 1000 // last 24h
 }]
 }]
}

Format Mattermost Message with Emojis

// Code Node (return statement)
return [{
 json: {
 text: `:bar_chart: **Daily CRM Report**\n\n• New Deals: ${newDeals}\n• New Contacts: ${newContacts}\n• Win Rate: ${winRate}%`
 }
}];

Data Output Format

The workflow outputs structured JSON data:

{
 "status": "success",
 "date": "2024-05-23",
 "hubspot": {
 "new_deals": 12,
 "new_contacts": 34,
 "win_rate": 27.1
 },
 "internal": {
 "tickets_opened": 8,
 "tickets_closed": 6
 },
 "mattermostPostId": "abc123xyz"
}

Troubleshooting

Common Issues

  1. 401 Unauthorized (HubSpot) – Verify Private App token and scopes. Regenerate if necessary.
  2. Message Not Posting – Ensure the Mattermost token has post:write or the webhook URL is valid.

Performance Tips

  • Cache HubSpot responses during testing to avoid hitting API limits.
  • Reduce payload size by selecting only the fields you need in the Set node.

Pro Tips:

  • Replace the Webhook node with the Cron node for an all-in-n8n schedule.
  • Use environment variables for tokens ({{$env.HUBSPOT_TOKEN}}) to avoid hard-coding secrets.
  • Add a second Mattermost node to DM managers for critical alerts (e.g., low win rate).

This is a community workflow template provided “as-is.” It is not officially supported by n8n GmbH. Always review and test in a development environment before deploying to production.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 📝 Workflow Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - ⚙️ Trigger & Config

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - 📡 Data Collection

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - 🛠️ Data Processing

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - 💾 Storage & Notification

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - 🚨 Error Handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Webhook Trigger

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1

Block 8 - Prepare Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3

Block 9 - Fetch Sales Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4

Block 10 - Sales Data OK?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 11 - Fetch Support Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4

Block 12 - Support Data OK?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 13 - Combine Results

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 2

Block 14 - Aggregate Metrics

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Generate PDF

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Upload Report to HubSpot

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 17 - HubSpot Upload OK?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 18 - Craft Mattermost Message

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Send Mattermost Notification

Type / Role
n8n-nodes-base.mattermost - mattermost
Config choices
Version 1

Block 20 - Compose Error Message

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Send Mattermost Error

Type / Role
n8n-nodes-base.mattermost - mattermost
Config choices
Version 1

Block 22 - Respond to Caller

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

3. Summary Table

Workflow Send daily CRM summary reports to Mattermost from HubSpot
Complexity advanced
Nodes 22
Categories CRM
Author vinci-king-01
Published 17 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12781/12781.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send daily CRM summary reports to Mattermost from HubSpot do?

Daily Report Generator with Mattermost and HubSpot This workflow automatically compiles key metrics from HubSpot (and optional internal data sources) into a concise daily summary and posts it to a ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM use case.