UNPKG

node-red-contrib-sendgrid

Version:
31 lines (30 loc) 2.3 kB
<script type="text/html" data-help-name="sendgrid"> <p>E-mail sending node using SendGrid service.</p> <p>You need to get an API key from the SendGrid website (<a href="https://sendgrid.com" target="_blank">https://sendgrid.com</a>).</p> <p>Sends the <code>msg.payload</code> as an e-mail, with a subject of <code>msg.topic</code>.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>msg.from<span class="property-type">string</span></dt> <dd>The sender of the message</dd> <dt>msg.to<span class="property-type">string</span></dt> <dd>Recipient of the message</dd> <dt>msg.topic || msg.title<span class="property-type">string</span></dt> <dd>The subject of the e-mail</dd> <dt>msg.cc<span class="property-type">string</span></dt> <dd>Recipient of carbon copy (Optional)</dd> <dt>msg.bcc<span class="property-type">string</span></dt> <dd>Recipient of blind carbon copy (Optional)</dd> <dt>msg.templateId<span class="property-type">string</span></dt> <dd>SendGrid dynamic template ID</dd> <dt>msg.templateData<span class="property-type">string</span></dt> <dd>Data to fill the dynamic template</dd> <dt>msg.payload<span class="property-type">string | buffer</span></dt> <dd>If a `String`, the body of the e-mail or attachment if it's a `Buffer`</dd> </dt> </dl> <h3>Details</h3> <p>The default message recipient can be configured in the node. If it is left blank, it should be set using the <code>msg.to</code> property of the incoming message. You can also specify <code>msg.cc</code> and/or <code>msg.bcc</code> properties. You can set the sender of <code>msg.from</code> in the payload.</p> <p>If the payload is a binary buffer then it will be converted to an attachment. The filename should be set using <code>msg.filename</code>. Optionally <code>msg.description</code> can be added for the body text.</p> <p>Optionally, you can provide a <a href="https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/">dynamic template ID</a> and data to use this node as a dynamic transactional template.</p> <p>In case you sending multiple e-mails but want to send each one individually, you can check the `Multiple` checkbox.</p> </script>