SOLVED

Send fetch task on onInstallationUpdateAdd

Copper Contributor

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();
    });

 

3 Replies
@dmsaprykin- We are looking into this I will get back to you soon.

best response confirmed by dmsaprykin (Copper Contributor)
Solution

@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 Docs

Thanks, 

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.

@dmsaprykin - Could you please accept the answer for more visibility?
1 best response

Accepted Solutions
best response confirmed by dmsaprykin (Copper Contributor)
Solution

@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 Docs

Thanks, 

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.

View solution in original post