Skip to content

Add Apple Shortcuts-based SMS sending flow#79

Merged
navyaa31 merged 3 commits into
mainfrom
feature/textsending_shortcut
Jun 4, 2026
Merged

Add Apple Shortcuts-based SMS sending flow#79
navyaa31 merged 3 commits into
mainfrom
feature/textsending_shortcut

Conversation

@siwenshao

@siwenshao siwenshao commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a text job API (POST /api/text-jobs, GET /api/text-jobs/:id) that stores message + recipients in MongoDB with a 1-hour TTL
  • On the review page, sending a text now creates a job and shows an "Open in Shortcuts" deep link instead of calling Twilio
  • The iPhone Shortcut fetches pre-personalized messages from the job endpoint and sends each via the native Messages app
  • This is the iCloud link: https://www.icloud.com/shortcuts/2d8c00d353364154af8d06e24d464e5c

How it works

  1. User composes message and selects recipients in the web app
Screenshot 2026-05-30 at 8 22 09 PM 2. "Send Text" creates a job on the backend and returns a `shortcuts://` deep link Screenshot 2026-05-30 at 8 23 18 PM 3. User opens the link on Apple device → Shortcut fetches `GET /api/text-jobs/:id` → sends each `{to, body}` via Messages app Screenshot 2026-05-30 at 8 23 44 PM

Notes

  • GET /api/text-jobs/:id is intentionally unauthenticated — the UUID job ID acts as the credential (same pattern as Google share links)
  • {{First Name}} personalization is resolved server-side per recipient before the Shortcut fetches
  • NEXT_PUBLIC_SHORTCUT_API_URL can be set independently of NEXT_PUBLIC_API_URL (e.g. to an ngrok URL for local testing)

Testing

  • Send a text from the review page — "Open in Shortcuts" button appears after clicking Send
  • Open the Shortcut link on iPhone — Shortcuts app opens and runs automatically
  • Each recipient receives a correctly personalized message
  • Navigating away and back resets the Shortcuts button (no stale job URL)
  • Deselecting recipients and resending uses the updated recipient list

…ulple bug fixes on the way for the volunteer select logic
@siwenshao siwenshao requested a review from navyaa31 as a code owner May 31, 2026 03:24
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
home-start Ready Ready Preview, Comment Jun 4, 2026 9:17pm

@njbizzle njbizzle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested it on a few old scam texts and it works great!

@navyaa31 navyaa31 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me! thank you so much for implementing this and for the idea!

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 1b036bf):

https://home-start-80e0a--pr79-feature-textsending-oxt2f6pp.web.app

(expires Thu, 11 Jun 2026 21:18:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2d310071333235bae3893f27fc89786faff3470f

@navyaa31 navyaa31 merged commit 1532ec7 into main Jun 4, 2026
5 checks passed
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.

3 participants