Video

Send video files to visitors using this card. There are two types of videos that you can send.

1. Videos on YouTube

Send URLs of videos that are available on YouTube to your website visitors.

2. Videos on a server

Send URLs of videos that have been uploaded on a particular server, along with subtitles and thumbnails.

 MandatoryDescriptionValues
typeYesThe type of input to be displayed to the visitorvideo
urlYesThe URL of the video that you want to send to the visitor{  
   "url":"youtube or mp4 URL",
}
textYesThe text to be displayed to the visitortext
subtitlesNoThe URL of the subtitle file(if any){  
   "subtitles":"subtitle URL",
}​
thumbnailNoThumbnail of the video that will be sent to the visitor{  
   "thumbnail":"thumbnail URL",
}​

 

Note: Subtitles and Thumbnails are only applicable for sharing videos that have been uploaded to a server. You do not need to include them while sharing URLs of videos that are on YouTube.

Channel compatibility and limitations

     

  • The card is supported on Facebook Messenger, Instagram, WhatsApp, Telegram and LINE. 
  • When using this card, the user would get the URL of the video along with a thumbnail, and clicking on it would redirect to the respective video player. But the video cannot be played inside the chat. 

Output (YouTube Videos)

Use case (YouTube Videos)

Copied{  
   "type":"video",
   "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021. Price: ₹ 29,999 Only",
   "url": "https://youtu.be/L_sQXMjAasA",
}
Copied//Context handler function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    {  
      "type":"video",
      "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021. Price: ₹ 29,999 Only",
      "url": "https://youtu.be/L_sQXMjAasA",
}
  ]);
prompt = Map(); 
prompt.put("param_name", "reply"); 
prompt.put("data", response); 
result.put("prompt", prompt); 
result.put("todo", "prompt");
return result;

//Execution function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    {
      "type":"video",
      "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021. Price: ₹ 29,999 Only",
      "url": "https://youtu.be/L_sQXMjAasA",
     }
  ]);
result.put("data", response);
return result;
Copied{  
   "type":"video",
   "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021. Price: ₹ 29,999 Only",
   "url": "https://youtu.be/L_sQXMjAasA",
}
Copied{
  "platform": "ZOHOSALESIQ",
  "action": "reply",
  "replies": [
    {  
   "type":"video",
   "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021.
Price: ₹ 29,999 Only",
   "url": "https://youtu.be/L_sQXMjAasA",
    }
  ]
}
Copied"channelData": {
  "zohosalesiq": {
    "replies": [
    {
   "type":"video",
   "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021.
Price: ₹ 29,999 Only",
   "url": "https://youtu.be/L_sQXMjAasA",
   "thumbnail":"https://zoho.com/images/bot.png",
   "autoplay" : true,
     }
   ]
  }
}
Copied"channelData": {
  "zohosalesiq": {
    "replies": [
    {
   "type":"video",
   "text": "OnePlus Nord 2 (Blue, Green, Grey) - August 2021.
Price: ₹ 29,999 Only",
   "url": "https://youtu.be/L_sQXMjAasA",
   "thumbnail":"https://zoho.com/images/bot.png",
   "autoplay" : true,
     }
   ]
  }
}

Output (Videos on a server)

Use case (Videos on a server)

Copied{  
   "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
}
Copied//Context handler function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    {  
   "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
}
  ]);
prompt = Map(); 
prompt.put("param_name", "reply"); 
prompt.put("data", response); 
result.put("prompt", prompt); 
result.put("todo", "prompt");
return result;

//Execution function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    {
      "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
     }
  ]);
result.put("data", response);
return result;
Copied{  
   "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
}
Copied{
  "platform": "ZOHOSALESIQ",
  "action": "reply",
  "replies": [
    {  
   "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
    }
  ]
}
Copied"user_defined": {
  "zohosalesiq": {
    "replies": [
    {
   "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
     }
  ]
  }
}
Copied"channelData": {
  "zohosalesiq": {
    "replies": [
    {
       "type":"video",
   "thumbnail":"https://zoho.com/images/bot.png",
   "url": "https://zoho.com/videos/bots.mp4",
   "autoplay" : true,
   "text": "Here's a video to help you get started with the Zobot",
   "subtitles": "https://zoho.com/videos/bots.srt"
     }
  ]
  }
}