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

multichannel notifications and omnichannel customer engagement for product managers
Product ManagementCourier

How Product Teams Build, Test and Ship Multichannel Notifications in Design Studio

Product teams need to build, test, and ship notifications across multiple channels without filing an engineering ticket every time. Courier's Design Studio is the workspace for that: a template builder, visual channel routing, omnichannel testing, and publishing in one place. This post walks through the traditional template designer paradigm, how it splits effort across too many tools, and outlines a path for product and growth teams to ship transactional, product, and marketing notifications from a single workspace.

By Kyle Seyler

March 12, 2026

EU data residency and translations and gdpr
EngineeringCourier

EU Data Residency for Notifications: What Engineering Teams Need to Know

Courier supports EU data residency through a dedicated datacenter in AWS EU-West-1 (Ireland), with full API feature parity, same-workspace dual-region access, built-in GDPR deletion endpoints, and localization support for multilingual notifications. Engineering teams can switch to EU hosting by changing a single base URL with no workspace migration or downtime required.

By Kyle Seyler

March 09, 2026

customer engagement and notification infrastructure image
Notifications LandscapeCourierProduct Management

Customer Engagement Platforms Are Splintered. Message Orchestration Is the Fix

Customer engagement platforms are splintered. Some are built for campaigns, others for support automation, and others treat messaging as a transactional delivery problem. The result is collisions, blind spots, and message fatigue. The highest-leverage fix is solving the lifecycle-to-product and transactional vector with a message orchestration layer: one system that routes, suppresses, prioritizes, and observes messages across channels. Think air traffic control for user communications.

By Kyle Seyler

March 03, 2026

Multichannel Notifications Platform for SaaS

Products

Platform

Integrations

Customers

Blog

API Status

Subprocessors


© 2026 Courier. All rights reserved.