Create template
gambot_create_templateCreate WhatsApp templates for Meta approval using text, media, variables, and buttons. Supports automatic media upload and header injection via public URL.
Instructions
Create a new WhatsApp template (submitted to Meta for approval). Name must be English, lowercase_with_underscores. Components use the full Meta shape and support: a TEXT or media (IMAGE/VIDEO/DOCUMENT) HEADER, a BODY with {{1}} variables, a FOOTER, and BUTTONS (QUICK_REPLY / URL / PHONE_NUMBER). For a media header you can either put example.header_handle on the HEADER component yourself (upload it first with gambot_upload_template_media), or simply pass headerMediaUrl (a public URL) and let Gambot upload it and inject the handle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| category | Yes | ||
| language | Yes | Language code, e.g. he / en | |
| components | Yes | Template components. Examples — HEADER text: {type:"HEADER",format:"TEXT",text:"Hi {{1}}",example:{header_text:["Dana"]}} | HEADER media: {type:"HEADER",format:"IMAGE",example:{header_handle:["<handle>"]}} | BODY: {type:"BODY",text:"Your order {{1}} shipped",example:{body_text:[["1234"]]}} | FOOTER: {type:"FOOTER",text:"Reply STOP to opt out"} | BUTTONS: {type:"BUTTONS",buttons:[{type:"QUICK_REPLY",text:"Track"},{type:"URL",text:"Open",url:"https://x.co/{{1}}",example:["abc"]},{type:"PHONE_NUMBER",text:"Call",phone_number:"+972500000000"}]} | |
| gmbtMediaId | No | Optional Gambot media id (for preview). | |
| headerFormat | No | Format for headerMediaUrl (default IMAGE). | |
| headerMediaUrl | No | Optional public media URL. If set, Gambot uploads it to Meta and injects the header_handle into the HEADER component. |