how do teams bot on channel get attachments?

Itacir Gabral 1 Reputation point

If you @ an bot on teams's channel it receive the message body. You can also include file attachments in the message.

I'm using bot framework 4.6 for nodejs. The mention message handler:

this.onMessage(async (context, next) => {
  await next()

how the bot can get the midia resources in the message?

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,062 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChetanSharmamsft 1,026 Reputation points Microsoft Vendor

    @Itacir Gabral - There are two ways to send files to and receive files from a bot:

    Use the Microsoft Graph APIs:
    This method works for bots in all Microsoft Teams scopes:

    Use the Teams bot APIs: These only support files in personal context.

    Reference doc:,only%20support%20files%20in%20personal%20context.%20More%20

    Sample link:

    Chetan Sharma

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.