How To Take Screenshot of All The URLs of A Domain
This workflow allows you to take the screenshots of all the URLs in a domain. You just have to give it the seed url i.e. the homepage URL, and the workflow extracts all the pages in that domain & simultaneously takes the screenshot of each in the loop.
The tools we are using are Page content API & Screenshot API from CaptureKit, and the no-code platform is n8n.
In the end, I will also give you the blueprint for this automation, so that you can easily quick start your screenshot taking.
Screenshot of Our n8n Workflow
Prefer watching the tutorial? check out the video below ⬇️
To maintain the database we use a Google Sheets, wherein in one tab we will take the domain for which we want to take screenshot of all the URLs.
And in the other tab we would take the public URLs of screenshots.
Building our workflow
This is how our whole workflow works.
We provide a Seed URL → the Page content API extract all the URLs from that domain → Screenshot API Takes screenshot for each URL → We finally store that in our database.
This is how our n8n workflow looks ⬇️
Since our workflow starts with collecting all the URLs first, we have to use page content API, that gets all the urls from sitemap of a domain.
We will get the domain name from our Google Sheets first tab, if you haven’t have your Sheet ready yet, you can do so by copying what I have done.
This is the configuration of my Google Sheets node, we are using the operation ‘Get Rows’ & taking the domain. Let’s execute this node only & see what we get as output. I already have the domain name in my Spreadsheet.
This needs to be passed to our Page content API. To know more about this API you can refer to the documentation of this API.
Along with the two necessary parameters that are access_key and url, to get all the URLs from a domain you also have to pass include_sitemapto true.
We are using HTTP node here & this is the configuration of this node.
To get your access_key, you need to sign up for CaptureKit, you get 100 free credits to test this all the endpoints.
Let’s now run this node, and see for the output it gives.
As you can see that we are getting all the URLs for this domain, now our task will be to take screenshot of each one & collect them in our database.
Since all the URLs are in an array with name “links”, we will split them out so as to get them one by one.
The next node is “Split”
A loop next will help to take one URL at a time and pass it onto the screenshot API.
And therefore the next node in our workflow will be an HTTP request wherein we will call the screenshot API.
Here is the configuration of that API: -
To read more about how to use this API, you can read the documentation of this API.
Let’s test run this node, and see what output we get.
Now finally, we will take this public url in our ‘Screenshot’ tab of spreadsheet.
Finally complete the loop by connecting the Google sheets node to loop node.
This is how our spreadsheet looks, we are also taking the corresponding URLs in column A for our better understanding as to know which screenshot URL belong to which page.
Here’s the blueprint for this automation that you can directly use in your n8n.
The only thing you would need is access to the CaptureKit’s Access key, and you can sign up for free and test it with 100 free credits now.