Automation library · Alerts and monitoring

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.

LargeCalls a model: OpenAIRetrieval

27 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 1Model 9Logic 6Service 11

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Real-Time F1 News ToolHttp Request ToolService
  4. 4Weather Data ToolHttp Request ToolService
  5. 5OpenAI EmbeddingsEmbeddings Open AiModel
  6. 6Recursive Text SplitterText Splitter Recursive Character Text SplitterModel
  7. 7Statistical Analysis ToolTool CodeModel
  8. 8OpenAI Embeddings1Embeddings Open AiModel
  9. 9Workflow ConfigurationSetLogic
  10. 10F1 Prediction AgentAgentModel
  11. 11Historical Data Retrieval ToolVector Store In MemoryModel
  12. 12Document LoaderDocument Default Data LoaderModel
  13. 13Historical Data Vector StoreVector Store In MemoryModel
  14. 14Fetch Current F1 Season DataHttp RequestService
  15. 15Fetch Driver StandingsHttp RequestService
  16. 16Fetch Constructor StandingsHttp RequestService
  17. 17Fetch Historical Race ResultsHttp RequestService
  18. 18Fetch Qualifying ResultsHttp RequestService
  19. 19Fetch Circuit InformationHttp RequestService
  20. 20Format Prediction OutputSetLogic
  21. 21Merge F1 DataCodeLogic
  22. 22Aggregate Historical DataAggregateLogic
  23. 23Check Prediction ConfidenceIfLogic
  24. 24Calculate Driver Performance MetricsCodeLogic
  25. 25Send High Confidence AlertSlackService
  26. 26Store Prediction in DatabasePostgresService
  27. 27Log to Prediction TrackerGoogle SheetsService

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.