DocumentationBotpress chatbot and 24/7 helpdesk

Botpress chatbot and 24/7 helpdesk

Send transactional email when a Botpress support flow opens a helpdesk incident.

Many support teams use Botpress for customer care outside office hours. When a user completes an incident flow (machine code, location, description), the bot must notify the helpdesk by email reliably — even at 3 a.m.

MailingCore fits as the transactional sending layer: async queue, versioned templates, verified domain, and delivery logs.

Typical flow

What the bot should do

  1. Validate minimum fields (contact email, incident type, description).
  2. Call your backend — never expose the API key in the browser widget; use a server-side Botpress action or a bridge service (e.g. botpress-service) with env vars.
  3. Send via POST /emails/send with metadata to correlate ticket and conversation.
  4. Confirm in chat only after a successful API response.

Send example

curl -X POST "https://api.mailingcore.com/emails/send" \
  -H "Authorization: Bearer mc_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "[email protected]",
    "subject": "[Incident] Code 5859 — Albacenter Mall",
    "htmlBody": "<h2>New chatbot incident</h2><p>Code: 5859</p><p>Location: Albacenter Mall</p><p>Contact: [email protected]</p>",
    "replyTo": "[email protected]",
    "fromEmail": "[email protected]",
    "fromName": "Virtual assistant",
    "tags": ["botpress", "helpdesk", "incident"],
    "metadata": {
      "source": "botpress",
      "conversationId": "conv_abc123",
      "incidentCode": "5859",
      "locale": "en"
    },
    "idempotencyKey": "botpress-conv_abc123-incident"
  }'
FieldHelpdesk use
metadata.conversationIdLink to Botpress thread / operator inbox
metadata.incidentCodeMachine or internal reference code
replyToReply directly to the customer
idempotencyKeyPrevent duplicates on user retry
tagsFilter in send logs

Optional: publish a template in the dashboard and send with templateVersionId instead of inline htmlBody.

User-facing confirmation

After sending, the bot typically shows a closing message such as:

Your incident has been registered successfully. Our technical team will contact you within 24 business hours.

That text is chat UX only; the helpdesk email carries operational detail. If you run a conversation inbox (Botpress sync + send detection), you can set email_sent_detected when the bot confirms registration.

Operational requirements

RequirementDetail
API keyMinimum scope email:send
DomainVerify sender (fromEmail)
QuotaEach incident counts toward monthly quota — watch X-Quota-*
AvailabilityBullMQ queue accepts requests 24/7; no self-hosted SMTP required

Common errors

  • 401 / 403 — Revoked key or missing scope; see API keys.
  • 429 — Quota exceeded; plans and upgrade.
  • Duplicates — Missing idempotencyKey per conversation.
  • Key in client — Move the call server-side; see API key security.

Next steps