Skip to main content
Glama

mcp-google-sheets

create-project.ts1.71 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { AuthenticationType, httpClient, HttpMethod, HttpRequest, } from '@activepieces/pieces-common'; import { ProjectCreateRequest, ProjectCreateResponse } from '../common/models'; import { posthogAuth } from '../..'; export const posthogCreateProject = createAction({ auth: posthogAuth, name: 'create_project', displayName: 'Create Project', description: 'Create a posthog project', props: { name: Property.ShortText({ displayName: 'Name', description: 'Project Name', required: false, }), slack_incoming_webhook: Property.ShortText({ displayName: 'Slack Incoming Webhook', description: 'Slack incoming webhook', required: false, }), anonymize_ips: Property.Checkbox({ displayName: 'Anonymize IPs', description: 'Whether to anonymize incoming IP addresses.', required: false, }), is_demo: Property.Checkbox({ displayName: 'Is demo project', description: 'If this is a demo project', required: false, }), }, async run(context) { const body: ProjectCreateRequest = { ...context.propsValue, }; const request: HttpRequest<ProjectCreateRequest> = { method: HttpMethod.POST, url: `https://app.posthog.com/api/projects/`, body, authentication: { type: AuthenticationType.BEARER_TOKEN, token: context.auth, }, }; const result = await httpClient.sendRequest<ProjectCreateResponse>(request); console.debug('Project creation response', result); if (result.status === 200) { return result.body; } return result; }, });

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