SkillHub

add-tiffin-order-roty-input

v0.1.0

解析授权 Telegram 用户的 "Roty input" 消息,通过 HTTPS POST 创建 Roty 餐食订单,无需 UI 自动化。

Sourced from ClawHub, Authored by Horng Yang Tan

Installation

Please help me install the skill `add-tiffin-order-roty-input` from SkillHub official store. npx skills add horngtan/add-tiffin-order-roty-input

name: add-tiffin-order-roty-input description: "POST-only: Parse 'Roty input' messages and create Roty orders via HTTPS POST (no Playwright/UI automation)."

Add Tiffin Order - Roty Input (POST-only)

Trigger

Run when an inbound message contains the exact phrase "Roty input" (case-insensitive).

Important

  • DO NOT use Playwright, browser automation, screenshots, or vision clicks.
  • This skill creates orders only by sending a JSON payload via HTTPS POST to: https://newdailyorderandcartcreation-818352713629.australia-southeast1.run.app

Execution (MANDATORY)

When triggered, you MUST call the dispatcher script and use its output. Do NOT manually construct curl or JSON payloads.

Run: python3 /data/.openclaw/workspace/skills/add-tiffin-order-roty-input/scripts/handle_message.py ""

Rules: - Always POST using the dispatcher (unless it returns Missing address/dates/product). - Never hardcode perProductCost (never "[15]"). - Never use hardCodedPrice for perProductCost. - perProductCost MUST come from pricing_engine.py via handle_message.py.

Authorization (Telegram)

  • Only allow Telegram users whose from.id is in: data/allowed_users.json under admins or vendors.
  • If unauthorized: reply "Not authorized."

Behavior

  1. Parse messy input into:
  2. customerName
  3. userAddress
  4. deliveryDates (must resolve at least 1 date; otherwise ask a follow-up)
  5. product selection + modifiers
  6. specialRequests
  7. Build payload in the exact API shape (see build_payload.py).
  8. Send POST immediately (no "Dry-run vs Live" prompt), unless:
  9. address missing, OR
  10. no dates resolved, OR
  11. product not matched In those cases, ask only for the missing piece.
  12. On success: confirm with cartNo.

Scripts

  • Dispatcher: scripts/handle_message.py
  • Parser: scripts/parse_roty_input.py
  • Matcher: scripts/match_product_and_modifiers.py
  • Pricing: scripts/pricing_engine.py
  • Payload: scripts/build_payload.py
  • POST sender (urllib): scripts/post_order.py
  • Products registry: data/products_roty.json
  • Allowlist: data/allowed_users.json