Hi all,
I'm running Hermes on EC2 (Ubuntu) with the Baileys-based WhatsApp bridge, and I'd like to know whether outbound-only messaging is possible.
What I want: have the agent send a WhatsApp message to a contact (I have their phone number) when that contact has never interacted with the bot (no prior message, no existing chat).
What I've found so far:
send_message(action='list') only returns existing conversations as targets (format whatsapp:<Display Name>). New numbers don't appear there.
Sending to a raw JID fails. 5[phone number]9@s.whatsapp.net returns Could not resolve ... Use send_message(action='list'). I also tested a variant with an extra 9 in the phone number, which returned a 500 from the bridge: Cannot destructure property 'user' of 'jidDecode(...)' as it is undefined.
I understand WHATSAPP_ALLOWED_USERS is inbound-only and doesn't affect outbound.
My questions:
(1) Is there a supported way to make the agent send the first message to a number with no prior chat? A different target format, a config option, or a way to register a contact so it shows up in action='list'?
(2) If not currently supported, does the underlying Baileys bridge have the capability (e.g. via onWhatsApp() to resolve the JID first), and would exposing it through the send_message adapter be feasible? Happy to look at the adapter code if someone can point me to the relevant file.
(3) Is the only intended path really "the contact must message the bot first, or I manually open the chat from the bot account once"?
I'm aware of the ban-risk caveat around cold outbound messaging, but I'm not looking to do bulk/spam, just occasional one-to-one messages to known contacts. Any guidance appreciated.
Thanks!