This is a simple html form project that can be deployed to Netlify. It uses Netlify Forms to handle the form submission. A Netlify Trigger Function sends the verified submission via Courier to the specified List or Recipient.
First, sign up for a Courier Developer Account, it’s free to sign up and includes 10,000 notifications per month. Then, choose an option below.
Clicking this button will create a new repo for you that looks like this one, and sets that repo up immediately for deployment on Netlify. You will be prompted for a repo name and to provide the values for the following environment variables to used with Courier.
- Courier Auth Token (
COURIER_AUTH_TOKEN
), required - You can find this value in your Courier API Keys Settings - Courier Event (
COURIER_EVENT
), optional - This is the notification id or mapped event for the notification you would like Courier to send. This will default toNETLIFY_FORM_{form name}
. - Courier List (
COURIER_LIST
), must provide a list or recipient - This is the id of the list you would like Courier to send to. You can find your lists in the Data > Lists section of the Courier app. - Courier Recipient (
COURIER_RECIPIENT
), must provide a recipient or list - This is the id of the recipient you would like Courier to send to. You can find your recipients in the Data > Recipients section of the Courier app.
You will need to install the Netlify CLI and connect it to your Netlify site to run locally.
- Clone this repo:
git clone https://github.com/trycourier/courier-netlify-form.git
- Connect to Netlify using
ntl init
- Add the above environment variables using
ntl env:set [env var] [value]
- Run the app locally using
ntl dev
- Make any changes and push to your repo to deploy.