How can I send a message through the hook

I want to display for the user a message, through the hook ?
I tried with this:
        type: 'proactive-trigger',
        channel: 'web',
        direction: 'outgoing',
        payload: {
          text: 'la conversation est réinitialiser'

That doesn’t work.
I use the hook on before_session_timeout.

Hi @kevin21,

You should use type: ‘text’, proactive-trigger is not a supported type; it is used in that proactive example to be caught in the hook and send something else instead.

Tu voudras aussi corriger “réinitialisée” :wink:

Something else you can do is try out the hook in another entry point, for example before incoming middleware, just to have quicker feedback than waiting for the dialog timeout. Make also sure to introduce the await statements and wrap the hook in an async function, since these return Promises.


Mais quelle erreur! Vive la France! vive le Quebec et vive le Luxembourg.

I have found the solution for this:

const userId =
    const botId = event.botId
    const channelId =
    const eventDestination = { target: userId, botId: botId, channel: channelId }
        { text: "Vous n'avez pas été actif, j'ai réinitialisée la conversation", typing: true },
      .then(payloads => {, payloads)


1 Like

How do i send node specific hooks?