File from in API Workflow, saving to S3

I am receiving a file via webhook (specifically from webmerge.me) and storing it. After storing it I’d like to retrieve it for my users. It’s a .PDF file. the raw data looks like this:

Is this stored to S3 somewhere? I don’t know, I don’t think so. When I add the :saved to S3 suffix to the 'Create a thing action …" like so, literally nothing is saved. So I’m not sure what that’s supposed to do.

18%20PM

Of course I can save it as the native string of characters that you can see in the first screenshot, but that appears to be completely unusable. It won’t download as a PDF.

How can I receive a PDF from my api webhook, store it in my data, and then obtain a nice AWS link (or any kind of link) that my users can download?

I’m on a paid plan, there should be email support, but I suspect that will turn into a very lengthy back and forth. I have searched many posts and seen similar questions unanswered, so I’m hoping an answer here will help others.

Note that webmerge.me is an excellent service, and has all kinds of great options for cleanly sending data many different ways. The API connector that puts data into webmerge.me works great. Getting a usable document back, not so easy.

1 Like

you possibly want to apply/attach the webhook data to the client when you receive it …looks to me like your getting the PDF base64 encoded …you’ll need to decode … check the forum PDF Base64 decoder

@Bubbleboy is right, its base64 encoded by webmerge before sending. Some options …

  • base64decode on client side / Bubble page.
    You’d need to use somewhat messy workarounds or javascript.

  • Intermediary API to base64decode, or file uploader API, during API workflow.
    There’s probably one out there …

  • Ask webmerge to add an option for binary send.

  • Ask Bubble to add support for incoming base64 to convert to binary file.

Edit …

  • Ask Bubble to add an upload function to be used in an API workflow.
2 Likes

Some options for an intermediary API, not that I’m endorsing any of them …

Looks like Rick made a Bubble plugin for cloudconvert.

Plus I made a little test utility, no docs yet haha … let me know if anyone would use this, and I’ll polish it …
https://decode.glitch.me/

API call setup …

API workflow step …

Another idea … webmerge can send to a number of cloud storage, so if you pick one of those, can it give the resulting url to the Bubble endpoint?

Very helpful information, at least I know what I am working with now and can choose a solution. In my case there are restrictions around how many external dependancies I can introduce to my project. For now I will need to look into JavaScript or (maybe) dropping the file in an AWS S3 bucket with webmerge.me and then somehow picking up the file or the link with bubble.

But I wouldn’t have gotten this far without your help, so thank you.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.