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
-
Start a chat session: Start a MS Teams chat session using the 'Post message in a chat or channel' action to senders email address
-
Write a message: Write a response message with a polite tone.
-
Provide Detailed Information: Write a message providing brief of user question and detailed answer for the question.
-
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.
-
Post message request: Post message request field will contain the response message of the Agent
-
Send an Email: Send an email using the 'Office 365 Outlook - Send an email (V2)' action with a polite tone.
-
Provide Detailed Information: Send a detailed email providing brief of user question and detailed answer for the question.
-
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.
-
The email body should be always be written in well formatted html. Please make it look polished.