nextlevelbuilder / nextlevelbuilder/goclaw
[Feature Request] Zalo Personal: Add inbound media/file download to agent workspace (all formats)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 24
Description
Summary
Zalo Personal channel currently does not download inbound media and files to the agent's workspace directory. When a user sends any file via Zalo Personal, the agent receives metadata (filename, size) but cannot access the file content because it is never written to disk.
Current Behavior
- User sends file (e.g.,
.xlsx,.png,.docx) via Zalo Personal chat -
- Agent sees the message and knows a file was attached
-
-
- Agent cannot read the file — responds with:
-
-
-
- "File được gửi trong lịch sử chat nhưng chưa được đính kèm trực tiếp vào tin nhắn gọi mình"
-
-
-
-
- The
read_filetool finds nothing in/app/workspace/<agent>/
- The
-
-
Expected Behavior
- All inbound files should be downloaded to the agent's workspace (or a temp directory) during message processing, similar to how Zalo OA already handles images:
-
"Receive: Images are downloaded and stored as temporary files during message processing."
-
(Source: zalo-oa.md)
- This should extend beyond images to cover all common file formats.
Requested File Format Support
| Category | Formats |
|---|---|
| Images | .jpg, .jpeg, .png, .gif, .webp, .bmp, .svg, .heic |
| Documents | .pdf, .doc, .docx, .txt, .rtf, .odt |
| Spreadsheets | .xls, .xlsx, .csv, .tsv, .ods |
| Presentations | .ppt, .pptx, .odp |
| Archives | .zip, .rar, .7z, .tar.gz |
| Data/Config | .json, .xml, .yaml, .yml |
| Audio | .mp3, .wav, .m4a, .ogg |
| Video | .mp4, .mov, .avi, .mkv |
Ideally, the channel should download any file type Zalo delivers, not just a hardcoded allowlist — and let the agent/tools decide whether they can process the content.
Zalo OA vs Zalo Personal — Media Gap
| Capability | Zalo OA | Zalo Personal |
|---|---|---|
| Send media | ✅ (with verification) | ✅ (with verification) |
| Receive/download images | ✅ (auto to /tmp) | ❌ Not implemented |
| Receive/download files | ❌ Images only | ❌ Not implemented |
Environment
- GoClaw v3.14.0 (Docker Compose)
-
- Channel type:
zalo-personal
- Channel type:
-
-
- Agent provider: Claude Sonnet (Anthropic)
-
-
-
-
- OS: Ubuntu 22.04 (Vultr VPS)
-
-
Suggested Implementation
- On inbound message with any media/file attachment, download from Zalo CDN/zCloud URL
-
- Save to agent workspace:
/app/workspace/<agent-name>/uploads/<original_filename>
- Save to agent workspace:
-
- Include the local file path in the message context passed to the agent
-
- Respect existing
media_max_mbconfig for size limits (suggest raising default to 25MB for documents)
- Respect existing
-
- Pass MIME type metadata alongside the file path so the agent knows how to handle it
-
- Optional: configurable file retention (auto-cleanup after X hours, or keep until session ends)
Use Case
Our logistics company (Nhất Tín Logistics, Vietnam) uses Zalo Personal to receive operational documents from field staff and partners:
- Excel files: shipping manifests, pricing sheets, KPI reports
-
- Word/PDF: contracts, SOPs, invoices
-
-
- Images/Photos: delivery proof, warehouse check-in photos, vehicle damage reports
-
-
-
-
- PowerPoint: training materials, monthly reports
The agent needs to read, analyze, and respond based on these files in real-time. Currently, users must use workarounds (sending zCloud links instead of files directly), which breaks the natural Zalo chat workflow.
- PowerPoint: training materials, monthly reports
-
-
Related
- Zalo OA already implements image download: channels/zalo-oa.md
-
- Zalo Personal media docs only cover outbound: channels/zalo-personal.md
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read channels/zalo-oa.md and channels/zalo-personal.md first, comparing the documented inbound media behavior. Then trace Zalo Personal inbound message handling and the existing media_max_mb configuration. Done means inbound attachments are stored in the workspace or a temporary directory, with their local path and MIME metadata passed to the agent while size limits are respected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100