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 { createAction, Property } from '@activepieces/pieces-framework';
import { scrapegraphaiAuth } from '../auth';
import { scrapegraphaiApi } from '../common/api';
import { scrapegrapghaiExtractOutputSchema } from '../output-schemas';
export const localScraperAction = createAction({
name: 'local_scraper',
outputSchema: scrapegrapghaiExtractOutputSchema,
classification: 'READ',
displayName: 'Local Scraper',
description: 'Extract content from HTML content using AI by providing a natural language prompt.',
audience: 'human',
aiMetadata: { description: 'Uses AI to extract information described in a natural-language prompt from raw HTML you supply directly (max 2MB); optionally pass an output schema to shape the result into structured fields. Choose this when you already have the page HTML in hand and do not want the service to fetch a URL — for a live URL use Smart Scraper instead. Read-only and safe to retry.', idempotent: true },
auth: scrapegraphaiAuth,
props: {
website_html: Property.LongText({
displayName: 'HTML Content',
description: 'The HTML content to process (max 2MB).',
required: true,
}),
user_prompt: Property.LongText({
displayName: 'Extraction Prompt',
description: 'Describe what information you want to extract in natural language.',
required: true,
}),
output_schema: Property.Json({
displayName: 'Output Schema',
description: 'Optional schema to structure the output data.',
required: false,
}),
},
async run({ auth, propsValue }) {
return await scrapegraphaiApi.extract({
auth,
html: propsValue.website_html,
prompt: propsValue.user_prompt,
schema: propsValue.output_schema,
});
},
});