Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
Image → Convert HTML to Image
AI-generatedOverview
The node provides a utility to convert HTML content or a webpage URL into an image. This is useful in scenarios where you want to generate visual representations of web content dynamically, such as creating thumbnails for webpages, capturing snapshots of HTML reports, or converting HTML email templates into images for embedding or archiving.
For example:
- Converting a marketing email's HTML code into an image preview.
- Generating a screenshot image from a given URL to display on dashboards.
- Creating image thumbnails from custom HTML content for social media sharing.
Properties
| Name | Meaning |
|---|---|
| Data Type | Choose the source type of the input data: either "URL" (a webpage URL) or "HTML" (raw HTML content). |
| HTML Content | The raw HTML string to convert into an image. Used only if "Data Type" is set to "HTML". |
| Webpage URL | The URL of the webpage to convert into an image. Used only if "Data Type" is set to "URL". |
Output
The node outputs JSON data representing the result of the conversion request. Typically, this will include metadata about the generated image or a direct link/reference to the image resource created from the HTML or URL input.
If the node supports binary output (not explicitly shown in the provided code), it would represent the actual image file data (e.g., PNG or JPEG) that can be used downstream in workflows for saving, uploading, or further processing.
Dependencies
- Requires an API key credential for authentication with the external service at
https://prod.0codekit.com. - The node sends a POST request to the
/image/htmlendpoint of the service, passing the selected data type and corresponding HTML or URL data. - No other external dependencies are indicated.
Troubleshooting
- Invalid or missing API key: Ensure the API key credential is correctly configured in n8n; otherwise, requests will fail authentication.
- Incorrect input data: If the HTML content is malformed or the URL is unreachable/invalid, the conversion may fail or produce unexpected results.
- Network issues: Connectivity problems to the external service endpoint will cause errors; verify network access.
- Empty input fields: Make sure to provide either valid HTML content or a valid URL depending on the selected data type.
Common error messages might include HTTP 4xx or 5xx responses indicating client or server errors. Checking the input parameters and API key validity usually resolves these.
Links and References
- 0CodeKit API Documentation (assumed base URL for the service)
- General info on HTML to Image conversion tools and use cases (external resources can be searched as needed)