What I did for my one and only vanilla porter was to split 3 vanilla beans, cut them into inch long pieces and soak them in 1/2 cup of Maker's Mark bourbon for as long as the beer was in primary, probably about 3 weeks. When I kegged the beer I poured the bourbon into the keg.
I'm not a fan of vanilla flavored beers but my daughter gave me the beans for Christmas last year and asked me to brew something with them. So I did and was amazed at how good the beer was. My vanilla porter is on my schedule to brew again pretty soon.
That was a 10 gallon batch-the other 5 gallons got about a pint of coffee. I roasted the beans, ground 1/3 pound of them, and steeped them in 170F water. I added the coffee directly to the other keg. I have to say that those 2 kegs have been some of my most popular ever among my friends and family.