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": "AI Trading Bot v4.0",
"nodes": [
{
"id": "1",
"name": "Market Data Ingestion",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "={{$credentials.marketDataAPI}}/real-time",
"options": {},
"queryParameters": {
"assets": "XAUUSD,US30,SP500,EURUSD,BTCUSD"
}
},
"credentials": {
"marketDataAPI": "<your credential>"
}
},
{
"id": "2",
"name": "Multi-Source Signal Aggregation",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": "const signals = aggregateSignals([TradingView, CoinMarketCap, Discord, Telegram, News]);\nreturn { signals: signals };"
}
},
{
"id": "3",
"name": "Sentiment Analysis",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": "const newsSentiment = analyzeHeadlines(items[0].json.news);\nreturn { sentimentScore: newsSentiment };"
}
},
{
"id": "4",
"name": "Risk Management Check",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"conditions": [
{
"value1": "={{$node[\"Market Data Ingestion\"].json.volatility}}",
"operation": "larger",
"value2": 2.0
},
{
"value1": "={{$node[\"AI Strategy Engine\"].json.riskScore}}",
"operation": "smaller",
"value2": 5
}
]
}
}
},
{
"id": "5",
"name": "AI Strategy Engine",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "const strategy = await runAIModel(items[0].json);\nreturn strategy;"
}
},
{
"id": "6",
"name": "Dynamic AI Recalibration",
"type": "n8n-nodes-base.cron",
"parameters": {
"interval": 5,
"mode": "Every X Seconds"
}
},
{
"id": "7",
"name": "Order Execution",
"type": "n8n-nodes-base.metaTrader",
"parameters": {
"operation": "placeOrder",
"instrument": "={{$node[\"Market Data Ingestion\"].json.symbol}}",
"units": "={{$node[\"AI Strategy Engine\"].json.lotSize}}",
"stopLoss": "={{$node[\"AI Strategy Engine\"].json.SL}}",
"takeProfit": "={{$node[\"AI Strategy Engine\"].json.TP}}",
"leverage": "={{$node[\"AI Strategy Engine\"].json.leverage}}"
}
},
{
"id": "8",
"name": "Performance Monitoring",
"type": "n8n-nodes-base.cron",
"parameters": {
"interval": 300,
"mode": "Every X Minutes"
}
}
],
"connections": {
"Market Data Ingestion": {
"main": [
[
{
"node": "Multi-Source Signal Aggregation",
"type": "main",
"index": 0
}
]
]
},
"Multi-Source Signal Aggregation": {
"main": [
[
{
"node": "Sentiment Analysis",
"type": "main",
"index": 0
}
]
]
},
"Sentiment Analysis": {
"main": [
[
{
"node": "Risk Management Check",
"type": "main",
"index": 0
}
]
]
},
"Risk Management Check": {
"main": [
[
{
"node": "AI Strategy Engine",
"type": "main",
"index": 0
}
]
]
},
"AI Strategy Engine": {
"main": [
[
{
"node": "Order Execution",
"type": "main",
"index": 0
}
]
]
},
"Dynamic AI Recalibration": {
"main": [
[
{
"node": "AI Strategy Engine",
"type": "main",
"index": 0
}
]
]
},
"Performance Monitoring": {
"main": [
[
{
"node": "Market Data Ingestion",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionTimeout": 60000,
"maxExecutionOrder": "vip",
"errorHandling": {
"retryCount": 3,
"retryInterval": 3000
}
}
}
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.
marketDataAPI
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI Trading Bot v4.0. Uses httpRequest, metaTrader. Scheduled trigger; 8 nodes.
Source: https://gist.github.com/Faisalaz9999/09e61da332ce8aecaf7340273cb8be3e — 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 template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n
Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o
This workflow is an improvement of this workflow by Greg Brzezinka.
N8N-Workflow-Github-Manager. Uses github, httpRequest, n8n. Scheduled trigger; 38 nodes.