microsoft / microsoft/CopilotStudioSamples

Issue: RelayBotSample - The bot is unable to deliver a response to the client

Open
#354 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
797
Forks
491
PR merge metrics
No merged PRs in 30d

Description

I'm integrating a Copilot agent with a Slack app. As part of the setup, I retrieved the token endpoint for the Slack channel from my Copilot agent and used it to generate a token and initiate a conversation with the bot. The bot successfully returns responses.

However, the following line of code is throwing an error. I'm running the bot locally and making the request via Postman.

await turnContext.SendActivitiesAsync(_responseConverter.ConvertToBotSchemaActivities(botResponses).ToArray());

While debugging, I noticed that the Conversation property on ITurnContext is null. This issue appears to occur when converting bot responses from DirectLineActivity to the Activity type—during this conversion, the Conversation property is not being set.

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the RelayBotSample request locally through Postman and inspect the SendActivitiesAsync call together with _responseConverter.ConvertToBotSchemaActivities. Trace how the DirectLineActivity becomes an Activity and verify the delivered response once Conversation is available on the converted activity.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.