Hi, I have an Agent with a flow should be simple:
- Trigger: when new email arrives
- Description: analyze the body of incoming emails and if the content suggests that the email is urgent then send a message in Teams
The Teams tool is defined to send to "Chat with Flow bot".
No matter what I do, the Agent won't format the body of the message to Teams properly.
It starts with this error:
Error Message: Evaluating PowerFx expression resulted in error while invoking the connector : Expected to get object for property body but got StringValue Error Code: ConnectorPowerFxError
So I tell the Agent to send the body as a JSON object, and I'm getting another error:
Error Message: The connector 'Microsoft Teams' returned an HTTP error with code 400. Inner Error: Message body is missing. Error Code: ConnectorRequestFailure
This was the message I saw in the Teams activity:
{
"message": "The user has expressed frustration or anger with the statement: 'I'm fed up! Get back to me at once!!!' This may indicate a serious issue that needs immediate attention."
}
So the question is:
What is the correct way to tell Copilot Agent to send a message using Teams?
On a personal note: I'm very disappointed that something that should be so obvious and straightforward doesn't "just work".
Thank you!