Skip to content

Add a Plivo app for sending SMS - #454

Open
sarveshpatil-plivo wants to merge 2 commits into
Shuffle:masterfrom
sarveshpatil-plivo:plivo-app
Open

Add a Plivo app for sending SMS#454
sarveshpatil-plivo wants to merge 2 commits into
Shuffle:masterfrom
sarveshpatil-plivo:plivo-app

Conversation

@sarveshpatil-plivo

Copy link
Copy Markdown

This adds a plivo app under plivo/1.0.0/, following the existing app conventions, with a single Send SMS action. Relates to Shuffle/Shuffle#1991.

What it does

A Basic auth REST wrapper around the Plivo Messages API. You provide your account message URL, Auth ID, and Auth Token, and the action sends an SMS. Multiple recipients can be passed as a comma separated list and are sent in one request.

Scope

Current scope is SMS only. Voice and other Plivo services can follow as additional actions later.

Notes

Success is read from the HTTP status, so a failed send surfaces as an error instead of passing silently, and empty recipients and invalid timeouts are handled. The request shape matches the Plivo Messages API and the app manifest validates.

Happy to adjust anything to fit your conventions.

sarveshpatil-plivo and others added 2 commits July 9, 2026 01:50
Add a Plivo Messages app (plivo/1.0.0) that sends SMS from a workflow,
mirroring the structure of the existing twilio app.

Contract (Plivo Messages API):
- POST https://api.plivo.com/v1/Account/{AUTH_ID}/Message/
- HTTP Basic auth (Auth ID / Auth Token)
- JSON body {src, dst, text, type: "sms"}
- multiple recipients joined into one dst with "<"
- send-only; no inbound webhook, so no signature verification needed

Intentional divergences from the twilio app (hardening, not copied bugs):
- success is derived from the HTTP status (2xx, including Plivo's 202 on
  queue) instead of hardcoded True, so a failed send reports success=False
- guard against an empty recipient list before calling the API
- defensive timeout parse (fall back to the default on bad/zero input)
- send the SMS text verbatim (no ast.literal_eval); dropped the now-unused
  checkbody helper
- returns.example documents the summary wrapper (the raw Plivo body is
  under results[0].body)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- wrap the send in try/except so network errors are reported, not raised
- drop ghost/no-op auth branch and unused run() reads carried from the template
- narrow the bare except; reflect the actual HTTP status (Plivo returns 202)
- replace the placeholder icon with the current Plivo brand logo
@sarveshpatil-plivo

Copy link
Copy Markdown
Author

Hi @0x0elliot (cc @frikky), this adds a Plivo SMS app, following the existing app pattern (relates to Shuffle/Shuffle#1991). Would you be able to take a look when you get a chance? Happy to adjust anything.

Sign up for free to 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