This project allows you to quickly and easily deploy a SendGrid email service utilizing IBM's Cloud Functions.
This repo is a companion to a workshop given at IBM Index 2018. The companion slides can be found here.
- Prerequisites & Dependencies
- Installation
- Quick Start
- Usage
- Use Cases
- Announcements
- Roadmap
- How to Contribute
- Troubleshooting
- About
Update the email addresses in app.py
.
bx plugin install Cloud-Functions -r Bluemix
bx login -a api.ng.bluemix.net -o <YOUR IBM CLOUD USERNAME> -s dev
docker run --rm -v "$PWD:/tmp" ibmfunctions/action-python-v3 \
bash -c "cd tmp && virtualenv virtualenv && source virtualenv/bin/activate && pip install -r requirements.txt"
zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action create helloSendGrid --kind python-jessie:3 helloSendGrid.zip
The following is the procedure for updating your IBM Cloud Function after making a code change:
zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action update helloSendGrid --kind python-jessie:3 helloSendGrid.zip
Go to the IBM Cloud Functions Actions page.
Click the "helloSendGrid" link.
Click the "Parameters" link.
"Add" a parameter with the "Parameter Name" SENDGRID_API_KEY and the "Parameter Value" is your SendGrid API Key.
bx wsk action invoke --result helloSendGrid
In addition the Quick Start, you can access your IBM Cloud Function using CURL.
cp .env_sample .env
Replace YOUR IBM CLOUD API KEY with your IBM Cloud API Key.
source .env
Go to the IBM Cloud Functions Actions page.
Click the "helloSendGrid" link.
Click the "Endpoints" link.
Copy the commands under "CURL" and replace API-KEY with $IBM_CLOUD_API_KEY.
Send an email using the command line.
Come join me at IBM Index 2018 on 2/2/18.
Add the ability to pass in various paramaters such as to email, from email, subject and body.
Add Web Action and Gateway support.
Add tests.
Update documentation.
I encourage contribution to this project, please see our CONTRIBUTING guide for details.
Please see the troubleshooting guide for common library issues.
sendgrid-ibm-index-open-source-workshop is supported by the SendGrid Developer Experience Team.
sendgrid-ibm-index-open-source-workshop is maintained and funded by SendGrid, Inc. The names and logos for sendgrid-ibm-index-open-source-workshop are trademarks of SendGrid, Inc.