For support and team-chat bots
Rich answers in chats that can't run scripts
Team chats and support widgets often show only text and images. Ask WebKnox for an image of the card and post it next to the text answer.
15° and partly cloudy in Dresden right now. Light rain starts around 8 pm and gets heavier after 10 pm.
15° and partly cloudy in Dresden right now. Light rain starts around 8 pm and gets heavier after 10 pm; it eases off by about 7 am, and Thursday stays mostly dry with a high of 12°.
Text alone, or text with the card
A medium banana (118 g) has about 105 kcal, mostly from carbohydrates: 27 g, including 14 g of sugars. It also gives you 3.1 g of fiber and 422 mg of potassium.
Where it fits in a bot
Your bot already receives the message. One call returns the text and a link to the image.
- Someone asksin a channel or a support chat
- Your botasks WebKnox for an image as well
- matched: truepost the text with the image attached
- matched: falseyour bot answers as usual
// Ask for a hosted image along with the answer body: JSON.stringify({ messages, render: { formats: ['image'] } }) if (answer.matched) { // Post the text, with the card as an image await chat.postMessage({ text: answer.text, attachments: [{ image_url: answer.render.image_url }], }); } else { await chat.postMessage({ text: await myBot.reply(messages) }); }
Good to know for bots
Image links expire
An image link works until render.expires_at. Upload the image to the platform if a message must keep it longer.
Text stays the answer
Always post text as well: it is searchable, and screen readers read it.
On Pro and Scale
Hosted images come with Pro and Scale and cost one extra token each.