Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/nylas/cli/workflowsgit clone --depth 1 https://github.com/nylas/cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.03642 |
| Opus 5 | $0.00000 | $0.01821 |
| Sonnet 5 | $0.00000 | $0.00728 |
| Haiku 4.5 | $0.00000 | $0.00364 |
Grade B, and why
workflows scanned grade B with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
curl -X POST "$SERVICE_URL/request-otp" -d "email=$USERNAME" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -X POST "$SERVICE_URL/request-otp" -d "email=$USERNAME" Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
result = subprocess.run( How it starts
The opening of the file, as written. The whole thing — 647 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hosted Workflows
Manage API-backed workflows that connect booking events to hosted templates.
nylas workflow list
nylas workflow create --name "Booking Confirmation" --template-id tpl_123 --trigger-event booking.created
nylas workflow show <workflow-id>
nylas workflow update <workflow-id> --disabled
nylas workflow delete <workflow-id> --yes
Scopes:
--scope appfor application-level workflows--scope grant --grant-id <id>for grant-level workflows
Typical flow:
- Create a hosted template with
nylas template create - Create a workflow that points at that template with
nylas workflow create - Verify the rendered email with
nylas email send --template-id ... --render-only
Advanced Automation Workflows
Complex automation workflows and integration patterns that span multiple Nylas CLI commands.
OTP Extraction
Extract OTP codes from emails:
# Get latest OTP
nylas otp get
# Get OTP from specific service
nylas otp get --from "[email protected]"
# Watch for OTP (poll every 5 seconds)
while true; do
otp=$(nylas otp get)
if [ -n "$otp" ]; then
echo "OTP received: $otp"
echo "$otp" | pbcopy # Copy to clipboard (macOS)
break
fi
sleep 5
done
Automated login with OTP:
#!/bin/bash
# auto-login-with-otp.sh
SERVICE_URL="https://app.example.com/login"
USERNAME="[email protected]"
# Step 1: Request OTP
curl -X POST "$SERVICE_URL/request-otp" -d "email=$USERNAME"
echo "OTP requested. Waiting for email..."
# Step 2: Wait and extract OTP
sleep 10
OTP=$(nylas otp get --from "[email protected]")
if [ -z "$OTP" ]; then
echo "Failed to receive OTP"
exit 1
fi
# Step 3: Login with OTP
curl -X POST "$SERVICE_URL/login" -d "email=$USERNAME&otp=$OTP"
echo "Login successful!"
OTP monitoring service (Python):
#!/usr/bin/env python3
# otp-monitor.py
import subprocess
import time
import re
def get_latest_otp():
"""Get OTP using Nylas CLI"""
result = subprocess.run(
['nylas', 'otp', 'get'],
capture_output=True,
text=True
)
if result.returncode == 0:
match = re.search(r'\b\d{6}\b', result.stdout)
if match:
return match.group(0)
return None
def monitor_otp(callback, timeout=60):
"""Monitor for OTP and call callback when received"""
start_time = time.time()
while time.time() - start_time < timeout:
otp = get_latest_otp()
if otp:
callback(otp)
return True
time.sleep(5)
return False
if __name__ == '__main__':
print("Monitoring for OTP...")
success = monitor_otp(lambda code: print(f"OTP: {code}"), timeout=120)
if not success:
print("Timeout waiting for OTP")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 647 lines · 0 tokens per session scan B 4945ce1de0a5
workflows is a command published in the GitHub repository nylas/cli (68 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,642 tokens. A static security scan graded it B with 3 findings (sends data to an external url, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
create-pr
Create a pull request following the official template.
/release
Release a new version — updates CHANGELOG, pyproject.toml, creates git tag, and pushes.
numbers-to-excel
Convert a Numbers document to Excel.
briefing
Get a daily briefing of today's calendar events, reminders, and optional inbox context.
symfony-api-errors
Design API Platform 4.3 error handling — RFC 7807.
execute-plan
Execute an implementation plan methodically with TDD and continuous validation.