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
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { digitalPilotAuth } from '../auth';
import { makeClient, tagIdProp } from '../common';
export const newHighIntentVisitTrigger = createTrigger({
auth: digitalPilotAuth,
name: 'new_high_intent_visit',
displayName: 'New High Intent Visit',
description: 'Triggers when a business exhibits high intent behavior on your website',
aiMetadata: {
description: 'Fires when DigitalPilot detects high-intent browsing behavior (e.g. elevated intent score, repeated page views, extended time on site) from an identified business visitor for the configured tag. Each event represents one such visit and carries the visiting account domain and engagement signals.',
},
type: TriggerStrategy.WEBHOOK,
props: {
tagId: tagIdProp,
},
sampleData: {
domain: 'example.com',
timestamp: '2024-01-15T10:30:00Z',
intent_score: 85,
page_views: 12,
time_on_site: 450,
},
async onEnable(context) {
const client = makeClient(context.auth.secret_text);
const webhookUrl = context.webhookUrl;
const webhook = await client.createWebhook(
context.propsValue.tagId,
webhookUrl,
'high_intent'
);
await context.store.put('_webhook_id', webhook.id);
},
async onDisable(context) {
const client = makeClient(context.auth.secret_text);
const webhookId = await context.store.get<string>('_webhook_id');
if (webhookId) {
await client.deleteWebhook(
context.propsValue.tagId,
undefined,
webhookId
);
}
},
async run(context) {
return [context.payload.body];
},
});