Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

1.2 KB
Raw Blame
import { createAction } from '@activepieces/pieces-framework';
import { baserowAuth } from '../auth';
import { baserowCommon, makeClient } from '../common';
import { rowOutputSchema } from '../output-schemas';

export const getRowAction = createAction({
  name: 'baserow_get_row',
  classification: 'READ',
  outputSchema: rowOutputSchema,
  displayName: 'Get Row',
  description: 'Gets a single row by its ID from a table.',
  audience: 'human',
  aiMetadata: {
    description:
      'Fetches one row from a Baserow table by its numeric row ID. Use when you already know the exact row ID and want its full current field values; to locate a row by a field value instead, use Find Row. Read-only and idempotent.',
    idempotent: true,
  },
  auth: baserowAuth,
  propertyGroups: [
    {
      key: 'row',
      display: 'section',
      label: 'Row to Get',
      icon: 'file',
      props: ['table_id', 'row_id'],
    },
  ],
  props: {
    table_id: baserowCommon.tableId(),
    row_id: baserowCommon.rowId(),
  },
  async run(context) {
    const { table_id, row_id } = context.propsValue;
    const client = await makeClient(context.auth);
    return await client.getRow(table_id!, row_id!);
  },
});