Skip to main content
Glama

mcp-google-sheets

unarchive-email.ts1.07 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 unarchiveEmailAction = createAction({ auth: zohoMailAuth, name: 'unarchive_email', displayName: 'Unarchive Email', description: 'Unarchives an email.', props: { accountId: accountId({ displayName: 'Account', required: true }), folderId: folderId({ displayName: 'Folder', required: true }), messageId: messageId({ displayName: 'Message ID', description: 'The ID of the email message to unarchive.', required: true, }), }, async run(context) { const { accountId, messageId } = context.propsValue; const response = await zohoMailApiCall({ auth: context.auth, method: HttpMethod.PUT, resourceUri: `/accounts/${accountId}/updatemessage`, body: { mode: 'unArchiveMails', messageId: [messageId], }, }); 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