Guide: Send Email on Trigger
Build the simplest useful workflow: run it manually, and it sends an email. A good first workflow to verify your setup end-to-end.
What you will build:
Manual Trigger → Code (build body) → Send Email
Time: ~10 minutes
Prerequisites:
- Tensorify account with a workspace
- Resend account with a verified domain
- CLI installed:
npm install -g @tensorify.io/cli
Before building the workflow, add your Resend API key to the workspace:
- Go to Settings → Env Vars
- Click Add Variable
- Name:
RESEND_API_KEY, Value: your key from resend.com/api-keys
- Dashboard → New Workflow → name it
send-test-email - Click Create
Drag a Manual node onto the canvas. In its settings:
- Mock Payload: paste this test data so you have values available during testing:
{
"recipientName": "Ada Lovelace",
"recipientEmail": "[email protected]",
"message": "This is a test notification from Tensorify."
}
Drag a Code node and connect Manual Trigger's payload output to Code's input.
In the code editor:
name = input.get("body", {}).get("recipientName", "there")
message = input.get("body", {}).get("message", "")
return f"""Hi {name},
{message}
Sent via Tensorify.
"""
Drag a Send Email node and connect Code's result to Send Email's text input.
In the Send Email settings:
- From:
[email protected](must be a verified Resend domain) - To:
{{ manual.body.recipientEmail }} - Subject:
Hello, {{ manual.body.recipientName }}
Start the watch loop:
export TENSORIFY_API_KEY="your_key_here"
tensorify watch send-test-email-workflow-id
In the canvas editor:
- Click Test → select the Send Email node → click Run to Selected
- The workflow runs locally using the mock payload
- Check the inbox of the address in
mockPayload.recipientEmail
The Code node's output panel in the canvas will show the formatted string that was passed to Send Email.
This is a manual-trigger workflow, so you don't need a webhook URL. Run it directly with the CLI:
tensorify run send-test-email-workflow-id
Or trigger it from the canvas by clicking the Run button.
- How to use a Manual Trigger with test payload data
- How to use a Code node to build a dynamic string from trigger data
- How to use
{{ }}bindings in email settings to personalize the recipient and subject - The complete development loop: build → test with watch → run in production
- Webhook Automation — trigger this email from an external event
- Send Email reference — HTML emails and dynamic recipients
- Code reference — more Python examples
