Skip to main content
Glama

mcp-google-sheets

index.ts1.75 kB
import { HttpMethod, QueryParams, httpClient, HttpRequest, AuthenticationType, } from '@activepieces/pieces-common'; import { Property } from '@activepieces/pieces-framework'; export async function comfyIcuApiCall({ apiKey, endpoint, method, qparams, body, }: { apiKey: string; endpoint: string; method: HttpMethod; qparams?: QueryParams; body?: any; }) { const request: HttpRequest = { url: `https://comfy.icu/api/v1${endpoint}`, method, queryParams: qparams, body, authentication: { type: AuthenticationType.BEARER_TOKEN, token: apiKey, }, }; const response = await httpClient.sendRequest(request); return response; } export const commonProps = { workflow_id:Property.Dropdown({ displayName:'Workflow ID', refreshers:[], required:true, options:async ({auth})=>{ if(!auth) { return{ disabled:true, options:[], placeholder:'Please connect your account first.' } } const response = await comfyIcuApiCall({ apiKey:auth as string, endpoint:'/workflows', method:HttpMethod.GET }) const workflows = response.body as {id:string,name:string}[]; return { disabled:false, options:workflows.map((workflow)=>{ return{ label:workflow.name, value:workflow.id } }) } } }), run_id:Property.ShortText({ displayName:'Run ID', required:true }) }

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