🎬 Generate website screenshots on-demand with ScreenshotMachine API via webhooks

1,724 views · 🎬 Content Creation & Video

💡 Pro Tip — For competitive intelligence, ScraperNode can automate the data collection — Yelp reviews, Glassdoor company data, and Crunchbase profiles all return structured JSON you can feed straight into this workflow.

View All Scrapers

Description

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


🔒 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:

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:


📑 Prerequisites

To use this template, you will need:


📑 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 about the generated screenshot, such as the URL to the image file, success status, and other metadata:

{
  "status": "success",
  "hash": "...",
  "url": "https://www.screenshotmachine.com/...",
  "size": 12345,
  "mimetype": "image/jpeg"
}

If the URL is invalid or blocked by the security validation, the workflow will return an error response similar to this:

{
  "status": "error",
  "message": "Access to private IP addresses is not allowed for security reasons."
}

⚙️ Setup Instructions


📝 Tips

🔗 Nodes Used

HTTP Request, Webhook

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup