Forum Discussion
Team Channel: Card with button. Specific URL for each user?
diegoSpace If you want to open a link in the browser on click of a button you need to use a Action.OpenURL action and if you want to open a task module you will need to pass a invoke action with type as "task/fetch". Please go through TaskModules and try this out.
Gousia_Begum I read the link you mention and according to what I understood there I had the code I pasted before. Is it wrong?
I send to a channel a card, with an action button ("type": "Action.Submit"). When button pressed, my bot receives the HTTP post (message with type 'invoke'), and I responde with a 200 OK (with the task info)
But nothing happens (no popup task is open). Maybe I am not returning properly the Task:
var task = {
"task": {
type: 'continue',
value: {
width: 500,
height: 220,
title: "Test",
url: sUrlNotLogged,
fallbackUrl: sUrlNotLogged
}
}
}
res.writeHeader(200, { "Content-Type": "application/json" });
res.write(JSON.stringify(task));
res.end();
Or I missunderstood the documentation...
Thanks for your help
- diegoSpaceMar 25, 2020Brass Contributor
@Gousia_Begum I would really appreciate any idea... Thanks!!