Foreman hooks module

I do use extensively foreman hooks module.
Right now I do some api calls to change foreman behavior.
Let’s say I create a new host, event named managed/before_create
Is there a way when foreman executes external script - change host name of machine and all next transaction will be with the new hostname?

Thank you