Hi, welcome to Just Answer.
Thanks, becuase the check engine lamp is illumianted, retreiving diagnostic codes from the engine computer is the first step to take. This can be done with an OBD II code reader or scan tool. If you have an AutoZone in your area, they'll usually scan the codes for no charge or rent you the code reader. With those code(s) I can further entail the possible causes.
Now, from the description of your problem, it sounds like you may have two seperate issues going on. But the first item to check for the slippage of the transmission is the ATF (automatic transmission fluid) level and condition. If the fluid is low, it will cause slippage as you described. The fluid is correctly checked and filled on these through special VW equipment, however..you can check the fluid level using the fill spout on the transmission...accessed from underneath. If the fluid is low, you need to top off with VW synthetic ATF. If the check engine lamp came on about the same instance the slippage began, the code stored in the computer may be for an internal transmission failure...which can often lead to a complete overhaul.
The problem with the engine not idling, may be due to a dirty IAC (Idle Air Control) valve, and gummed up throtle body. To correct this condition, you can use over the counter throtle body spray cleaner to wipe down the inside of the throtle body as well as the blade. Than remove the IAC valve from the intake and clean it thoroughly as well.
Let me know what codes you pull, and if you would like to attempt the cleaning yourself, I can provide some instruction...
Lead Technician
VW Factory training, ASE Master Technician, Adv. Engine Performance 10 years