HSG test question

If I want to do an <a href="https://glowing.com/glow-fertility-program">IUI</a>, do I have to do the HSG test before I can? Is it mandatory??