Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1BRcMK0HMSaBi3Bqg9OL+5
Copilot Studio - Calling Actions from Copilot S...
Unanswered

When an email is received, Agent should send the answer via MS Teams chat, but how?

Like (2) ShareShare
ReportReport
Posted on 3 Apr 2025 17:44:38 by 2
My scenario is; when a user sends an email to support team, PowerAutomate will get the email body, Copilot Studio Agent will understand question and prepare a proper answer, then agent will start a MS Teams chat session and ll say something like "hello, you sent an email and asked how the weather is.. Your answer is sunny". So I created this setup;
 
Also I added Send an email action to test and it is working good. If user sends a quesion via email, he receives a response via email. 
 
Problem is; Post message in a chat or channel is not working.
1- Sometimes, Post message request field is being empty. Like in screenshot;
2- Sometimes Post message request is also filled with proper answer, but it gives error 400. But %90 of my tries, Post message request is missing.
Could you please help me, Post message is empty then if it is empty why do I get 400 error.
 
My agents description area is as following;
 
You are a IT support agent who receives questions about the SAP system problems, user permission issues and daily work questions.
 
Receive the end user question from an email
Users will send a html email to ozan.dikerler@daimlertruck.com. Body of the message will contain the user question.
 
Choose response method
Try to rich user via MS Team chat session initially. If the user MS Teams status is offline, then respond with an email
 
Respond with Chat Message
  1. Start a chat session: Start a MS Teams chat session using the 'Post message in a chat or channel' action to senders email address
  2. Write a message: Write a response message with a polite tone.
  3. Provide Detailed Information: Write a message providing brief of user question and detailed answer for the question.
  4. Provide response to no information: If no information is available then post a message using the 'Post message in a chat or channel' action stating no proper answer can be found that matched their question, however, they can contact us again for additional information later again.
  5. Post message request: Post message request field will contain the response message of the Agent
Respond with Email
  1. Send an Email: Send an email using the 'Office 365 Outlook - Send an email (V2)' action with a polite tone.
  2. Provide Detailed Information: Send a detailed email providing brief of user question and detailed answer for the question.
  3. Provide response to no information: If no information is available then Send an email using the 'Office 365 Outlook - Send an email (V2)' action stating no proper answer can be found that matched their question, however, they can contact us again for additional information later again.
  4. The email body should be always be written in well formatted html. Please make it look polished.
  • ronaldwalcott Profile Picture
    3,625 on 12 Apr 2025 at 03:30:40
    When an email is received, Agent should send the answer via MS Teams chat, but how?
    You probably need to validate your inputs, error check the responses and add repeats where applicable, 
  • Suggested answer
    w.p Profile Picture
    4,083 on 07 Apr 2025 at 18:53:29
    When an email is received, Agent should send the answer via MS Teams chat, but how?
    Check the trigger output "when a question arrives with a new email", it might return an empty string.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard

Featured topics

Loading started