What is ctx.jelou?
ctx.jelou is the built-in messaging client. It lets you send WhatsApp messages directly from your function. Available automatically when the company has Jelou API credentials configured.
Check availability
Send messages
ctx.jelou.send(options)
Returns { messageId: string }.
- Text
- Image
- List
- Carousel
- Location
video, audio, file, sticker, contacts, quick_reply, cta_url, flow.
Send HSM templates
ctx.jelou.sendTemplate(options)
Returns Array<{ id, destination }>.
Validate templates before sending
AsendTemplate fails silently for three reasons: the name is misspelled, the language is not approved, or you pass more or fewer params than the template expects. ctx.templateRegistry gives you the channel’s approved-template catalog so you can catch that before calling Meta.
Methods
has() and hasAnywhere() are boolean checks: if no channel is bound or the catalog does not respond, they log a warning and return false instead of throwing. When you need a definitive answer use get(), list() or validate(), which throw TemplateRegistryError with a code: unknown_template, language_not_approved, param_count_mismatch, template_paused, registry_unavailable or no_bot_context.In cron and deferred runs
On a cron or deferred run fire there is no channel resolved, sohas() would always return false. Carry the botId in your own payload and bind the catalog explicitly:
for(botId) is safe on any path: on a normal request it simply re-binds to the given channel.
Channel override
All messages default toctx.bot.id. Override with botId: