How to Convert URL to PDF using Custom API Call to from Zapier

Here, you will learn how to convert URL to PDF using and Zapier integration.

In this tutorial, we will use Wikipedia’s contact page to show you how to convert a URL into a PDF document by making a Custom API Call to using the /pdf/convert/from/url endpoint.

The Custom API Call is designed for advanced users. This gives you access to customizations that are not available in Anything to PDF Converter. If you are not looking for advanced settings, you can use Anything to PDF Converter Action in the plugin with URL as the input.

Screenshot of Source URL
Screenshot of Source URL

Open and Select Custom API Call Function

In Zapier we assume that you have already configured the Trigger step and are ready to set up the Action step. For our Action step, let’s choose as the App and Custom API Call as the Action Event. Custom API call in Zapier Custom API call in Zapier

Set Up the Custom API Call for URL to PDF Conversion

  • In the API Endpoint field, select v1/pdf/convert/from/url.
  • In the Input JSON, enter the JSON code. Following is the complete JSON code that we will use for this example:
"url": "",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
Selected Endpoint and added Input JSON in Zapier step
Selected Endpoint and added Input JSON in Zapier step

Test & Review

We are now ready to send our Custom API Call to Click on Test & Review button to send our data.

Test & Review in Zapier
Test & Review in Zapier

Copy & Paste URL to Browser to View Result

Our test was a success! Copy the URL and paste it on your browser’s address bar to see the result.

PDF URL in test output
PDF URL in test output

Fantastic! We have successfully converted Wikipedia’s Contact page URL to PDF using the Custom API Call to

Send the Generated PDF via Gmail

In this next step, we use Gmail as the App and Send Email as the Action Event.

Gmail step in Zapier
Gmail step in Zapier

Configure Send Email Action

  • In the To field, enter the recipient’s email address.
  • In the From field, enter the email address you want to use to send the email.
  • In the Subject field, enter your email subject.
  • In the Body Type field, you either choose a Plain text or HTML.
  • In the Body field, you can enter your message and the generated PDF URL.
  • In the Attachment field, you can also select the generated PDF URL to be sent as attachment.
Gmail in Zapier
Gmail in Zapier

Check the Configuration

Let’s test the action and send it to Gmail to make sure that we configured it correctly.

Send Email : Test Action
Send Email : Test Action

Great! Gmail confirmed that our email was sent to the recipient’s email account successfully.

See Result

Here’s the email that we received in our inbox after we sent the generated PDF through Gmail and Zapier.

Email with attached PDF in Inbox
Email with attached PDF in Inbox

In this tutorial, we learned to generate a PDF from a website URL using the Custom Call API pdf/convert/from/url endpoint. We also learned how to set up Gmail so we can send the generated PDF to our contacts and desired recipients.

So, now you know how to convert links to PDF or turn your URL into PDF by using and Zapier integration.