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

881 B
Raw Blame
import { createAction } from '@activepieces/pieces-framework';
import { makeClient } from '../common';
import { moxieCRMAuth } from '../auth';
import { listClientsActionOutputSchema } from '../output-schemas';

export const moxieListClientsAction = createAction({
  auth: moxieCRMAuth,
  name: 'moxie_list_clients',
  classification: 'SEARCH',
  displayName: 'List Clients',
  description: 'Retrieve every client and prospect in the workspace.',
  audience: 'both',
  aiMetadata: {
    description:
      'Returns all clients and prospects in the Moxie workspace. Use to find a client id or name before creating a project, task or invoice against it. Read-only and idempotent.',
    idempotent: true,
  },
  outputSchema: listClientsActionOutputSchema,
  props: {},
  async run({ auth }) {
    const client = await makeClient(auth);
    return await client.listClients();
  },
});