Back View all Articles

Courier Live: Sending notifications from a Jamstack site

Posted by Aydrian Howard on September 23rd, 2020

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.

Contact Form in Begin

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

Handling the Form

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

Author
Aydrian Howard

Courier
GitHubtwitterLinkedInFacebookInstagram