Templates / Generate website screenshots on-demand with ScreenshotMachine API via webhooks

Generate website screenshots on-demand with ScreenshotMachine API via webhooks

Ready for 3.0

by ist00dent ✓ · 2,006 views · created 2025-06-02 · Content Creation

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (5)

What it does

This n8n template enables you to instantly generate high-quality screenshots of any specified public URL by simply sending a webhook request. It’s an indispensable tool for developers, content creators, marketers, or anyone needing on-demand visual captures of web pages without manual intervention, all while including crucial security measures. --- 🔧 How it works - Receive URL Webhook: This node acts as the entry point for the workflow. It listens for incoming POST requests and expects a JSON body containing a url property with the website you want to screenshot. You can trigger it from any application or service capable of sending an HTTP POST request. - Validate URL for SSRF: This is a crucial security step. This Function node validates the incoming url to prevent Server-Side Request Forgery (SSRF) vulnerabilities. It checks for valid http:// or https:// protocols and, more importantly, ensures the URL does not attempt to access internal/private IP addresses or localhost. If the URL is deemed unsafe or invalid, it flags it for an error response. - IF URL Valid: This IF node checks the isValidUrl flag set by the previous validation step. - If the URL is valid (true), the workflow proceeds to take the screenshot. - If the URL is invalid or flagged for security (false), the workflow branches to Respond with Validation Error. - Take Screenshot: This node sends an HTTP GET request to the ScreenshotMachine API to capture an image of the validated URL. Remember to replace YOURAPIKEY in the URL field of this node with your actual API key from ScreenshotMachine. - Respond with Screenshot Data: This node sends the data received directly from the Take Screenshot node back to the original caller of the webhook. This response typically includes information about the generated screenshot, such as the URL to the image file, success status, and other metadata from the ScreenshotMachine API. - Respond with Validation Error: If the IF URL Valid node determines the URL is unsafe or invalid, this node sends a descriptive error message back to the webhook caller, explaining why the request was denied due to security concerns or an invalid format. --- 🔒 Security Considerations This template includes a dedicated Validate URL for SSRF node to mitigate Server-Side Request Forgery (SSRF) vulnerabilities. SSRF attacks occur when an attacker can trick a server-side application into making requests to an unintended location. Without validation, an attacker could potentially use your n8n workflow to scan internal networks, access sensitive internal resources, or attack other services from your n8n server. The validation checks for: - Only http:// or https:// protocols. - Prevention of localhost or common private IP ranges (e.g., 10.x.x.x, 172.16.x.x - 172.31.x.x, 192.168.x.x). While this validation adds a significant layer of security, always ensure your n8n instance is properly secured and updated. --- 👤 Who is it for? This workflow is ideal for: - Developers: Automate screenshot generation for testing, monitoring, or integrating visual content into applications. - Content Creators: Quickly grab visuals for articles, presentations, or social media posts. - Marketing Teams: Create dynamic visual assets for campaigns, ads, or competitive analysis. - Automation Enthusiasts: Integrate powerful screenshot capabilities into existing automated workflows. - Website Owners: Monitor how your website appears across different tools or over time. --- 📑 Prerequisites To use this template, you will need: - An n8n instance (cloud or self-hosted). - An API Key from ScreenshotMachine. You can obtain one by signing up on their website: https://www.screenshotmachine.com/ --- 📑 Data Structure When you trigger the webhook, send a POST request with a JSON body structured as follows: { "url": "https://www.example.com" } If the URL is valid, the workflow will return the JSON response directly from the ScreenshotMachine API. This response typically includes information abou

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.