1997 Audi A4 Stalling problems

Hello everyone,
I have a 1997 Audi A4 that has been acting a little bit strange lately. When it is started up and left to idle all of a sudden the RPMs drop from around 600-800 to 100-200 sometimes rebounding back up and sometimes the car just dies. This also is happening while I am driving and stopped at a stop light for a short time. It will idle fine then suddenly drop RPMs and if I don’t give it any gas then the car usually dies. I have just had some work done on it to try and fix this problem thinking it was the air flow sensor (or something like that) but apparently that is not the case.
Any ideas?
Thank you for your possible help!
Sincerely,
Emily

“I have just had some work done on it to try and fix this problem”

Are you thinking that the details would somehow be irrelevant? You had what work done? By whom? And on what basis? Do you have a check engine light and error codes? If so post the exact error codes. Also specify what the shop did to check/test things.

A run down of the state of maintenance on the car would also be helpful.

You probably have a vacuum leak, or something that can act like one (e.g. an EGR problem, brake booster issue), or a dirty of defective idle air control (IAC) valve.

Sorry, the reason that I left out the details is that I am not 100% sure what was done as the car is still at the shop. I know that the mass air flow sensor was replaced and the mechanic says he has tried everything that he can think of and has run out of options. I found out last night that my father, who previously had the car, has had the same issues for quite sometime. I will suggest that the mechanic try the things you suggested to see if they can help solve the problem. Thank you for your help and when I have more details I will update the post.
Emily