AutomationFlowsSocial Media › Automated Football Match Analysis to Twitter

Automated Football Match Analysis to Twitter

Original n8n title: Footballanalytics AI Brain Workflow

FootballAnalytics AI Brain Workflow. Uses httpRequest, twitter. Scheduled trigger; 10 nodes.

Cron / scheduled trigger★★★★☆ complexity10 nodesHTTP RequestTwitter
Social Media Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Twitter 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 →

Download .json
{
  "name": "FootballAnalytics AI Brain Workflow",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "id": "schedule-trigger",
      "name": "Every 6 Hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        220,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "https://footballanalytics.pro/api/matches",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "get-todays-matches",
      "name": "Get Today's Matches",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Filter matches starting in next 12 hours\nconst now = new Date();\nconst in12Hours = new Date(now.getTime() + 12 * 60 * 60 * 1000);\n\nconst matches = $input.all()[0].json.matches || [];\n\nconst upcomingMatches = matches.filter(match => {\n  const matchDate = new Date(match.datetime);\n  return matchDate >= now && matchDate <= in12Hours;\n});\n\n// Return each match as separate item\nreturn upcomingMatches.map(match => ({\n  json: match\n}));"
      },
      "id": "filter-upcoming",
      "name": "Filter Upcoming Matches",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        660,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://footballanalytics.pro/api/analyze",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ fixtureId: $json.fixtureId, mode: 'consensus' }) }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          },
          "timeout": 120000
        }
      },
      "id": "analyze-match",
      "name": "AI Brain Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "high-confidence",
              "leftValue": "={{ $json.analysis.overallConfidence }}",
              "rightValue": 70,
              "operator": {
                "type": "number",
                "operation": "gte"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "filter-high-confidence",
      "name": "High Confidence?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1100,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Format prediction for social media\nconst analysis = $input.first().json.analysis;\nconst match = $input.first().json;\n\nconst consensus = analysis.consensus;\nconst confidence = analysis.overallConfidence;\n\n// Emoji mapping\nconst resultEmoji = {\n  '1': '\ud83c\udfe0',\n  'X': '\ud83e\udd1d',\n  '2': '\u2708\ufe0f'\n};\n\nconst matchResult = consensus.matchResult.prediction;\nconst goalsOver = consensus.goals.over25;\nconst btts = consensus.btts.prediction;\n\n// Create tweet\nconst tweet = `\ud83e\udde0 AI PREDICTION \ud83e\udde0\n\n\u26bd ${match.homeTeam?.name || 'Home'} vs ${match.awayTeam?.name || 'Away'}\n\n${resultEmoji[matchResult]} Result: ${matchResult === '1' ? 'Home Win' : matchResult === 'X' ? 'Draw' : 'Away Win'} (${consensus.matchResult.confidence}%)\n\n\u26bd Goals: ${goalsOver ? 'Over 2.5' : 'Under 2.5'} (${consensus.goals.confidence}%)\n\n\ud83c\udfaf BTTS: ${btts ? 'Yes' : 'No'} (${consensus.btts.confidence}%)\n\n\ud83d\udcca Overall Confidence: ${confidence}%\n\n#FootballPredictions #AIBetting #SportsBetting`;\n\nreturn [{\n  json: {\n    tweet,\n    fixtureId: match.fixtureId,\n    confidence,\n    analysis\n  }\n}];"
      },
      "id": "format-social",
      "name": "Format for Social Media",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        200
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "text": "={{ $json.tweet }}",
        "options": {}
      },
      "id": "post-twitter",
      "name": "Post to Twitter",
      "type": "n8n-nodes-base.twitter",
      "typeVersion": 2,
      "position": [
        1540,
        200
      ],
      "credentials": {
        "twitterOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://graph.facebook.com/v18.0/YOUR_PAGE_ID/feed",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "facebookGraphApi",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "message",
              "value": "={{ $json.tweet }}"
            }
          ]
        },
        "options": {}
      },
      "id": "post-facebook",
      "name": "Post to Facebook",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1540,
        340
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.telegram.org/bot{{ $credentials.telegramApi.token }}/sendMessage",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "chat_id",
              "value": "YOUR_TELEGRAM_CHANNEL_ID"
            },
            {
              "name": "text",
              "value": "={{ $json.tweet }}"
            },
            {
              "name": "parse_mode",
              "value": "HTML"
            }
          ]
        },
        "options": {}
      },
      "id": "post-telegram",
      "name": "Post to Telegram",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1540,
        480
      ]
    },
    {
      "parameters": {
        "jsCode": "// Log low confidence predictions\nconst analysis = $input.first().json.analysis;\nconst match = $input.first().json;\n\nconsole.log(`Low confidence (${analysis.overallConfidence}%) for match:`, match.fixtureId);\n\nreturn [{\n  json: {\n    skipped: true,\n    fixtureId: match.fixtureId,\n    confidence: analysis.overallConfidence,\n    reason: 'Below threshold'\n  }\n}];"
      },
      "id": "log-skipped",
      "name": "Log Skipped",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        420
      ]
    }
  ],
  "connections": {
    "Every 6 Hours": {
      "main": [
        [
          {
            "node": "Get Today's Matches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Matches": {
      "main": [
        [
          {
            "node": "Filter Upcoming Matches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Upcoming Matches": {
      "main": [
        [
          {
            "node": "AI Brain Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Brain Analysis": {
      "main": [
        [
          {
            "node": "High Confidence?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Confidence?": {
      "main": [
        [
          {
            "node": "Format for Social Media",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Skipped",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format for Social Media": {
      "main": [
        [
          {
            "node": "Post to Twitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveExecutionProgress": true,
    "errorWorkflow": ""
  },
  "staticData": null,
  "tags": [
    {
      "name": "Football Analytics"
    }
  ],
  "triggerCount": 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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

FootballAnalytics AI Brain Workflow. Uses httpRequest, twitter. Scheduled trigger; 10 nodes.

Source: https://github.com/serayd61/football-match-analyzer/blob/842ecd37e06ec6f39009da3cd8db27baa21e4dd8/n8n/ai-brain-workflow.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Social Media

Social media managers, creators, and brand accounts that rely on retweets for reach but want an automated, hands-off cleanup after campaigns to keep profiles tidy and on-brand.

HTTP Request, Twitter, Slack +1
Social Media

This workflow monitors brand mentions across multiple platforms (Twitter/X, Reddit, News) and automatically detects reputation crises based on sentiment analysis and trend detection. Multi-platform mo

Twitter, Reddit, HTTP Request +3
Social Media

Creator: Summer Chang

HTTP Request, Notion, Twitter
Social Media

This n8n workflow automates the process of finding, summarizing, and posting breaking news headlines on X (formerly Twitter). It combines Google Custom Search for finding the latest news articles with

Twitter, HTTP Request
Social Media

Symcio · SDG1 Poverty Digest. Uses httpRequest, linkedIn, twitter. Scheduled trigger; 6 nodes.

HTTP Request, LinkedIn, Twitter