I want to hyperlink a particular text in lambda function content. I tried doing this but didn't work.
if (intentName == "greetings") {
var message = {
'contentType': 'PlainText',
'content': '<a href="www.google.com">click here</a>'
}
responseMsg = close( sessionAttributes, 'Fulfilled', message );
}
I know we can hyperlink response card, but i want to hyperlink a particular text in content. Any idea how to do it or any alternative? i am using javascript.
Edit 1 : I am able to do it by Attachments through attachment :
function close(sessionAttributes,fulfillmentState,message){
return{
sessionAttributes,
dialogAction: {
type: 'Close',
fulfillmentState,
message,
"responseCard": {
"contentType": "application/vnd.amazonaws.card.generic",
"genericAttachments": [
{
'title': 'Google',
'attachmentLinkUrl': 'https://www.google.com',
}
]
}
}
};
}