Back to Integrations
integrationMatrix node
integrationNotion node

Matrix and Notion integration

Save yourself the work of writing custom integrations for Matrix and Notion and use n8n instead. Build adaptable and scalable Communication, and Productivity workflows that work with your technology stack. All within a building experience you will love.

How to connect Matrix and Notion

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Matrix and Notion integration: Create a new workflow and add the first step

Step 2: Add and configure Matrix and Notion nodes

You can find Matrix and Notion in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Matrix and Notion nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Matrix and Notion integration: Add and configure Matrix and Notion nodes

Step 3: Connect Matrix and Notion

A connection establishes a link between Matrix and Notion (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Matrix and Notion integration: Connect Matrix and Notion

Step 4: Customize and extend your Matrix and Notion integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Matrix and Notion with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Matrix and Notion integration: Customize and extend your Matrix and Notion integration

Step 5: Test and activate your Matrix and Notion workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Matrix to Notion or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Matrix and Notion integration: Test and activate your Matrix and Notion workflow

Score and route qualified leads to Notion and Matrix

Lead Scoring Pipeline – Matrix + Notion

This workflow automatically enriches incoming form leads, applies a customizable scoring model, then routes high-value prospects to a Notion CRM database and a Matrix channel for instant sales notification. It streamlines lead qualification by combining third-party enrichment APIs, conditional logic, and asynchronous batching—eliminating manual research and ensuring your sales team focuses on the best opportunities.

Pre-conditions/Requirements

Prerequisites
n8n instance (self-hosted or n8n cloud)
ScrapeGraphAI community node installed
Matrix community node installed
Notion Integration (internal integration or Notion OAuth)
Active third-party enrichment/validation APIs (e.g., Clearbit, Hunter, Kickbox) for scoring data
A Notion database set up as your “Leads” table with fields: Name, Email, Company, Score, Status, Enrichment

Required Credentials
ScrapeGraphAI API Key** – For optional web-scraping based enrichment
Notion OAuth2 / Integration Token** – To create & update pages in your CRM database
Matrix Username & Password** – For sending room messages
(Optional) Third-party API Keys** – Clearbit, Hunter, etc.

Additional Setup Requirements

Setting Example / Notes
Notion Database ID 8f3d49e8c8f74e6f9d32e8e2bf7c1c46
Matrix Room ID !aBcDeFgHiJ:matrix.org
Scoring Threshold (env var) LEAD_SCORE_MIN=70
Batch Size SPLIT_IN_BATCHES=10 (controls parallel requests)
Webhook URL for form submission https://your-n8n-instance/webhook/leads

How it works

This workflow automatically enriches incoming form leads, applies a customizable scoring model, then routes high-value prospects to a Notion CRM database and a Matrix channel for instant sales notification. It streamlines lead qualification by combining third-party enrichment APIs, conditional logic, and asynchronous batching—eliminating manual research and ensuring your sales team focuses on the best opportunities.

Key Steps:
Schedule / Webhook Trigger**: Starts on a schedule (daily) or via a form-submission webhook.
Split in Batches**: Processes leads in manageable chunks to avoid rate limits.
HTTP Requests**: Calls enrichment APIs (Clearbit, Hunter, etc.) to retrieve firmographic & technographic data.
Code (Scoring Logic): Calculates a numeric lead score using weighted criteria (industry, employee count, email validity, etc.).
If Node (Qualification)
: Checks if the computed score meets or exceeds the defined threshold.
Notion Node**: Inserts or updates the qualified lead record in your Notion CRM database.
Matrix Node**: Sends a rich-text message to the sales room with lead details and score.
Wait + Merge**: Handles asynchronous API limits and merges enrichment data back into the main flow.

Set up steps

Setup Time: 15-25 minutes

Clone the template in your n8n instance or import the JSON.
Set environment variables (LEAD_SCORE_MIN, SPLIT_IN_BATCHES, API keys) in n8n Settings → Variables.
Configure the Webhook/Schedule Trigger
Webhook: copy the URL to your form provider
Schedule: set cron (e.g., every hour).
Update HTTP Request nodes with your enrichment API endpoints & headers.
Map Notion fields: open the Notion node → choose your connection → select your Leads database → map data pins (Name, Email, etc.).
Enter Matrix credentials & Room ID in the Matrix node.
Adjust scoring weights in the Code node (weights object) to match your ICP (Ideal Customer Profile).
Execute the workflow once with test data, verify Notion rows and Matrix messages.
Activate the workflow and monitor via n8n’s execution list.

Node Descriptions

Core Workflow Nodes:
Schedule Trigger / Webhook** – Initiates the workflow on time-based interval or form submission.
SplitInBatches** – Limits API calls to avoid hitting rate caps.
HTTP Request (Enrichment)** – Queries external services for company, domain, and email data.
Set (Normalize)** – Formats API responses for scoring.
Code (Score Calculator)** – JavaScript that assigns points based on business rules.
If (Score ≥ Threshold?)** – Branches leads into “Qualified” or “Discard” paths.
Notion (Create/Update Page)** – Inserts the qualified lead into Notion database.
Matrix (Send Message)** – Notifies the sales team with lead context.
Merge (Rejoin Streams)** – Consolidates asynchronous branches before completion.
Sticky Note** – Documentation & config hints embedded directly in the canvas.

Data Flow:
Schedule/Webhook → SplitInBatches → HTTP Request (Enrichment) → Set → Code (Score) → If (Qualified?) →
a. (Yes) Notion → Matrix
b. (No) Wait (Cooldown) → Merge

Customization Examples

  1. Change Scoring Weights
    // Code node snippet
    const weights = {
    employeeCount: 0.4, // increase influence of company size
    emailDeliverability: 0.2,
    industryMatch: 0.25,
    techStack: 0.15,
    };

  2. Notify Different Matrix Rooms Based on Territory
    // If node expression
    {{ $json.country === 'US' ? '!usSales:matrix.org' : '!intlSales:matrix.org' }}

Data Output Format

The workflow outputs structured JSON data:

{
"name": "Jane Doe",
"email": "[email protected]",
"company": "Acme Co.",
"enrichment": {
"employeeCount": 120,
"industry": "SaaS",
"techStack": ["AWS", "React"]
},
"score": 83,
"qualified": true,
"notionPageId": "9b2a4c09-0bf4-4b58-988a-1f361b0a2c20",
"matrixEventId": "$15163622445EBvZJ:matrix.org"
}

Troubleshooting

Common Issues
Low or zero scores for valid leads – Review weighting logic and API response mapping in the Code node.
Notion “Missing required property” error – Ensure all mandatory database fields are mapped and Notion token has write access.
Matrix authentication failure – Double-check username/password or switch to an access token login method.

Performance Tips
Reduce SPLIT_IN_BATCHES size if you’re hitting API rate limits.
Enable “Execute Once” during testing to prevent excess API usage.

Pro Tips:
Store enrichment API keys as n8n credentials, not hard-coded strings.
Add a second If node to flag “Priority” leads (score > 90) for immediate follow-up.
Use n8n’s built-in logging to create an audit trail by writing each execution to a Loggly/Datadog endpoint.

This is a community template provided “as is.” Always test thoroughly in a non-production environment before activating in production.

Nodes used in this workflow

Popular Matrix and Notion workflows

Score and route qualified leads to Notion and Matrix

Lead Scoring Pipeline – Matrix + Notion This workflow automatically enriches incoming form leads, applies a customizable scoring model, then routes high-value prospects to a Notion CRM database and a Matrix channel for instant sales notification. It streamlines lead qualification by combining third-party enrichment APIs, conditional logic, and asynchronous batching—eliminating manual research and ensuring your sales team focuses on the best opportunities. Pre-conditions/Requirements Prerequisites n8n instance (self-hosted or n8n cloud) ScrapeGraphAI community node installed Matrix community node installed Notion Integration (internal integration or Notion OAuth) Active third-party enrichment/validation APIs (e.g., Clearbit, Hunter, Kickbox) for scoring data A Notion database set up as your “Leads” table with fields: Name, Email, Company, Score, Status, Enrichment Required Credentials ScrapeGraphAI API Key** – For optional web-scraping based enrichment Notion OAuth2 / Integration Token** – To create & update pages in your CRM database Matrix Username & Password** – For sending room messages (Optional) Third-party API Keys** – Clearbit, Hunter, etc. Additional Setup Requirements | Setting | Example / Notes | |---------------------------------|----------------------------------------------------------| | Notion Database ID | 8f3d49e8c8f74e6f9d32e8e2bf7c1c46 | | Matrix Room ID | !aBcDeFgHiJ:matrix.org | | Scoring Threshold (env var) | LEAD_SCORE_MIN=70 | | Batch Size | SPLIT_IN_BATCHES=10 (controls parallel requests) | | Webhook URL for form submission | https://your-n8n-instance/webhook/leads | How it works This workflow automatically enriches incoming form leads, applies a customizable scoring model, then routes high-value prospects to a Notion CRM database and a Matrix channel for instant sales notification. It streamlines lead qualification by combining third-party enrichment APIs, conditional logic, and asynchronous batching—eliminating manual research and ensuring your sales team focuses on the best opportunities. Key Steps: Schedule / Webhook Trigger**: Starts on a schedule (daily) or via a form-submission webhook. Split in Batches**: Processes leads in manageable chunks to avoid rate limits. HTTP Requests**: Calls enrichment APIs (Clearbit, Hunter, etc.) to retrieve firmographic & technographic data. Code (Scoring Logic)**: Calculates a numeric lead score using weighted criteria (industry, employee count, email validity, etc.). If Node (Qualification)**: Checks if the computed score meets or exceeds the defined threshold. Notion Node**: Inserts or updates the qualified lead record in your Notion CRM database. Matrix Node**: Sends a rich-text message to the sales room with lead details and score. Wait + Merge**: Handles asynchronous API limits and merges enrichment data back into the main flow. Set up steps Setup Time: 15-25 minutes Clone the template in your n8n instance or import the JSON. Set environment variables (LEAD_SCORE_MIN, SPLIT_IN_BATCHES, API keys) in n8n Settings → Variables. Configure the Webhook/Schedule Trigger Webhook: copy the URL to your form provider Schedule: set cron (e.g., every hour). Update HTTP Request nodes with your enrichment API endpoints & headers. Map Notion fields: open the Notion node → choose your connection → select your Leads database → map data pins (Name, Email, etc.). Enter Matrix credentials & Room ID in the Matrix node. Adjust scoring weights in the Code node (weights object) to match your ICP (Ideal Customer Profile). Execute the workflow once with test data, verify Notion rows and Matrix messages. Activate the workflow and monitor via n8n’s execution list. Node Descriptions Core Workflow Nodes: Schedule Trigger / Webhook** – Initiates the workflow on time-based interval or form submission. SplitInBatches** – Limits API calls to avoid hitting rate caps. HTTP Request (Enrichment)** – Queries external services for company, domain, and email data. Set (Normalize)** – Formats API responses for scoring. Code (Score Calculator)** – JavaScript that assigns points based on business rules. If (Score ≥ Threshold?)** – Branches leads into “Qualified” or “Discard” paths. Notion (Create/Update Page)** – Inserts the qualified lead into Notion database. Matrix (Send Message)** – Notifies the sales team with lead context. Merge (Rejoin Streams)** – Consolidates asynchronous branches before completion. Sticky Note** – Documentation & config hints embedded directly in the canvas. Data Flow: Schedule/Webhook → SplitInBatches → HTTP Request (Enrichment) → Set → Code (Score) → If (Qualified?) → a. (Yes) Notion → Matrix b. (No) Wait (Cooldown) → Merge Customization Examples Change Scoring Weights // Code node snippet const weights = { employeeCount: 0.4, // increase influence of company size emailDeliverability: 0.2, industryMatch: 0.25, techStack: 0.15, }; Notify Different Matrix Rooms Based on Territory // If node expression {{ $json.country === 'US' ? '!usSales:matrix.org' : '!intlSales:matrix.org' }} Data Output Format The workflow outputs structured JSON data: { "name": "Jane Doe", "email": "[email protected]", "company": "Acme Co.", "enrichment": { "employeeCount": 120, "industry": "SaaS", "techStack": ["AWS", "React"] }, "score": 83, "qualified": true, "notionPageId": "9b2a4c09-0bf4-4b58-988a-1f361b0a2c20", "matrixEventId": "$15163622445EBvZJ:matrix.org" } Troubleshooting Common Issues Low or zero scores for valid leads – Review weighting logic and API response mapping in the Code node. Notion “Missing required property” error – Ensure all mandatory database fields are mapped and Notion token has write access. Matrix authentication failure – Double-check username/password or switch to an access token login method. Performance Tips Reduce SPLIT_IN_BATCHES size if you’re hitting API rate limits. Enable “Execute Once” during testing to prevent excess API usage. Pro Tips: Store enrichment API keys as n8n credentials, not hard-coded strings. Add a second If node to flag “Priority” leads (score > 90) for immediate follow-up. Use n8n’s built-in logging to create an audit trail by writing each execution to a Loggly/Datadog endpoint. This is a community template provided “as is.” Always test thoroughly in a non-production environment before activating in production.

Build your own Matrix and Notion integration

Create custom Matrix and Notion workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Matrix supported actions

Me
Get current user's account information
Get
Get single event by ID
Upload
Send media to a chat room
Create
Send a message to a room
Get Many
Get many messages from a room
Create
New chat room with defined settings
Invite
Invite a user to a room
Join
Join a new room
Kick
Kick a user from a room
Leave
Leave a room
Get Many
Get many members

Notion supported actions

Append After
Append a block
Get Child Blocks
Get many child blocks
Get
Get a database
Get Many
Get many databases
Search
Search databases using text search
Get
Get a database
Get Many
Get many databases
Create
Create a page in a database
Get
Get a page in a database
Get Many
Get many pages in a database
Update
Update pages in a database
Create
Create a pages in a database
Get Many
Get many pages in a database
Update
Update pages in a database
Create
Create a page
Get
Get a page
Search
Text search of pages
Archive
Archive a page
Create
Create a page
Search
Text search of pages
Get
Get a user
Get Many
Get many users

FAQs

  • Can Matrix connect with Notion?

  • Can I use Matrix’s API with n8n?

  • Can I use Notion’s API with n8n?

  • Is n8n secure for integrating Matrix and Notion?

  • How to get started with Matrix and Notion integration in n8n.io?

Need help setting up your Matrix and Notion integration?

Discover our latest community's recommendations and join the discussions about Matrix and Notion integration.
Justin Cheu
Cris A. Works
Martin
Liam Skaff
AyS 0908

Looking to integrate Matrix and Notion in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Matrix with Notion

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon