Tips

Using Doppio with Zapier

Using Doppio with Zapier

Using Doppio with Zapier

Zapier is a cloud-based platform to automate workflows

a whimsical machine in a playful high-tech environment, complete with purple and pink tones.
a whimsical machine in a playful high-tech environment, complete with purple and pink tones.

Create a Zapier account

First, register on Zapier.


Create a Zap

Then create a new Zap in your dashboard.


Configure the trigger

Create a webhook

We'll set up a webhook as the trigger for the Zap. The webhook gives you a URL you can call from any platform that can make api requests.

First, clic on the button to add a trigger

Then choose "Webhoooks by Zapier"


Configure the webhook

Now we'll configure the webhook to be able to call it.

Clicking on the new webhook trigger, a side panel will open on the right.

In the "Event" dropdown, choose the "Catch Hook" option.

Leave the field empty in the next section "Trigger" by clicking on "Continue".

Zapier gives you the URL you have to call to trigger the Zap in the section "Test".

To easily test it, you can use the reqbin API testing tool.

  1. copy the webhook URL given by Zapier in the previous step

  2. select the method POST

  3. send the request

Going back to Zapier, you should see that the request has been detected by Zapier, confirming that the webhook works as expected !


Configure the action

Create a webhook

As we want Zapier to call the Doppio API, we'll setup a new webhook as the action for the Zap.

Click on the button to add an action

Then choose "Webhoooks by Zapier"


Configure the webhook

Next, we'll configure this new webhook to call the Doppio API.

Click on the new webhook action to open the side panel on the right.

And choose "Custom Request" for the "Event" dropdown.

You can click on "Continue", and for the "Action" section :

  1. Select the POST method

  2. Copy the Doppio URL to render PDFs https://api.doppio.sh/v1/render/pdf/sync (this URL depends on the render method you choose)

  3. Select "False"

  4. Insert the options you want for this request

    example :

    {
    	"page": {
        "setJavaScriptEnabled": false,
        "goto": {
          "url": "https://www.spacejam.com/1996",
          "options": {
            "waitUntil": ["networkidle0"]
          }
        }
      }
    }

And for the rest of the fields :

  1. Select "No"

  2. Leave this field empty

  3. Add a header for the authorization (replace [YOUR_API_KEY] with your actual API key, which is available in your Doppio's dashboard)

    "Authorization": "Bearer [YOUR_API_KEY]"
  4. Add a second header indicating the format of the data sent

    "Content-Type": "application/json"

And click on "Continue"

The third section "Test" is to ensure the webhook is properly configured. Click on "Test step".

If everything is properly set up you should see the response of the Doppio API with an URL to your document.


Check the result

First, to be able to trigger your Zap, you have to publish it and make it publicly available by clicking on "Publish" at the right top corner.

Now, if you want to test the whole chain, you can call the webhook URL given by Zapier in the webhook trigger with the reqbin tool and see in your Doppio dashboard that a new document has been generated.


What's next

In this article, we used the webhook module, but be sure to check all the services Zapier can connect to !
You can easily replace the webhook module shown in this article with any other module from Zapier to better suit your needs.


You also can store your Doppio API key as an environment variable to make it easy to reuse it, Zapier documentation is here.

Create a Zapier account

First, register on Zapier.


Create a Zap

Then create a new Zap in your dashboard.


Configure the trigger

Create a webhook

We'll set up a webhook as the trigger for the Zap. The webhook gives you a URL you can call from any platform that can make api requests.

First, clic on the button to add a trigger

Then choose "Webhoooks by Zapier"


Configure the webhook

Now we'll configure the webhook to be able to call it.

Clicking on the new webhook trigger, a side panel will open on the right.

In the "Event" dropdown, choose the "Catch Hook" option.

Leave the field empty in the next section "Trigger" by clicking on "Continue".

Zapier gives you the URL you have to call to trigger the Zap in the section "Test".

To easily test it, you can use the reqbin API testing tool.

  1. copy the webhook URL given by Zapier in the previous step

  2. select the method POST

  3. send the request

Going back to Zapier, you should see that the request has been detected by Zapier, confirming that the webhook works as expected !


Configure the action

Create a webhook

As we want Zapier to call the Doppio API, we'll setup a new webhook as the action for the Zap.

Click on the button to add an action

Then choose "Webhoooks by Zapier"


Configure the webhook

Next, we'll configure this new webhook to call the Doppio API.

Click on the new webhook action to open the side panel on the right.

And choose "Custom Request" for the "Event" dropdown.

You can click on "Continue", and for the "Action" section :

  1. Select the POST method

  2. Copy the Doppio URL to render PDFs https://api.doppio.sh/v1/render/pdf/sync (this URL depends on the render method you choose)

  3. Select "False"

  4. Insert the options you want for this request

    example :

    {
    	"page": {
        "setJavaScriptEnabled": false,
        "goto": {
          "url": "https://www.spacejam.com/1996",
          "options": {
            "waitUntil": ["networkidle0"]
          }
        }
      }
    }

And for the rest of the fields :

  1. Select "No"

  2. Leave this field empty

  3. Add a header for the authorization (replace [YOUR_API_KEY] with your actual API key, which is available in your Doppio's dashboard)

    "Authorization": "Bearer [YOUR_API_KEY]"
  4. Add a second header indicating the format of the data sent

    "Content-Type": "application/json"

And click on "Continue"

The third section "Test" is to ensure the webhook is properly configured. Click on "Test step".

If everything is properly set up you should see the response of the Doppio API with an URL to your document.


Check the result

First, to be able to trigger your Zap, you have to publish it and make it publicly available by clicking on "Publish" at the right top corner.

Now, if you want to test the whole chain, you can call the webhook URL given by Zapier in the webhook trigger with the reqbin tool and see in your Doppio dashboard that a new document has been generated.


What's next

In this article, we used the webhook module, but be sure to check all the services Zapier can connect to !
You can easily replace the webhook module shown in this article with any other module from Zapier to better suit your needs.


You also can store your Doppio API key as an environment variable to make it easy to reuse it, Zapier documentation is here.

By Frédéric Llorca

January 9, 2024