Data & connectionsGuide

Messages: e-mail, chat and webhooks

E-mail in Waiso has three parts: a provider — your own account that actually delivers the message — a template written in HTML with {{ values }}, and the Email step of a flow, which fills the template and sends it. Every send is recorded, with its status and the exact message that went out.

10 min readBefore this: Integrations, What a flow isOpen in Waiso
What you will learn
  • Find your way around the Messages page: E-mail, Chat and Webhook
  • Turn on Email and connect a provider
  • Write a template with values, preview it and publish it
  • Send from a flow’s Email step, and from code through a flow
  • Read a template’s sends and resend one

How a send happens

Waiso does not deliver e-mail itself. It renders your template with the values of the run and hands the result to the provider you connected — over SMTP or the provider’s own API — and records the attempt. Because the provider is your account, the sender address, the deliverability and the bill are yours.

The Email step at the end of the flow fills a published template with values from the steps above it.

Email is a service of the project. Turn it on from Integrations → Add integration → Email (“Send emails from scripts and flows.”); its card then opens the Email page, where the template list sits on the left, the open template in the middle and Providers beside it.

The Messages page has three tabs, so you always know which kind you are editing: E-mail (providers and templates, this page’s first half), Chat (Slack, Discord, Teams and Google Chat formats) and Webhook (the JSON a webhook receives). Chat and webhook messages are covered in Chat and webhook messages below.

Connect a provider

  1. Add the provider

    On the Messages page’s E-mail tab, under Providers, click Add Provider and pick the service and, where there is a choice, the method.

  2. Fill its fields and confirm the variables

    Each method asks for what that service needs, with help text on where to find it. Saving lists Variables this provider creates: a provider named Transactional using an API key stores it as EMAIL_TRANSACTIONAL_API_KEY.

  3. Send a test

    Send test email asks for a Recipient email and sends through the real provider. With several providers, Set as default marks the one steps use when they do not pick one.

ProviderMethodsSecret variable
Custom SMTPUsername / Password (host, port 587 · 465 · 25)…_PASSWORD
GmailConnect with Google (sign in once, send-only permission) · App Password (SMTP) · Gmail REST API (an access token)…_REFRESH_TOKEN, …_PASSWORD or …_BEARER_TOKEN
Outlook / Microsoft 365App Password (SMTP) · Microsoft Graph API (an access token)…_PASSWORD or …_BEARER_TOKEN
SendGrid · ResendAPI Key…_API_KEY
Mailgun · BrevoAPI Key · SMTP…_API_KEY or …_PASSWORD
Amazon SESSMTP · AWS Access Key (SES API)…_PASSWORD, or …_ACCESS_KEY_ID + …_SECRET_ACCESS_KEY
PostmarkServer Token…_SERVER_TOKEN
Zoho MailApp Password…_PASSWORD

Write a template

New Template asks how to start — Use example (a filled-in sample) or Start from scratch — and the System Template Library offers ready ones to Import. The editor holds one HTML with its styles inline, in style="…" attributes (mail clients drop <style>, and every send inlines one left in), a Subject line and a live Preview you can switch between Desktop, Tablet and Mobile.

Values in a template

Templates use Jinja syntax. {{ name }} inserts a value, {{ user.name }} a field of one, {{ items[0] }} an element of a list; {% if %} and {% for %} decide and repeat. Every value the HTML or the subject uses appears under Template variables by itself, with a box to try it in the preview.

Expected outputThe HTML tab of a template with three values
<h1>Welcome, {{ name }}!</h1>
<p>Your workspace <strong>{{ workspace }}</strong> is ready.</p>
{% if trial_days %}
  <p>Your trial ends in {{ trial_days }} days.</p>
{% endif %}

Save, then publish

Save keeps your work; Publish makes it the version flows send. A badge says where a template stands — Never published, Unpublished changes or Published — and Send test always uses what is open in the editor. The History tab lists every save, publish and restore.

Send from a flow

Add a Send email step (the Email step) to a flow, click it, and fill its sheet:

  • Connection — a provider, or Default connection.
  • Template — Choose a template. The flow sends its published version; the sheet warns when it was never published or has unpublished changes.
  • Message — with no template chosen, write the e-mail right in the step: plain text or HTML, with values from earlier steps like {{name}}. The step needs one or the other.
  • Recipients — one address, several separated by commas, or a list from an earlier step.
  • Subject — leave empty to use the template’s; it can use the template’s values.
  • Template values — one expression per value the template uses, like any step input (Passing values between steps).
  • Attachments — a file from an earlier step, up to 10 MB in total.

Preview e-mail shows The e-mail as it will be sent; values only known at run time are listed as such. After a run, the step’s output says what went out:

Expected outputSuccessThe Email step’s output
{
  "ok": true,
  "historyId": "9b2f6c1e-4d7a-4e0b-9a61-3f2d8c5e7a10",
  "to": [
    "ana@example.com"
  ],
  "subject": "Welcome, Ana!"
}

From a script

Scripts have no network, so they do not talk to a provider themselves. To send from code, run a flow whose Email step does it — the SDK’s run_flow waits for it and returns how it ended:

welcome_new_user.py
from waiso import run_flow

def main(email: str, name: str = "Ana"):
    result = run_flow("notify/welcome", {"email": email, "name": name})
    return {"status": result.status, "flowRunId": result.flow_run_id}

With a loop over a SQL step, one flow can send one e-mail per row — the complete recipe is in SQL report by e-mail.

Sends and resend

A template’s Sends tab lists every message sent with it — tests included — with To, Subject, Provider, Status and Sent At, filtered by All, Sent, Failed or Pending. A failed send shows Error details: the provider’s own answer.

Resend opens the send dialog filled in with that e-mail’s values — nothing goes out until you press Send, so you can fix an address first.

Chat and webhook messages

The Chat and Webhook tabs hold two things, as the E-mail tab holds templates and providers: formats — how a message looks — and destinations — where it goes.

  1. Add a destination

    In the Destinations card, click +, pick the service (Slack, Discord, Microsoft Teams or Google Chat — a Google Chat space gives its address under Apps & integrations → Webhooks), give it a name and paste the incoming-webhook address. The address is kept as a secret: afterwards only its host is shown, and Replace address swaps it. A new webhook destination shows its signing secret once.

  2. Make a format

    New format asks for the service (fixed once created) and a name, and starts from that service’s default message. Edit its body — the service’s own JSON, like Slack blocks or a Teams card — and click a fact on the right to place it, like {{ title }} or {{ link }}. The preview renders a sample alert as you type; a body the service would refuse is marked at its place and the saved one keeps being used.

  3. Send a test

    Send test sends the saved format, filled with sample facts and marked as a test, to a destination of the same service, and shows what the service answered.

Alerts use them: an alert channel sends to a destination in a format (or the default message), and a rule can pick another format per service for its own messages. Deleting a format in use asks first, names the channels that use it, and those fall back to the default message.

A flow sends one too: the Send message step takes a format and a destination, and each of the format’s fields becomes one of its inputs. From code, it is waiso.api.messages.send.

Limits and gotchas

  • A flow sends only a published template; one never published is refused (template_not_published).
  • Deleting a template makes every flow step that sends it fail.
  • A custom SMTP host must be a public address; a private one is refused with host_not_allowed.
  • Attachments add up to 10 MB per message.