Forum Discussion
dmsaprykin
Jul 20, 2022Copper Contributor
Send fetch task on onInstallationUpdateAdd
Hi,
I'm working on onboarding experience for my bot and want to add several steps once app is added.
I currently send this prompt that invokes activity and shows the dialog. However I can't find a way to trigger task/fetch without user clicking on a button. Is it possible to force fetch so that user is presented with dialog?
Thank you
this.onInstallationUpdateAdd(async (context, next) => {
// This method is triggered when app is installed
console.log('onInstallationUpdateAdd', this.dialogState);
const installCard = CardFactory.heroCard(
'Install App',
null,
[{
type: 'invoke',
title: 'Install',
value: {
type: 'task/fetch',
install: true
}
}]);
await context.sendActivity({ attachments: [installCard] });
await next();
});
dmsaprykin - It is not possible to trigger task/fetch without user clicking on a button.
When the value object of the invoke card action or Action.Submit is initialized and when a user selects the button, an invoke message is sent to the bot.
Ref Doc-Use Task Modules in Microsoft Teams bots - Teams | Microsoft DocsThanks,
Sayali
--------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
- Sayali-MSFT
Microsoft
dmsaprykin - It is not possible to trigger task/fetch without user clicking on a button.
When the value object of the invoke card action or Action.Submit is initialized and when a user selects the button, an invoke message is sent to the bot.
Ref Doc-Use Task Modules in Microsoft Teams bots - Teams | Microsoft DocsThanks,
Sayali
--------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
- ChetanSharma-msft
Microsoft
dmsaprykin - Could you please accept the answer for more visibility?
- Sayali-MSFT
Microsoft