Here I show you how to quickly flatten group tracks in Ableton without exporting it and then re importing it into Ableton.
Step1. Create a midi track
Step2. Put a compressor on it (you can use ableton built in compressor)
Step 3. Enable Sidechain and the listen to input (little headphone button)
Step 4. Choose your input for the sidechain (the group or track you want to flatten)
Step 5. Choose Pre FX/Post FX/Post Mixer if you have to
Step6. Create a Midi clip over the region you want to flatten
Step 7. Right click on the midi track you just created, and choose freeze and flatten
DONE