Skip to content

The open alternative to Salesforce, designed for AI.

596 B
Raw Blame
import { defineLogicFunction } from 'twenty-sdk/define';

const handler = async (params: { recipientName: string }) => {
  return { found: true, name: params.recipientName };
};

export default defineLogicFunction({
  universalIdentifier: 'a1b2c3d4-1001-4a7b-8c9d-0e1f2a3b4c5d',
  name: 'lookup-recipient',
  description: 'Look up a recipient by name to find their details',
  timeoutSeconds: 5,
  handler,
  toolTriggerSettings: {
    inputSchema: {
      type: 'object',
      properties: {
        recipientName: { type: 'string' },
      },
      required: ['recipientName'],
    },
  },
});