Skip to content

Update send-proactive-messages.md#14272

Open
SharanGarcha-MSFT wants to merge 12 commits intomainfrom
SharanGarcha-MSFT-update-SDK-sample
Open

Update send-proactive-messages.md#14272
SharanGarcha-MSFT wants to merge 12 commits intomainfrom
SharanGarcha-MSFT-update-SDK-sample

Conversation

@SharanGarcha-MSFT
Copy link
Copy Markdown
Collaborator

No description provided.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 12cec03:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 48daddf:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit dd5dedd:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit b5c0df3:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 59f2eaf:

💡 Validation status: suggestions

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 💡Suggestion View Details

msteams-platform/bots/how-to/conversations/send-proactive-messages.md

  • Line 21, Column 64: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/microsoftteams/platform/teams-sdk/essentials/sending-messages/proactive-messaging' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

This comment was marked as outdated.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 9a6fc44:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the “Send proactive messages” documentation to shift guidance and samples from Bot Framework–centric proactive messaging to Teams SDK (Teams AI Library) proactive messaging patterns.

Changes:

  • Updates page metadata/positioning and several narrative sections to reference Teams SDK proactive messaging.
  • Replaces prior Bot Framework sample snippets with new C#/TypeScript/Python Teams SDK examples and updates SDK reference links.
  • Refreshes the “Code sample” table to point to Teams SDK-oriented sample locations.

Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
Comment on lines +243 to +247
teams.OnInstall(async context =>
{
private readonly IBotFrameworkHttpAdapter _adapter;
private readonly string _appId;
private readonly ConcurrentDictionary<string, ConversationReference> _conversationReferences;

public NotifyController(IBotFrameworkHttpAdapter adapter, IConfiguration configuration, ConcurrentDictionary<string, ConversationReference> conversationReferences)
{
_adapter = adapter;
_conversationReferences = conversationReferences;
_appId = configuration["MicrosoftAppId"] ?? string.Empty;
}

public async Task<IActionResult> Get()
{
foreach (var conversationReference in _conversationReferences.Values)
{
var newReference = new ConversationReference()
{
Bot = new ChannelAccount()
{
Id = conversationReference.Bot.Id
},
Conversation = new ConversationAccount()
{
Id = conversationReference.Conversation.Id
},
ServiceUrl = conversationReference.ServiceUrl,
};

// Sends a proactive message from the bot to a conversation.
await ((BotAdapter)_adapter).ContinueConversationAsync(_appId, newReference, BotCallback, default(CancellationToken));
}

// Let the caller know proactive messages have been sent.
return new ContentResult()
{
Content = "<html><body><h1>Proactive messages have been sent.</h1></body></html>",
ContentType = "text/html",
StatusCode = (int)HttpStatusCode.OK,
};
}

private async Task BotCallback(ITurnContext turnContext, CancellationToken cancellationToken)
context.Storage.Set(context.Activity.From.AadObjectId!, context.Activity.Conversation.Id);
await context.Send("Hi! I am going to remind you to say something to me soon!");
notificationQueue.AddReminder(context.Activity.From.AadObjectId!, Notifications.SendProactive, 10_000);
Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
## Send the message

Now that you have the right address information, you can send your message. If you're using the SDK, you must use the `continueConversation` method, and the `conversationId` and `tenantId` to make a direct API call. To send your message, set the `conversationParameters`. See the [samples](#samples) section or use one of the samples listed in the [code sample](#code-sample) section.
Now that you have the right address information, you can send your message. If you're using the SDK, you must use the `app.Send()` method, and the `conversationId` and `tenantId` to make a direct API call. To send your message, set the `conversationParameters`. See the [samples](#samples) section or use one of the samples listed in the [code sample](#code-sample) section.
Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 804d467:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit a51e407:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
Comment thread msteams-platform/bots/how-to/conversations/send-proactive-messages.md Outdated
@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 87bef51:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

AjayJ12-MSFT
AjayJ12-MSFT previously approved these changes Apr 24, 2026
Copy link
Copy Markdown

@Harikrishnan-MSFT Harikrishnan-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved !!!!

@microsoft-production-github-app
Copy link
Copy Markdown

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/bots/how-to/conversations/send-proactive-messages.md 91 20 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5055578:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/bots/how-to/conversations/send-proactive-messages.md ✅Succeeded View

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants