Skip to main content
Glama

mcp-google-sheets

locale.ts1.02 kB
import { DropdownOption, Property } from '@activepieces/pieces-framework'; import { ContentfulAuth, makeClient } from '../common'; import { isEmpty } from '@activepieces/shared'; const Locale = Property.Dropdown({ displayName: 'Content Locale', required: true, refreshers: [], options: async ({ auth }) => { if (isEmpty(auth)) { return { disabled: true, options: [], placeholder: 'Please connect your account', }; } const { client } = makeClient(auth as ContentfulAuth); try { const response = await client.locale.getMany({}); const options: DropdownOption<string>[] = response.items.map( (locale) => ({ label: locale.name, value: locale.code }) ); return { disabled: false, options, }; } catch (e) { console.debug(e); return { disabled: true, options: [], placeholder: 'Please check your Contentful connection settings', }; } }, }); export default Locale;

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