Keyboard

Shortcuts

Command palette
K
Home
gh
About
ga
Projects
gp
Expertise
gx
Journal
gj
Contact
gc
Copy email
e
Call
c
Toggle theme
t
Show this help
?

↑↓ to navigate · Enter to open · Esc to close

AI & agents

Newsletter + Gemini: welcome mail without black magic

TL;DR Optional Gemini. Newsletter flag. Timeout + fixed-text fallback if the API stalls.

14 Feb 2026 · Albert Nicolas

  • gemini
  • newsletter
  • laravel
  • ia
Newsletter + Gemini: welcome mail without black magic

1 min read Reading 0%

Idea: a welcome mail slightly less robotic than a fixed template. Constraint: signup must never depend on Gemini.

Wiring

  1. Newsletter flag ON in admin
  2. Gemini key set (otherwise null adapter)
  3. Short timeout + fallback copy
try {
    $body = $gemini->welcome($subscriber, timeout: 4);
} catch (Throwable $e) {
    $body = $fallbackWelcome;
}
Mail::to($subscriber)->send(new WelcomeMail($body));

← Back to journal

Contact me Call