Skip to main content
Glama

mcp-google-sheets

get-contact-from-id.ts1.3 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { httpClient, HttpMethod } from '@activepieces/pieces-common'; import { freshdeskAuth } from '../..'; export const getContactFromID = createAction({ auth: freshdeskAuth, name: 'get_contact_from_id', displayName: 'Get Contact from ID', description: 'Get contacts details from Freshdesk using ID number.', props: { contactid: Property.ShortText({ displayName: 'Contact ID number', description: 'The ID number of the contact', required: true, }), }, async run(context) { const FDapiToken = context.auth.access_token; const FDcontactID = context.propsValue.contactid; const headers = { Authorization: FDapiToken, 'Content-Type': 'application/json', }; // Remove trailing slash from base_url const baseUrl = context.auth.base_url.replace(/\/$/, ''); // not needed for gettickets ?${queryParams.toString()} const url = `${baseUrl}/api/v2/contacts/${FDcontactID}`; const httprequestdata = { method: HttpMethod.GET, url, headers, }; const response = await httpClient.sendRequest(httprequestdata); if (response.status == 200) { return response.body; } else { return response; } }, });

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