Skip to main content
Glama

mcp-google-sheets

content-object-dropdown.ts1.54 kB
import { Property } from '@activepieces/pieces-framework'; import { HttpMethod } from '@activepieces/pieces-common'; import { CognosClient } from './cognos-client'; export const contentObjectDropdown = Property.Dropdown({ displayName: 'Content Object', description: 'Select a content object', required: true, refreshers: [], options: async ({ auth }) => { if (!auth) { return { disabled: true, options: [], placeholder: 'Connect your account first' }; } try { const client = new CognosClient(auth as any); const response = await client.makeAuthenticatedRequest('/content', HttpMethod.GET); if (response.status === 200) { const data = response.body; const contentObjects = data.content || []; if (contentObjects.length === 0) { return { disabled: true, options: [], placeholder: 'No content objects found' }; } return { disabled: false, options: contentObjects.map((obj: any) => ({ label: `${obj.defaultName || 'Unnamed'} (${obj.type || 'Unknown'})`, value: obj.id })) }; } else { return { disabled: true, options: [], placeholder: 'Failed to load content objects' }; } } catch (error) { return { disabled: true, options: [], placeholder: 'Error loading content objects' }; } } });

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