Microsoft Teams Bot icon

Microsoft Teams Bot

Send messages and cards via Microsoft Teams Bot

Message → List Messages

AI-generated

Summary

Lists recent messages from a Microsoft Teams channel or chat using Microsoft Graph. You can filter chat messages, match mentions, include channel replies, and return either full message data or concise summaries.

Inputs

  • Recipient Type (required) — Choose Channel or Chat (Direct Message).
  • Team ID (required) — Team containing the channel; required for channel messages.
  • Channel ID (required) — Channel to retrieve messages from; required for channel messages.
  • Chat ID (required) — Chat to retrieve messages from; required for chat messages.
  • Count — Maximum number of recent messages to retrieve (1–50; default 10).
  • Filter — OData filter expression for chat messages.
  • Mention Match Text — Keep only messages whose mention text or body contains this string, case-insensitively.
  • Order By — For chat messages, sort newest first by last modified time (default) or creation time.
  • Simplified View — Return a concise summary with message ID, sender, timestamps, plain-text preview, and reaction and attachment counts instead of the full Graph payload.
  • Include Replies — For channel messages, expand each message to include its replies.
  • Include Unknown Enum Members — For chat messages, add the Graph API Prefer: include-unknown-enum-members header.

Output shape

A list of message items, with each message returned as an item.

With Simplified View enabled, items contain concise summaries; otherwise they contain the message data returned by Microsoft Graph. Channel replies are included only when requested.

Links

Discussion