You can either drill a hole through the beam with a drill machine or attach a light box directly to the beam. If you use the latter, place the fan brace/beam mount on the beam with your hand and run the wire through the hole.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.