← Microsoft Teams

New Chat Message from Microsoft Teams API

Pipedream makes it easy to connect APIs for Microsoft Teams and 900+ other apps remarkably fast.

Trigger workflow on
New Chat Message from the Microsoft Teams API
Next, do this
Connect to 900+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New Chat Message with Microsoft Teams API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New Chat Message trigger
    1. Connect your Microsoft Teams account
    2. Configure Polling interval
    3. Select a Chat
    4. Optional- Configure Max
  2. Add steps to connect to 900+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Send Message with Discord Webhook API on New Chat Message from Microsoft Teams API
Microsoft Teams + Discord Webhook
 
Try it
Add Multiple Rows with Google Sheets API on New Chat Message from Microsoft Teams API
Microsoft Teams + Google Sheets
 
Try it
Get Film with SWAPI - Star Wars API on New Chat Message from Microsoft Teams API
Microsoft Teams + SWAPI - Star Wars
 
Try it
Create Multiple Records with Airtable API on New Chat Message from Microsoft Teams API
Microsoft Teams + Airtable
 
Try it
Send any HTTP Request with HTTP / Webhook API on New Chat Message from Microsoft Teams API
Microsoft Teams + HTTP / Webhook
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New Chat Message on Microsoft Teams
Description:Emit new event when a new message is received in a chat
Version:0.0.1
Key:microsoft_teams-new-chat-message

Code

import base from "../common/base.mjs";

export default {
  ...base,
  key: "microsoft_teams-new-chat-message",
  name: "New Chat Message",
  description: "Emit new event when a new message is received in a chat",
  version: "0.0.1",
  type: "source",
  dedupe: "unique",
  props: {
    ...base.props,
    chat: {
      propDefinition: [
        base.props.microsoftTeams,
        "chat",
      ],
    },
    max: {
      propDefinition: [
        base.props.microsoftTeams,
        "max",
      ],
    },
  },
  methods: {
    ...base.methods,
    async getResources(lastCreated) {
      return this.getNewPaginatedResources(
        this.microsoftTeams.listChatMessages,
        {
          chatId: this.chat,
        },
        this.max,
        lastCreated,
      );
    },
    generateMeta(message) {
      return {
        id: message.id,
        summary: `New Message ${message.id}`,
        ts: Date.parse(message.createdDateTime),
      };
    },
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Microsoft TeamsmicrosoftTeamsappThis component uses the Microsoft Teams app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
Polling intervaltimer$.interface.timer

Pipedream will poll the YouTube API on this schedule

ChatchatstringSelect a value from the drop down menu.
Maxmaxinteger

Maximum number of items to return

Authentication

Microsoft Teams uses OAuth authentication. When you connect your Microsoft Teams account, Pipedream will open a popup window where you can sign into Microsoft Teams and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microsoft Teams API.

Pipedream requests the following authorization scopes when you connect your account:

User.Reademailoffline_accessopenidprofileChat.ReadChat.ReadWriteChatMessage.SendChannel.CreateChannel.ReadBasic.AllChannelMessage.SendTeam.ReadBasic.AllTeamMember.Read.AllChannelMessage.Read.All

About Microsoft Teams

Chat, Meetings, Calling, Collaboration

More Ways to Use Microsoft Teams

Triggers

New Channel from the Microsoft Teams API

Emit new event when a new channel is created within a team

 
Try it
New Channel Message from the Microsoft Teams API

Emit new event when a new message is posted in a channel

 
Try it
New Chat from the Microsoft Teams API

Emit new event when a new chat is created

 
Try it
New Team from the Microsoft Teams API

Emit new event when a new team is joined by the authenticated user

 
Try it
New Team Member from the Microsoft Teams API

Emit new event when a new member is added to a team

 
Try it

Actions

Create Channel with the Microsoft Teams API

Create a new channel in Microsoft Teams. See the docs here

 
Try it
List Channels with the Microsoft Teams API

Lists all channels in a Microsoft Team. See the docs here

 
Try it
Send Channel Message with the Microsoft Teams API

Send a message to a team's channel. See the docs here

 
Try it
Send Chat Message with the Microsoft Teams API

Send a message to a team's chat. See the docs here

 
Try it