Overview
This node integrates with the AnyWebsites HTML hosting service, allowing users to manage HTML content through n8n workflows. The "Upload Content" operation specifically enables uploading custom HTML pages to be hosted and published online. This is useful for scenarios such as quickly sharing static web pages, publishing landing pages, or hosting simple HTML-based documents without managing your own web server.
Practical examples include:
- Automatically generating and uploading a report as an HTML page after data processing.
- Publishing marketing landing pages created dynamically from workflow data.
- Hosting temporary HTML content with optional expiration and access control.
Properties
| Name | Meaning |
|---|---|
| Title | Title of the HTML content being uploaded. |
| Description | Optional description providing additional details about the HTML content. |
| HTML Content | The actual HTML code/content to upload. This is required. |
| Is Public | Boolean flag indicating if the content should be publicly accessible (true) or private (false). |
| Access Code | Access code required to view the content if it is set to private (only shown when Is Public is false). |
| Expires At | Optional date/time when the content will expire and no longer be accessible. |
Output
The node outputs JSON data representing the response from the AnyWebsites API after uploading the content. This includes metadata about the uploaded content such as its ID, title, description, public/private status, and importantly, a published_url field which provides the URL where the HTML content can be accessed.
Example output structure (simplified):
{
"content": {
"id": "string",
"title": "string",
"description": "string",
"is_public": true,
"access_code": "string",
"expires_at": "datetime",
...
},
"published_url": "https://your-anywebsites-domain/view/{content.id}"
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for the AnyWebsites service configured in n8n.
- The node makes HTTP requests to the AnyWebsites API endpoints to perform operations.
- No additional environment variables are needed beyond the API credential.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause authentication errors.
- Providing invalid HTML content or missing required fields (like HTML Content) will result in validation errors.
- Setting private content without an access code may cause access issues.
- Expired content will no longer be accessible after the specified expiration date.
Error messages:
"The operation \"upload\" is not supported!"— indicates an unsupported operation was requested; ensure the operation parameter is correctly set.- API errors returned from the AnyWebsites service will be passed through; check the error message for details like invalid parameters or permission issues.
Resolution tips:
- Verify API credentials are correct and have necessary permissions.
- Ensure all required properties are provided and valid.
- For private content, always provide a non-empty access code.
- Check the expiration date format and validity if used.
Links and References
- AnyWebsites Official Documentation (replace with actual URL)
- n8n Documentation on Creating Custom Nodes
- HTML Basics