younifyd
Menu

Send Message

Send a customer's message to an assistant and get its reply, so an assistant can answer on WhatsApp, Facebook Messenger, Instagram, SMS, Slack or any other channel a workflow can receive

Use it in a workflow

  1. Add a step and choose the Assistant connector.
  2. Pick the Send Message action (under ai).
  3. Fill in the fields below, then reference the result from later steps as {{sendMessage.response.data}}.

Fields

agentSlugstringrequired

Which assistant answers

messagestring

What the customer said, in their own words. Not needed when sending the opening message.

sessionKeystringrequired

What identifies this conversation — a phone number, a chat id, a customer id. The same key continues the same conversation, so the assistant remembers what was said before.

headersstring

JSON object of headers sent to every tool the assistant calls, e.g. {"X-Customer-ID":"{{steps.lookup.response.data.id}}"}. This is how you tell your workflows who the customer is when there is no sign-in — the assistant cannot change or override these.

channelstring

Set this when the customer is writing from a messaging app, so a person who takes over the conversation in your inbox can answer them there. The step's connection is the one their reply is sent with: a WhatsApp, Facebook Messenger or Instagram connection to match.

One ofwhatsappmessengerinstagram

channelTostring

The customer's address on the channel — their phone number for WhatsApp, or the sender id from the webhook (sender.id) for Messenger and Instagram.

channelLabelstring

How the customer appears in your inbox, such as their WhatsApp profile name or Messenger or Instagram name.

messageIdstring

The channel's own id for this message. A message the channel delivers twice is only answered once.

deliverReplyboolean

Send the assistant's answer to the customer on the channel, followed by its product cards and cart in that channel's own format: pictures, captions and buttons on WhatsApp, a carousel, quick replies and buttons on Messenger and Instagram. Leave off to send the reply yourself with a Send Text Message step.

Default false

welcomeboolean

Use when Meta says a customer has just opened the chat (WhatsApp's welcome request, a Messenger Get Started tap). Sends the assistant's Opening message and Starter prompts on the channel as buttons or quick replies, without running the assistant. Needs a channel, a connection and the customer's address.

Default false

Examples

Answer an incoming WhatsApp message

Key the conversation on the sender's number so the thread continues across messages

json
{
  "agentSlug": "support",
  "message": "{{trigger.body.messages[0].text.body}}",
  "sessionKey": "{{trigger.body.messages[0].from}}"
}

Need more? See the Assistant guide for connection setup and behaviour shared by every action.

Was this page helpful?