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.1 KB
Raw Blame
import { capsuleCrmCreateTrigger } from '../common/trigger';

export const newTaskTrigger = capsuleCrmCreateTrigger({
  name: 'new_task',
  displayName: 'New Task',
  description: 'Fires when a new task is created.',
  aiMetadata: {
    description:
      'Fires when a new task is created in Capsule CRM, delivering the created task record. Use to react to newly scheduled to-dos or follow-ups.',
  },
  event: 'task/created',
  sampleData: {
    event: 'task/created',
    payload: [
      {
        id: 530,
        description: 'Email product details',
        dueTime: '18:00:00',
        status: 'OPEN',
        party: {
          id: 11587,
          type: 'person',
          firstName: 'Scott',
          lastName: 'Spacey',
          pictureURL:
            'https://capsulecrm.com/theme/default/images/person_avatar_70.png',
        },
        owner: {
          id: 1,
          username: 'john',
          name: 'John Spacey',
        },
        createdAt: '2015-12-21T13:51:38Z',
        updatedAt: '2015-12-21T13:51:38Z',
        dueOn: '2014-05-20',
        hasTrack: false,
      },
    ],
  },
});