I am preparing a project in dialogflow and implementing everything on Facebook. It turns out that I want to send a previous message and then the card through fulfillment but for some reason it always sends only the card and ignores any message that I add to it either at the beginning or at the end, how can I fix it?
function ProbandoWebHook(agent) {
const card = {
attachment: {
type: 'template',
payload: {
template_type: 'generic',
elements: [
{
title: 'Título de la tarjeta',
subtitle: 'Subtítulo de la tarjeta',
image_url: 'https://acortar.link/GG8nfC',
buttons: [
{
type: 'postback',
title: 'Botón 1',
payload: 'Acción_1'
},
{
type: 'postback',
title: 'Botón 2',
payload: 'Acción_2'
}
]
}
]
}
}
};
agent.add("Hola");
agent.add(new Payload(agent.FACEBOOK, card, { sendAsMessage: true }));
}