ProtonMail to Webhook

Forward every ProtonMail email to your endpoint as structured JSON — headers, body, and attachments included. No polling, no MIME parsing, no infrastructure to maintain.

Table of Contents
  1. Why Route ProtonMail Emails to a Webhook?
  2. How to Forward ProtonMail to JsonHook
  3. ProtonMail vs ProtonMail Bridge (IMAP)
  4. JSON Payload Example
  5. Common ProtonMail to Webhook Use Cases

Why Route ProtonMail Emails to a Webhook?

ProtonMail is an end-to-end encrypted email service built by Proton AG, trusted by privacy-conscious users and organisations handling sensitive communications. While ProtonMail is a capable email platform, its native tooling for programmatic automation was not built for developers who need structured, reliable data delivery to backend systems.

The native approach — ProtonMail Bridge (IMAP) — introduces significant operational overhead. You need to manage credentials, poll or maintain persistent connections, and write custom parsing logic for every message field you care about. When your team is moving fast, that friction adds up to hours of maintenance per integration.

JsonHook eliminates that overhead by accepting inbound mail on your behalf and immediately firing a structured JSON payload to any HTTPS endpoint you specify. The email is parsed, attachments are base64-encoded, and headers are normalised — so your webhook handler can focus entirely on business logic rather than MIME parsing.

Below are the core benefits of routing your ProtonMail messages through JsonHook instead of relying on the native alternative:

  • Limitation avoided: ProtonMail's end-to-end encryption means there is no server-side API that can access message content — forwarding is the only reliable programmatic integration path.
  • Limitation avoided: ProtonMail Bridge (the IMAP/SMTP desktop app) only works on desktop clients and cannot be used in server-side or containerised environments.
  • Limitation avoided: The Proton API is not publicly documented for third-party use and does not provide a stable webhook or push notification mechanism.
  • Zero-polling architecture: JsonHook pushes to your endpoint the moment mail arrives — no long-running background jobs needed.
  • Automatic attachment handling: PDFs, images, and other file types are extracted, base64-encoded, and included in the JSON payload with their original MIME type.
  • Retry with exponential back-off: If your endpoint is temporarily unavailable, JsonHook retries automatically — something the ProtonMail Bridge (IMAP) does not do natively.
  • Webhook signatures for security: Every delivery includes an HMAC-SHA256 signature header so you can verify the payload originated from JsonHook.

Whether you are building a support-ticket ingestion pipeline, a lead-capture workflow, or an automated document processor, JsonHook gives you a consistent, typed interface to ProtonMail messages without the fragility of raw SMTP or polling-based API integrations.

How to Forward ProtonMail to JsonHook

Getting ProtonMail emails delivered to your webhook takes about five minutes. The process has two parts: creating a JsonHook address via the API, and configuring ProtonMail to forward a copy of each incoming message to that address.

  1. Log in to ProtonMail and open Settings › All settings › Filters.
  2. Click Add filter and configure the conditions (e.g. all incoming mail, or mail from a specific sender).
  3. Add the action Forward to and enter your JsonHook inbound address.
  4. Note: ProtonMail forwarding sends a decrypted copy of the message to the forwarding address. Ensure your JsonHook endpoint is accessed over HTTPS (it always is) and that your webhook handler is secured appropriately.

Once forwarding is active, every email that arrives in your ProtonMail inbox (or matches your filter) will be relayed to your JsonHook address, parsed, and delivered to your endpoint as a JSON payload within seconds.

You can create your JsonHook inbound address with a single curl command. Replace YOUR_API_KEY with the key from your dashboard and set webhookUrl to your endpoint:

curl -X POST https://jsonhook.com/api/addresses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "ProtonMail inbound",
    "webhookUrl": "https://your-app.example.com/webhooks/email",
    "secret": "a-random-signing-secret"
  }'

The response includes your unique @in.jsonhook.com address. Copy that address and paste it into the forwarding field in your ProtonMail settings. That is all the infrastructure you need to stand up.

Start Receiving ProtonMail Webhooks in 5 Minutes

Free tier: 100 emails/month, 1 address. No credit card required.

Get Free API Key

ProtonMail vs ProtonMail Bridge (IMAP)

When developers first explore email-to-webhook automation they typically discover ProtonMail Bridge (IMAP) — the official programmatic route provided by Proton AG. The table below shows how it compares to using JsonHook as an intermediary.

Feature ProtonMail Native (ProtonMail Bridge (IMAP)) JsonHook
Structured JSON payload
Attachment parsing
Retry logic
Webhook signatures
Setup time Hours to days Under 5 minutes

The native approach through ProtonMail Bridge (IMAP) requires you to set up OAuth credentials or API keys, maintain a long-running listener or polling job, write your own MIME parser, and implement your own retry queue. Any one of those steps can become a reliability bottleneck in production.

JsonHook handles all of that infrastructure on your behalf. You get a single HTTPS webhook call with a predictable JSON schema every time a ProtonMail email arrives — no polling, no credential rotation, no MIME parsing, and no bespoke retry code to maintain.

JSON Payload Example

When a ProtonMail email is forwarded to your JsonHook address and delivered to your endpoint, the request body looks like the following. All fields are consistently present; optional fields such as htmlBody and attachments are included when the source message contains them.

{
  "id": "msg_01j8xkr4p2vn3q7w",
  "receivedAt": "2026-03-15T14:32:07.412Z",
  "from": {
    "name": "Alice Smith",
    "address": "[email protected]"
  },
  "to": [
    {
      "name": "",
      "address": "[email protected]"
    }
  ],
  "subject": "Your ProtonMail message subject here",
  "textBody": "Plain-text content of the email body.",
  "htmlBody": "<div>HTML version of the email body.</div>",
  "headers": {
    "message-id": "<[email protected]>",
    "x-mailer": "Proton AG",
    "mime-version": "1.0"
  },
  "attachments": [
    {
      "filename": "document.pdf",
      "contentType": "application/pdf",
      "size": 84234,
      "content": "JVBERi0xLjQK..."
    }
  ],
  "spf": "pass",
  "dkim": "pass"
}

The id field is a unique, stable identifier you can use for idempotent processing. The spf and dkim fields reflect the authentication results JsonHook observed when receiving the message, which you can use to enforce additional trust policies in your handler.

Attachment content is standard base64. Decode it with a single call in any language — Buffer.from(att.content, 'base64') in Node.js, base64.b64decode(att.content) in Python, and so on.

Go handler for ProtonMail messages forwarded through JsonHook:

package main

import (
  "crypto/hmac"
  "crypto/sha256"
  "encoding/hex"
  "encoding/json"
  "io"
  "net/http"
  "os"
)

func handleEmail(w http.ResponseWriter, r *http.Request) {
  body, _ := io.ReadAll(r.Body)
  mac := hmac.New(sha256.New, []byte(os.Getenv("JSONHOOK_SECRET")))
  mac.Write(body)
  expected := hex.EncodeToString(mac.Sum(nil))
  if r.Header.Get("X-JsonHook-Signature") != expected {
    http.Error(w, "unauthorized", 401)
    return
  }
  var msg map[string]any
  json.Unmarshal(body, &msg)
  // Process ProtonMail message...
  w.WriteHeader(200)
}

func main() {
  http.HandleFunc("/webhooks/email", handleEmail)
  http.ListenAndServe(":8080", nil)
}

Common ProtonMail to Webhook Use Cases

ProtonMail is the preferred provider for privacy-conscious users and organisations handling sensitive communications. Because ProtonMail uses end-to-end encryption, native API integrations are deliberately limited — making the JsonHook forwarding approach even more valuable for teams that need automation without sacrificing control.

  • Secure document intake: Legal, medical, or financial professionals who receive sensitive attachments via ProtonMail can forward decrypted copies to a private, self-hosted webhook endpoint for secure archival and processing.
  • Whistleblower or tip-line pipelines: Newsrooms and compliance teams using ProtonMail for confidential submissions can route messages to an internal webhook that notifies the right people without exposing the inbox to multiple staff accounts.
  • Privacy-first lead capture: Products marketed to privacy-aware audiences often receive leads from ProtonMail addresses. Route those into a CRM through a webhook while keeping the forwarding path entirely within controlled infrastructure.
  • Encrypted alert relay: DevOps teams that route security alerts through ProtonMail for an additional privacy layer can bridge those alerts to PagerDuty or OpsGenie via webhook without compromising the privacy posture.

Frequently Asked Questions

Can I forward ProtonMail emails to a webhook?
Yes. ProtonMail supports email forwarding rules that let you relay a copy of any incoming message to an external address. By forwarding to your JsonHook @in.jsonhook.com address, those messages are immediately parsed and delivered as a JSON POST to your webhook endpoint — no polling required.
Does JsonHook parse ProtonMail attachments?
Yes. Every attachment in a forwarded ProtonMail message is extracted from the MIME envelope, base64-encoded, and included in the attachments array of the JSON payload. Each entry contains the original filename, MIME content type, file size in bytes, and the base64-encoded content string. You can decode it with a single line in any language.
How fast does ProtonMail forwarding work?
End-to-end delivery is near real-time. Once ProtonMail forwards the message to your JsonHook inbound address, JsonHook parses and dispatches the webhook within a few seconds. The main variable is how quickly ProtonMail itself applies your forwarding rule after a message arrives — this is typically instantaneous for filters and a few seconds for rule-based forwarding.
Is it safe to forward ProtonMail messages to JsonHook?
Forwarding a ProtonMail message to an external address sends a decrypted copy to that address, which means the message leaves ProtonMail's encrypted environment. If your use case requires end-to-end encryption throughout the delivery chain, consider hosting a private JsonHook-compatible SMTP receiver on infrastructure you control. For most automation use cases, forwarding to a TLS-secured JsonHook endpoint is an acceptable security trade-off.