Blog
COURIER

Sending notifications from a Jamstack site

Aydrian Howard

September 23, 2020

Courier Live Header

Table of contents

Handling Contact Forms with Courier

For our September 16th Courier Live, Paul Chin, Jr joined me to talk about Begin. Begin helps you effortlessly ship web apps and APIs on AWS. Paul recently updated his 5 year old LAMP stack Ghostbusters site into a functional FASTstack application using Begin. While updating the contact form, he decided he'd rather it send a Slack message instead of sending an email. He decided to use Courier to handle this. Together we walked through creating a new Begin application that included an HTML contact form and configured it to send using Courier.

Check out the video below to watch us:

  • Create a new Begin application
  • Add an HTML Form and handle the submit using a serverless function
  • Set up a new Slack Application to handle sending direct messages
  • Create a new Courier notification and connect it to the serverless function
  • Add a conditional SMS channel for urgent messages without changing any code

Check out the full project code available on GitHub.

Be sure to Like the video and Subscribe to our YouTube channel.

Handling Contact Forms with Courier

It's easy to set up a contact form using Begin. Begin will store your static assets in an S3 bucket and help you create the serverless function needed to handle the form submit. It's easy to get started by signing in to Begin and clicking Create new app and selecting a minimal app.

You can add a form like the following to your app.

Copied!

<form id="main-contact-form" method="post" action="contact-form">
  <div><input type="text" name="name" placeholder="Name" required /></div>
  <div><input type="email" name="email" placeholder="Email" required /></div>
  <div><input type="text" name="subject" placeholder="Subject" required /></div>
  <div>
    <textarea
      name="message"
      class="form-control"
      rows="8"
      placeholder="What seems to be the problem?"
      required >
    </textarea>
  </div>
  <div>
    <input type="checkbox" name="urgent" value="true" />
      <label for="urgent" >Urgent</label>
  </div>
  <div><button type="submit">Send Message</button></div>
</form>

And then create a serverless function using Begin with the same name as the form action.

Copied!

let tiny = require('tiny-json-http')
let arc = require('@architect/functions')
let sendCourier = async function (req) {
  let body = req.body
  let url = 'https://api.courier.com/send'
  let headers = {
    "authorization": `Bearer ${process.env.COURIER_AUTH_TOKEN}`,
    "content-type": "application/json",
  }
  let data = {
    event: `praisecage-contact`,
    recipient: 'pchinjr',
    profile: {
      slack: {
        access_token: `${process.env.SLACK_TOKEN}`,
        email: 'paul@praisecage.org'
      }
    },
    data: {
      name: `${body.name}`,
      email: `${body.email}`,
      subject: `${body.subject}`,
      message: `${body.message}`,
      urgent: `${body.urgent}`
    }
  }
  let response = await tiny.post({ url, data, headers })
  console.log(response)
}
let route = async function (req) {
  return {
    statusCode: 303,
    location: '/'
  }
}
exports.handler = arc.http.async(sendCourier, route)

This function will handle the form submit and send it to Courier. From there, you can use the Courier application to create your notification.

You can sign up for a free account on both Courier and Begin. I hope this stream has given you a taste of what is possible when you build your app with Begin and Courier. It's never been easier to build on top of AWS, so get started and be sure to share with us what you create.

Is there something you’d like to see us do using Courier? Let us know and it might be the subject of our next Courier Live. We stream a new Courier Live every Wednesday at noon Pacific. Follow us on Twitch to be notified when we go live.

-Aydrian

Similar resources

healthcare messaging
Notifications LandscapeCourier

The $5.9 Billion Rebuild: Why Healthcare Is Replacing Its Notification Infrastructure

The clinical alert and notification market will reach $5.9 billion by 2032, growing at 12.3% annually. That number represents hardware, software, and services combined. It also represents healthcare's admission that pagers and overhead speakers aren't enough anymore. Healthcare organizations are rebuilding how critical information moves through their systems. Regulatory pressure, workforce shortages, and value-based care economics are forcing the investment. The software layer is where outcomes are won or lost.

By Kyle Seyler

February 02, 2026

a guide for ai assisted development: Notification infrastructure
CourierNotifications LandscapeEngineering

Vibe Coding Notifications: How to Use Courier with Cursor or Claude Code

Courier's MCP server lets AI coding tools like Cursor and Claude Code interact directly with your notification infrastructure. Unlike Knock and Novu's MCP servers that focus on API operations, Courier's includes embedded installation guides for Node, Python, Flutter, React, and other platforms. When you prompt "add Courier to my app," your AI assistant pulls accurate setup instructions rather than relying on outdated training data. OneSignal's MCP is community-maintained, not official. Courier supports 50+ providers, native Slack/Teams integration, drop-in inbox and preference components, and a free tier of 10,000 notifications/month. Configure in Cursor with "url": "https://mcp.courier.com" and "headers": { "api_key": "YOUR_KEY" }.

By Kyle Seyler

January 22, 2026

b2b customer engagement guide
Notifications LandscapeCourier

The Complete Guide to B2B Customer Engagement

Courier provides the notification infrastructure layer for B2B customer engagement, routing messages across email, SMS, push, in-app, Slack, and Teams based on user preferences and product events. Unlike building notification systems in-house—which takes months of engineering time for features like multi-channel routing, preference management, and delivery tracking—Courier handles this infrastructure so product teams can focus on engagement strategy. B2B customer engagement requires multiple layers: notification infrastructure (Courier), customer data platforms (Segment), product analytics (Mixpanel/Amplitude), and channel-specific tools. Companies with strong engagement programs see 15-25% churn reduction. The key is connecting product events to customer communication at the right moment through the right channel, handling complexity like multiple users per account with different notification needs across work channels.

By Kyle Seyler

January 20, 2026

Multichannel Notifications Platform for SaaS

Products

Platform

Integrations

Customers

Blog

API Status

Subprocessors


© 2026 Courier. All rights reserved.