Skip to main content
Glama

mcp-google-sheets

find-table.ts1.07 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { airtableAuth } from '../../index'; import { airtableCommon } from '../common'; import { AirtableTable } from '../common/models'; export const airtableFindTableAction = createAction({ auth: airtableAuth, name: 'airtable_find_table', displayName: 'Find Table', description: 'Find a table in a given base by its name.', props: { base: airtableCommon.base, tableName: Property.ShortText({ displayName: 'Table Name', description: 'The exact name of the table you want to find.', required: true, }), }, async run(context) { const { auth: personalToken, propsValue } = context; const { base: baseId, tableName } = propsValue; const tables: AirtableTable[] = await airtableCommon.fetchTableList({ token: personalToken, baseId: baseId as string, }); const foundTable = tables.find( (table) => table.name.toLowerCase() === (tableName as string).toLowerCase() ); return foundTable ?? null; }, });

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