Top to furnace flue just blew off
Likely, little or no damage was done in a single rainstorm, unless it was a deluge. If you don't see damp spots under the furnace, there's no puddle inside it, and it works now, then the replacement cap is not urgent... until the next storm.
Also, you or the repairman can drill a hole through the replaced cap and pipe and put in a small, self-taping sheet metal screw to prevent a repetition, similar to the way a downspout is held to a rain gutter.