Notix
Integrations

Send email from Pipedream, or Zapier.

Notix has no native app in either catalogue yet, and does not need one for the common case: an HTTP step to the JSON API sends the email, and an HTTP trigger receives Notix's signed delivery events. This page shows both in Pipedream, and the same send from Zapier's Webhooks step.

Send

One HTTP step, with the key kept out of the workflow.

Store the API key as a Pipedream environment variable and reference it as process.env.NOTIX_API_KEY. Build the idempotency key from the trigger's record id, so a replayed run answers with the original email instead of sending a second one.

A code step after any trigger
// Environment variable NOTIX_API_KEY is set in Pipedream's settings,
// never typed into the step. steps.trigger.event is the trigger's payload.
export default defineComponent({
  async run({ steps, $ }) {
    const order = steps.trigger.event;

    const response = await fetch("https://app.usenotix.dev/api/v1/emails", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.NOTIX_API_KEY}`,
        "Content-Type": "application/json",
        // Pipedream may re-run a workflow; the key keeps one email per order.
        "Idempotency-Key": `order-${order.id}-receipt`,
      },
      body: JSON.stringify({
        from: "receipts@acme.com",
        to: order.customer_email,
        templateId: "tpl_receipt_v4",
        variables: { orderId: String(order.id), total: order.total },
      }),
    });

    const body = await response.json();
    if (!response.ok) {
      // { error: { code, message } }; 429 carries Retry-After
      throw new Error(`Notix ${response.status} ${body.error?.code}: ${body.error?.message}`);
    }
    $.export("emailId", body.emailId);
    return body;
  },
});
Receive

Delivery events as a trigger, verified before anything runs.

Every event Notix sends is signed. The step below uses notix-js, which Pipedream installs on import, to check the signature and the five-minute timestamp window before your workflow acts on it.

Node.js step after an HTTP trigger
// Trigger: HTTP / Webhook. Paste the trigger's URL into the Notix
// dashboard as a webhook endpoint and copy the whsec_ secret into
// NOTIX_WEBHOOK_SECRET in Pipedream's environment variables.
//
// The signature covers the exact bytes Notix sent. Configure the HTTP
// trigger to pass the raw body through to the step (Pipedream parses JSON
// by default; a re-serialised body no longer matches the signature).
import { Notix } from "notix-js";

export default defineComponent({
  async run({ steps, $ }) {
    const rawBody = steps.trigger.event.body;      // must be the raw string
    const headers = steps.trigger.event.headers;   // X-Notix-Signature, X-Notix-Timestamp

    const webhooks = new Notix(process.env.NOTIX_API_KEY).webhooks(process.env.NOTIX_WEBHOOK_SECRET);
    // Throws on a bad signature or a timestamp older than five minutes.
    const event = webhooks.constructEvent(rawBody, { headers });

    if (event.type === "email.bounced" && event.data.bounce.type === "Permanent") {
      $.export("invalidAddresses", event.data.to);
      // next step: mark the address invalid in your CRM, post to Slack, etc.
    }
    return event;
  },
});
Events worth wiring into an automation
EventWhat to do with it
email.deliveredMark the order's receipt as delivered in your database or CRM.
email.bouncedWhen bounce.type is Permanent, mark the address invalid and stop other systems mailing it.
email.complainedRecord the complaint against the contact and review what was sent.
email.suppressedA send was refused because the address is on the suppression list; ask the customer for a new one.
contact.unsubscribedMirror the unsubscribe into your marketing tool so no system sends to them.
Zapier

No Notix app, so use the webhook step.

Zapier's Webhooks by Zapier action with the Custom Request option sends the same POST; the Zapier tab above lists every field. Zapier can also receive Notix events with its Catch Raw Hook trigger, but it cannot run the signature check itself, so keep the endpoint URL private and verify the event in a code step or a downstream service.

What the API needs.

A from-address on a verified domain, a recipient, and a template or html and text. The full request shape is in the API reference.

What a retry does.

With an idempotency key, a replayed run within 24 hours returns the original id. Without one, it sends again. See idempotency keys.

What the signature proves.

That the event came from Notix and was not altered or replayed. The scheme is on the signature verification page.

Questions

Pipedream and Zapier, answered.

Is there a Notix app in Pipedream or Zapier?
Not yet. Notix is used from both through their generic HTTP steps: Pipedream's HTTP request action or a Node.js code step, and Zapier's Webhooks by Zapier Custom Request action. Both call the same JSON API as the SDKs, with a Bearer key and an Idempotency-Key header, so nothing about the send changes when a native app arrives.
How do I send a transactional email from Zapier?
Add a Webhooks by Zapier step with the Custom Request action. Method POST, URL https://app.usenotix.dev/api/v1/emails, an Authorization header of Bearer plus your API key, Content-Type application/json, and a raw JSON body with from, to and either subject, html and text or a templateId and variables. Add an Idempotency-Key header built from the trigger's record id so a replayed Zap does not send twice.
Where do I keep the API key in Pipedream?
In Pipedream's environment variables, referenced as process.env.NOTIX_API_KEY from a code step or the HTTP action's header field. Pipedream's documentation recommends this over pasting a key into a step, and it keeps the key out of the workflow's exported code.
Can a Pipedream workflow receive Notix delivery events?
Yes. Create a workflow with an HTTP trigger, paste its URL into the Notix dashboard as a webhook endpoint, and put the endpoint's whsec_ secret in Pipedream's environment variables. A Node.js step imports notix-js and calls constructEvent on the raw body and headers; a bad signature or a timestamp older than five minutes throws before anything downstream runs.
Why does signature verification need the raw body?
The signature is an HMAC-SHA256 over the timestamp and the exact bytes Notix sent. If the trigger parses the JSON and a later step re-serialises it, key order and whitespace can change and the signature no longer matches. Use the trigger's raw-body option so the step receives the original string.
Does Notix have a built-in integrations catalogue?
Not today. The dashboard has webhooks, API keys and the SMTP relay; automation platforms connect through those. An in-product integrations catalogue is on the roadmap and will be announced in the changelog when it ships.

Send your first email in five minutes.

Verify a domain, copy an API key, make one call. The free plan does not ask for a card.