agentic workflows

Form Logic

A race-day decision engine.

Form. Ratings. Odds. Ranked into one clear signal.

This is Form Logic.

Except it isn’t.

The product doesn’t exist. The workflow and Telegram bot do.

The device is how we imagined Form Logic might look if the system behind it existed as a physical product: a handheld race-day device, a kind of pocket racing almanac, with mysterious buttons, clicky-twisty dials, illuminated calculations and cryptic numbered selections.

Form Logic itself is a bespoke n8n workflow and Telegram bot built to explore agentic decision-making through horse-racing analysis.

Form Logic — the imagined device

Cut through the race-day noise.

Form Logic started with a simple question: could we capture and process the information surrounding a day’s horse racing, apply a consistent logic to it, and present likely win and place candidates without quite so much heavy reading and guesswork?

What started as a workflow idea developed into an n8n experiment, then became a working system.

system architecture

How it works

Form Logic is built across
40+ n8n nodes.

Form Logic — the 40+ node n8n workflow

For any given day of UK and Irish racing, Form Logic gathers racecard data, extracts and structures the relevant runner information, applies a defined scoring model, ranks the results and returns them through Telegram.

Form Logic — processing sequence

A shared processing core supports three different operating modes, with branching logic routing each request through the appropriate analysis path before the results are formatted and returned.

The logic

The scoring is deterministic rather than generated by an LLM.

Race and runner data are first structured into the fields needed by the scoring model. Previous results are weighted into a form score, ratings and odds contribute to win and place calculations, and time away is accounted for through a layoff factor.

These signals are combined into the score used to rank each runner.

The same inputs and scoring rules produce the same result.

interactive layers

Three modes, one system

⚡ MODEL 7

This was going to be the only output at first. It scans the day’s racing and returns seven of the strongest ranked selections, with one horse selected from each of seven different races.

💪🏻 POWER 25

Expands the results. It takes a wider view across UK and Irish racing, returning a ranked board of the day’s top 25 candidates.

🏇 RACE EXPLORER

The most interactive mode.

After seeing what the first two modes could produce, the obvious question became: what if we could choose the racecourse and select an individual race?

Race Explorer does exactly that. Form Logic analyses the field before returning one Telegram response containing the top four runners in ranked order.

Under the hood

Form Logic — the imagined device, exploded view

The workflow is built around a combination of data retrieval, transformation, deterministic scoring and interaction.

Racecards are retrieved over HTTP and parsed into structured race and runner data. Custom JavaScript nodes handle parsing, scoring and ranking, while branching and routing allow the same workflow to support Model 7, Power 25 and Race Explorer.

Multi-race modes use batching and loop control to process multiple races, accumulate viable candidates and rank them once the wider analysis is complete. Duplicate candidates are removed before the final ranked outputs are produced.

Telegram callbacks and inline keyboards create the interactive layer, allowing users to move through course and race selection before receiving the final analysis.

Form Logic — simplified system diagram

A working orchestrated system with deterministic logic, branching behaviours and interaction.

An improbable device

Most of the interesting part
happens invisibly.

So we started thinking about what that invisible system might look like if its inputs, calculations and outputs became a physical object.

It also gave us a good excuse to put Seedance 2.5 through its paces to create our 30-second ad, starting with a single product image and refining the instructions to communicate what this imagined product actually does.

The result is a fictional racing calculator: inputs become physical controls, calculations become illuminated displays, and ranked selections emerge as numbered outputs.

What comes next

V1 — Working System

WE ARE HERE

Race-day scoring and ranking
Three operating modes
Telegram interface

V2 — Memory

Historical storage
Temporal tracking
Signal changes over time
Adaptive analysis
Potential dedicated app

V3 — ?

Multi-user access?
A public-facing version?
Or something else entirely?

The original idea was always bigger than the first build, but getting the working core in place was the important first step.

V1 made the system work.

V2 will be about giving it memory.

V3 is undecided.

Creative Idea

What if race-day noise could become a clearer decision?

Working System

Build the logic, scoring, routing and interaction.

Visual Expression

Turn an invisible workflow into an imagined physical product.

Form Logic — the imagined device