capabilities.work

Announce a New OneDrive File in a Teams Channel

A 4-step recipe with Microsoft Office. We can help you get access.

Recipe · 4 steps

Announce a New OneDrive File in a Teams Channel

Notify a Teams channel that a OneDrive file is ready.

  1. List the items in the drive root so a file can be resolved by name and so the announcement reflects what is actually present in the drive.
  2. Read the target driveItem to confirm it exists and carries a file facet, and to capture the name and size quoted in the announcement.
  3. List the team's channels to confirm the destination channel resolves before a message is posted against its id.
  4. Post the announcement to the channel, naming the file and its size so readers know what landed without opening OneDrive first.
What you'll need to have ready
  • itemId: The id of the driveItem to announce. Resolve it from the root listing when only a file name is known.
  • teamId: The id of the team holding the destination channel.
  • channelId: The id of the channel the announcement is posted to.
For your developer

Arazzo workflow microsoft-office:drive-file-to-teams-notification, 4 operations: listMyDriveRootChildren → getMyDriveItem → listTeamChannels → sendChannelMessage. Specs on APIs.io.