I'm trying to build a small circuit that will run a fan for say 10 minutes, the timer would be triggered from an on / off pull switch.

The switch would trigger the timer to start on a change of state either on -> off or off -> on

This circuit would need to be compact enough to fit inside the fan housing and suitable for 230 V AC application.

I have an Xplair fan in a downstairs toilet that is run from a pull cord on / off bit it keeps being left running where people forget to switch it off, I could connect in the lighting circuit with a standard fan timer module but the toilet has a generous window and during the day when it is used the most the light is often not turned on, so the option to select to run the fan by pulling the switch, the fan housing has a pull switch module built in and despite looking I can not find an pushbutton type pull switch that fits the housing, an the timer module for this fan required the switch to be closed for 10 s before it runs, so this was a non-starter.

Ideally not IC based as something like a 555 would need additional power regulation which uses space.