Actions10
Overview
This node integrates with ManageEngine ServiceDesk Plus to manage tickets and their attachments. Specifically, the "Download Attachment" operation allows users to download a file attached to a specific ticket. It can either save the downloaded file directly to a specified path on disk or return the file data encoded in base64 within the node's output.
Common scenarios for this node include:
- Automating retrieval of ticket attachments for further processing or archival.
- Integrating ServiceDesk Plus attachments into other workflows or systems.
- Downloading files from tickets without manual intervention.
For example, a user could automate downloading error logs attached to support tickets and then analyze them in another system.
Properties
| Name | Meaning |
|---|---|
| Ticket ID | The ID of the ticket from which to download the attachment. |
| Attachment ID | The ID of the specific attachment to download. |
| Download Path | Optional local file system path where the downloaded file will be saved. If omitted, the file content is returned as base64 data in the output. |
Output
The node outputs JSON objects with the following structure depending on whether a download path was provided:
If Download Path is specified:
{ "success": true, "ticketId": "<Ticket ID>", "attachmentId": "<Attachment ID>", "downloadPath": "<Path where file was saved>", "message": "File downloaded successfully" }This indicates the file was saved locally at the given path.
If Download Path is not specified:
{ "success": true, "ticketId": "<Ticket ID>", "attachmentId": "<Attachment ID>", "fileData": "<Base64 encoded file content>", "message": "File data retrieved successfully" }The file content is returned as a base64 string in
fileData.On failure, the output contains:
{ "success": false, "error": "<Error message>" }
Dependencies
- Requires an API key credential for authenticating with the ServiceDesk Plus API.
- Uses HTTPS requests to communicate with the ServiceDesk Plus server.
- For saving files locally, requires access to the file system where n8n runs.
- Node dependencies include:
axiosfor HTTP requests.- Node.js built-in
fsmodule for file writing (when saving to disk). - Node.js built-in
httpsmodule configured to ignore unauthorized SSL certificates.
Troubleshooting
Common issues:
- Invalid or missing ticket or attachment IDs will cause errors.
- Incorrect or missing API authentication token will result in authorization failures.
- Providing an invalid or inaccessible download path may cause file write errors.
- Network connectivity issues to the ServiceDesk Plus server can cause request failures.
Error messages:
"Request failed with status code 404": The ticket or attachment ID does not exist."Request failed with status code 401": Authentication failed; check API credentials.- File system errors when saving the file: Ensure the path exists and n8n has write permissions.
"self signed certificate"or SSL errors: The node disables strict SSL verification but network proxies or firewalls might interfere.
Resolutions:
- Verify ticket and attachment IDs are correct.
- Confirm API credentials are valid and have necessary permissions.
- Check that the download path is writable by the n8n process.
- Ensure network connectivity and firewall rules allow access to the ServiceDesk Plus API endpoint.