Marketing

Taking Periodic or Conditional Screenshots of a Website in Zapier

Post by
Andrew Pierno
Taking Periodic or Conditional Screenshots of a Website in Zapier

In this tutorial, we’ll show you how to create periodic or conditional screenshots of any website using Zapier.

We’ll configure a schedule, generate the desired screenshot, and save it to Google Drive. 

By the end of this tutorial, you’ll be able to generate a screenshot using any trigger and use the generated screenshot for any action of your choice.

If you’re interested in taking a look at the Zap, i.e., the final output of this tutorial, check out:  https://zapier.com/shared/516db32409c9e064c17f0c2f7f45953add70b22d

Step 1: Create a new zap

Go to https://zapier.com/app/dashboard and create a new Zap by clicking on the ‘Create Zap’ button.

how to create a zap in zapier

Step 2: Add a trigger

A trigger is an event that starts the automation. For example, a trigger could be a new email received in your Gmail account.

For the purpose of this tutorial, we’ll use ‘Schedule by Zapier’ as a trigger. This will invoke the action at a specified time.

Start typing ‘schedule’ in the input field and select the ‘Schedule by Zapier’ app.

how to schedule taking screenshots in zapier

Next, select the desired frequency, i.e., ‘Every Day,’ ‘Every Hour,’ ‘Every Month,’ or ‘Every Week.’ 

Now, click on the ‘Continue’ button.

Select if you'd like to trigger the action on the weekend.

Select the time of the day you'd like to trigger the action. Hit ‘Continue.’

Test the trigger by clicking on the ‘Test Trigger’ button. Hit ‘Continue.’

Step 3: Build your screenshot query

Open a new tab and go to screenshotapi.net. Create a free account. 

Once you’re in, go to ‘Query Builder.’ 

Paste the URL of the website that you’d like to capture:

  • Specify browser width and browser height. 
  • Feel free to tweak a plethora of advanced options (from blocking ads to using cookies or even injecting some HTML.) 

You’ll see the text inside ‘Your API query’ changing as you make changes to the options.

how to build a screenshot API query to take periodic screenshots with zapier

Step 4: Create an action to generate the screenshot

Now, select the action you'd like to trigger. (In this case, we want to call the ScreenshotAPI, so select ‘Webhook by Zapier’ from the list.)

Note that 'Webhook from Zapier' is a premium app. You'll need to upgrade your Zapier account to use it.

Select 'GET' as the event because we're making a GET request to the ScreenshotAPI.

Hit 'Continue.'

Inside the URL field, paste the URL you just copied from the Query builder.

Skip the rest of the fields and click on 'Continue.'

Click on the 'Test Action' button to see if you receive the desired screenshot as a file in response to making a GET call to the ScreenshotAPI endpoint.

After a few seconds, you should see a green checkmark and a file returned by the ScreenshotAPI.

Step 5: Create an action to upload the screenshot to Google Drive

In this step, you can add another action to the Zap. 

In this case, we want to save the screenshot as a file in our Google Drive, so select 'Google Drive' from the list.

how to take automated screenshots with zapier and save them to google drive

Select the 'Upload File' event. Hit 'Continue.'

Select a Google Drive account.

If you haven't connected your Google Drive account to Zapier before, you'll need to add a Google Drive account first. 

Click on the 'Connect a new account' button. Approve access to your Google Drive account. Hit 'Continue.'

Select the folder where you'd like to save the screenshot. (You can leave it as it is if you want to save the screenshot in the root folder.)

In the file input, select ‘File received’ as the response from the previous action, i.e., the Webhook app.

Give the file a name or leave it as it is if you want to save the screenshot with the default name. 

Hit 'Continue.'

Click on the 'Test Action' button to see if you received the desired screenshot in your Google Drive.

After a few seconds, you should see a green checkmark and a file saved in your Google Drive.

Publish the Zap by clicking on the 'Publish Zap' and 'Publish & Turn On' button.

And there you have it! You’ll be able to take periodic or conditional screenshots of a website in Zapier in no time. All you need is a few zaps and ScreenshotAPI!