# Predict F1 Race Winners with OpenAI and Historical Data: n8n workflow

> Started by a clock, and works across Google Sheets, Postgres, Slack and in-memory vectors.

Source: https://millionrounds.com/workflow/predict-f1-race-winners-with-openai-and-historical-data (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Predict F1 Race Winners with OpenAI and Historical Data

Started by a clock, and works across Google Sheets, Postgres, Slack and in-memory vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 27 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpredict-f1-race-winners-with-openai-and-historical-data)

**27 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 1 Model 9 Logic 6 Service 11

The steps in the order they run, from what starts it.

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Real-Time F1 News Tool** Http Request Tool *Service*
- 4 **Weather Data Tool** Http Request Tool *Service*
- 5 **OpenAI Embeddings** Embeddings Open Ai *Model*
- 6 **Recursive Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 7 **Statistical Analysis Tool** Tool Code *Model*
- 8 **OpenAI Embeddings1** Embeddings Open Ai *Model*
- 9 **Workflow Configuration** Set *Logic*
- 10 **F1 Prediction Agent** Agent *Model*
- 11 **Historical Data Retrieval Tool** Vector Store In Memory *Model*
- 12 **Document Loader** Document Default Data Loader *Model*
- 13 **Historical Data Vector Store** Vector Store In Memory *Model*
- 14 **Fetch Current F1 Season Data** Http Request *Service*
- 15 **Fetch Driver Standings** Http Request *Service*
- 16 **Fetch Constructor Standings** Http Request *Service*
- 17 **Fetch Historical Race Results** Http Request *Service*
- 18 **Fetch Qualifying Results** Http Request *Service*
- 19 **Fetch Circuit Information** Http Request *Service*
- 20 **Format Prediction Output** Set *Logic*
- 21 **Merge F1 Data** Code *Logic*
- 22 **Aggregate Historical Data** Aggregate *Logic*
- 23 **Check Prediction Confidence** If *Logic*
- 24 **Calculate Driver Performance Metrics** Code *Logic*
- 25 **Send High Confidence Alert** Slack *Service*
- 26 **Store Prediction in Database** Postgres *Service*
- 27 **Log to Prediction Tracker** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 27, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, Postgres, Slack, in-memory vectors
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets, Postgres, Slack and in-memory vectors accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 27 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 27 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpredict-f1-race-winners-with-openai-and-historical-data)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)[in-memory vectors](https://millionrounds.com/workflows?service=in-memory+vectors#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Monitor and track brand Sentiment on Facebook Groups** 27 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/monitor-and-track-brand-sentiment-on-facebook-groups)
- [**Monitor brand mentions with OpenAI and Brave Search** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/monitor-brand-mentions-with-openai-and-brave-search)
- [**Analyze customer feedback and alert negative sentiment** 26 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-customer-feedback-and-alert-negative-sentiment)
- [**Automated job scraping with Gemini** 26 steps · calls a model · Google Sheets, Outlook](https://millionrounds.com/workflow/automated-job-scraping-with-gemini)
- [**Optimize fleet routes and anomaly alerts with OpenAI and Slack** 28 steps · calls a model · Email, Postgres](https://millionrounds.com/workflow/optimize-fleet-routes-and-anomaly-alerts-with-openai-and-sla)
- [**Singapore university eligibility analyzer with WordPress** 26 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/singapore-university-eligibility-analyzer-with-wordpress)
