Skip to main content
With a Code Node, you can output a text message along with a data object by using the following actions functions:
The data parameter should take the JSON payload that defines the custom channel message:
See the next sections for the required format.
The Cognigy.AI default channel has a specific channel format which you can find more about at AI default channel format.
Alexa Response JSON Reference

Example

We’ll output a simple card to our contact by using the following snippet:
Messenger Messaging ReferenceFor the messenger you can send multiple templates by building a JSON object or by using the facebook-bot-messenger module. For further information go to their GitHub Page.

Example

The following snippet will send a simple text message and a quick reply to the contact:
Or you can use the facebook-bot-messenger module for building custom json. Here we’ll send quick replies to the contact:
The Webchat uses the same format as the Messenger but instead of adding the _facebook property you have to add _webchat.

Example

The following example sends a text message and a quick reply to the contact:
The default AI channel, which is always selected from the default, uses the almost same format as the webchat above. The only difference is that you type _default instead of _webchat.

Example

The following example sends a text message and a quick reply to the contact:
LINE Messaging API

Example

The following outputs a simple confirm prompt to the contact:
Smooch messaging API

Example

The following outputs a simple image to the end user:

Example

The following outputs a gallery with images to the end user. This example is quite interesting since one needs to create an attachment for each image using the RingCentral Engage API. The returned attachmentIds are inserted in the Custom JSON below:
Last modified on June 10, 2026