Skip to main content
Glama

mcp-google-sheets

find-channel.ts1.03 kB
import { microsoftTeamsAuth } from '../../'; import { createAction, Property } from '@activepieces/pieces-framework'; import { Client, PageCollection } from '@microsoft/microsoft-graph-client'; import { microsoftTeamsCommon } from '../common'; export const findChannelAction = createAction({ auth: microsoftTeamsAuth, name: 'microsoft_teams_find_channel', displayName: 'Find Channel', description: 'Finds channels by name.', props: { teamId: microsoftTeamsCommon.teamId, channelName: Property.ShortText({ displayName: 'Channel Name', required: true, }), }, async run(context) { const { teamId, channelName } = context.propsValue; const client = Client.initWithMiddleware({ authProvider: { getAccessToken: () => Promise.resolve(context.auth.access_token), }, }); const response: PageCollection = await client .api(`/teams/${teamId}/allChannels`) .filter(`displayName eq '${channelName}'`) .get(); return { found: response.value.length > 0, result: response.value, }; }, });

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