HomeVideos

Claude Routines Just Dropped, And It's Perfect

Now Playing

Claude Routines Just Dropped, And It's Perfect

Transcript

607 segments

0:00

Well, Anthropic just launched routines,

0:02

which allows Claude to kick off

0:03

automations via schedule, trigger, or

0:05

even webhook. And this closes the loop

0:07

and basically turns Claude into a

0:09

dedicated automation platform competing

0:11

with no-code drag-and-drop builders like

0:13

n8n and others. In this video, I'm going

0:15

to show you guys how you can build

0:16

routines very quickly. I'm going to give

0:18

you guys a couple of demos. Then I'm

0:19

going to walk you through step-by-step

0:20

setting up your own routines on both the

0:22

Claude desktop interface as well as

0:25

behind the scenes via API. Okay, so for

0:27

the most prototypical example, I have a

0:29

daily mailbox summary plus draft

0:31

routine. And what I'm doing here is I

0:33

just clicked run now because they have a

0:35

little demo or test feature that allows

0:37

you to actually run it and then see the

0:38

inputs and outputs live. If I click on

0:41

this little runs button, you'll see that

0:43

all I've really done is I've just fed in

0:44

a prompt. And this is the exact same

0:45

thing as Claude Code. It's just

0:47

occurring on a standardized cloud

0:49

container, not on my computer. And in

0:52

this case, I'm just testing it using

0:53

their interface, but you can also

0:55

schedule it. You can have it triggered

0:57

based off webhook, and then you can also

0:58

send an API request to trigger it. And

1:00

so you can trigger it based on incoming

1:02

data, you can trigger it based on

1:03

outgoing data. It's very powerful. If

1:05

anybody has watched my previous video on

1:07

agentic workflows, this is basically the

1:09

standardized and enterprise version of

1:11

agentic workflows.

1:13

So this is now searching through Gmail

1:14

emails. It's actually doing everything

1:16

more or less that I would normally do if

1:18

running this locally on my computer. The

1:20

only difference being obviously that

1:22

because it's occurring on the cloud,

1:23

it's not something that I realistically

1:25

am going to want to have to steer.

1:26

Typically, you want to be a lot clearer

1:28

about the instructions and make sure

1:29

that it has all the information that it

1:31

needs. After that, it's just going to go

1:33

through various tool calls and

1:34

everything like that until it gets to

1:36

the definition of done, which in my case

1:37

is going to be, "Hey, once you're

1:39

finished, use a Slack connector to send

1:40

me an update." Now, on the Claude Code

1:42

docs page, the majority of the use cases

1:44

are what I'd consider to be overly

1:45

technical things like backlog

1:47

maintenance, alert triage, bespoke code

1:49

review. I mean, most people don't even

1:51

know what any of this stuff means. But I

1:53

want you to know this is basically a

1:55

stand-in replacement for automation. You

1:57

can automate anything using this tool.

2:00

And what's really cool is you can do it

2:01

using natural language. So what I've

2:03

done is I've developed a Claude skill

2:04

that you can import into your own

2:05

workspace. Then you can just give that

2:07

skill any pre-existing workflow, whether

2:09

it's in natural language, written as an

2:11

SOP, or it's something on a no-code tool

2:14

like n8n or make.com. Back to the skill

2:16

page here, you can see it's found two

2:18

unreads. The thing is, I don't really

2:20

care about this because if you think

2:21

about it, this is the conversation

2:22

thread. What I want to do is I want to

2:24

see this Slack update that was sent to

2:25

my DMs because, you know, if I'm using

2:27

this like a traditional automation,

2:29

that's where I'd probably

2:31

So if I go, I actually see I did receive

2:33

a notification at 12:01 where it pulled

2:35

my unreads and then it fed me the

2:37

information as well as like a high-level

2:39

summary along with a polite decline that

2:41

it drafted as well as an acceptance for

2:43

for this one. And I can go on to my

2:45

email and I can actually open up the

2:46

drafts and I could I could see them all

2:47

as well. And just because I'm trying not

2:49

to dox all of these people too hard, you

2:51

know, in this case, I immediately

2:53

drafted, "Hey Corey, thanks for reaching

2:54

out. Tell the other Net Kai own one.

2:56

Happy to come on. Send over a few time

2:57

slots that work on your end." And then I

2:59

just removed the two email that was

3:01

previously populated. Okay, so that's

3:03

probably the simplest example of a demo.

3:05

And I just did all this stuff

3:07

live using the test feature because I

3:08

wanted to show you that that's how it

3:10

works. But you can also schedule it, and

3:12

then you can also fire things off based

3:13

off webhooks and API calls. So what I'm

3:15

going to do next is I'm very quickly

3:16

going to show you how the scheduling

3:18

feature works. And then after I'm going

3:19

to show you how you can use triggers

3:21

like webhooks and so on and so forth to

3:22

run your routines. Once we're done with

3:24

that, I'll actually walk through like

3:26

the UX and show you guys more of the

3:28

deep dive behind how this works. So

3:30

anyway, for scheduling purposes, all you

3:32

need to do is go back to the routine

3:33

that I made a moment ago. Okay, click on

3:35

this little button here, and then I can

3:37

just select a different trigger. So in

3:38

this case, I have call via API, but I

3:41

could also click schedule. And as you

3:42

can see here, we have this little visual

3:44

interface where I can select hourly,

3:45

daily, and so on and so forth. Because

3:47

this is going to be an email triage

3:48

flow, I'm probably going to want to run

3:49

this pretty early before I wake up. I'm

3:51

waking up around 5:20 these days, so

3:53

it'll probably be about 5:10. And what I

3:55

should note is you can add multiple of

3:56

these triggers at any point in time. So

3:58

now, after saving, if I go back to

4:00

routines, you'll see there's a little

4:02

calendar feature here, and you can now

4:03

see that there's a daily mailbox summary

4:06

plus draft open at 5:10 as well as a

4:08

couple of other ones that I was playing

4:09

around with earlier today. You don't

4:10

have to pay attention to those. What

4:12

that means is without me having to do

4:13

anything, the exact same exercise is

4:15

going to occur. The agent is going to

4:17

check my mailbox using the Gmail

4:19

connector. It's going to run through

4:20

whatever SOP or logic that I gave it,

4:22

which in this case was just, "Hey, go

4:24

see if we had any previous email

4:25

communicate." And then it's going to

4:26

draft up the message and send it to me

4:28

in Slack. Okay, what I have here is

4:30

another routine. This one takes a

4:32

transcript that is generated using

4:34

Fireflies, which is a transcript service

4:36

that joins your call, listens to what

4:38

you say, and then basically stores it

4:40

all as text. And essentially, what I'm

4:42

going to do just for the purposes of

4:43

this demo is I'm going to do it via API

4:45

request, but I'm going to show you guys

4:47

as well how you can hook it up via

4:48

webhooks, which just fires

4:49

automatically. So I have my transcript

4:51

to proposal routine right over here, and

4:53

I could click run now, but there's no

4:54

actual transcript. The instructions here

4:56

are I give you a transcript via API

4:58

call. So what I'm going to do is I'm

4:59

going to open up a Claude Code, and

5:01

since I'm just going to have it send an

5:03

API request using

5:05

this transcript.

5:07

And then I'm just going to press enter.

5:09

And I'm not going to expand this because

5:10

I've just hardcoded an API key for demo

5:13

purposes, but you can see here what it's

5:14

going to start off by doing is basically

5:16

sending that curl request as a text

5:19

payload and then also generating the

5:21

proposal entirely on its own. And when

5:23

this occurs, it's actually going to

5:24

trigger that routine.

5:26

I guess I already just leaked my API

5:28

key, whatever the hell.

5:29

It's going to fire that routine, which

5:31

it's done right over here, and now it's

5:33

actually running in the cloud with the

5:34

full transcript and whatever the deal

5:36

terms are of the, you know,

5:37

conversation. And so I can actually open

5:39

this up, and then I can see what's going

5:41

on. So you can see, "I give you a

5:42

transcript via API call. I want you to

5:44

create a full proposal using one of my

5:46

other AI agents in a managed session."

5:48

And this is where managed sessions come

5:50

in handy, which if you guys didn't know

5:51

is just a similar way that you could set

5:53

up different endpoints out there that

5:55

allow AI to basically create an an

5:58

interconnected network of managed agents

6:00

or agents that all have their own siloed

6:02

containers both for security and then

6:04

safety purposes. So it's just verifying

6:06

that we actually have what we need for

6:07

Slack, and now it's going to go ahead

6:09

and generate a high-quality proposal.

6:11

Now, I just want to be clear about what

6:12

problem exactly this solves. The old way

6:15

of designing automations typically

6:17

involved some sort of event or outside

6:20

trigger like a schedule, maybe something

6:22

that occurred, you know, at 5:00 a.m.

6:23

every morning or whatever.

6:25

That event would be fed into a platform

6:27

like n8n, which was responsible for

6:30

basically proceeding through a chain of

6:32

logic that you created. You know, it'd

6:34

be a bunch of drag-and-drop nodes that

6:37

you put together to do some function. In

6:39

this case, this is a Reddit scraper for

6:41

a live build that I did for one of my

6:42

communities. And see, this whole section

6:45

in the middle here, this logic, this can

6:47

take a fair amount of time to put

6:48

together. You know, you have to drag and

6:49

drop all these nodes, you have to set up

6:51

all of these credentials, you have to do

6:52

all the authentication, you got to get

6:54

the data and and map the right variables

6:56

in the fields. This is really like where

6:57

the meat and potatoes of your work as

6:59

somebody that's looking to automate your

7:00

business um um came in.

7:03

Okay, and then from there, your n8n

7:04

system, typically it doesn't just like

7:06

work by itself. It does something to

7:08

some platform, right? So it would then

7:09

grab its output and then shove that into

7:11

Slack or maybe some sort of CRM

7:13

somewhere or whatever it is that you do,

7:15

some database. The new way is basically

7:17

the exact same thing. You have an event,

7:19

okay, and that event is either an API

7:21

call, it's a webhook, or it's some sort

7:23

of schedule. So again, you know, waking

7:25

it up at 5:00 a.m. every morning. It's

7:26

just instead of putting that into n8n

7:28

and then having to build all that stuff

7:30

yourself with those drag-and-drop nodes,

7:32

all you have to do, okay, is just give

7:34

it some natural language, which is far

7:37

easier obviously with some very

7:39

high-level instructions, and then it can

7:40

then output things as

7:42

n8n did before to, you know, some other

7:44

platform, Slack or CRM.

7:46

And so the reason why I'm equating it

7:48

like this is because routines

7:50

effectively solve that middle problem.

7:52

I've made some videos in the past to the

7:54

tune of n8n is over because XYZ thing is

7:57

now launched and it does it way better.

7:59

And you know, sometimes a specific

8:01

feature was missing that, you know, n8n

8:02

or some other no-code platform handled

8:05

that didn't make it an exactly

8:06

one-to-one overlap. But routines are

8:08

Claude's literal one-to-one overlap. It

8:10

replaces the exact same functionality.

8:12

It's capable of scheduling, it's capable

8:13

of orchestrating workflows, and so on

8:15

and so forth. And it really is like the

8:17

next step in agentic execution of

8:20

knowledge tasks. When all this stuff

8:21

finishes, I actually have the proposal

8:23

right over here. I can take a look at

8:24

that. Click this button to open it in

8:26

new page, and you can see I now have the

8:28

proposal, which is just part of the

8:30

template of the managed session that

8:31

generates this thing.

8:32

Pull out all of the data. So, you know,

8:34

we're we're an AI content writing

8:36

marketplace that matches business

8:37

clients with vetted freelancer writers.

8:39

And then this is Left Click, which, you

8:41

know, is pitching them. And so these are

8:42

the sorts of proposals that we actually

8:43

send day-to-day. And hopefully you guys

8:45

see how easy it is to actually like

8:46

integrate a routine or some sort of API

8:50

event-based system into your

8:52

infrastructure like 2 minutes.

8:54

Uh boy, have we come a long way from

8:56

back in the day when me designing that

8:58

proposal generator would have taken like

8:59

2 and 1/2 to 3 hours. The current UX for

9:02

routines looks like this. And in order

9:03

to get there, all you have to do is type

9:05

in claude.ai/code/routines.

9:09

You'll be given a page that looks

9:10

something like this where you can see

9:12

all routines stored in a grid-like

9:13

pattern over here alongside their title,

9:16

the time that they are running, and then

9:18

also the the next scheduled run, as well

9:20

as what looks like some category

9:22

listing, which they provide with or

9:23

without you. There's also a calendar

9:25

view, and so you can see the actual ones

9:27

that are going to be executed and

9:28

exactly which times they're going to be

9:30

executed. And so here I created a couple

9:32

of demos, daily unread mention scan,

9:34

morning inbox drafts, and news video

9:35

ideas. You can see that today, this

9:37

one's going to execute at 6:51, this one

9:40

at 7:43, and this one at 8:17. So you

9:42

also get a little bit of a visual aspect

9:44

there. When you click new routine up in

9:46

the top right, it'll immediately ask you

9:47

for some information like the name. So

9:50

I'm just going to provide a quick demo

9:51

here called mailbox drafter. Next, you

9:54

can describe what Claude should do in

9:55

each session. So this is where you

9:56

basically give it a prompt. And this

9:58

prompt is essentially analogous to a

10:00

skill. Just like in a skill, you have a

10:02

standardized list of steps that you need

10:04

the model to take in order to perform

10:05

some economically valuable piece of work

10:07

for you. Um so, too should you construct

10:10

this routine description like a list of

10:13

SOPs or steps to allow it to perform uh

10:16

tasks for you. It's just my

10:17

recommendation here is be a little bit

10:19

more precise than you were probably in

10:21

your skill because whereas in your

10:23

skill, you could modify things on the

10:26

fly, change your trajectory of the task,

10:27

and so on and so forth. Here, the

10:29

routine occurs entirely hands-off,

10:31

meaning that it basically needs to work

10:32

almost perfectly every time. So,

10:35

decrease the total scope of possible

10:37

mess-ups and screw-ups that it could

10:38

make by being as clear and precise as

10:40

possible. But for instance, I wrote pull

10:42

all of my unreads using the provided

10:44

Gmail connector, more on that in a sec.

10:46

For each unread, check if there's any

10:47

pre-existing conversations with that

10:49

contact. If so, pull those two for

10:51

context, then draft replies based on

10:53

what you know about me and the con- text

10:55

of the task. Once done, use the Slack

10:57

connector, more on that in a sec, to

10:59

send me an update. And so, as you can

11:01

see here, um you know, you can make this

11:03

about as long or as a short as you want.

11:05

I don't believe there's a length limit.

11:07

I went and I checked just by pasting

11:08

this a bunch of times, and I couldn't

11:09

find anything. So, uh I would definitely

11:11

lean on the side of more context as

11:13

opposed to less.

11:15

From there, you can select a repository.

11:16

So, whatever repository you want, I'm

11:18

just going to say this business one. You

11:20

can select a model type. So, I'm going

11:21

to use Opus 4.61 mil. And then you can

11:24

also select which cloud environment you

11:26

want to run it in. And so, you can here

11:28

basically create a cloud environment

11:29

with a bunch of environment variables,

11:31

keys, uh you know, API credentials, and

11:34

so on and so forth as needed. So, in my

11:36

case, I'm fine with default. I'm just

11:37

going to move on. You can then select a

11:39

trigger. So, you can schedule it. You

11:41

can go via GitHub event, or you can go

11:43

via API. Now, realistically, this is

11:45

probably something you're going to want

11:46

to do on a schedule since we are just

11:47

going to be going through unreads and

11:49

then drafting. But for demonstration

11:50

purposes, I'm just going to go via API.

11:52

And the whole idea is by doing this,

11:54

I'll be able to very quickly call and

11:56

then test in another Claude Code

11:58

instance to show you guys what's

11:59

happening live. So, I'm just going to

12:01

add a trigger.

12:02

And then once we've added said trigger,

12:04

we are going to receive a little curl

12:05

request, which is a snippet of code that

12:06

you can give any model. And finally, now

12:08

we just need to add our connectors. So,

12:10

here I'm going to click add connector,

12:11

and then I'm going to connect my own

12:12

Gmail. By the way, if you don't have a

12:14

connector, just head on down to Claude

12:16

Code settings, then go to connectors

12:18

over here. Then you can actually add uh

12:20

just clicking on this little connect

12:21

button. When you do, it'll ask to

12:23

connect Claude to your Gmail account.

12:25

click continue, and then you can sign

12:26

into the particular one that you want.

12:28

So, in my case, this. I'm also going to

12:29

need one other connector, if you guys

12:31

think about it, because I'm going to

12:32

want a Slack message sent. So, here I

12:33

can use this little search bar, and then

12:35

click a plus button. Then I'll just have

12:36

to perform again some OAuth in a new

12:38

browser tab. Here, I'm going to click

12:39

allow, and just like any simple OAuth

12:42

screen, we're now going to be connected.

12:44

So, now what we can do is we can go back

12:45

to the routine, and then I can add the

12:47

connector manually. From here, you'll be

12:49

given a token. You can copy that token,

12:51

store it somewhere safe. So, that's what

12:52

I'm going to do here.

12:54

And now we basically have our skill or

12:56

our routine ready to go. Okay, and then

12:58

once you're done, just head over to the

13:00

run now in the top right-hand corner to

13:01

basically start the workflow run. And uh

13:04

we're just going to do this here using

13:05

the GUI, graphical user interface, for

13:08

testing purposes. But you'll see a new

13:09

little run just populated. So, maybe go

13:11

down here, and you'll see all we're

13:12

really doing is we're just sending it

13:14

this message.

13:15

Once it's done, it'll use the Slack

13:16

connector to send me an update. You can

13:18

see it's already starting to fire off a

13:19

tool search. So, I'll just double back

13:20

when it's done. And I should note, I

13:22

mean, I'm watching it here, but the

13:23

whole idea is that I don't even know

13:24

what this thing's going on, right? This

13:26

was triggered uh ideally on a schedule

13:28

or something like that. And I just wake

13:30

up in the morning to my Slack uh message

13:32

with a bunch of different emails and

13:34

their various drafts. If I head back

13:36

over here, you can see that we actually

13:37

have both of those fed in. Um looks like

13:40

somebody invited me for a podcast

13:41

interview, and then somebody else asked

13:43

me a couple of questions about uh a few

13:45

things here. Finally, I want to show you

13:46

guys how easy it is to convert workflows

13:48

that you built on third-party tools like

13:50

n8n, for instance, into uh routines. And

13:54

what's really cool about n8n is they

13:55

allow you just to like mouse over if you

13:57

hold shift, and then hold command C, or

13:59

just right-click and press copy. And

14:01

then now you basically have access to a

14:03

bunch of JSON. And you could tell just

14:04

by me pasting it in, this is like JSON

14:06

or the uh syntax that these nodes are

14:09

represented in if we're talking through

14:10

text. Well, anyway, if I go back to

14:12

antigravity, which contains my little

14:14

Claude Code window, and then I type in

14:16

this JSON, and then at the very top, I

14:18

say use the routine generator to turn

14:21

this n8n workflow into a routine. Okay,

14:25

I'm just going to divide this to make it

14:26

really simple. Uh what this is going to

14:28

do is use the skill that I'm giving all

14:30

of you guys out of the box to basically

14:31

turn this into a flow that we can call

14:33

just using natural language. So, I'm not

14:36

necessarily going to encourage you to

14:37

use all of your workflows or to port

14:39

them over from n8n or some other no-code

14:41

tool to uh Claude's back end. Reason

14:43

being is, you know, when you're dealing

14:45

in the domain of tokens, things are

14:46

going to be a little bit more expensive

14:47

than dealing entirely in the domain of

14:49

compute. And really, the point is not,

14:51

"Hey, just turn all your n8n or make.com

14:53

workflows into routines." The point is

14:55

more like, you know, if you have

14:56

something you can build today that

14:58

previously would have taken you a couple

14:59

of hours in n8n, might make more sense

15:01

just to one-shot it as a routine.

15:03

But um you know, what this will do

15:04

really quickly is just go ahead and do

15:06

the creation. So, as you guys can see

15:07

here, it's doing some thinking, it's

15:09

loading the routines. In this case, it's

15:10

just going to schedule one cuz I didn't

15:11

provide any context as to how I wanted

15:13

to run it.

15:14

Um but yeah, here we go. It's now going

15:15

to fetch stories from the Hacker News

15:17

Algolia API, extract the hits, format

15:19

them into a markdown report, and commit

15:21

it, which was what the actual flow was

15:23

doing. And so, just like this one here,

15:25

if I click execute workflow, this goes

15:27

through the scraper. It then generates a

15:29

bunch of hits basically from um a

15:32

website called Hacker News. Hacker News

15:34

is the source here, which in this case

15:35

is going to contain a bunch of different

15:37

um comments like this one on how

15:39

open-source AI is the path forward.

15:40

Certainly not when Claude drops a

15:42

freaking update like this. Well, the

15:43

same routine is going to work here the

15:45

exact same way. And you can see it just

15:47

had routine created and fired. Hacker

15:48

News AI stories fetch, right? What's

15:51

really cool about this is, I mean, it's

15:52

it's just so easy for me to to change

15:54

things. Um so, I mean, right now, this

15:57

is obviously going to fetch that data,

15:58

right? And you know, fetching that data

16:00

is okay. But what am I going to do with

16:01

it? It's just sort of like stuck here,

16:02

right? You know, if I were in n8n, I'd

16:04

have to modify this. Uh it'd be

16:06

significantly harder to modify this.

16:07

Here, I can literally just go

16:09

connectors, Slack. Okay, save.

16:11

I can then set it to run on, you know,

16:13

7:33 MDT or via API request, which I'm

16:17

going to click done. And now what I can

16:18

also do is I can go back here, and I can

16:20

say, "Great, update this so that it

16:22

sends me a message in Slack with the

16:25

scrape after it's done." And now in 3

16:29

seconds, you know, we can make an HTTP

16:30

request over to the routine and just

16:32

edit it on the fly for me. I don't have

16:34

to drag and drop any nodes. It's much

16:35

easier and much faster. Okay, so

16:37

hopefully you guys can see that this has

16:39

a lot of potential, and you're likely to

16:42

see larger and larger flows be passed

16:44

off to agents in this manner.

16:47

Um I didn't really give you guys an

16:49

extraordinarily comprehensive look at

16:50

all the different things you could do

16:51

with us. But just off the top of my

16:53

head, some ways that I'm implementing

16:55

this in my agency today, some ways that

16:57

I've already done so, and some ways that

16:58

I can I'm going to continue to do so

17:00

after this video,

17:01

are I'm going to replace all of my

17:02

proposal generators with these built-in

17:04

routines. I'm going to connect a couple

17:06

of additional routines so that after a

17:08

call, like a sales call with a prospect,

17:11

um I'll receive a webhook with um

17:13

essentially like a transcript. I'm going

17:15

to feed that transcript into a routine

17:16

that's going to generate an immediate

17:18

post-call email, and then uh like a

17:20

workflow diagram draft based on our

17:22

conversations that I can also pin

17:24

alongside it just for the impression of

17:26

of more effort and higher perceived

17:27

quality

17:28

uh when we send out the proposal, I'm

17:30

going to be monitoring to see if

17:31

somebody signed. When they do, it's

17:33

going to write back to another routine

17:34

via a webhook, which is going to proceed

17:36

with the next step, which is sending

17:37

them a message uh with an email with an

17:39

onboarding uh you know, calendar

17:40

notification, as well as congratulating

17:42

them and thanking them on on coming

17:43

aboard.

17:45

You guys can automate more or less all

17:46

of the non like human face-time steps in

17:49

a business right now. And it's not like

17:51

you couldn't before. It's just in order

17:52

to do it before, it was pretty

17:53

laborious, and you needed a fair amount

17:54

of know-how. Um now, as long as you

17:56

understand sort of the routine spec and

17:58

more or less what I've showed you in

17:58

this video, you guys are good to go. So,

18:01

it's an exciting time to be in AI and

18:03

automation. Hopefully you guys

18:03

appreciated this video. Looking forward

18:05

to the next one. Catch y'all on it.

Interactive Summary

This video explores Anthropic's new 'Routines' feature for Claude, which enables users to build automated agentic workflows using natural language. The presenter demonstrates how routines can replace traditional no-code platforms like n8n by scheduling tasks, handling webhooks, and using API triggers. Key use cases discussed include automating email triage, transcript-to-proposal generation, and integrating connectors like Gmail and Slack to create end-to-end business automations.

Suggested questions

3 ready-made prompts