Skip to main content
Glama

mcp-google-sheets

move-email.ts1.34 kB
import { HttpMethod } from '@activepieces/pieces-common'; import { createAction } from '@activepieces/pieces-framework'; import { zohoMailApiCall } from '../common'; import { zohoMailAuth } from '../common/auth'; import { accountId, folderId, messageId } from '../common/props'; export const moveEmailAction = createAction({ auth: zohoMailAuth, name: 'move_email', displayName: 'Move Email to Folder', description: 'Moves an email to a different folder.', props: { accountId: accountId({ displayName: 'Account', required: true }), folderId: folderId({ displayName: 'Current Folder', required: true }), messageId: messageId({ displayName: 'Message ID', description: 'The ID of the email message to move.', required: true, }), destfolderId: folderId({ displayName: 'Destination Folder', description: 'Select the folder to move the email to.', required: true, }), }, async run(context) { const { accountId, destfolderId, messageId, folderId } = context.propsValue; const response = await zohoMailApiCall({ auth: context.auth, method: HttpMethod.PUT, resourceUri: `/accounts/${accountId}/updatemessage`, body: { mode: 'moveMessage', destfolderId: destfolderId, messageId: [messageId], isFolderSpecific: true, folderId: folderId, }, }); 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