Send template generated PDF file via webhook

Hi,

I want to send a template generated PDF via webhook to zapier. The HTTP verb is set to Post, HTTP Content Type to PDF, HTTP Headers - Content-Type: โ€œapplication/pdfโ€ and the body template is assigned to a google doc. The problem is that the zapier webhook is catching the data as HTML not as PDF.

All iโ€™m trying to achieve is to send the generated PDF to zapier, catch it and print it via Google Print Cloud.

How can this be done?

Thanks!

0 11 2,223
11 REPLIES 11

I have implemented a new feature that might help.
If you set the HTTP Content Type to PDF, I now create a PDF file, base64 encode it, and send it in the body.

If testing goes well, this change will be released on Monday afternoon Seattle time on 4/29/2019.

Hello @Phil,
Can you expand this new feature a bit more to us? And how we can benefit out of it? Thnx.

I believe that Vlad is attempting to use a workflow webhook to send a PDF file to Google Cloud Print.
He plans to send the PDF file to Zapier, where he can invoke the Zapier Google Cloud Print service.

Previously, if you specified โ€œPDFโ€ as the HTTP Content Type, the webhook sent an HTML document in the post body. Vlad asked that we send a PDF document in the post body instead. That is the change I made.

When you specify โ€œPDFโ€ as the HTTP Content Type in the webhook, we now:

  1. Process the workflow template by replacing the template variables.
  2. Produce an HTML file.
  3. Convert the HTML file to a PDF file.
  4. Base64 encode the PDF file.
  5. Send the Base64 encoded PDF file in the post body with a MIME type of โ€œapplication/pdfโ€.

Frankly, I am not sure that is exactly what Vlad needs. I am hoping it is close.

I wonder if we should be supporting Google Cloud Print directly?
I am not sure how many people would use Google Cloud Print, if we did that.

On a related note, I also enhanced workflow Webhook and workflow Savefile to allow you to specify an HTTP Content Type of โ€œHTMLโ€.This allow you to send an HTML document in a post or to save an HTML file to cloud storage.

Thanks for the detailed explanation @Phil, pretty helpful.

@Phil - just my opinion, but supporting google cloud print might be a place to start. Donโ€™t want to limit Appsheet to just google users, but direct print capability request have shown up quite a bit and (if simpler), might be a good place to start? Just not sure the implications and that does not help non-google environment usersโ€ฆ

Hi Vlad,

Have you tried the webhook to PDF feature?

Hi Phil,

Sorry, i didnโ€™t. I have a lot of work on other parts of my app. I will try this weekend. Thank you for involving in this matter. I appreciate. Iโ€™ll let you know when i attempt to make this to work!

I am think about adding direct support for Google Cloud Print, but wonder how many people would use it?

Every feature takes time, and the question is always how many people would use the feature if we provided it. I hate to add features that are little used.

@Phil - I absolutely agree. Not everything can be done, and all take effort (and risk of untended implications).

You are getting a lot of feature requests, but with only three votes allowed on the community, I am not sure itโ€™s a great way to help with your backlog (which I assume is quite full). Maybe there is a better way to allow community ranking (like the old app) so you have a better way to compare ranked feedback?

Maybe we can use polls in the community more effectively?

the encoding works as intended. Now i need to decode the base64 code on zapier side. Not sure how to do it.

I want to vote for Cloud Print Support! Getting my app to print stuff is the biggest headache so far.

Top Labels in this Space