Are you saying the conduit is exposed at the peak of the ceiling and coming into the side of the box?
As far as installing the electrical box in the beam, you just have to make sure the width of the beam will accommodate the box and that the box is well secured to a joist, rafter or brace.
If the conduit is exposed and coming into the side of the box, you will need to offset the conduit down and possibly replace the existing box with a deep box so you can still bring the conduit into the side while having enough of the box bottom exposed to fit into the cutout in the beam bottom and be flush.
- Is a standard box
- Is a deep box (there are deeper ones)
- and 4. are extension rings
Coming into the side of #1 will mean the box cannot be flush with the surface of the beam. Deep boxes and extension rings can solve this but I'm not a big fan of using extension rings with ceiling fans.