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.2 KB
Raw Blame
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { launchPhantom } from './lib/actions/launch-phantom';
import { phantombusterAuth } from './lib/common/auth';
import { newOutput } from './lib/triggers/new-output';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { BASE_URL } from './lib/common/client';
import { PieceCategory } from '@activepieces/pieces-framework';

export const phantombuster = createPiece({
  displayName: 'PhantomBuster',
  auth: phantombusterAuth,
  minimumSupportedRelease: '0.36.1',
  logoUrl: 'https://cdn.activepieces.com/pieces/phantombuster.png',
  description: 'Automate your web scraping and web automation tasks',
  categories: [PieceCategory.MARKETING, PieceCategory.SALES_AND_CRM],
  authors: ['sanket-a11y'],
  actions: [
    launchPhantom,
    createCustomApiCallAction({
      auth: phantombusterAuth,
      baseUrl: () => BASE_URL,
      authMapping: async (auth) => {
        const apiKey = auth;
        return {
          'X-Phantombuster-Key': `${apiKey.secret_text}`,
          'Content-Type': 'application/json',
        };
      },
    }),
  ],
  triggers: [newOutput],
});