Skip to main content
Glama

mcp-google-sheets

create-chatbot.ts1.01 kB
import { HttpMethod } from '@activepieces/pieces-common'; import { createAction, Property } from '@activepieces/pieces-framework'; import { chatbaseAuth } from '../../index'; import { makeRequest } from '../common'; export const createChatbotAction = createAction({ auth: chatbaseAuth, name: 'create_chatbot', displayName: 'Create Chatbot', description: 'Creates a new chatbot.', props: { chatbotName: Property.ShortText({ displayName: 'Chatbot Name', required: true, }), sourceText: Property.LongText({ displayName: 'Source Text', description: 'Optional text data for training the chatbot.', required: false, }), }, async run(context) { const { chatbotName, sourceText } = context.propsValue; const apiKey = context.auth as string; const body: Record<string, unknown> = { chatbotName, }; if (sourceText) { body['sourceText'] = sourceText; } const response = await makeRequest(apiKey, HttpMethod.POST, '/create-chatbot', body); return response; }, });

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