Skip to main content
Glama
create-conversation.ts1.01 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { customgptAuth } from '../common/auth'; import { makeRequest } from '../common/client'; import { HttpMethod } from '@activepieces/pieces-common'; import { projectId } from '../common/props'; export const createConversation = createAction({ auth: customgptAuth, name: 'createConversation', displayName: 'Create Conversation', description: 'Create a new conversation in a CustomGPT project', props: { projectId: projectId, name: Property.ShortText({ displayName: 'Conversation Name', description: 'Optional name for the conversation', required: false, }), }, async run(context) { const { projectId, name } = context.propsValue; const body: any = {}; if (name) body.name = name; const response = await makeRequest( context.auth.secret_text, HttpMethod.POST, `/projects/${projectId}/conversations`, body ); return response; }, });

Latest Blog Posts

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