AlphornAlphorn Docs

Contact Form Notifications

Get instant notifications from contact forms instead of relying on email.

Contact form submissions traditionally go to an email inbox where they get buried. Route them through Alphorn instead and get instant alerts in Slack, Telegram, or wherever your team actually works.

Why not just email?

  • Emails get lost in spam folders or cluttered inboxes
  • No priority routing — a partnership inquiry looks the same as a spam message
  • Multiple team members need access, requiring shared inboxes or forwarding rules
  • No real-time alerting — you check email when you check email

With Alphorn, a contact form submission hits Slack immediately, pages someone for urgent requests, and still archives everything via email.

Implementation

Backend handler (Node.js)

app.post("/contact", async (req, res) => {
  const { name, email, subject, message, type } = req.body;

  // Determine priority based on inquiry type
  const priority = type === "enterprise" ? 4 : type === "support" ? 3 : 2;

  await fetch("https://app.alphorn.dev/api/webhooks/wh_abc123", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      title: `Contact: ${subject}`,
      message: `From: ${name} (${email})\n\n${message}`,
      priority,
      tags: ["contact", type || "general"],
    }),
  });

  res.json({ ok: true });
});

Backend handler (Python / Flask)

@app.route("/contact", methods=["POST"])
def contact():
    data = request.json
    priority = 4 if data.get("type") == "enterprise" else 2

    requests.post(
        "https://app.alphorn.dev/api/webhooks/wh_abc123",
        json={
            "title": f"Contact: {data['subject']}",
            "message": f"From: {data['name']} ({data['email']})\n\n{data['message']}",
            "priority": priority,
            "tags": ["contact", data.get("type", "general")],
        },
    )

    return {"ok": True}

Routing examples

ChannelFilterPurpose
Slack (#leads)tags CONTAINS "enterprise"Enterprise inquiries go to sales
Slack (#support)tags CONTAINS "support"Support requests go to the support team
Telegrampriority >= 3Personal alert for high-priority contacts
EmailNo filterArchive every submission

On this page