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.3 KB
Raw Blame
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { woodpeckerAuth } from '../..';
import { WEBHOOK_EVENTS, subscribeWebhook, unsubscribeWebhook } from '../common';

export const prospectNonresponsive = createTrigger({
  auth: woodpeckerAuth,
  name: 'prospect_nonresponsive',
  displayName: 'Prospect Nonresponsive',
  description: 'Triggers when a prospect is marked as nonresponsive',
  aiMetadata: {
    description: 'Fires when a prospect is marked nonresponsive, meaning they completed the campaign sequence without replying. Represents an end-of-sequence no-reply outcome for a single prospect.',
  },
  props: {},
  sampleData: {
    method: 'prospect_nonresponsive',
    prospect: {
      id: 1234567890,
      email: '[email protected]',
      first_name: 'Erlich',
      last_name: 'Bachman',
      company: 'Bachmanity',
    },
    timestamp: '2025-03-21T20:47:47+0100',
  },
  type: TriggerStrategy.WEBHOOK,
  async onEnable(context) {
    await subscribeWebhook(
      context.auth.secret_text,
      context.webhookUrl,
      WEBHOOK_EVENTS.PROSPECT_NONRESPONSIVE
    );
  },
  async onDisable(context) {
    await unsubscribeWebhook(
      context.auth.secret_text,
      context.webhookUrl,
      WEBHOOK_EVENTS.PROSPECT_NONRESPONSIVE
    );
  },
  async run(context) {
    return [context.payload.body];
  },
});