Chat icon

Chat

Interact with the Chat API

Actions253

Conversation → Download Attachment

AI-generated

Summary

Downloads an attachment from a conversation.

Inputs

  • downloadMode (required) — How to identify the attachment to download. Either by its ID (requires account, inbox, conversation, and attachment) or by providing a direct URL.
  • accountId (required) — Select the account to use. Visible when download mode is 'By Attachment ID'.
  • inboxId (required) — Select the inbox to use. Visible when download mode is 'By Attachment ID'.
  • conversationId (required) — Select the conversation to use. Visible when download mode is 'By Attachment ID'.
  • attachmentId (required) — The attachment to download. Visible when download mode is 'By Attachment ID'.
  • attachmentUrl (required) — The direct URL of the attachment to download. Visible when download mode is 'By URL'.
  • allowExternalUrls — Whether to allow downloading from URLs outside the configured Chat instance. Enable with caution. Visible when download mode is 'By URL'. Defaults to false.
  • binaryPropertyName (required) — Name of the binary property to write the attachment data to. Defaults to 'data'.

Output shape

binary

The attachment file is stored as binary data in the property specified by the 'Output Binary Property' parameter (default: data). The operation does not return JSON data; the binary file can be used by subsequent nodes that accept binary input (e.g., Send Email, HTTP Request).

Examples

Example 1: Download an attachment by its ID

Set Download Mode to 'By Attachment ID', select the Account, Inbox, Conversation, and Attachment, and keep Output Binary Property as 'data'.

Example 2: Download an attachment via a public URL

Set Download Mode to 'By URL', paste the attachment URL into Attachment URL, optionally enable Allow External URLs if the URL points outside your Chat instance, and set Output Binary Property as desired.

Links

Discussion