[SOLVED] Bubble as Zapier action instead of trigger?

This is my first time trying out zapier so this may be a dumb question.
I see that zapier has a schedule tool that i can use to run actions once a day, once a week or once a month. I was thinking i could use it to trigger bubble actions in one of those time frames. I can set up the zapier schedule just fine as the trigger but it wont let me select bubble as an action app, only as a trigger app. Am i doing something wrong? is this not possible? being able to do this would extend the functionality of my app immensely. thanks!

It is possible, but you should do this as a webhook in zapier and use an API workflow in Bubble. It’s a bit tricky to make an action in zapier because fields are different for each workflow, and zapier doesn’t allow that. But a webhook does the job and works great. There are a few posts on the forum about that.

1 Like

Yes, it is certainly possible, but you will need to create your own action in the zapier dev console.

I have an outstanding “todo” to write this up and hopefully create a shareable generic version (I think only URL, API Key and Workflow name will change each time).

@emmanuel - I don’t really understand Webhooks in this context. Are you saying that you don’t need to create an action but can just use something else instead ?

2 Likes

Would really really appreciate a tutorial on receiving stuff into bubble (i.e. a bubble api tutorial that’s easy to understand) and how to link this to zapier and potentially other applications !

1 Like

Will do. Just need to understand the difference between an action and a webhook in Zapier. I have both working, but don’t really understand the user cases for both.

@NigelG
I have been reading up on the basic fundamentals of APIs through Zapier’s learning courses.
Am i understanding correctly that because bubble only supplies a GET and POST, that i cant change or delete data using a PUT or DELETE request?

Yes, but … you can do that in your workflow. So you can do a POST which triggers an API workflow to delete.

1 Like

OK think i understand. I guess i will find out when i figure out how to get everything set up on zapiers end.

Yes, using the webhook should be the simplest way.

So select Zapier Schedule as your trigger.

Then Zapier Webhook as your Action and set it to POST.

Add in your Bubble POST url to the workflow you want to run… (be careful to add version-test if you are in dev mode).

(I am passing the date in because my test API just a mandatory field, but you don’t need this).

The only slightly tricky bit is the authorisation, which you will need to put in the header as here…

5 Likes

Sweet that helps alot! two general questions though.

  1. On the URL you entered what do the variables after /version-test/ mean and where do i find mine? or are they standard?
    /api/1.0/wf/test <-- these guys

  2. for authorization, is the bearer a user ID as in its a public endpoint? do i need to use authorization if my endpoint has the “this endpoint can be run without authorization” box is checked?

I got this to work!! Thanks so much for the help!
I figured out the “test” in your example just needed to be the name of my api endpoint.
I would still like to know where to get my authorization code in case i want to use it and what the /api/1.0/wf part means. is this standard for all APIs? just Bubbles?
Thanks again!

1 Like

So from, the reference … Introduction - Bubble Docs

https://appname.bubbleapps.io/api/1.0/wf/endpoint_name

or

endpoint_name is just the name of the API endpoint workflow as you have found. The other bits are just types and a version (so if the guys update the API to a new version 1.1 then people still on 1.0 would still work).

“wf” is workflow. The other thing (at the moment) you can have in there is “obj” which allows you read your Bubble databases via API.

https://trest.bubbleapps.io/version-test/api/1.0/obj/product … returns all the things on the product.

There isn’t that much standardisation … so the Google Places API for text search is …

https://maps.googleapis.com/maps/api/place/textsearch/

A mosaic thing I am looking at is …

https://www.printmosaic.com/api/v2/mosaics/

Similar, but not similar enough !

Authorization is the API key found on the Settings page. You need to manually type the “bearer” bit, then copy/paste the key.

2 Likes

Well I think Zapier has an action that can post something to a webhook, that’s what I meant. By design, as I was saying, it’s hard to build a generic action in zapier, as all API workflows are different.

1 Like

Ah ok, I see what you mean. The webhook seems to be working well. The generic action I will have a look at again.

How to schedule a trigger for all the users when we are creating authorisation header then how will zapier differentiate a user