Skip to main content
Glama

mcp-google-sheets

ask-a-question-about-the-web-page.ts1.37 kB
import { createAction } from '@activepieces/pieces-framework'; import { webscrapingAiAuth, webscrapingAiCommon } from '../common'; export const askAQuestionAboutTheWebPage = createAction({ auth: webscrapingAiAuth, name: 'askAQuestionAboutTheWebPage', displayName: 'Ask a Question About the Web Page', description: 'Gets an answer to a question about a given webpage.', props: webscrapingAiCommon.askQuestionProperties, async run({ auth: apiKey, propsValue }) { const { device, format, question, ...rest } = propsValue; const allowedCountries = [ 'us', 'gb', 'de', 'it', 'fr', 'ca', 'es', 'ru', 'jp', 'kr', 'in' ]; const params: any = { apiKey, question, ...rest, format: (format === 'json' || format === 'text') ? format : undefined, proxy: (rest.proxy === 'datacenter' || rest.proxy === 'residential') ? rest.proxy : undefined, country: (rest.country && allowedCountries.includes(rest.country)) ? rest.country as typeof allowedCountries[number] : undefined, headers: rest.headers && Array.isArray(rest.headers) ? Object.fromEntries(rest.headers.map((h: any) => [(h as any).name, (h as any).value])) : undefined, device: device as 'desktop' | 'mobile' | 'tablet' | undefined, }; return await webscrapingAiCommon.askQuestion(params); }, });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server