When do you get hsg test?

Kaitlyn
My dr. Has mentioned getting hsg test to check if tubes are blocked next month if I'm not pregnant this month on my 5th cycle of clomid. What part of your cycle to you get the hsg test? If there is a blockage can the dye clear it or do you have to schedule surgery?