...very dangerous to ask on pages like this as you will get all sorts of advice from barrack room lawyers and it will put your mind in a spin...
A little patronising?! For every "barrack room lawyer" there's more than one guy offering good advice, which is the very purpose of EOS!
There are 17 autonomous regions in Spain, each with both their own rules and varying interpretations, so you are best advised to visit the planning department of your local town hall. Most likely you will be told you need a building licence which will cost €100/200 or so, but not all a bad thing as at least you get written confirmation.
If you hit a brick wall send me a PM as there are ways of speeding the process.
(do hope you're mind is not spinning too much )