File Slots

Learn how to use the File slot type to receive file attachments from users in plugins.
View as Markdown

The File slot type enables plugins to receive file attachments from users. It is resolved only when the user interacts with the dedicated “Upload file” button in the assistant interface.

File Object Structure

When a an attachment is added to the File slot, it generates this object structure:

1{
2 "file_name": string, // Name used when uploading to the external system's API
3 "location": string, // File location
4 "content": string, // base-64 encoded
5}

Supported file extensions (case-insensitive)

(case-insensitive)

.png, .jpg, .jpeg, .pdf, .txt, .csv, .xlsx, .xlsm, .xls, .xltx, .xltm

Callout: Only these extensions are allowed as ticket attachments. Attempts to upload unsupported types will fail validation.

Upload Interface

Users must use the “Upload file” button.

Single vs. Multiple Files

A File slot resolves to exactly one file. To accept several files in a single slot, set the slot’s data type to a list by checking “Data type is expected to be a list” when you create or edit the slot. This makes the slot a List[File].

Slot data typeBehavior
FileResolves to a single file. If multiple files are selected, only the first is assigned to the slot and the rest are ignored.
List[File]Resolves to the full array of uploaded files. Use this when your plugin needs to accept more than one file.

The “Upload file” pop-up blocks attaching more than one file when the slot type is File. Set the slot to List[File] to enable multi-file selection.

Limitations

LimitationDetails
File size limitMaximum file size is 5MB. Files exceeding this limit will fail to upload.
No file delivery to usersFiles cannot be sent back to end users in chat responses.
No content manipulationThe system cannot read, parse, or modify file contents beyond base64 encoding.
Upload only via dedicated buttonUploading files directly in chat (e.g., Slack drag-and-drop) will not populate the File slot — it triggers BriefMe instead. Use only the “Upload file” pop-up that appears when the File slot is requested.

Workarounds

Use Case: Avoid Local File Download

Problem:

You do not want users to download files to their machine. Instead, you want users to paste a link (e.g., from Google Drive, OneDrive, or internal file server) directly into the assistant.

Limitation:

The platform cannot download files from external URLs on behalf of the user.

Solution:

Use a string slot named file_link instead of File.

Customer API responsibility:

Your API will need to handle the file download from the link passed by the user.

  • Download file from file_url
  • Validate content/type
  • Process as needed

This bypasses local upload entirely. No file is stored or transmitted through the assistant.