Facebook Messenger List Template not working in botpress 10.x


#1

Hi Team, I am new to botpress and able to successfully install botpress and botpress messenger channel.
I am trying to send a set of products on facebook messenger, whenever user requests for, using botpress chatbot. Facebook provides some templates for listing, here is the URL. I have to provide a product list in FB template format.

After a while, I got to know that, I have to start coding this in the actions.js file and below is my code

		
	 var payloadJSON = {
        "template_type":"generic",
        "elements":[
           {
            "title":"Welcome!",
            "image_url":"https://petersfancybrownhats.com/company_image.png",
            "subtitle":"We have the right hat for everyone.",
            "default_action": {
              "type": "web_url",
              "url": "https://petersfancybrownhats.com/view?item=103",
              "webview_height_ratio": "tall",
            },
            "buttons":[
              {
                "type":"web_url",
                "url":"https://petersfancybrownhats.com",
                "title":"View Website"
              },{
                "type":"postback",
                "title":"Start Chatting",
                "payload":"DEVELOPER_DEFINED_PAYLOAD"
              }              
            ]      
          }
        ]
      } 


function: async (state, event, params) => {
event.bp.renderers.sendToUser("facebook:"+event.user.id, '#builtin_raw', {type:"template", payload: payloadJSON })
}

But now error says there is

'Error: [Renderer] Renderer not defined (#builtin_raw)\n

when I tried builtin_text Renderer it says

'Error: Text must be a string less than 640 chars.

can anyone guide me how to send templated data to facebook messenger?
@dmk23
OS: Windows 10
Botpress Version: 10.x


"@botpress/channel-messenger" and webviews