Skip to content

Inbox

The Inbox integration connects external email accounts via IMAP/SMTP so your Protokol workflows can send and fetch email through real mailboxes.

  • Connect one or more IMAP/SMTP mailbox accounts
  • Send outbound emails with attachments from workflows
  • Fetch and process inbound emails automatically
  • React to email events (received, sent, failed) in real-time

Overview

Inbox is a workflow-driven integration. Instead of a standalone SDK class, all email operations are performed through workflow nodes that you wire into your automation flows. The platform handles IMAP/SMTP connections, credentials, and retry logic behind the scenes.

Note

Inbox provides its own UI pages (menu, home, page) inside the platform for managing connected mailbox accounts and viewing email activity.


Workflow Nodes

Send Email

The send-email node sends an outbound message via a connected SMTP account.

Send Email — Inputs

Field Type Required Description
account_id string Yes ID of the connected mailbox account to send from
to string[] Yes List of recipient email addresses
cc string[] No Carbon-copy recipients
bcc string[] No Blind carbon-copy recipients
subject string Yes Email subject line
body string Yes Email body (HTML supported)
attachments array No File attachments to include

Send Email — Outputs

Field Type Description
message_id string Unique message ID assigned by the mail server
status string Delivery status
sent_at string ISO 8601 timestamp of when the message was sent

Fetch Emails

The fetch-emails node retrieves messages from a connected IMAP account.

Fetch Emails — Inputs

Field Type Required Description
account_id string Yes ID of the connected mailbox account to read from
folder string No IMAP folder to read (defaults to INBOX)
limit number No Maximum number of messages to fetch
unread_only boolean No When true, only fetch unread messages

Fetch Emails — Outputs

Field Type Description
emails array Array of fetched email objects
count number Number of emails returned

Workflow Events

Subscribe to these events to trigger workflows when email activity occurs.

Event Description
integration.protokol-inbox.email.received Fired when a new email arrives in a connected mailbox
integration.protokol-inbox.email.sent Fired after an email is successfully sent
integration.protokol-inbox.email.failed Fired when an outbound email fails to send

Permissions

Permission Description
use Use inbox email capabilities within workflows

Platform Function Example

Use the Workflow SDK to send an email from a platform function:

module.exports = async function ({ $sdk, $input, response }) {
  const workflow = $sdk.version("0.10").workflow();

  const result = await workflow.executeNode(
    "integration.protokol-inbox.send-email",
    {
      account_id: "support-mailbox",
      to: [$input.body.recipient],
      subject: "Your request has been received",
      body: "<p>We have opened your case and will reply shortly.</p>",
    }
  );

  response.json({ message_id: result.message_id, status: result.status });
};

SDK Reference

Inbox does not have a dedicated SDK class. All operations are performed through workflow nodes.

Node ID Description
integration.protokol-inbox.send-email Send email via SMTP through a connected account
integration.protokol-inbox.fetch-emails Fetch emails via IMAP from a connected account

Info

To invoke these nodes programmatically, use the Workflow SDK's executeNode() method as shown in the platform function example above.