How to send proactive messages with the help of continueConversationAsync method #99
Unanswered
Jyothsna-2023
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
Hi @Jyothsna-2023, can you share more details about the error you are getting when the app crashes. Here is the documentation you can find more info about sending proactive messages with bots: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages?tabs=javascript Sample code reference: https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/graph-proactive-installation/nodejs/bots/proactiveBot.js#L59 |
Beta Was this translation helpful? Give feedback.
2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team, I'm trying to send proactive messages in my bot. For this use case I have chosen the Teams toolkit - Basic bot template. Here is the code which is getting used to send the proactive message.
const currentUser = context.activity.from.id;
const conversationReferences[currentUser] = TurnContext.getConversationReference(context.activity);
const adapter = context.adapter;
await adapter.continueConversationAsync(config.botId, conversationReferences[currentUser], async (context) => {
await context.sendActivity("Hello");
});
The bot send the message for the first time and it get crashes. Can I know the proper way to get/pass on the turncontext to the bot to send the proactive messages.
Appreciate your help!
Beta Was this translation helpful? Give feedback.
All reactions