Order medicines from a prescription photo in messenger, with stock checks

The customer sends a prescription photo to messenger — the scenario reads the medicines, checks stock, builds the order and sends a summary. Status, refills and reminders all work in the same conversation.

  • The order is built from a photo — no phone calls, no spelling things out
  • Stock is checked and decremented automatically
  • Delivery status and refills happen in the same chat
  • A refill reminder arrives on its own when it's due
Webhook

How it works

To get Telegram notifications in Google Sheets, you don't need a developer: a ready-made scenario watches events and sends messages for you.

  1. Starts when: Telegram Message Received
  2. Then: Normalize Incoming Message
  3. Check: Route By Message Type
  4. If yes: Telegram - Download Photo
  5. Then: Analyze an image
  6. Then: Parse OCR Result
  7. Then: Split Out Medicines
  8. Then: Lookup Medicine In Inventory
  9. Check: Check Stock Available
  10. If yes: Update Inventory Stock
  11. Then: Aggregate Order Lines
  12. Then: Build Order Summary
  13. Then: Create Order Record
  14. Then: Telegram - Send Order Summary
  15. If no: Get Last Order (Refill)
  16. Then: Build Refill Order
  17. If no: Get Latest Order (Status)
  18. Then: Telegram - Send Delivery Status
  19. If no: Get Pending Order (Confirm)
  20. Then: Update Order Status To Confirmed
  21. Then: Telegram - Send Order Confirmed
  22. Starts when: Delivery Status Webhook
  23. Then: Update Order Delivery Status
  24. Then: Telegram - Send Delivery Update
  25. Starts when: Daily Refill Check
  26. Then: Get Orders Due For Refill
  27. Check: Filter Due Today Or Earlier
  28. Check: Loop Over Due Refills
  29. Then: Telegram - Send Refill Reminder
  30. Then: Mark Reminder Sent
  31. Starts when: On Workflow Error
  32. Then: Slack – Post Workflow Error Alert

You can launch this Telegram + Google Sheets integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.