buongiorno a tutti

sto provando a fare questo trigger mysql per un'installazione personalizzata della piattaforma di e-learning Docebo.

codice:
create trigger html 
before insert on learning_organization 
for each row if new.objectType='htmlpage' 
then 
set new.idpage=new.idresource; 
end
Quando vado a compilarlo il DBMS mi da quest'errore: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

Qualche idea? Su postgresql ne ho fatti centinaia di trigger anche + complessi di questo, su mysql invece sto avendo mille problemi