Actions32
- Campaign Actions
- List Actions
- Media Actions
- Setting Actions
- Subscriber Actions
- Template Actions
- Transaction Actions
Overview
The node "Listmonk" allows interaction with a Listmonk instance, which is an open-source self-hosted newsletter and mailing list manager. Specifically, the "Get Preview by ID" operation under the "Template" resource fetches a preview of an email template by its unique identifier. This is useful for users who want to retrieve and review the content or layout of a specific email template before sending campaigns or making further modifications.
Common scenarios include:
- Previewing an email template to verify its design and content.
- Automating workflows that require fetching template previews for approval processes.
- Integrating template previews into custom dashboards or applications.
Example: A marketing automation workflow where a user selects a template ID, and the node retrieves the preview content to display it in a UI or send it for review.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the template object whose preview you want to retrieve. This is a required string input. |
Output
The node outputs JSON data representing the preview of the specified template. This typically includes the rendered HTML or text content of the email template as stored in the Listmonk system. The exact structure depends on the Listmonk API response but generally contains fields such as the template's subject, body, and possibly metadata about the template.
If the node supports binary data output (not explicitly shown here), it would likely represent attachments or media related to the template preview, but this is not indicated in the provided code snippet.
Dependencies
- Requires access to a running Listmonk instance with API enabled.
- Needs credentials for authentication, specifically a username and password, configured in n8n credentials.
- The base URL for the Listmonk API must be set correctly, typically derived from the domain credential.
- The node uses HTTP Basic Authentication to communicate with the Listmonk API.
Troubleshooting
- Invalid ID error: If the provided template ID does not exist or is malformed, the API will return an error. Ensure the ID is correct and corresponds to an existing template.
- Authentication failures: Incorrect username or password will cause authorization errors. Verify credentials are accurate and have sufficient permissions.
- Connection issues: Network problems or incorrect API base URL can prevent communication. Confirm the domain URL is reachable and properly formatted without trailing slashes.
- API changes: If Listmonk updates their API, some operations might fail. Check for updated node versions or API documentation.