Skip to main content
Glama

mcp-google-sheets

find-lead.ts931 B
import { createAction, Property } from '@activepieces/pieces-framework'; import { HttpMethod } from '@activepieces/pieces-common'; import { makeRequest } from '../common'; import { kommoAuth } from '../../index'; export const findLeadAction = createAction({ auth: kommoAuth, name: 'find_lead', displayName: 'Find Lead', description: "Finds an existing lead.", props: { query: Property.ShortText({ displayName: 'Query', required: true, description: 'Search query (Searches through the filled fields of the lead).' }), }, async run(context) { const { subdomain, apiToken } = context.auth const result = await makeRequest( { apiToken, subdomain }, HttpMethod.GET, `/leads?query=${encodeURIComponent(context.propsValue.query)}` ); const leads = result?._embedded?.leads ?? []; return { found: leads.length > 0, result: leads }; }, });

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