Animation activating

I would like to trigger an animation on an object which IS NOT a character.

The problem I am facing is the following.
I have made a 3D object with animations in blender. I imported the object with animation to UE4. I also created a anim blueprint for the object, to change trigger the animations.

What I did is a simple lever in the anim blueprint I made a state machine, which has a boolean X, if X value changes it triggers an animation which changes its position from left to right or visa versa.

I have no idea how I could change X value, because I do not know how to make a connection between an anim blueprint and the object blueprint or if that is even possible.

I am not even sure if this is the correct way to approach this issue, but I have not found any solutions when googling for them.

NB! Please do not suggest to use a tick to rotate the lever, lever is just a placeholder, I have other objects with animations as well, which can not change shape with tick.

Hi,
you can cast to your actor or pawn inside your AnimationBP, check the third person example there the “try get pawn owner” is used you can use “get owning actor” and cast to your actorBP and access your variables from the actor blueprint and set the AnimationBP variables.

Thank you very much for you answer, this actually solved my problem.
I was always trying to access the state machine from the object blueprint, but did not even think about getting the owner from animations.