Communicating between Prototype and Figma Plugin

I’ve created a Figma plugin to get the state of local variables then trigger external API’s based on that state change.

I’m trying to have a prototype instance of the file communicate with the Figma Plugin I created so when I click a UI element in the prototype, a variable changes which triggers an external API. Right now, there’s no way I can find to ‘listen’ for the variable state change in a prototype because it does not ‘write’ to the original variable value.

Plugins cannot run in Presentation mode, and therefore receive changes from the prototype.