Plugin - initialization with server-side data


I’m probably missing something but I can’t find a way to have a plugin Element initialize itself with a server-side API call.

What I want is to provide an Element that will can trigger a server-side API call specific to the working user when it’s displayed.
I get how an app builder can do it with a Workflow, but I want to do it automatically (built-in in the plugin).

Thanks for your help !

I believe the only way is to have a separate element and server-side action or API call.

The plugin element has an event that can be triggered and then in the app, when that event triggers a workflow you have to add your API call as an action in the workflow.

Thanks for your quick answer !

Just to be sure, what you are telling me is that:
1/ my Element should have a ‘startup’ Event, that I can trigger in the ‘initialize’

function(instance, context) {

2/ that my server-side call has to be declare in the API Calls (as an action)

3/ that I have to explain to 100% of the people using my plugin in their app that they have to create the exact same workflow to have it work properly ? :thinking:

That doesn’t seems very… plug-and-playable

That’s the only way I know how it is possible, I agree with your point, I’ve had the exact same with my plugins, but remember that Bubble is a no-code development tool and apps still require ‘development’ using workflows etc.

Hopefully, you get it working or someone else has a better suggestion!

I completely agree with your point. Plugin means user will install and it started working(some case credential/API key require) that’s it.

I am also looking for such solution. That can reduce to set a workflow from client side.
Is there any way?

Still no solution on my side.
We ended with a no-that-good plug in and moved to other subjects.
However, if you find a way, please share with me, I’m still interested !