n8n setup
Pull FighterAPI data into an n8n workflow on a schedule and send it on to Google Sheets, Slack or any other node. There are two ways in: n8n's HTTP Request node, which works today, and a community node that is not on npm yet.
1. Create an account
Sign up for 500 free credits a month, no card, and copy your API key from the dashboard. Every call uses credits at the price on its docs page, the same as any other way of calling the API.
2. Works today: the HTTP Request node
Add an HTTP Request node and set:
- Method:
POST - URL:
https://mcp.fighterapi.com/v1/get_schedule - Send Headers: on, with
x-api-keyset to your key andContent-Typeset toapplication/json - Send Body: on, JSON, with the tool's parameters, or
{}if it takes none
Better than pasting the key into the node: create a Header Auth credential named x-api-key and choose it under Authentication, so the key is stored once and stays out of exported workflows. Any tool works the same way: replace get_schedule in the URL with the tool's name from the docs.
The answer is JSON shaped {"data": {...}}. The rows are usually a list inside data; the Code node in the sample below turns that list into one n8n item per row so the next nodes can use each field.
3. The community node (not on npm yet)
We have built an n8n community node, n8n-nodes-sportsdatahq, in the sports-data-hq/n8n-nodes-sportsdatahq repository. It is not published to npm yet, so the install below does not work until it is. Use the HTTP Request node until then.
Once it is published:
- In n8n, open Settings, then Community Nodes, then Install.
- Enter
n8n-nodes-sportsdatahqand accept the prompt. n8n's own guide covers self-hosted installs and n8n Cloud. - Create a SportsDataHQ API credential and paste your key.
- Add the SportsDataHQ node, pick a sport and a tool, and give it parameters as JSON. Each row of the answer becomes one item.
4. Sample workflow
A schedule trigger runs once a day at 10:00, calls get_schedule, turns its rows into items, keeps the rows that mention a team code you choose, and sends them to Google Sheets and Slack. In n8n, create a workflow, press Ctrl+V (or Cmd+V) on the canvas with this JSON on your clipboard, then:
- Put your key in the
x-api-keyheader, or switch the node to a Header Auth credential. - Set
YOUR_TEAM_CODEin the Filter node, and edit it to match whatever field you care about; the filter reads the whole row as text. - Attach your Google Sheets and Slack credentials and set
YOUR_SHEET_IDandYOUR_CHANNEL_ID. Delete either branch if you only want one.
{
"name": "FighterAPI get_schedule to Google Sheets and Slack",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "days",
"daysInterval": 1,
"triggerAtHour": 10
}
]
}
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0001",
"name": "Every day at 10:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://mcp.fighterapi.com/v1/get_schedule",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "YOUR_API_KEY"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{}",
"options": {}
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0002",
"name": "Call get_schedule",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
220,
0
]
},
{
"parameters": {
"mode": "runOnceForAllItems",
"language": "javaScript",
"jsCode": "const data = $input.first().json.data || {};\nconst lists = Object.values(data).filter(Array.isArray);\nconst rows = lists.sort((a, b) => b.length - a.length)[0] || [];\nreturn rows.map((row) => ({ json: row }));"
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0003",
"name": "One item per row",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
440,
0
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f00a1",
"leftValue": "={{ JSON.stringify($json) }}",
"rightValue": "YOUR_TEAM_CODE",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0004",
"name": "Keep my team",
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
660,
0
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "id"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": {},
"matchingColumns": [],
"schema": []
},
"options": {}
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0005",
"name": "Append to Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
900,
-100
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "YOUR_CHANNEL_ID",
"mode": "id"
},
"text": "={{ JSON.stringify($json) }}",
"otherOptions": {}
},
"id": "5b1c6d9e-0a1f-4a52-9d52-0a7e3c2f0006",
"name": "Post to Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.3,
"position": [
900,
100
]
}
],
"connections": {
"Every day at 10:00": {
"main": [
[
{
"node": "Call get_schedule",
"type": "main",
"index": 0
}
]
]
},
"Call get_schedule": {
"main": [
[
{
"node": "One item per row",
"type": "main",
"index": 0
}
]
]
},
"One item per row": {
"main": [
[
{
"node": "Keep my team",
"type": "main",
"index": 0
}
]
]
},
"Keep my team": {
"main": [
[
{
"node": "Append to Google Sheets",
"type": "main",
"index": 0
},
{
"node": "Post to Slack",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
}
}The workflow makes one call a day. Check get_schedule for its credit cost and for what each row holds, then widen or narrow the filter to match.
5. What you can do with the data
Data you pull through n8n is covered by the same terms as any other call. The one-page summary is usage rights; what each timestamp means is on data timing and rights. A question these pages do not answer: email support@fighterapi.com.