Run your workspace
Conversation export
Bulk-export your workspace's conversations as CSV or JSON for retention, analytics, or compliance handover. Admin and Owner roles only.
The export screen
On Conversations, Export opens the export screen. It exports the conversations the list is filtered to: the AI employee named in the filter chip, and the period (last 7, 30 or 90 days, or all time). Pick CSV or JSON and Start export. The screen lists your recent exports; one that is still being prepared refreshes every few seconds, and a ready one has Download for 7 days.
An export holds conversations in the sense used everywhere in the app: chats where the visitor wrote something. Page loads where nobody typed, and your own playground tests, are left out. (Before card #668 every widget load was a row.)
How it works
- The screen (or an API client) POSTs to
/app/conversation-exportswith format (csvorjson) and optional filters (agent_id, andperiod— one of7d,30d,90d— orfrom/to). The screen sends the list's period and the server turns it into the same start as the list (today and the days before it, from midnight), so the export holds exactly the conversations the list showed. Dates an API client sends are stored as plain dates and times in the app's timezone. - A
ConversationExportrow is inserted withstatus=pendingandBuildConversationExportJobis queued. - The job runs in the background. It reads the conversations in
chunks of 200, builds the whole file in memory, and writes it in
one go to a private-disk file at
storage/app/private/exports/conversations/{uuid}.{format}. Only real conversations are included (the visitor wrote something; playground chats never). - On completion,
status=ready, the file size + row count are stamped, andexpires_atis set 7 days out. - An owner or admin downloads from
/app/conversation-exports/{id}/download. The endpoint sends the file as a download with the right MIME and rejects the request if the export is not ready, expired, or belongs to another workspace.
What's in the export
Each row carries the conversation's lifecycle metadata, the
visitor's lead profile (email / phone / name / status), and
every message in the conversation. CSV format flattens the
transcript to first_user_message +
last_assistant_message for spreadsheet use; JSON
keeps the full message array per conversation.
Retention
Exports expire 7 days after they're created. The
conversations:prune-exports Artisan command runs
nightly at 02:15 UTC and deletes both the DB row and the file.
Re-trigger the export if you need it again after expiry.
Tenant isolation
The build job only reads conversations whose
agent_id belongs to the requesting workspace.
Download requests verify workspace_id match before
sending the file. A leaked export id is harmless without an authed
session in the right workspace.
Limits
The job has a 600-second hard timeout. Workspaces with very large conversation volume should narrow with date / agent filters; we'll lift the timeout if buyers ask. The export file is held on the application's local private disk; very large files may push the disk usage warning thresholds on shared hosts.