I usually do this in the bottling bucket if it's a "chemical" flavoring. I.E. I recently brewed a BB Weizenbier kit and I bottled half the bottling bucket as straight Weizenbier and then I added the Blueberry beer flavoring "chemical" to the remainder in the bottling bucket. I don't know how you would do this with coffee unless you used ground fresh coffee in a muslin/grain bag. The Vanilla would be easy. The nice thing about doing it this way is you can add the flavoring, sample, add more if needed, sample, etc. until you get it right.
Some people don't like using the beer flavoring "chemicals" but that is another discussion!