Bubble.io & AppGyver

Hey all,

I’m currently in the process of converting by Bubble app into a native app, but there are some things I would like clarified (thanks in advance to anyone who answers).

  1. Can I use the Bubble Workflow API with AppGyver, and if so, how? I’ve looked through the docs and it seems like the answer is no, but I just wanted to ask to be sure.

  2. Does the Webview element have events like “If URL is…” & “onLoading”? If not, could these be possible? It would make interactions between the Webview and app much easier.

Apologies for these rookie questions, and thanks to all the AppGyver team for this platform.

Go to your Bubble dashboard, and under the API tab you can expose whatever fields you want. Now got to AppGyver and create a data variable that pulls in data from this API. In other words, AppGyver doesnt care where the data is coming from, and Bubble doesnt care where the data is going to - so there’s no reason why this would not work. If you need to send special headers or pull in info from the API response body (or if AppGyver’s API dashboard doesnt work for any reason) you can also directly use an HTTP Request from AppGyver to mimic an API call, because the HTTP Request will allow you to do more with the response than the API dashboard (in some cases).

Okay, then. I will try this and get back to you if there are any issues.

Apologies again for the rookie question - what would I put in the ‘Response key path’ after exposing the workflow API?. Thanks again, appreciate the response.

After a lot of trial & error, I just found out the Bubble Workflow API doesn’t support GET requests, meaning the Webview will have to be my only option, as I’m not prepared to re-build my whole app.

So I’ll ask again, could we get more Webview events? Like “whilst Webview is loading” or “when Webview URL changes”?

Appreciate any replies in advance.

See the discussion here for what to put in the response key path:

Blockquote Problem with setting get collection schema

And here’s how to send a GET request to Bubble: Get Request to Bubble API

Appreciate the reply, however the links you provided relate to the Bubble Data API not the Workflow API, which I wanted to use.

Ohh now I get the problem :slight_smile: sorry!

You have to created backend workflow with unique endpoint name in bubble and you can access it from API address that is in your bubble dashboard. It’s looks like this https://APP-NAME.bubbleapps.io/version-test/api/1.1/wf/ENDPOINT-NAME

In AppGyver in data configurator add this endpoint address and in add HTTP Header with values:
Label: authorization
Key: authorization
Value: Bearer YOUR-PRIVATE-KEY

I’ve just configured it for authentication and it’s working.
Data API is also working and I have schema created automatically by AppGyver from response.

2 Likes

Amazing, thanks. From the logo - were you the creator of LifeBe the Bubble app?

@imvicdiagnostic take a look at the tutorial in the post below. It shows how to setup both data and workflow api of Bubble to work with AppGyver.

Yes, I did prepare https://LifeBe.com first MVP on Bubble :slight_smile:
Old app is no longer active as we are working on new one.

Oh, very cool. Do you know how to use the Workflow API to enable app actions? For example, once the app receives a command from the Bubble Workflow API, it switches screen or downloads a file etc.?

Thank you Sean, this helped a lot with understanding the basics. Is there anyway that the Workflow API can be used to enable app actions? For example, once the app receives a command from the Bubble Workflow API, it switches screen or downloads a file etc.?

Not sure if i understand your question entirely. But if you mean that you want to perform an action in AppGyver in reaction to a response from a Bubble workflow API then that is very easy to do and there are some examples in the tutorial on the Login button logic.

You simply call your Bubble Workflow API endpoint using a Create record (remember that all Bubble workflow API endpoints are POST). Then in the output of the Create record action you add the action you want to perform, e.g. Go to another page, download a file etc.

For example in the tutorial the logic for the Login button is as shown below. After the Create record (1) action which is a call to the login workflow api we perform some steps, i.e. Set app variable (2), Set item to storage (3) and Dismiss initial view (4).

So you can perform any actions after calling the workflow api endpoint. You can also perform different actions if the call to the workflow endpoint failed. In the example above if the login workflow api fails (second output of the Create record) we perform a different set of actions - in this case Hide spinner and show a Toast.

Note that AppGyver doesn’t have a webhook mechanism that will allow your app to sit there waiting to react in response to some event that occurred in your backend. So if you want something to happen automatically without a user’s action, then you will have to pool your backend e.g. do a Create record every X seconds using the Global Canvas page and perform the necessary action accordingly. If the action is to be initiated by the user then you simply call the workflow api and add the actions like I’ve done in the login button logic above.

Hope this makes sense.

1 Like

This is part of what I’m looking for…but not exactly. For example, when I click a button in my Bubble app, I want my AppGyver app to react likewise, by navgating screens etc.

I’m not sure I follow the use case here. It will help if you provide a concrete use case.
So you want your app to react in response to a button clicked in a bubble page? What if the app isn’t opened?

In any case see this previous response. That’s what I was explaining but not sure if it will meet your need as I don’t know exactly what you’re trying to do.

Apologise, seems like I did not explain it well. I’m using a Webview to display my Bubble app in AppGyver. I want the user to be able to click a Downloads button in that webview that will switch screens in the app to display all their downloaded files.

Thanks for the help, appreciate it, Sean.

Ok I now understand. Didn’t know you were just using AppGyver as a wrapper to your bubble page.
In this case you don’t really do anything in AppGyver as all actions are being done in your bubble UI pages. So all actions and reactions should be done purely in bubble and you don’t need to do any action in AppGyver.

So in bubble you can add an action to the Button click event. For example if you want to go to a page on button click you add the Go to page action like below:

If I you’re really building your app entirely in Bubble and displaying it in a webview using AppGyver then you should rather be using the bubble forum since that is where you will get you bubble questions better answered.
If you intention is to have some pages in AppGyver and some in bubble inside a webview, then that is an entirely new story and things can get a bit complex switching between webview to the appgyver page. There is no natively supported way of doing this so you will have to use some hacks.
One way is to have set some url parameter in your bubble page when a button is clicked, then in the appyver page continuously check the url of the webview to see if it contains that url parameter and if so add the action you want to perform in appgyver.