Skip to main content

Hello,

I'm experiencing formatting inconsistencies with my AI Agent when posting to Microsoft Teams channels. The agent preview shows the correct formatting, but the actual Teams message appears with unwanted indentation.

The Issue:

  • AI Agent UI displays proper message formatting
  • When posted to Teams channel, message shows incorrect indentation
  • Multiple instruction modifications haven't resolved the problem

What I've Tried:

  • Adjusting agent instructions several times
  • Various formatting approaches in the prompt

Attachments: I've included screenshots showing:

  1. The agent's preview (correct formatting)
  2. My current instructions
  3. The actual Teams output (with indentation issues)

Has anyone encountered similar formatting issues when using AI Agents with Microsoft Teams? Any suggestions for maintaining consistent formatting between the agent preview and the final Teams post would be greatly appreciated!

Thank you! 

Hi ​@jsa828,

 

Welcome to the Community.

To troubleshoot formatting inconsistencies in AI Agent posts to Microsoft Teams, ensure Markdown syntax is correctly applied, manage whitespace to prevent unintended formatting, and use consistent line breaks. Test simplified messages to isolate potential issues and review AI Agent instructions for inadvertent formatting errors. Check Microsoft Teams' API documentation to confirm proper message structuring if using a direct API call.

If you have any more questions or need further assistance, feel free to ask. We're here to help.


Hi there, ​@jsa828 👋

Did Jammer’s reply help to point you in the right direction?

If not, can you try uploading those screenshots here again—they don’t appear to have been uploaded. And can you also share a screenshot of the Configure section of the Microsoft Teams action? That’ll help to give us a bit more context on what might be causing the unexpected indentations. Make sure to blur/remove any personal info (names, emails etc.) before sharing—you can use a tool like Zappy for that.

Looking forward to hearing from you!


Hello ​@JammerS and ​@SamB ,

After changing the “Message Text Format” to HTML in the “Microsoft Teams: Reply to Channel Message” configuration, I am now seeing the expected behavior. My responses are being formatted correctly. The Teams messages are now human readable. 

Thank you for the replies and willingness to help me. 


Hi ​@jsa828,

 

It's great to hear that changing the "Message Text Format" to HTML in your "Microsoft Teams: Reply to Channel Message" configuration resolved the issue and that your messages are now displaying correctly. Formatting messages in HTML makes them more readable and visually appealing.

Feel free to reach out if you need further support with Zapier integrations, whether optimizing workflows or exploring new automation possibilities.


Reply