UNPKG

n8n-nodes-imap-ai

Version:

Simplified IMAP node for n8n with AI-agent support. Clean and modular email and mailbox management for automation workflows.

27 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateMailboxOperation = void 0; const n8n_workflow_1 = require("n8n-workflow"); const helpers_1 = require("../utils/helpers"); class CreateMailboxOperation { async execute(executeFunctions, client, itemIndex) { const mailboxName = executeFunctions.getNodeParameter('mailboxName', itemIndex); helpers_1.ParameterValidator.validateMailbox(mailboxName); try { const result = await client.mailboxCreate(mailboxName); return { success: true, message: `Mailbox '${mailboxName}' created successfully`, mailbox: mailboxName, result, }; } catch (error) { throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), { message: `Failed to create mailbox '${mailboxName}': ${error.message}`, }); } } } exports.CreateMailboxOperation = CreateMailboxOperation; //# sourceMappingURL=createMailbox.js.map