Skip to main content
Glama

mcp-google-sheets

send-chat-message.ts1.29 kB
import { microsoftTeamsAuth } from '../..'; import { createAction, Property } from '@activepieces/pieces-framework'; import { Client } from '@microsoft/microsoft-graph-client'; import { microsoftTeamsCommon } from '../common'; export const sendChatMessageAction = createAction({ auth: microsoftTeamsAuth, name: 'microsoft_teams_send_chat_message', displayName: 'Send Chat Message', description: 'Sends a message in an existing chat.', props: { chatId: microsoftTeamsCommon.chatId, contentType: Property.StaticDropdown({ displayName: 'Content Type', required: true, defaultValue: 'text', options: { disabled: false, options: [ { label: 'Text', value: 'text', }, { label: 'HTML', value: 'html', }, ], }, }), content: Property.LongText({ displayName: 'Message', required: true, }), }, async run(context) { const { chatId, contentType, content } = context.propsValue; const client = Client.initWithMiddleware({ authProvider: { getAccessToken: () => Promise.resolve(context.auth.access_token), }, }); const chatMessage = { body: { content: content, contentType: contentType, }, }; return await client.api(`/chats/${chatId}/messages`).post(chatMessage); }, });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server