# /etc/cron.d/digest
0 7 * * 1-5 ops bash /opt/scripts/digest.sh
# /etc/cron.d/digest
0 7 * * 1-5 ops bash /opt/scripts/digest.sh
# /etc/cron.d/digest
0 7 * * 1-5 ops bash /opt/scripts/digest.sh
# /opt/scripts/digest.sh
#!/usr/bin/env bash
SUMMARY=$(psql -tA -c "SELECT count(*) FROM signups WHERE created_at > now() - interval '1 day'")
nylas email send --to [email protected] \ --subject "Daily signups: $SUMMARY" \ --body "https://dashboard.yourapp.com/signups"
# /opt/scripts/digest.sh
#!/usr/bin/env bash
SUMMARY=$(psql -tA -c "SELECT count(*) FROM signups WHERE created_at > now() - interval '1 day'")
nylas email send --to [email protected] \ --subject "Daily signups: $SUMMARY" \ --body "https://dashboard.yourapp.com/signups"
# /opt/scripts/digest.sh
#!/usr/bin/env bash
SUMMARY=$(psql -tA -c "SELECT count(*) FROM signups WHERE created_at > now() - interval '1 day'")
nylas email send --to [email protected] \ --subject "Daily signups: $SUMMARY" \ --body "https://dashboard.yourapp.com/signups"
nylas agent rule create \ --name "Archive weekly newsletters" \ --condition subject.text,contains,weekly \ --action archive
nylas agent rule create \ --name "Archive weekly newsletters" \ --condition subject.text,contains,weekly \ --action archive
nylas agent rule create \ --name "Archive weekly newsletters" \ --condition subject.text,contains,weekly \ --action archive
nylas webhook create --url https://your-handler/inbound \ --triggers message.created
nylas webhook create --url https://your-handler/inbound \ --triggers message.created
nylas webhook create --url https://your-handler/inbound \ --triggers message.created
# Your handler
@app.post("/inbound")
def inbound(payload): msg_id = payload["data"]["object"]["id"] out = subprocess.check_output( ["nylas", "email", "attachments", "list", "--message-id", msg_id, "--json"] ) for att in json.loads(out): s3.upload_fileobj(...)
# Your handler
@app.post("/inbound")
def inbound(payload): msg_id = payload["data"]["object"]["id"] out = subprocess.check_output( ["nylas", "email", "attachments", "list", "--message-id", msg_id, "--json"] ) for att in json.loads(out): s3.upload_fileobj(...)
# Your handler
@app.post("/inbound")
def inbound(payload): msg_id = payload["data"]["object"]["id"] out = subprocess.check_output( ["nylas", "email", "attachments", "list", "--message-id", msg_id, "--json"] ) for att in json.loads(out): s3.upload_fileobj(...)
nylas email list --unread --json | jq -r '.[] | select(.snippet | test("out of office"; "i")) | .id' | while read id; do nylas email send --to "$(nylas email get $id --json | jq -r '.from[0].email')" \ --subject "Re: thanks" --body "No worries — I'll wait." nylas email mark-read $id
done
nylas email list --unread --json | jq -r '.[] | select(.snippet | test("out of office"; "i")) | .id' | while read id; do nylas email send --to "$(nylas email get $id --json | jq -r '.from[0].email')" \ --subject "Re: thanks" --body "No worries — I'll wait." nylas email mark-read $id
done
nylas email list --unread --json | jq -r '.[] | select(.snippet | test("out of office"; "i")) | .id' | while read id; do nylas email send --to "$(nylas email get $id --json | jq -r '.from[0].email')" \ --subject "Re: thanks" --body "No worries — I'll wait." nylas email mark-read $id
done - Zapier: their webhook URL → Zapier proxies → your URL. Latency: 1-3 sec.
- n8n: their webhook URL → your n8n flow → optional outbound. Self-hosted = direct. Cloud = +1 hop.
- Nylas CLI: nylas webhook create --url https://your-endpoint. Direct delivery, sub-200ms. - Send email from the terminal — full CLI send reference
- Receive email without an SMTP server — webhook + agent setup
- Best CLI email tools compared — mutt vs mailx vs msmtp vs Nylas
- Full command reference