Actions2
Overview
The Snap Kit node allows users to interact with a web snapshot and content crawling service via API. It supports two main operations:
- Take Snapshot: Captures a screenshot of a specified URL with customizable viewport dimensions, quality, and options for full page capture.
- Crawl Content: Extracts the content from a specified URL.
This node is useful in scenarios where automated website screenshots or content extraction are needed, such as monitoring website changes, archiving pages, or gathering data for analysis.
Practical examples:
- Automatically capturing daily snapshots of a marketing landing page to track visual changes.
- Crawling product pages to extract updated pricing or descriptions for competitive analysis.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Take Snapshot" (capture webpage screenshot) or "Crawl Content" (extract content). |
| URL | The target URL to capture or crawl. Must be a valid URI. |
| Browser Width | Width of the browser viewport in pixels (minimum 375px). Applies only to "Take Snapshot". |
| Browser Height | Height of the browser viewport in pixels (minimum 500px). Applies only to "Take Snapshot". |
| Screenshot Quality | Quality of the screenshot from 1 to 100. Applies only to "Take Snapshot". |
| Operation Timeout | Timeout duration in seconds (10-120) for the operation to complete. |
| Full Page | Whether to capture the entire page or just the visible viewport. Boolean, applies to "Take Snapshot". |
| Sync | Whether to wait for the operation to complete before returning a response. Boolean. |
Output
The node outputs JSON data representing the result of the chosen operation:
- For Take Snapshot, the output JSON typically includes details about the captured image, such as URLs or metadata related to the screenshot.
- For Crawl Content, the output JSON contains the extracted content from the specified URL.
If an error occurs during processing, the output JSON will contain an error field with the error message.
The node does not explicitly output binary data; any images or files are referenced via URLs or metadata in the JSON output.
Dependencies
- Requires access to the Snap Kit API service endpoint
/api/snapfor snapshots and/api/crawlfor content crawling. - Requires an API authentication credential configured in n8n (referred generically as an API key credential).
- Network connectivity to the target URLs and the Snap Kit API service is necessary.
Troubleshooting
- Timeouts: If the operation times out, consider increasing the "Operation Timeout" property within allowed limits.
- Invalid URL: Ensure the URL provided is a valid and accessible URI; otherwise, the API may return errors.
- API Authentication Errors: Verify that the API key credential is correctly configured and has sufficient permissions.
- Quality or Dimension Limits: Values outside the specified ranges (e.g., width < 375px) may cause validation errors.
- Sync Option: Setting "Sync" to false may cause the node to return before the operation completes, resulting in incomplete data.
Common error messages include:
"Invalid URL": Check the URL format."Request timed out": Increase timeout or check network conditions."Authentication failed": Verify API credentials.
Links and References
- Snap Kit API Documentation (replace with actual URL if available)
- n8n Documentation on Creating Custom Nodes
- General info on web scraping and screenshot automation tools.