if you've already got a conveyancer/solicitor, let him or her do it cos' writing a cooling-off notice should be included in the services which you paid for.
Otherwise you can write a notice yourself. No specific format required.
As I remember the cooling-off period is 3 business days for purchasing a property
Here is the body of the letter:
Following the building inspection conducted yesterday afternoon at the above property, I exercise my cooling-off rights to terminate the contract on the property with immediate effect.