Run google cloud function in bubble

Hello all,

Am trying to invoke google cloud functions in bubble, however no success till now.
As google has mandated authentication now, can anyone help how do we do that please ?


you can use express() to create api endpoints in your google cloud functions. You can then connect those endpoints in the Bubble API Connector.

const express = require("express");
const app = express();'/api/create/example', (req, res) =>{
(async () => {
        let data =
        const result = await doSomething(data);
        return res.status(200).json({status: "SUCCESS"});
        functions.logger.log("Error: ", error)
        return res.status(500).send(error);
})();}); = functions.https.onRequest(app)

The url will be:

Thanks much for the reply, have done both nodejs and python endpoint.

Since these requires authentication, its becomes more tricky and am unable to find a way how to authenticate gcp functions via bubble.

Any pointers here would be helpful.


Are you talking about Authenticating a Google Service Account or authenticating a user’s google account before being able to use the API?

The steps in this video is what I used to have a user log into their google account and return back to bubble with access tokens and then you can get a Token to be used with the Authentication Bearer header.

1 Like

Thanks much, this is more towards google user login, that is something which I have.
Was referring to GCP functions ( example written in express.js) and we can’t call the same without authentication.

Am struggling how to add authentication in bubble for the same.

Sample API endpoint :

Any help here is much appreciated

I am not understanding how you are having an issue in calling google cloud functions to run with authentication. Here is an example of how I pass an API-Key or it will respond with a 401 code and say unauthorized but that’s only because I added the code for that.

If I understand correctly, your access to API is public in Google cloud meaning set to “AllUsers” and then you are managing the authentication via code.