Skip to main content
Glama

mcp-google-sheets

update-conversation-state.ts1.14 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { HttpMethod } from '@activepieces/pieces-common'; import { crispAuth } from '../common/auth'; import { sessionIdProp, websiteIdProp } from '../common/props'; import { crispApiCall } from '../common/client'; export const updateConversationStateAction = createAction({ auth: crispAuth, name: 'change_state', displayName: 'Change Conversation State', description: 'Updates the state of a conversation.', props: { websiteId: websiteIdProp, sessionId: sessionIdProp, state: Property.StaticDropdown({ displayName: 'State', required: true, options: { options: [ { label: 'Unresolved', value: 'unresolved' }, { label: 'Resolved', value: 'resolved' }, { label: 'Pending', value: 'pending' }, ], }, }), }, async run(context) { const { websiteId, sessionId, state } = context.propsValue; const response = await crispApiCall({ auth: context.auth, method: HttpMethod.PATCH, resourceUri: `/website/${websiteId}/conversation/${sessionId}/state`, body: { state, }, }); 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