Cast Rapid Fire and wait for the end?

Hello, with the trait of azerite, I have to wait for the end of rapid fire to have the buff of haste, for cons I can not do it in macro, it breaks once in two … Do you have a idea of ​​how to proceed?

/cast [nochanneling] Rapide fire

Dont work correctly

Thx

all the other abilities in the macro need to have [nochanneling] also. They are breaking the cast of rapid fire.