
Sleeper NFL Chatbot Starter
Description
Categories
📊 Productivity
Nodes Used
n8n-nodes-base.coden8n-nodes-base.coden8n-nodes-base.coden8n-nodes-base.mergen8n-nodes-base.airtablen8n-nodes-base.telegramn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
PriceGratuit
Views0
Last Updated11/28/2025
workflow.json
{
"id": "",
"meta": {},
"name": "Sleeper NFL Chatbot Starter",
"tags": [
{
"name": "Sleeper App"
},
{
"name": "NFL"
},
{
"name": "Fantasy Football"
},
{
"name": "Sports Analytics"
}
],
"nodes": [
{
"id": "048ab092-4ba8-4093-a799-058a92719c84",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
464
],
"parameters": {
"height": 320,
"content": "This chatbot will give you the ability to pull your Sleeper team players \n & position & team by typing it into a chatbot in Telegram.\n\nEnsure Telegram credentials are set via your n8n credentials panel before running \n\n\nBe sure to check your Sleeper App for your username & enter your username including upper or lower case letter. If entered incorrectly, no results will present 0 results back."
},
"typeVersion": 1
},
{
"id": "cf85115e-62e4-4c87-8a38-f01312515ec0",
"name": "Extract Username",
"type": "n8n-nodes-base.code",
"position": [
-384,
240
],
"parameters": {
"jsCode": "const message = $json.message.text || '';\nconst username = message.replace('/team ', '').trim();\n\nreturn [{ json: { username } }];\n"
},
"typeVersion": 2
},
{
"id": "b42b8d81-d198-4a3e-9f8b-38067c76817f",
"name": "Get Sleeper User ID",
"type": "n8n-nodes-base.httpRequest",
"position": [
-160,
240
],
"parameters": {
"url": "= https://api.sleeper.app/v1/user/{{ $json.username }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "b403d5d1-a969-4e14-805f-5aa0ef7d99b4",
"name": "Get Leagues",
"type": "n8n-nodes-base.httpRequest",
"notes": "This will need update for upcoming years",
"position": [
64,
240
],
"parameters": {
"url": "=https://api.sleeper.app/v1/user/{{$json[\"user_id\"]}}/leagues/nfl/2024",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "5133a61d-b60f-4e14-bb1e-366e322960f8",
"name": "Extract League ID",
"type": "n8n-nodes-base.code",
"position": [
288,
240
],
"parameters": {
"jsCode": "const leagues = $input.all();\nconst league = leagues[0].json; // Grab the first league from input items\nreturn [{ json: { league_id: league.league_id, owner_id: league.user_id } }];"
},
"typeVersion": 2
},
{
"id": "56aeb158-e61f-4e5a-98ec-1a190de40a95",
"name": "Get Rosters",
"type": "n8n-nodes-base.httpRequest",
"position": [
512,
240
],
"parameters": {
"url": "=https://api.sleeper.app/v1/league/{{$json[\"league_id\"]}}/rosters",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "65562cdb-bf4b-4aba-9e8e-16fdc43f6178",
"name": "Find User Roster",
"type": "n8n-nodes-base.code",
"position": [
736,
240
],
"parameters": {
"jsCode": "// Get Sleeper user ID from earlier node (make sure it's passed in!)\nconst sleeperUserId = $items('Get Sleeper User ID')[0].json.user_id;\n\n// All rosters pulled from GET /v1/league/{league_id}/rosters\nconst rosters = $input.all();\n\n// Find the correct user's team\nconst myRoster = rosters.find(roster => roster.json.owner_id === sleeperUserId);\n\nif (!myRoster) {\n throw new Error(`No roster found for Sleeper User ID: ${sleeperUserId}`);\n}\n\nconst playerIds = myRoster.json.players || [];\n\nconst formula = `OR(${playerIds.map(id => `{player_id} = \"${id}\"`).join(', ')})`;\n\nreturn [{\n json: {\n player_ids: playerIds,\n player_id: playerIds, // keep for downstream Airtable join\n airtable_filter: formula,\n sleeper_user_id: sleeperUserId\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "c7166e62-b1ca-45ef-90d7-f13598a26973",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"position": [
1408,
320
],
"webhookId": "7658fe50-b009-41cf-9dc0-c8f11102eb78",
"parameters": {
"text": "=You have {{ $items().filter(i => i.json.full_name).length }} players on your roster:\n\n{{ $items()\n .filter(i => i.json.full_name)\n .map(i => `${i.json.full_name} (${i.json.position} - ${i.json.team})`)\n .join(\", \") }}\n",
"chatId": "={{ $node[\"Send Message to Chatbot\"].json.message.chat.id }}\n",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "",
"name": "REPLACE_WITH_YOUR_TELEGRAMAPI_CREDENTIAL"
}
},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "b70e7170-b89b-4d7c-a547-acf011239217",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
400
],
"parameters": {
"width": 150,
"height": 144,
"content": "Please note this GET address will reference 2024 and will probably need to be changed for 2025"
},
"typeVersion": 1
},
{
"id": "61d63ad0-1554-480b-b2ed-0f30a0c7cc81",
"name": "Search records",
"type": "n8n-nodes-base.airtable",
"position": [
960,
240
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appGxp4GkT8p2FXWy",
"cachedResultUrl": "https://airtable.com/appGxp4GkT8p2FXWy",
"cachedResultName": "Fantasy Players Daily"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblE6hmNAQGTw3koH",
"cachedResultUrl": "https://airtable.com/appGxp4GkT8p2FXWy/tblE6hmNAQGTw3koH",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"filterByFormula": "={{ $json.airtable_filter }}"
},
"credentials": {
"airtableTokenApi": {
"id": "",
"name": "REPLACE_WITH_YOUR_AIRTABLETOKENAPI_CREDENTIAL"
}
},
"typeVersion": 2.1
},
{
"id": "a1021d98-5730-4357-8631-49cf0a9860e3",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1184,
320
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "159d29c9-709a-4bb8-8ca4-f33c515ec865",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
464
],
"parameters": {
"width": 304,
"height": 240,
"content": "Message back to your Telegram chatbot\n\nYou can change some of the text & information messaging if you want to be creative. \n\nKeep active when you need it on or manually play it through as inactive"
},
"typeVersion": 1
},
{
"id": "809f5164-0e2d-407c-9618-7e9b9c9732c2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
-48
],
"parameters": {
"color": 6,
"height": 256,
"content": "In Order to make these player_id fields useful, you'll want to add the Sleeper NFL Daily Sync workflow to get a data pull from Sleeper API.\n\nWithout the Airtable, this workflow will pull in player_ids.\n\nAlternatively, swap this node for a Google Sheet search if Airtable isn’t your stack.\n"
},
"typeVersion": 1
},
{
"id": "7c986aa9-8373-44e6-9b77-badec62c1298",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
32
],
"parameters": {
"width": 176,
"height": 192,
"content": "Please note that this pulls the first Sleeper league found. For users in multiple leagues, customize logic to prompt selection or filter by name."
},
"typeVersion": 1
},
{
"id": "4974c9a5-7659-4630-a8c1-8a95efc31879",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-64
],
"parameters": {
"color": 4,
"width": 608,
"height": 320,
"content": "# Sleeper NFL Chatbot Starter\n**You will need the following to run:**\n\n-Telegram Chatbot via the BotFather or use any Trigger for your messaging you would prefer.\n\n-Also, I use Airtable to sync my Player table. Please see Sleeper NFL Players Daily Sync template for an active player table. You can also use other ways to store the data for Sleeper Player API calls like Google Sheets, Access, etc.\n\nThis should give you a way to look up your team by username & basic information on players in your rosters using Sleeper App.\n"
},
"typeVersion": 1
},
{
"id": "73971579-392e-44b0-a421-adb14bacfae1",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
368
],
"parameters": {
"color": 5,
"width": 160,
"height": 144,
"content": "However, if you want to hardcode a username instead of using Telegram, you can modify this node directly."
},
"typeVersion": 1
},
{
"id": "fd549c6f-eaa1-49e4-95f5-f25ccfe5d270",
"name": "Send Message to Chatbot",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-608,
320
],
"webhookId": "23dcd8b4-1280-4c11-b0a3-3f813257c427",
"parameters": {
"updates": [
"message"
],
"additionalFields": {
"userIds": ""
}
},
"credentials": {
"telegramApi": {
"id": "",
"name": "REPLACE_WITH_YOUR_TELEGRAMAPI_CREDENTIAL"
}
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"Merge": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Get Leagues": {
"main": [
[
{
"node": "Extract League ID",
"type": "main",
"index": 0
}
]
]
},
"Get Rosters": {
"main": [
[
{
"node": "Find User Roster",
"type": "main",
"index": 0
}
]
]
},
"Search records": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Extract Username": {
"main": [
[
{
"node": "Get Sleeper User ID",
"type": "main",
"index": 0
}
]
]
},
"Find User Roster": {
"main": [
[
{
"node": "Search records",
"type": "main",
"index": 0
}
]
]
},
"Extract League ID": {
"main": [
[
{
"node": "Get Rosters",
"type": "main",
"index": 0
}
]
]
},
"Get Sleeper User ID": {
"main": [
[
{
"node": "Get Leagues",
"type": "main",
"index": 0
}
]
]
},
"Send Message to Chatbot": {
"main": [
[
{
"node": "Extract Username",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
}
}
}