This workflow follows the Gmail → Notion recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "\ud83d\udcca AI Tygodniowy Raport Sprzeda\u017cy | Portfolio aiautobusiness",
"nodes": [
{
"id": "sticky-intro",
"name": "\ud83d\udccc O tym workflow",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-320,
60
],
"parameters": {
"content": "## \ud83d\udcca AI Tygodniowy Raport Sprzeda\u017cy\n**Zbudowane przez aiautobusiness.pl**\n\nAutomatyczny raport co poniedzia\u0142ek rano \u2014 bez r\u0119cznego zbierania danych.\n\n**Jak to dzia\u0142a:**\n1. Uruchamia si\u0119 co poniedzia\u0142ek o 8:00\n2. Pobiera leady i transakcje z Notion CRM\n3. AI analizuje wyniki i pisze podsumowanie\n4. Wysy\u0142a raport na Slack i email\n\n**Integracje:** Notion CRM \u00b7 OpenAI GPT-4o \u00b7 Slack \u00b7 Gmail",
"height": 260,
"width": 360,
"color": 7
}
},
{
"id": "schedule-trigger",
"name": "\u23f0 Co Poniedzia\u0142ek 8:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
240,
360
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
],
"triggerAtHour": 8,
"triggerAtMinute": 0
}
]
}
}
},
{
"id": "notion-get-leads",
"name": "\ud83d\udccb Notion: Pobierz Leady (7 dni)",
"type": "n8n-nodes-base.notion",
"typeVersion": 2.2,
"position": [
480,
260
],
"credentials": {
"notionApi": {
"name": "<your credential>"
}
},
"parameters": {
"resource": "databasePage",
"operation": "getAll",
"databaseId": {
"__rl": true,
"value": "TWOJE_NOTION_DATABASE_ID",
"mode": "id"
},
"returnAll": true,
"filterType": "manual",
"filters": {
"conditions": [
{
"key": "Data|date",
"condition": "past_week"
}
]
},
"options": {}
}
},
{
"id": "aggregate-data",
"name": "\ud83d\udd22 Agreguj Dane",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
720,
360
],
"parameters": {
"mode": "runOnceForAllItems",
"jsCode": "const items = $input.all();\n\nconst totalLeads = items.length;\nconst hotLeads = items.filter(i => (i.json.properties?.Score?.number || 0) >= 60).length;\nconst coldLeads = totalLeads - hotLeads;\n\nconst avgScore = totalLeads > 0\n ? Math.round(items.reduce((sum, i) => sum + (i.json.properties?.Score?.number || 0), 0) / totalLeads)\n : 0;\n\nconst byStatus = {};\nitems.forEach(i => {\n const status = i.json.properties?.Status?.select?.name || 'Nieznany';\n byStatus[status] = (byStatus[status] || 0) + 1;\n});\n\nconst leadNames = items.slice(0, 5).map(i => {\n const title = i.json.properties?.title?.title?.[0]?.plain_text || 'Brak nazwy';\n const score = i.json.properties?.Score?.number || 0;\n return `- ${title} (score: ${score})`;\n}).join('\\n');\n\nreturn [{\n json: {\n totalLeads,\n hotLeads,\n coldLeads,\n avgScore,\n byStatus: JSON.stringify(byStatus, null, 2),\n topLeads: leadNames,\n tydzien: new Date().toLocaleDateString('pl-PL', { week: 'long' }),\n data: new Date().toLocaleDateString('pl-PL')\n }\n}];"
}
},
{
"id": "openai-summary",
"name": "\ud83e\udde0 AI: Napisz Raport",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.4,
"position": [
960,
360
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"parameters": {
"resource": "chat",
"model": "gpt-4o-mini",
"messages": {
"values": [
{
"role": "system",
"content": "Jeste\u015b analitykiem sprzeda\u017cy. Piszesz cotygodniowe raporty dla zespo\u0142u handlowego. Ton: konkretny, motywuj\u0105cy, oparty na danych. U\u017cywasz emotikonek dla czytelno\u015bci. Odpowiadasz po polsku."
},
{
"role": "user",
"content": "=Napisz tygodniowy raport sprzeda\u017cy na podstawie tych danych:\n\n\ud83d\udcc5 Tydzie\u0144: {{ $json.data }}\n\ud83d\udcca \u0141\u0105cznie lead\u00f3w: {{ $json.totalLeads }}\n\ud83d\udd25 Gor\u0105cych (\u226560): {{ $json.hotLeads }}\n\u2744\ufe0f Zimnych (<60): {{ $json.coldLeads }}\n\ud83d\udcc8 \u015aredni score: {{ $json.avgScore }}/100\n\nPodzia\u0142 wg statusu:\n{{ $json.byStatus }}\n\nTop 5 lead\u00f3w:\n{{ $json.topLeads }}\n\nRaport powinien zawiera\u0107:\n1. Kr\u00f3tkie podsumowanie tygodnia (2-3 zdania)\n2. Kluczowe metryki z interpretacj\u0105\n3. Co posz\u0142o dobrze\n4. Na co zwr\u00f3ci\u0107 uwag\u0119 w tym tygodniu\n5. 1 konkretna akcja na ten tydzie\u0144\n\nD\u0142ugo\u015b\u0107: max 300 s\u0142\u00f3w. Format: czytelny, z nag\u0142\u00f3wkami i emotikonkami."
}
]
},
"options": {
"temperature": 0.5,
"maxTokens": 600
}
}
},
{
"id": "slack-report",
"name": "\ud83d\udcca Slack: Wy\u015blij Raport",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
1200,
260
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
},
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#sprzeda\u017c",
"text": "=\ud83d\udcca *TYGODNIOWY RAPORT SPRZEDA\u017bY \u2014 {{ $('\ud83d\udd22 Agreguj Dane').item.json.data }}*\n\n{{ $json.message.content }}\n\n---\n_Raport wygenerowany automatycznie przez aiautobusiness.pl \ud83e\udd16_",
"otherOptions": {}
}
},
{
"id": "gmail-report",
"name": "\ud83d\udce7 Gmail: Raport na Email",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1200,
460
],
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"parameters": {
"operation": "send",
"sendTo": "twoj@email.pl",
"subject": "=\ud83d\udcca Raport sprzeda\u017cy \u2014 {{ $('\ud83d\udd22 Agreguj Dane').item.json.data }}",
"emailType": "html",
"message": "=<h2>\ud83d\udcca Tygodniowy Raport Sprzeda\u017cy</h2>\n<p><strong>{{ $('\ud83d\udd22 Agreguj Dane').item.json.data }}</strong></p>\n<hr>\n<p>{{ $('\ud83e\udde0 AI: Napisz Raport').item.json.message.content.replace(/\\n/g, '<br>') }}</p>\n<hr>\n<p><small>\ud83e\udd16 Raport wygenerowany automatycznie przez aiautobusiness.pl</small></p>",
"options": {}
}
}
],
"connections": {
"\u23f0 Co Poniedzia\u0142ek 8:00": {
"main": [
[
{
"node": "\ud83d\udccb Notion: Pobierz Leady (7 dni)",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udccb Notion: Pobierz Leady (7 dni)": {
"main": [
[
{
"node": "\ud83d\udd22 Agreguj Dane",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udd22 Agreguj Dane": {
"main": [
[
{
"node": "\ud83e\udde0 AI: Napisz Raport",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udde0 AI: Napisz Raport": {
"main": [
[
{
"node": "\ud83d\udcca Slack: Wy\u015blij Raport",
"type": "main",
"index": 0
},
{
"node": "\ud83d\udce7 Gmail: Raport na Email",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "portfolio"
},
{
"name": "raportowanie"
},
{
"name": "sprzeda\u017c"
}
]
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2notionApiopenAiApislackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
📊 AI Tygodniowy Raport Sprzedaży | Portfolio aiautobusiness. Uses notion, openAi, slack, gmail. Scheduled trigger; 7 nodes.
Source: https://gist.github.com/antonisetkowicz/eaf4481de16067d215d201a9d16f11d6 — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Virtual-Weather-Caster-Workflow. Uses httpRequest, googleDrive, openAi, gmail. Scheduled trigger; 20 nodes.
A scheduled process aggregates content from eight distinct data sources and standardizes all inputs into a unified format. AI models perform sentiment scoring, detect conspiracy or misinformation sign
AI-powered priority re-evaluation every 2 hours. Analyzes new signals, meeting decisions, emails, and blockers, then runs 3 AI passes (Impact, Urgency, Final Ranking) to suggest re-ranking. Only updat
Imagine a dedicated financial expert tirelessly working behind the scenes, sifting through every transaction, every investment move, and every accounting entry. That's exactly what this automated syst
Daily trigger scans your Notion database for unpublished blog ideas AI generates complete blog posts + engaging LinkedIn content using OpenAI (Blog Posting is not implemented yet) Creates custom image