Hello and welcome to JustAnswer. My name is XXXXX XXXXX X am here to help you in any way I can.
A flashing check engine light is most likely due to the engine misfiring. Engine misfires can be caused by many things, including but not limited to the following: failed ignition coils, bad mass air flow readings, vacuum leaks, clogged fuel injectors, and low compression.
The first step is to connect an Audi compatible scan tool to check for faults. Then diagnose the concern based on those faults. Here are some guidelines.
You are going to see misfire codes (P0300 - P0306), but they are not going to be the root cause. This means that if you see misfire codes and a fault for something else (i.e. the mass air flow meter), then address the other fault. Once that is fixed, the misfire codes will most likely disappear as well.
If you see only two codes (i.e. P0300 & P0302), then suspect a failed ignition coil or maybe even a spark plug or fuel injector. Swap items such as the ignition coils. Clear the faults. Run the engine until it misfires. Recheck fault memory. If fault numbers changed (i.e. from P0302 to P0303), then you found your problem. If they don't change, then swap something else like the spark plug.
If you see multiple cylinders misfiring, suspect a vacuum leak, camshaft not in time, or mass air flow meter problem. If it is a 1.8T gas engine, check the crankcase breather lines under the intake manifold and the round check valves on the back of the intake manifold and on top of the airbox.
I hope this helps. Feel free to let me know what you find out.