I've found that the easiest way is to do it "live."
Press "R" to arm FL for recording..
You must be in song mode....
In the playlist, select the Main Automation pattern (or at least one that is open)
Start your song a few bars before the song ends
Hit play
In the mixer, just manually fade out...