Skip to main content
Glama

Activepieces MCP Server

by eldoonreval
index.tsβ€’1.62 kB
import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework'; import { getCalendars, getColors } from './helper'; export const googleCalendarCommon = { baseUrl: 'https://www.googleapis.com/calendar/v3', calendarDropdown: (minAccessRole?: 'writer') => { return Property.Dropdown<string>({ displayName: 'Calendar', refreshers: [], required: true, options: async ({ auth }) => { if (!auth) { return { disabled: true, placeholder: 'Please connect your account first', options: [], }; } const authProp = auth as OAuth2PropertyValue; const calendars = await getCalendars(authProp, minAccessRole); return { disabled: false, options: calendars.map((calendar) => { return { label: calendar.summary, value: calendar.id, }; }), }; }, }); }, colorId: Property.Dropdown({ displayName: 'Color', refreshers: [], required: false, options: async ({ auth }) => { if (!auth) { return { disabled: true, placeholder: 'Please connect your account first', options: [], }; } const authProp = auth as OAuth2PropertyValue; const response = await getColors(authProp); return { disabled: false, options: Object.entries(response.event).map(([key, value]) => { return { label: value.background, value: key, }; }), }; }, }), };

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/eldoonreval/activepieces'

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