ShareShortcuts

Send an Email with SendGrid

9-ninja
Fork “Send an Email with SendGrid”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so 9-ninja gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
74K
Saved
2
Actions
12
Category
API
Version
1.0
Language
EN

Sends an e-mail via the SendGrid API

Documentation: SendGrid API

Requires an API-KEY from Sendgrid.

What's New

Version 1.0

First release

Version History
1.0 Oct 19, 2018

First release

What it does

12 actions
  1. Text
  2. Set Variable
    SendGridAPIKey
  3. Ask for Input
    What's the subject of the email?
  4. Set Variable
    Subject
  5. Ask for Input
    What's the email address you want to send to?
  6. Set Variable
    ToEmail
  7. Ask for Input
    What email is this message coming from?
  8. Set Variable
    FromEmail
  9. Ask for Input
    What is the body of the email?
  10. Set Variable
    ContentHTML
  11. URL
    https://api.sendgrid.com/v3/mail/send
  12. Get Contents of URL

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/web'
#define color darkblue
#define glyph magicWand

@SendGridAPIKey = "Put your SendGrid API Key here"
prompt("What's the subject of the email?")
@Subject = nil
prompt("What's the email address you want to send to?")
@ToEmail = nil
prompt("What email is this message coming from?")
@FromEmail = nil
prompt("What is the body of the email?")
@ContentHTML = nil
url("https://api.sendgrid.com/v3/mail/send")
fileRequest("", "POST", {
	"authorization": "Bearer {@SendGridAPIKey}",
	"content-type": "application/json"
})
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Oct 24, 2018
sarahnhahs

Thank so much @9-ninja! I would like to ask if it is possible to add an attachment from the files App ..

Advertisement

More by 9-ninja

See All

You Might Also Like

See All
Advertisement