Unipile icon

Unipile

Interact with Unipile API

Overview

The node interacts with the Unipile API to retrieve a specific attachment from a message within the Messaging resource. This operation is useful when you need to programmatically access and download attachments sent or received in messages managed by Unipile.

Practical examples include:

  • Automatically downloading invoice PDFs attached to incoming messages for processing.
  • Extracting image attachments from customer support messages for archival or analysis.
  • Integrating message attachments into other workflows, such as saving them to cloud storage or sending them via email.

Properties

Name Meaning
Message ID The unique identifier of the message from which to retrieve the attachment.
Attachment ID The unique identifier of the attachment within the specified message to be retrieved.

Output

The node outputs JSON data representing the requested message attachment. This typically includes metadata about the attachment (such as filename, size, MIME type) and the attachment content itself, which may be encoded or provided as binary data depending on the implementation.

If the node supports binary output, the attachment's raw data will be available in the binary property of the output item, allowing further processing or saving to disk.

Dependencies

  • Requires an active connection to the Unipile API using an API key credential configured in n8n.
  • The base URL for API requests is taken from the configured credentials.
  • Proper permissions to access messaging data and attachments in the Unipile account are necessary.

Troubleshooting

  • Invalid Message ID or Attachment ID: If the IDs provided do not correspond to existing resources, the node will likely return an error indicating that the message or attachment was not found. Verify the IDs are correct.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Ensure the API key credential is correctly set up and has sufficient permissions.
  • Network Issues: Connectivity problems can prevent the node from reaching the Unipile API. Check network settings and API availability.
  • Attachment Too Large: Some APIs impose size limits on attachments. If retrieval fails due to size, consider alternative approaches like direct download links.

Links and References

Discussion