Send LINE Message (universal)
line_send_messageSend LINE messages to users via reply, push, multicast, narrowcast, or broadcast. Supports text, templates, flex, stickers, coupons, images, and videos.
Instructions
Universal LINE sender. Auto-picks the API (reply/push/multicast/narrowcast/broadcast) from the target shape; message shape selects text/template/flex/sticker/coupon/image/video. Feed pre-built objects from line_design_imagemap/line_design_card/line_design_flex via message.message_json; native coupons from line_manage_coupon via message.coupon_id.
mode: send_now (default) sends immediately; draft returns a LINE OA Manager handoff package (URL + Flex JSON + steps) — use when the user wants to SCHEDULE, since the Messaging API can't schedule but the OA Manager UI can; dry_run validates + estimates cost without sending.
Safety: pre-flight /validate before spending quota; Quota Guardian blocks if projected cost >95% of remaining quota unless confirm=true; broadcast { everyone:true } requires confirm=true; quiet-hours 22:00–08:00 BKK warns unless force=true; quiet_push silences the recipient device; reply tokens expire ~1 min (falls back to a push hint).
Returns send_now → { success, transport, request_id?, recipient_count_estimated, quota, warnings[] }; draft and dry_run return their own shapes. Narrowcast needs ~24h before line_get_message_stats shows engagement.
Example: "ส่งโปรให้ผู้หญิง 25-44 กรุงเทพ" → target.filter { genders:["female"], ages:["age_25","age_30"], areas:["bangkok"] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oa | No | OA id (multi-OA). Omit to use active OA. | |
| mode | No | send_now (default) sends immediately; draft returns a handoff package for LINE OA Manager UI; dry_run validates + estimates without sending. | send_now |
| force | No | Override quiet-hours warning (22:00–08:00 BKK). Defaults false; LINE Thai customers prefer not to be pinged at night. | |
| target | Yes | Who to send to. Pick one shape: { reply_to } | { user_id } | { user_ids[] } | { audience } | { filter } | { everyone: true } | |
| confirm | No | Required to be true when projected cost > 95% of remaining quota, or when target.everyone === true. | |
| message | Yes | What to send. Pick one shape: { text } | { template, data } | { flex_json, alt_text } | { sticker } | { coupon_id } | |
| quiet_push | No | Suppress push notification on recipient device (silent send). Default false. |