This workflow follows the HTTP Request → Postgres 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": "Crypto Price Tracker",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "*/15 * * * *"
}
]
}
},
"id": "cron-trigger",
"name": "Every 15 Minutes",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"url": "https://api.coingecko.com/api/v3/simple/price",
"options": {
"qs": {
"ids": "bitcoin,ethereum,cardano,solana,polkadot,chainlink,avalanche-2,polygon,cosmos,algorand",
"vs_currencies": "usd",
"include_24hr_change": "true",
"include_24hr_vol": "true",
"include_market_cap": "true"
}
}
},
"id": "get-crypto-prices",
"name": "Get Crypto Prices",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
460,
300
]
},
{
"parameters": {
"jsCode": "// Process cryptocurrency data\nconst cryptoData = $input.first().json;\nconst processedData = [];\n\n// Map of coin IDs to names\nconst coinNames = {\n 'bitcoin': 'Bitcoin',\n 'ethereum': 'Ethereum',\n 'cardano': 'Cardano',\n 'solana': 'Solana',\n 'polkadot': 'Polkadot',\n 'chainlink': 'Chainlink',\n 'avalanche-2': 'Avalanche',\n 'polygon': 'Polygon',\n 'cosmos': 'Cosmos',\n 'algorand': 'Algorand'\n};\n\nfor (const [coinId, data] of Object.entries(cryptoData)) {\n const processed = {\n coinId,\n name: coinNames[coinId] || coinId,\n price: data.usd,\n change24h: data.usd_24h_change,\n volume24h: data.usd_24h_vol,\n marketCap: data.usd_market_cap,\n timestamp: new Date().toISOString(),\n // Calculate additional metrics\n priceChangePercent: data.usd_24h_change,\n isPositiveChange: data.usd_24h_change > 0,\n volumeRank: 0, // Will be calculated later\n marketCapRank: 0 // Will be calculated later\n };\n \n processedData.push(processed);\n}\n\n// Sort by market cap and assign ranks\nprocessedData.sort((a, b) => b.marketCap - a.marketCap);\nprocessedData.forEach((coin, index) => {\n coin.marketCapRank = index + 1;\n});\n\n// Sort by volume and assign ranks\nprocessedData.sort((a, b) => b.volume24h - a.volume24h);\nprocessedData.forEach((coin, index) => {\n coin.volumeRank = index + 1;\n});\n\nreturn processedData.map(coin => ({ json: coin }));"
},
"id": "process-crypto-data",
"name": "Process Crypto Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
680,
300
]
},
{
"parameters": {
"operation": "insert",
"table": "crypto_prices",
"columns": "coin_id, name, price, change_24h, volume_24h, market_cap, timestamp, price_change_percent, is_positive_change, volume_rank, market_cap_rank",
"values": "={{ $json.coinId }}, {{ $json.name }}, {{ $json.price }}, {{ $json.change24h }}, {{ $json.volume24h }}, {{ $json.marketCap }}, {{ $json.timestamp }}, {{ $json.priceChangePercent }}, {{ $json.isPositiveChange }}, {{ $json.volumeRank }}, {{ $json.marketCapRank }}"
},
"id": "save-crypto-prices",
"name": "Save Crypto Prices",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.4,
"position": [
900,
200
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "// Calculate market summary\nconst prices = $input.all().map(item => item.json);\n\nconst summary = {\n totalMarketCap: prices.reduce((sum, coin) => sum + coin.marketCap, 0),\n totalVolume: prices.reduce((sum, coin) => sum + coin.volume24h, 0),\n averageChange: prices.reduce((sum, coin) => sum + coin.change24h, 0) / prices.length,\n positiveChanges: prices.filter(coin => coin.isPositiveChange).length,\n negativeChanges: prices.filter(coin => !coin.isPositiveChange).length,\n topGainer: prices.reduce((max, coin) => coin.change24h > max.change24h ? coin : max, prices[0]),\n topLoser: prices.reduce((min, coin) => coin.change24h < min.change24h ? coin : min, prices[0]),\n timestamp: new Date().toISOString()\n};\n\nreturn { json: summary };"
},
"id": "calculate-summary",
"name": "Calculate Summary",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
900,
400
]
},
{
"parameters": {
"operation": "insert",
"table": "crypto_summary",
"columns": "timestamp, total_market_cap, total_volume, average_change, positive_changes, negative_changes, top_gainer, top_gainer_change, top_loser, top_loser_change",
"values": "={{ $json.timestamp }}, {{ $json.totalMarketCap }}, {{ $json.totalVolume }}, {{ $json.averageChange }}, {{ $json.positiveChanges }}, {{ $json.negativeChanges }}, {{ $json.topGainer.name }}, {{ $json.topGainer.change24h }}, {{ $json.topLoser.name }}, {{ $json.topLoser.change24h }}"
},
"id": "save-summary",
"name": "Save Summary",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.4,
"position": [
1120,
400
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "condition-1",
"leftValue": "={{ $json.averageChange }}",
"rightValue": 5,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "check-market-trend",
"name": "Check Market Trend",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1340,
400
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "n8n",
"mode": "name"
},
"text": "\ud83d\ude80 Crypto Market Update - Bullish Trend",
"otherOptions": {
"attachments": [
{
"color": "good",
"fields": [
{
"title": "Total Market Cap",
"value": "${{ Math.round($json.totalMarketCap / 1000000000) }}B",
"short": true
},
{
"title": "Total Volume",
"value": "${{ Math.round($json.totalVolume / 1000000000) }}B",
"short": true
},
{
"title": "Average Change",
"value": "{{ $json.averageChange.toFixed(2) }}%",
"short": true
},
{
"title": "Positive Changes",
"value": "{{ $json.positiveChanges }}/{{ $json.positiveChanges + $json.negativeChanges }}",
"short": true
},
{
"title": "Top Gainer",
"value": "{{ $json.topGainer.name }}: {{ $json.topGainer.change24h.toFixed(2) }}%",
"short": false
}
]
}
]
}
},
"id": "bullish-notification",
"name": "Bullish Notification",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.1,
"position": [
1560,
200
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "n8n",
"mode": "name"
},
"text": "\ud83d\udcc9 Crypto Market Update - Bearish Trend",
"otherOptions": {
"attachments": [
{
"color": "warning",
"fields": [
{
"title": "Total Market Cap",
"value": "${{ Math.round($json.totalMarketCap / 1000000000) }}B",
"short": true
},
{
"title": "Total Volume",
"value": "${{ Math.round($json.totalVolume / 1000000000) }}B",
"short": true
},
{
"title": "Average Change",
"value": "{{ $json.averageChange.toFixed(2) }}%",
"short": true
},
{
"title": "Negative Changes",
"value": "{{ $json.negativeChanges }}/{{ $json.positiveChanges + $json.negativeChanges }}",
"short": true
},
{
"title": "Top Loser",
"value": "{{ $json.topLoser.name }}: {{ $json.topLoser.change24h.toFixed(2) }}%",
"short": false
}
]
}
]
}
},
"id": "bearish-notification",
"name": "Bearish Notification",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.1,
"position": [
1560,
600
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Every 15 Minutes": {
"main": [
[
{
"node": "Get Crypto Prices",
"type": "main",
"index": 0
}
]
]
},
"Get Crypto Prices": {
"main": [
[
{
"node": "Process Crypto Data",
"type": "main",
"index": 0
}
]
]
},
"Process Crypto Data": {
"main": [
[
{
"node": "Save Crypto Prices",
"type": "main",
"index": 0
},
{
"node": "Calculate Summary",
"type": "main",
"index": 0
}
]
]
},
"Calculate Summary": {
"main": [
[
{
"node": "Save Summary",
"type": "main",
"index": 0
}
]
]
},
"Save Summary": {
"main": [
[
{
"node": "Check Market Trend",
"type": "main",
"index": 0
}
]
]
},
"Check Market Trend": {
"main": [
[
{
"node": "Bullish Notification",
"type": "main",
"index": 0
}
],
[
{
"node": "Bearish Notification",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [
{
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"id": "crypto",
"name": "crypto"
}
],
"triggerCount": 1,
"updatedAt": "2024-01-01T00:00:00.000Z",
"versionId": "1"
}
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
Crypto Price Tracker. Uses httpRequest, postgres, slack. Scheduled trigger; 9 nodes.
Source: https://github.com/kyletaylored/n8n-docker-demo/blob/84bda45802ceaf2a5ac14b7d45606f1d78cb750b/examples/n8n-demo/workflows/04-crypto-price-tracker.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.
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.
WF-7: Health Check. Uses httpRequest, slack, postgres. Scheduled trigger; 7 nodes.
Heavy IO — HTTP + DB + Slack (well-handled). Uses httpRequest, postgres, slack. Scheduled trigger; 5 nodes.
debug. Uses httpRequest, slack, redis, mailgun. Scheduled trigger; 60 nodes.