We Really Need a GET Method for Workflow APIs

@keith, i think you’re missing the point @romanmg and I raised about the “Return data from API”.
This is not the Data API but rather the Workflow API.

There is no pagination here when getting data using the “Return data from API” action.
Below is what the reference manual states:

In the case of the Workflow API, we limit the size of lists to 50 entries. For a full list of data, please use the Data API that handles pagination.

So there is a difference between getting data from the Data API and getting data from the Workflow API.

I’m not sure if this will still address the 50 entries limit?

Hey @seanhoots - well, I sorta glossed that you were talking about “Return data from” limits as my mind immediately went to Data API/paging.

But related to what you’re saying: They way to dump large (well larger) quantities of data OUT of Bubble is to stand up an external API that can consume that data and POST it via the API Connector.

Example: “calendar.ics” here is a microservice running on webtask.io that I set up. It takes individual event information, creates an iCalendar .ics file and passes that file back to the requestor (Bubble in this case).

The lists here (of start dates, end dates and summaries) can number in the hundreds and the entire operation takes just a couple seconds for the entire round trip:

No, it wouldn’t. But see my other reply.

+1 for this discussion as well as the points raised by @romanmg.

From more of a business standpoint, I am curious about you wanting to use embed.ly. I am not familiar with it, but I do have an app where my clients can embed some basic parts of it with on their websites with an iFrame and I was actually just thinking of improving the embeddable parts soon.

So what is the difference between using embed.ly and just providing a snippet of code for an iFrame?

If this strays too far from the topic of the post shoot me a DM

Hey @gf_wolfer, what you’re asking is right on topic. Rather than write on at length here about the relationship between oEmbed standard and embed.ly and why it’s important and useful today, I’m going to instead point you to THIS really terrific article which explains as well as I could (and also introduces you to all the necessary technical details):

https://blog.ycombinator.com/how-to-build-an-oembed-integration-for-your-startup-and-why-its-necessary/

So in my app, my interface does the same thing that you describe. You can configure/customize widget and I serve you up the iFrame code you need to embed. And of course, there’s a “copy to clipboard” button to make that easy. And, I also show you the link to that object on its own page, right?

SO while it is not HARD for a user to take the line or lines of embed code and put them somewhere, the world has MOVED ON from this kind of approach. What is more common now is for a thing that supports embedding to use embed.ly (or sometimes the page’s discoverable oEmbed information) to auto-fetch the necessary embed code and do it FOR YOU.

You see this for example in Squarespace editor. When i was testing my iFrames there, I noticed that you put down an Embed block and it says, “Hey, past the URL of the thing you’re trying to embed and we’ll give it a shot.” And I was like, “Huh, I wonder if that works for MY page?”

Well, of course it doesn’t as I didn’t understand how the auto-embed thing worked. So what squarespace does then is lets you paste in explicit iFrame code, right?

But wouldn’t it just be SO much better if I could tell my users: Hey, I give you the iFrame code here so you can embed this anywhere, but most places on the web you can actually just paste the URL to your calendar page (or booking widget page) and they will auto-magically embed!

That’s what oEmbed / embed.ly can do for you. But as I note there are several blocking issues that can keep you from creating a fully compliant oEmbed API for your app in pure vanilla Bubble.

I’m still obviously working out the minimal easy approach to accomplishing that. However, once I figure it out (meaning that I’ve created an API endpoint that successfully passes embed.ly validation) I will share some info on that here.

Best,
K

2 Likes

Possibly interesting update on this. Behavior seems to be changing a bit. Today, calling a workflow API call as a GET (like putting the address in the browser), returns a 401 “unrecognized authorization type” rather than giving the 405 “wrong method” error.

Trying https://grupz.com/api/1.1/wf/oembed as GET gives:

{“statusCode”:400,“message”:“Unrecognized authorization type”,“args”:{“bubble_code”:“1537993370605x584895459469407760”}}

Hmm… is change a comin’?

@romanmg Off topic: I am currently using PDFotter for pdf generation based on filled in fields. Works great with the API connector, also less expensive than pdfgeneratorapi.com. Probably worth checking out.

1 Like

I think ya posted this reply to the wrong topic, but hey I didn’t know about PDF Otter - interesting. :stuck_out_tongue:

@keith it was a reply on @romanmg comment :slight_smile:

Thanks for the tip!

Thanks for the detail!
For my own app, I’ve noticed the iFrame not being served up on my client’s Squarespace website with Safari mobile, wonder if this could help solve that. At the very least sounds easier for my non-techy clients to paste embeds

Would be great to see if you get things working with this

Well, this would not help with your Squarespace/iOS Safari issue. To debug that you need to examine that page.

What oEmbed APIs do is translate: “here is the URL of a thing I’d like to embed and here’s how I’d like to embed it” into “OK, here is are is the iFrame code you need” or “sorry, we don’t let you embed that and here’s why.”

But yes I’d like to get this working. At present, I’m seeing if I can get something like Amazon API Gateway to translate responses that I can put in the body of Bubble’s api workflow response into the right status codes needed in response to an oEmbed check. (I keep hitting little issues in doing that. Have also looked at Tyk - another API Gateway. It may be that there is NOT an easily available gateway that can do exactly what is needed here. I won’t belabor the details, but it’s starting to look like it may not be possible.)

The best fix would be significant enhancements to API Workflows in Bubble. The main missing thing is an action to return a specified HTTP status code as well as a custom body.

Might be that one would just have to do it the old fashioned way and write some code on another microservice like webtask or something. I’m not sure it’s worth the effort.

Basically, the idea I had is something that should be easy, but is not as certain requirements are missing from the Bubble feature set in this particular case.

it’s a really cool thing to have learned about, though…

1 Like

+1 for this!

1 Like

+1 for GET Method

1 Like

+1 also. I’m stuck for implementing the full CloudConvert API because the callback is done as a GET request on the endpoint :

@Bubble
Can you tell us if it on the roadmap or a workaround such as using Amazon API Gateway is necessary with Bubble ?

2 Likes

@nicolas_dap There is no immediate plan for supporting GET request on API workflow endpoints at present but we will keep you posted

Hi @romanmg, how do you like https://pdfgeneratorapi.com/? Are you still using it? If not, have you found something better. It appears to be what I’ve been looking for.

HI @gnelson, I did try it out for a little while to create some basic printouts of RG data. There was some crafting I needed to do to get the data to be sent over to the platform just right, but it was getting to be too cumbersome for the client so in the end, we went with a regular “print page” function :woman_facepalming:

Having said that, it does give you a lot of control over the design of a PDF because you can create templates in their editor and fill it with your dynamic data. This isn’t like a rendering of a Bubble page like SelectPDF, for example.

1 Like

Thanks @romanmg for the feedback. I really need something with that level of detail. If you or anyone else knows of something similar that’s easier to configure with Bubble I’d greatly appreciate the pointer.