PolpoMail
Use cases

Triage incoming email with your own AI model

Send each new email to your own AI classifier, then file, flag or draft a reply with the REST API: email triage you control, on your own domain.

Why automate it

Inbox rules match fixed words. An AI model can tell a complaint from a sales lead or an invoice, in any language. With a webhook and the REST API you can build that triage yourself, with the model and the prompts you choose.

How it works

Set it up in three steps

  1. 1

    Receive each new email

    A webhook with no filters sends every message that reaches the inbox, with its text, HTML and message id.

  2. 2

    Classify it

    Send the subject and text to the AI model of your choice and ask for a category, an urgency level or a summary.

  3. 3

    Act through the API

    Move the message to a folder or flag it with PATCH /api/v1/messages/{id}, or send an answer with POST /api/v1/messages/send.

Settings

The webhook to create

In Settings › Developer, after you sign in.

FormatJSON
From matchesempty (any sender)
To or Cc matchesempty (any recipient)
Request headersnone needed
Extra JSONnone needed
  • You choose the model and the prompt, and you control what data it sees.
  • Webhook filters decide which mail is sent at all, for example only mail to info@.
  • Every action goes through scoped access tokens you can revoke at any time.
Example

Python: classify, then file with the REST API

Every request includes the webhook's token in X-Polpo-Webhook-Token; check it first. See the payload reference.

@app.post("/hooks/triage")
def triage():
    if not hmac.compare_digest(request.headers.get("X-Polpo-Webhook-Token", ""), TOKEN):
        abort(401)
    m = request.json["message"]
    label = classify(m["subject"], m["text"])   # your AI model: "Sales", "Billing", "Urgent", …
    requests.patch(f"{API}/messages/{m['id']}",
                   headers={"Authorization": f"Bearer {MODIFY_TOKEN}"},
                   json={"mailbox": label, "flagged": label == "Urgent"})
    return "", 204
FAQ

Common questions

Do you send my email to an AI service?

No. We only send the webhook to the URL you configure. Which AI service, if any, sees the message is entirely up to the code behind your endpoint.

Which folders can the API move messages to?

Any folder in the mailbox, such as Archive or one you create in webmail. Create the folders first; moving to a folder that doesn't exist returns mailbox_not_found.

Is this included in the free plan?

Yes. Webhooks, the REST API and access tokens are included free, with up to 5 webhooks per mailbox and up to 10 mailboxes per domain.

More use cases

Start with one webhook.

Free business email on your own domain, with webhooks and a REST API included.

Create your free workspace