Design LINE Flex Message
line_design_flexCreate validated LINE Flex Message JSON using Thai-localized templates or raw input. Returns preview, size, and warnings so you can send it with line_send_message.
Instructions
Compose a validated Flex Message for line_send_message. Modes: template mode { template, data } (Thai-localized, recommended; templates: receipt, voucher, shipping_update, order_confirm, appointment_reminder, promo_simple, course_cert, thank_you); raw mode { flex_json, alt_text } (advanced); or { list_templates: true } to get the catalog with Thai descriptions + required fields per template. DESIGN ONLY — never calls the LINE API.
Feed the result to line_send_message via message.flex_json, or pass { template, data } straight to line_send_message (same templates). Returns { flex_json, alt_text, preview_url (Flex Simulator), size_bytes, warnings[] } (warns near the 30KB bubble limit).
Example: "ออกแบบคูปอง 20% หมด 31 ส.ค." → { template:"voucher", data:{ title:"ส่วนลดวันแม่", code:"MOM20", discount:"ส่วนลด 20%", valid_until:"31 ส.ค. 2026" } }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Template-specific data fields. Required when template is set. | |
| alt_text | No | Optional override for altText. Defaults to a template-derived alt text. | |
| template | No | Name of a pre-built Thai-localized Flex template. See catalog below. Mutually exclusive with flex_json. | |
| flex_json | No | Raw Flex contents (bubble or carousel). Advanced users only. Mutually exclusive with template. | |
| list_templates | No | Set true to return the available template catalog instead of rendering. |