The Messenger Template node is used to send any of the supported template in Facebook Messenger:

For the last two templates it’s not available an advanced UI, just a JSON editor where to copy and paste the payload for the desired template (read the Facebook documentation about how to generate it).

Two generic templates can be combined together in a carousel by simply chaining Messenger Template node (to maximum of 10). Each template can have a maximum of 3 buttons, title and subtitle are limited to 80 chars.

Generic templates and button template can have up to 3 buttons, see Buttons node for a complete list of available buttons (only quick-reply and location are not available here).

In order to create a generic template in a upstream Function node

msg.payload = {
  templateType: 'generic',
  title: 'my title',
  subtitle: 'I am a sub title',
  imageUrl: '<http://image.server.com/cover.png>',
  buttons: [
    {
      type: 'url',
      url: '<http://javascript-jedi.com>',
      label: 'Javascript Jedi'
    }
  ]
}

or in order to pass a collection of elements for the carousel

msg.payload = {
  elements: [
    {
      templateType: 'generic',
      title: 'my title',
      subtitle: 'I am a sub title',
      imageUrl: '<http://image.server.com/cover.png>',
      buttons: [
        {
          type: 'url',
          url: '<http://javascript-jedi.com>',
          label: 'Javascript Jedi'
        }
      ]
    },
    {
      templateType: 'generic',
      title: 'another title',
      subtitle: 'Second sub title',
      imageUrl: '<http://image.server.com/cover2.png>',
      buttons: [
        {
          type: 'url',
          url: '<http://javascript-jedi.com>',
          label: 'Javascript Jedi'
        }
      ]
    }
  ]
}

Some additional parameters can like shareable or aspectRatio can be defined using the Params node .

Available parameters for the msg.payload