NEW Claude Feature - Setting up your First Routine
Chapters10
Claude routines are AI infused cron-like tasks that can include decision making, not just automation. They are best when intelligence is needed.
Claude’s routines turn AI-powered checks into recurring tasks, demonstrated with a 4-hour email filtering and alert flow using Claude Code CLI and Zoho/Twilio workarounds.
Summary
DesignCourse host walks through setting up Claude's new routines with practical, real-world use in mind. He starts by outlining when a routine makes sense—only when AI-driven decision-making is needed rather than a simple cron job. He compares three setup paths: Claude AI’s UI, Claude Code CLI, and Claude Desktop, choosing Claude Code CLI for this demo. The use case: a 4-hour email check that filters sponsorship pitches from legitimate inquiries, using Zoho Mail as an API bridge since Twilio isn’t immediately available for texting. The process includes crafting a system prompt via Claude Code, configuring an hourly (actually every 4 hours) trigger, and entering environment variables in the routine—highlighting the importance of secure, correct environment configuration. He notes Twilio approval may delay SMS delivery, so a Zoho Mail summary serves as a temporary workaround. The takeaway: routines add intelligent, recurring capabilities without API billing, leveraging your Claude subscription. End result is an inbox scout that summarizes potential sponsorship emails and flags important messages for attention, with plans to switch to SMS once Twilio is approved. Finally, he emphasizes choosing routines when the task benefits from AI reasoning and recurring automation. Check the linked Cloud Code course for deeper hands-on guidance.
Key Takeaways
- Routines in Claude are best when you need AI-driven decision making over a recurring task, not just a cron replacement.
- Claude routines don’t incur external API billing because they run on your Claude subscription instead of paid API calls.
- The demo uses Zoho Mail as a temporary integration for summarizing sponsorship emails while awaiting Twilio SMS onboarding.
- Twilio approval can take days or weeks, so a Zoho Mail-based inbox summary acts as a functional fallback.
- Environment variables must be added in the routine’s environment section, not pasted into the chat or prompt text.
- Claude Code CLI is used to write the prompt and configure the routine; the UI, CLI, and Claude Desktop are three setup paths.
- Since the Twilio connector isn’t available in Claude yet, the creator falls back to a direct API call approach for texting behavior when possible.
Who Is This For?
Essential viewing for developers and creators exploring Claude’s new routines, especially those who want AI-driven, recurring automation without API costs. Great for those considering integrating with email flows (Zoho) or messaging (Twilio) while awaiting broader connector support.
Notable Quotes
"Claude has just released routines which are really just glorified AI infused cron jobs and I'm going to show you my first time using and setting one up for a real use case for designcourse.com"
—Opening framing of what routines are and the real-world test case.
"If it needs intelligence like if you need decisionmaking that's when you want to use a routine as opposed to a cron job."
—Core guidance on when to choose a routine over a traditional cron.
"The whole sending me a text thing is not going to work until Twilio approves the phone number and my ability to send a text."
—Practical hurdle of onboarding with Twilio and fallback to Zoho Mail.
"So that is how I used it. So anyhow yeah it makes sense to use routines you know because you kind of get that whole claw type setup."
—Conclusion on rationale and general workflow.
Questions This Video Answers
- How do Claude routines differ from traditional cron jobs and API calls?
- What are the best practices for setting environment variables in Claude Code routines?
- Can I use Zoho Mail and Twilio together with Claude routines, and what are the workarounds?
- What are the steps to create a 4-hour interval routine in Claude Code CLI?
- When should I prefer Claude UI versus Claude Code CLI for setting up routines?
Claude RoutinesClaude Code CLICloud CodeZoho Mail APITwilio APICron vs AI-driven schedulingEnvironment VariablesAPI connectorsDesignCourse tutorial
Full Transcript
Claude has just released routines which are really just glorified AI infused cron jobs and I'm going to show you my first time using and setting one up for a real use case for designcourse.com my primary business and we're going to see what this flow and this process looks like. So there's a few different ways to set up a routine. You can do it through Claude AI right here in this UI. You can do it in the Claude Code CLI which is what I use when I code and then also you can use it in Claude desktop.
Now the first thing I did is I went into my project open up claude and I asked it where can we use routines? Does it make sense anywhere to use routines in the context of my app? But you really have to be careful because it suggested some use cases that would just be way better to set up with cron jobs. So when do you actually know when you should use a routine versus something like a cron job? Well, if it needs intelligence like if you need decisionmaking that's when you want to use a routine as opposed to a cron job.
Now, what's really cool about routines is they don't use API billing, which we know is way more expensive. It uses your actual clawed subscription. So, a use case that I came up with that I want to test is I get a lot of spam email. I get a lot of email for sponsorships because of the size of my channel. Most of them are all junk. And so, what I want is a routine that would check maybe my email every 4 hours. And it's set up through Zoho Mail, which has an API endpoint that it can, you know, interface with.
and it will go through all the latest emails received in the last 4 hours, if any, and it will discard any of the BS sponsorship requests that I get that don't have anything to do with my channel or my topic. And also, if somebody does submit an actual email that needs my attention, it will flag it. Then it will send a text message with it. That way, I get notified, you know, not just through email, but through my actual phone text. And that way, I can really be on top of things. I think that would be a good use case for routines because it does require intelligence.
Now, one of the fundamentals of routines is connectors. And there's a ton of different services that you can choose and interface and add to your routine, but in this case, I'm going to be using Twilio API for the text messages. And there's no connector for it already in Claude that I found at least. So, we're just going to hit it up the API endpoint directly with curl within the routine. So, here I am. We're going to set up here using claude.ai/code routines new and I'm going to give it a name of 4hour email notifier and then describe what claude should do in each session.
Okay, so what I did is I hit up cloud code CLI. I told it exactly what I wanted to do and have it write the prompt for me. Here is the prompt. I'm not going to read through this, but you can kind of see how it constructs a system prompt to help it kind of filter through the sponsorship emails and the regular contact form emails as well. Then I'm going to click on schedule right here. And this is going to be hourly. All right. Runs every hour. I I want custom. And I'm not sure how to specify this.
So I literally just pasted this as a screenshot to Claude Code just now. and it told me to specify this for every 4 hours right there. Okay, so we're going to hit add trigger. Now, in order to actually add those environment variables, we edit the actual routine right here. And where it says default, we're going to click add environment. This is where they're going to be pasted. Don't paste it in the chat right here. You want to paste it in the environment variable section. So, I pasted it in create environment. I'm going to hit run now once more.
Great. Says all environment variables are set. All right. and it is done. Now, unfortunately, the whole sending me a text thing is not going to work until Twilio approves the phone number and my ability to send a text. That could take several days or weeks even. Uh, so just as a temporary workaround, I had it use Zoho Mail to send me my personal email, a summary of my business emails, and it worked. So, if I go over here, it called it inbox scout, but it's just giving me a summary of potential sponsorship here. Corsero, uh, paid collab, blah, blah, blah.
Contact, no new website, contact submissions in the last four hours. There we go. So, really, this would be in a form of a text message that I just get automatically so I don't have to forget to check my email or anything. And there we go. That is one way to use routines here in Claude Code. Now the best way to use it isn't like trying to directly uh interface with APIs via curl or anything. It is to use you know the connectors that are in there but for my case they didn't have Twilio. They also didn't have Zoho.
So that's how I used it. So anyhow yeah it makes sense to use routines you know because you kind of get that whole claw type setup. Um but it has to make sense in terms of what your use case is. Do you need something that needs intelligence that you know you use AI to do stuff for you and make decisions? If so, and it's on a recurring basis, then yeah, use routines. All right, everybody. I will see you all very soon. Definitely check out the top link here in the description for the follow along Cloud Code course that I'm building now.
It's very cool. I will see you soon. Bye.
More from DesignCourse
Get daily recaps from
DesignCourse
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









