Albert, I've done this three different ways
1. The first time was with a stout: I brewed an entire pot of Sulawesi coffee, cooled it, and added to the secondary. The result was bitter, oily and lacked head retention. It took years before that beer came around, fortunately it was high ABV. I still have 3 bottles left (from 1995...!

) The last time I had one, it was really good. After 15 years in the bottle, it's hard for me to open these--like that really expensive or rare cigar sitting in the back of your humi. One day....

2. The next two times were with a porter. Instead of hot brewing, I let some Sumatra coffee steep overnight in a French press. I added this at bottling and the result was much better than the first batch--good aroma & flavor, no problems with bitterness although I still had head problems. Maybe it's just a coffee thing, I dunno.
3. Last time, I cracked about 1/2 pound of whole beans inside a ziploc bag using a rolling pin, put them into a hop bag and dropped it into the secondary. Kinda like dry hopping with coffee. That did really well for aroma, but nothing really special in flavor. Probably have better results just mashing some roasted malt.
In any event, I would recommend sticking with a low-acidity coffee. Good luck!