Prioritize sourcing projects with Notion, Groq, Slack, and Gmail alerts

Go to Workflow
0 views
Built by WeblineIndia WeblineIndia
Created on August 31, 2026

Description

Quick Overview
This workflow runs every Monday morning to pull unscored sourcing initiatives from a Notion database, calculate a risk-weighted priority score, optionally generate a Groq-based AI rationale for higher-priority items, write results back to Notion, post a ranked report to Slack, and email an alert for critical scores.

How it works
Runs weekly on Monday at 08:00.
Retrieves all Notion database pages where the “Priority Score” property is empty and maps the key project metrics into a clean structure.
Calculates a priority score for each initiative using value, urgency, supplier risk, business impact, and effort.
Uses Groq to generate a 2-sentence procurement rationale only for items with a priority score of 20 or higher, and assigns a default rationale for lower-scored items.
Sorts the initiatives by priority score (highest first) and updates each Notion page with the computed “Priority Score” and “AI Rationale.”
Compiles a single “Weekly Sourcing Priority Report” message and posts it to a Slack channel.
Checks the highest score in the batch and sends a Gmail alert email if it exceeds 50.

Setup
Connect your Notion credentials and select the target database ID, ensuring it has properties for Project Name, Value, Urgency, Supplier Risk, Business Impact, Effort, Priority Score, and AI Rationale.
Add a Groq API credential (Chat Model) to enable AI rationale generation for items scoring 20 or higher.
Add Slack credentials and set the destination channel (currently #social) for the weekly report.
Add Gmail credentials and replace RECEIVER_MAIL_HERE with the alert recipient email address.
Adjust the score thresholds (20 for AI rationale, 50 for email escalation) if your scoring scale differs.

Nodes Used (6)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
Notion
n8n-nodes-base.notion
Slack
n8n-nodes-base.slack