This workflow follows the Postgres → Slack 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": "Daily Sales Report",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"id": "schedule-node",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT \n DATE(created_at) as date,\n COUNT(*) as orders,\n SUM(amount) as revenue\nFROM orders\nWHERE created_at >= NOW() - INTERVAL '24 hours'\nGROUP BY DATE(created_at)",
"options": {}
},
"id": "postgres-node",
"name": "Fetch Sales Data",
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"position": [
450,
300
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"functionCode": "const data = items[0].json;\nconst date = data.date;\nconst orders = data.orders;\nconst revenue = data.revenue;\nconst avgOrder = revenue / orders;\n\nreturn [{\n json: {\n report: `\ud83d\udcca Daily Sales Report - ${date}\\n\\n` +\n `Orders: ${orders}\\n` +\n `Revenue: $${revenue.toFixed(2)}\\n` +\n `Avg Order: $${avgOrder.toFixed(2)}`\n }\n}];"
},
"id": "function-node",
"name": "Format Report",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
650,
300
]
},
{
"parameters": {
"channel": "#sales-team",
"text": "={{$json.report}}",
"options": {}
},
"id": "slack-node",
"name": "Send to Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [
850,
300
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Fetch Sales Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch Sales Data": {
"main": [
[
{
"node": "Format Report",
"type": "main",
"index": 0
}
]
]
},
"Format Report": {
"main": [
[
{
"node": "Send to Slack",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"tags": []
}
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.
postgresslackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Daily Sales Report. Uses postgres, slack. Scheduled trigger; 4 nodes.
Source: https://github.com/Schimmilab/n8n-workflow-builder/blob/d82676d3bf98cc595196a94415d6b16d2006d557/examples/02_scheduled_report.json — 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.
This workflow automatically monitors PostgreSQL database data quality and detects structural or statistical anomalies before they impact analytics, pipelines, or applications.
Data ETL Pipeline - Daily Sales Report. Uses postgres, awsS3, moveBinaryData, emailSend. Scheduled trigger; 13 nodes.
The template allows to make Dropcontact batch requests up to 250 requests every 10 minutes (1500/hour). Valuable if high volume email enrichment is expected.
System Health Check. Uses httpRequest, postgres, slack. Scheduled trigger; 10 nodes.
Crypto Price Tracker. Uses httpRequest, postgres, slack. Scheduled trigger; 9 nodes.