This workflow follows the HTTP Request → OpenAI 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": "MLB Odds + News Analysis (v1.108 compatible)",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "c26abecb-4225-4482-a14a-084b8bf22319",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-576,
-32
],
"id": "webhook1",
"name": "Webhook"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"name": "away_team",
"value": "={{ $json.text.split('vs')[0] || $json.text.split(',')[0] }}",
"type": "string"
},
{
"name": "home_team",
"value": "={{ $json.text.split('vs')[1] || $json.text.split(',')[1] }}",
"type": "string"
}
]
}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-384,
-32
],
"id": "parseteams1",
"name": "Parse Teams"
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.away_team || $json.awayTeam }}",
"operation": "contains",
"value2": "={{ $('Parse Teams').item.json.away_team }}"
},
{
"value1": "={{ $json.home_team || $json.homeTeam }}",
"operation": "contains",
"value2": "={{ $('Parse Teams').item.json.home_team }}"
}
]
},
"combineOperation": "all"
},
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
-208,
-128
],
"id": "checkteams1",
"name": "Check Teams"
},
{
"parameters": {
"method": "GET",
"url": "https://api.the-odds-api.com/v4/sports/baseball_mlb/odds/",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "regions",
"value": "us"
},
{
"name": "markets",
"value": "h2h"
},
{
"name": "oddsFormat",
"value": "american"
},
{
"name": "apiKey",
"value": ""
}
]
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-16,
-224
],
"id": "getodds1",
"name": "Get MLB Odds"
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.away_team }}",
"operation": "contains",
"value2": "={{ $('Parse Teams').item.json.away_team }}"
},
{
"value1": "={{ $json.home_team }}",
"operation": "contains",
"value2": "={{ $('Parse Teams').item.json.home_team }}"
}
]
},
"combineOperation": "all"
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
128,
-224
],
"id": "filter1",
"name": "Filter"
},
{
"parameters": {
"url": "https://newsapi.org/v2/everything",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "q",
"value": "={{ $json.away_team }} OR {{ $json.home_team }} AND MLB BASEBALL"
},
{
"name": "from",
"value": "={{ new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]}}"
},
{
"name": "sortBy",
"value": "popularity"
},
{
"name": "apiKey",
"value": ""
}
]
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
48,
-32
],
"id": "getnews1",
"name": "Get News"
},
{
"parameters": {
"modelId": {
"value": "gpt-4o-mini",
"mode": "list"
},
"messages": {
"values": [
{
"content": "You are a sports betting analyst. Analyze the raw odds data for {{ $('Parse Teams').item.json.away_team }} vs {{ $('Parse Teams').item.json.home_team }}:\n\n{{ JSON.stringify($json) }}"
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
320,
-224
],
"id": "oddsanalyst1",
"name": "Odds Analyst"
},
{
"parameters": {
"modelId": {
"value": "gpt-4o-mini",
"mode": "list"
},
"messages": {
"values": [
{
"content": "You are a sentiment analyst. Summarize recent news for {{ $('Parse Teams').item.json.away_team }} vs {{ $('Parse Teams').item.json.home_team }}:\n\n{{ JSON.stringify($json) }}"
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
320,
-32
],
"id": "newsanalyst1",
"name": "News Analyst"
},
{
"parameters": {
"jsCode": "return [{ json: { odds: items[0].json, news: items[1].json } }];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
560,
-128
],
"id": "mergeanalysis1",
"name": "Merge Analysis"
},
{
"parameters": {
"modelId": {
"value": "gpt-4o-mini",
"mode": "list"
},
"messages": {
"values": [
{
"content": "You are an expert MLB betting analyst. Given the odds and news analysis below, provide a final recommendation for the matchup {{ $('Parse Teams').item.json.away_team }} vs {{ $('Parse Teams').item.json.home_team }}:\n\nOdds Analysis:\n{{ JSON.stringify($json.odds) }}\n\nNews Analysis:\n{{ JSON.stringify($json.news) }}"
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
800,
-128
],
"id": "finalsynth1",
"name": "Final Synthesizer"
},
{
"parameters": {
"jsCode": "let text = $json.text || JSON.stringify($json);\ntext = text.replace(/\\\\n/g, '<br>');\nreturn [{ json: { html: `<div>${text}</div>` } }];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1056,
-128
],
"id": "formathtml1",
"name": "Format HTML"
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.html }}",
"options": {
"responseHeaders": {
"entries": [
{
"name": "Content-Type",
"value": "text/html; charset=utf-8"
}
]
}
}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.4,
"position": [
1232,
-128
],
"id": "respond1",
"name": "Respond"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Parse Teams",
"type": "main",
"index": 0
}
]
]
},
"Parse Teams": {
"main": [
[
{
"node": "Check Teams",
"type": "main",
"index": 0
},
{
"node": "Get News",
"type": "main",
"index": 0
}
]
]
},
"Check Teams": {
"main": [
[
{
"node": "Get MLB Odds",
"type": "main",
"index": 0
}
],
[]
]
},
"Get MLB Odds": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "Odds Analyst",
"type": "main",
"index": 0
}
]
]
},
"Get News": {
"main": [
[
{
"node": "News Analyst",
"type": "main",
"index": 0
}
]
]
},
"Odds Analyst": {
"main": [
[
{
"node": "Merge Analysis",
"type": "main",
"index": 0
}
]
]
},
"News Analyst": {
"main": [
[
{
"node": "Merge Analysis",
"type": "main",
"index": 1
}
]
]
},
"Merge Analysis": {
"main": [
[
{
"node": "Final Synthesizer",
"type": "main",
"index": 0
}
]
]
},
"Final Synthesizer": {
"main": [
[
{
"node": "Format HTML",
"type": "main",
"index": 0
}
]
]
},
"Format HTML": {
"main": [
[
{
"node": "Respond",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {},
"staticData": {},
"tags": [],
"meta": {
"templateCredsSetup": []
},
"version": 2
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
MLB Odds + News Analysis (v1.108 compatible). Uses httpRequest, openAi. Webhook trigger; 12 nodes.
Source: https://gist.github.com/rsdelarosa75/3b285d4840e91eacaaab345ac435e242 — 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 powerful n8n automation workflow is designed to execute advanced B2B lead enrichment and hyper-personalization for cold email outreach. By orchestrating a complex chain of data scraping, AI analy
Propulsar — Content Engine v3. Uses openAi, httpRequest, googleSheets. Webhook trigger; 73 nodes.
Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.
This workflow bridges the gap between raw product data and revenue sales tools. It automates the entire Product Qualified Lead (PQL) lifecycle—from real-time intent routing to churn prevention—reducin
Lua Nova - Sistema Completo. Uses postgres, httpRequest, openAi. Webhook trigger; 55 nodes.