microsoft / microsoft/CopilotStudioSamples
Issue: RelayBotSample - The bot is unable to deliver a response to the client
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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