One more question, and I'm sorry if it sounds basic but: The iMac microphone is laser cut into the top of the computer. Is it possible that you have a piece of tape that might be covering the camera lens also covering the microphone? You could try tapping the spot where the mic is located to see if it registers at all.
Any work done inside of the case could have also led to the cable being severed or not plugged back in. That is another possibility.
You could also try flashing the NVRAM and resetting the SMC (system management controller):
NVRAM
https://support.apple.com/en-us/HT204063
SMC
https://support.apple.com/en-us/HT201295
Lastly, it isn't the end of the world to just have to use a USB mic. There are quite a few options out there that might even provide better quality audio for your specific environment than you had before.
Hope this helps.