EmailgisticsAPI
WebhooksActions

Send message action

Send a templated or inline reply from the mailbox.

Sends a message from the mailbox in response to the incoming message. Two modes:

  • Template mode — render an existing template defined in Emailgistics Admin.
  • Inline mode — supply the body and subject directly in the action.

The two modes are mutually exclusive: provide either templateName or body+bodyType, never both. If both are provided (or neither), the action is silently dropped — Emailgistics records a validation error in the rule’s admin log and moves on to other actions in the response.

Action object

type"sendMessage"

Always "sendMessage".

name?string

Optional label for diagnostics.

valueobject

The message to send — see modes below.

Template mode

{
  "type":  "sendMessage",
  "name":  "Send template",
  "value": {
    "templateName":  "Customer Followup",
    "subject":       "Optional subject override",
    "toAddresses":   [{ "emailAddress": { "address": "to@acme.com",  "name": "To User"  } }],
    "ccAddresses":   [{ "emailAddress": { "address": "cc@acme.com",  "name": "CC User"  } }],
    "bccAddresses":  [{ "emailAddress": { "address": "bcc@acme.com", "name": "BCC User" } }]
  }
}
templateNamestring

Name of an existing template in Emailgistics Admin. Required for template mode.

subject?string

Override the template’s subject. Omit to use the template’s configured subject.

toAddressesAddress[]

Primary recipients.

ccAddresses?Address[]

Cc recipients.

bccAddresses?Address[]

Bcc recipients.

Inline mode

{
  "type":  "sendMessage",
  "name":  "Send inline reply",
  "value": {
    "body":      "<p>Thanks for your email.</p><img src=\"cid:logo1\" alt=\"Logo\"/>",
    "bodyType":  "html",
    "subject":   "Re: Coverage question",
    "toAddresses":  [{ "emailAddress": { "address": "to@acme.com", "name": "To User" } }],
    "ccAddresses":  [],
    "bccAddresses": [],
    "inlineAssets": [
      {
        "id":            "logo1",
        "filename":      "logo.png",
        "contentType":   "image/png",
        "base64Content": "iVBORw0KGgo..."
      }
    ]
  }
}
bodystring

The message body. Required for inline mode.

bodyType"html" | "text"

How body is interpreted.

subject?string

The subject line.

toAddressesAddress[]

Primary recipients.

ccAddresses?Address[]

Cc recipients.

bccAddresses?Address[]

Bcc recipients.

inlineAssets?InlineAsset[]

Images to embed by reference (using cid:<id> URLs in body when bodyType is html). Up to 5 assets per action, 3 MB each (base64-encoded). If any asset fails validation the entire action is rejected.

Address

{ "emailAddress": { "address": "user@acme.com", "name": "User Name" } }

This shape matches the from / sender / to / cc / bcc fields in the webhook request payload, so you can echo addresses straight from the incoming payload into a sendMessage action without reshaping them.

InlineAsset

idstring

Identifier referenced from the body via <img src="cid:<id>"/>.

filenamestring

Filename for downstream clients.

contentTypestring

MIME type. Must be one of image/png, image/jpeg, image/gif, or image/webp.

base64Contentstring

Base64-encoded file contents.

Variables

Subjects and bodies sent by this action support variables — same syntax as the rules-based Send action in Emailgistics Admin. In inline mode, variables are substituted into the subject and body you provide. In template mode, variables are substituted into the template’s body and into either the template’s subject or your subject override. Variables are resolved using fields from the triggering message.

TokenResolves toWhere
%%fromName%%Sender’s display nameSubject + body
%%fromAddress%%Sender’s email addressSubject + body
%%subject%%Original message subjectSubject + body
%%conversationID%%Emailgistics conversation IDSubject + body
%%message-text%%Original message body (plain text)Body only

Limitations

  • No file attachments. If you need to send attachments, use a template configured with attachments in Admin.
  • Modes are exclusive. Don’t combine templateName with body / bodyType.

On this page