Skip to main content
Glama

mcp-google-sheets

publish-event.ts1.26 kB
import { baseUrl, getEvents } from '../common'; import { sessionAuth } from '../..'; import { HttpMethod, httpClient } from '@activepieces/pieces-common'; import { Property, createAction } from '@activepieces/pieces-framework'; export const publishEvent = createAction({ auth: sessionAuth, name: 'publish_event', displayName: 'Publish Event', description: 'Quickly publish an event.', props: { event: Property.Dropdown({ displayName: 'Event', description: 'The event you want to publish.', required: true, refreshers: [], options: async ({ auth }) => { if (!auth) { return { disabled: true, options: [], }; } const events = await getEvents(auth as string); return { options: events.map((event) => { return { label: event.session.name, value: event.id, }; }), }; }, }), }, async run({ propsValue, auth }) { const response = await httpClient.sendRequest({ method: HttpMethod.POST, url: `${baseUrl}/events/${propsValue.event}/publish`, headers: { 'x-api-key': auth, }, }); return response.body; }, });

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