DAY 4 BUILD
Deployed to Trigger.dev.
WHAT IT DOES
Every morning at 8am Central it emails me a brief with a countdown to my Suno download deadline and the open items on my build. My laptop is not involved.
WHAT I DEPLOYED
A two task automation. One task builds the brief, a separate task sends it. I split it the same way Nate split find leads from create lead. If the send fails, only the send retries. The brief does not get rebuilt.
It sends through a Google Apps Script web app I already had running, so the whole thing costs nothing. Trigger.dev free tier, GitHub free, Apps Script free. No new subscription.
WHAT BROKE
Three things, and two of them were mine.
First, the obvious one everybody hits. It ran perfectly in dev and failed in production. My API keys were in my .env file, and .env is in .gitignore, so it never reached GitHub and never reached Trigger.dev. That is not a bug, that is the design. Dev and production keep completely separate variables. Nothing on the screen tells you that is what went wrong.
The normal fix is to add them by hand in the dashboard. I could not find that page. So instead of hunting for it I put the fix in the code. Trigger.dev has a build extension called syncEnvVars that runs before the deploy starts. Mine reads my local .env and uploads only the variables that start with LL_ to whatever environment I am deploying to. My CLI key is explicitly excluded, because that one is not a task variable and it has no business being uploaded.
Deploy output now reads:
syncEnvVars: uploading LL_MAIL_ENDPOINT, LL_MAIL_TOKEN, LL_MAIL_TO
Found 3 env vars to sync
Successfully synced 3 env vars with the server
The dashboard page I could not find is no longer part of my process. That is worth more than finding it would have been.
Second, my first production test failed with "Send failed 200: missing subject" and I thought I had broken it. I had not. I had run the inner task, the one that just sends whatever it is handed, and the test page handed it an empty payload. My Apps Script correctly refused it. The error was the system working. Read what the error actually says before you assume it is you.
Third, and this one is the real lesson from today. Before I deployed anything, I found out that three weeks of work I had built with Claude Code had never been written to my hard drive. Not one file. It was sitting in a session workspace that gets wiped when the session ends. A hundred and forty one kilobytes of Apps Script, sixteen workflow blueprints, six legal documents. One session away from gone.
That is the same problem this whole day is about. Something that only exists while you are sitting there is not really built yet. Deploying is not just about schedules. It is about the thing existing somewhere that is not you.
I now have a PowerShell script that rebuilds a searchable index of every function, every script and every document in my system by reading the actual files. It runs offline, costs nothing, and it means the next session starts by reading what exists instead of asking me.
ONE MORE THING I FIXED BEFORE I PUSHED
My GitHub account was named after me. Every repo URL I will ever own would have carried my legal name. I renamed the account to my brand before the first push, so no repo, no clone, no bookmark and no webhook ever saw the old one. Renaming later means redirects and explaining. Renaming before the first push costs one minute and nobody ever knows.
Same pass caught my package name and both of my task IDs still carrying an older version of my brand name. A deployed task ID is how the platform identifies that job for the rest of its life. Nothing was deployed yet, so it was free to change. One day later it would not have been.
Check every name a thing carries before it leaves your machine. Repo, package, task IDs, branch, account. Not after.
WHAT I ACTUALLY LEARNED
Dev is tethered to your laptop. Production is not. That difference is the entire point of the day, and it applies to a lot more than Trigger.dev.
And when a dashboard will not show you the button, look for the version of the fix that lives in your code instead. It survives the UI changing.
#AISChallenge
3
3 comments
Kristopher Shaffer
4
DAY 4 BUILD
AI Automation Society
skool.com/ai-automation-society
Learn to get paid for AI solutions, regardless of your background.
Leaderboard (30-day)
Powered by