Skip to content

improvement(whatsapp): validate + improve integration skill for file inputs/outputs - #5942

Merged
icecrasher321 merged 3 commits into
stagingfrom
staging-v10
Jul 24, 2026
Merged

improvement(whatsapp): validate + improve integration skill for file inputs/outputs#5942
icecrasher321 merged 3 commits into
stagingfrom
staging-v10

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Validate whatsapp + blocks with file inputs / outputs.

Type of Change

  • Bug fix

Testing

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedJul 24, 2026 11:00pm

Request Review

@cursor

cursorBot commented Jul 24, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches workflow load migrations and several communication blocks; new WhatsApp routes handle tokens and outbound fetches to Meta CDN with existing security helpers, but misconfigured media params could still break live customer messaging workflows.

Overview
WhatsApp gains Upload Media and Download Media operations with internal API routes (auth, size limits, DNS-pinned CDN fetch, execution/copilot file storage). Send Media now accepts file upload, media ID, or public link via a server route that uploads first when needed; the block splits media into a mediaSource basic/advanced pair plus separate mediaId / mediaLink fields. Webhooks expose incoming mediaId, MIME type, and caption; Mark As Read supports an optional typing indicator; interactive sends use an interactiveType discriminator with a load-time migration for older workflows.

Integration authoring docs (skills, commands, sim-integrations rules) are expanded around canonical params: block-wide uniqueness, one concept per pair, normalizeFileInput in params not tool, and reading canonical IDs after serialization.

Telegram and Buffer blocks are aligned to that pattern—file upload + reference pairs, separate URL/file_id fields, and params that map uploads to HTTPS URLs for Telegram JSON APIs.

Docs and block skills/templates are updated for 24-hour windows, limits, and new operations.

Reviewed by Cursor Bugbot for commit ec21502. Configure here.

@greptile-apps

greptile-appsBot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds WhatsApp media upload/download support and strengthens integration file handling.

  • Adds authenticated media upload, send, and download routes with validation and storage integration.
  • Extends WhatsApp block operations, webhook media metadata, interactive-message migration, tool contracts, documentation, and tests.
  • Separates uploaded-file references from provider IDs and URLs across WhatsApp, Telegram, Buffer, and ElevenLabs blocks.

Confidence Score: 5/5

The pull request appears safe to merge because no eligible blocking failure remains.

No blocking failure remains.

Important Files Changed

FilenameOverview
apps/sim/blocks/blocks/whatsapp.tsExpands WhatsApp operations and maps canonical file inputs to upload, send, and download tools.
apps/sim/app/api/tools/whatsapp/get-media/route.tsAdds authenticated, size-limited WhatsApp media retrieval and workflow-file storage.
apps/sim/app/api/tools/whatsapp/send-media/route.tsAdds server-side orchestration for direct media sends and file-upload-backed sends.
apps/sim/app/api/tools/whatsapp/upload.server.tsImplements authorized file retrieval, per-media size enforcement, and multipart Meta uploads.
apps/sim/lib/workflows/migrations/whatsapp-interactive-type.tsBackfills the interactive-message variant for legacy WhatsApp workflow blocks.
apps/sim/lib/webhooks/providers/whatsapp.tsExposes media IDs, MIME types, hashes, filenames, and captions from incoming messages.
apps/sim/tools/whatsapp/utils.tsCentralizes WhatsApp endpoint construction, media limits, message bodies, and response handling.
apps/sim/blocks/blocks/telegram.tsSeparates file references from Telegram IDs and URLs while resolving workflow files to HTTPS URLs.

Sequence Diagram

sequenceDiagram
participant W as Workflow
participant T as WhatsApp Tool
participant R as Internal Media Route
participant M as Meta Graph API
participant S as File Storage
W->>T: Upload, send, or download media
T->>R: Authenticated internal request
alt Upload or file-backed send
R->>S: Read authorized workflow file
R->>M: Upload media
M-->>R: Media ID
opt Send media
R->>M: Send message with media ID
end
else Download media
R->>M: Fetch metadata and media bytes
R->>S: Store execution file
end
R-->>T: Normalized output
T-->>W: Media ID, message result, or file
Loading

Reviews (2): Last reviewed commit: "add whatsapp subblock migration" | Re-trigger Greptile

Comment threadapps/sim/blocks/blocks/whatsapp.ts
@blacksmith-sh

This comment has been minimized.

@icecrasher321

Copy link
Copy Markdown
CollaboratorAuthor

bugbot run

@icecrasher321

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ec21502. Configure here.

Comment threadapps/sim/blocks/blocks/buffer.ts
@icecrasher321
icecrasher321 merged commit fe184d3 into stagingJul 24, 2026
20 checks passed
@icecrasher321
icecrasher321 deleted the staging-v10 branch July 24, 2026 23:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@icecrasher321