OriginateAutomation with Claude Code · Course notes
Course notes

Automation with Claude Code

Everything from the session in one place, end to end: installing the app, keeping API keys safe, what APIs and MCPs are, and how we built a weekly AI agent that keeps an eye on our competitors.

SessionNatWest, November 2026
Presented byAaron Kennedy, Originate
How to use these notesFollow them in order, or dip in when a word is new.

The route through these notes

01

Install the app

Originate Terminal and Claude Code

02

Keep keys safe

Where they live and what to do if one leaks

03

Learn the ideas

APIs, MCPs, GitHub, Cloudflare and zones

04

Plan and get keys

Agree the job, then make each key

05

Build and test

A practice issue, then let the schedule take over

06

Use the skill

Run the same stages for your own automation

What you need

A computer

Mac or Windows

An Apple Silicon Mac (M1 or later) on macOS 13 or later, or a PC on Windows 10 version 1809 or later. On an Intel Mac, use the Claude desktop app, because Originate Terminal doesn’t have an Intel version.

A paid Claude plan

Pro or above

Claude Code comes with Pro, Max, Ultra, Team and Enterprise plans. The free plan doesn’t include it.

A Cloudflare account

Workers Paid

US$5 a month. The free plan stops a job after 10 milliseconds of computing, which is too short for this one.

You’ll also need accounts with the services your automation uses. For ours, that’s OpenRouter, Apollo and Resend, and 2. API keys we need lists what each one costs.

Ways to use Claude Code

Claude Code runs in several places, all on the same engine, so your work carries across. We use Originate Terminal, and everything in these notes is shown there.

WhereWhat it isBest for
Originate TerminalOur free, open-source app. Your projects sit in a sidebar, with Claude Code and a browser side by side.Everything in these notes. It’s what we use
Claude desktop appThe Code tab in the Claude app, with nothing else to install.A quick first try
VS CodeA panel inside the VS Code editor, showing Claude’s changes inline.People who already use VS Code
Web and phoneClaude Code at claude.ai/code or in the Claude app. It runs on Anthropic’s computers.Long tasks you want to check on later
A terminalThe original command-line version, for developers.People who are comfortable typing commands

Originate Terminal

Our free, open-source app for working with Claude Code. Each job gets its own project and folder, with a browser beside the conversation.

On a Mac

Install

  1. Go to the latest release and download the .dmg. It runs on Apple Silicon Macs (M1 and later).
  2. Open it and drag Originate Terminal into Applications.
  3. Open it. Apple will block it the first time, because the app isn’t notarised yet. Open the Terminal app, paste this line once, press Return, then open it again.
xattr -cr "/Applications/Originate Terminal.app"
On Windows

Install

  1. Go to the latest release and download the file ending setup.exe.
  2. Run it. If SmartScreen appears, click More info, then Run anyway.

Add Claude Code

The first time it opens, the app asks you to choose your code folder, then checks for Claude Code. If it’s missing, open a new tab, paste the line for your computer, press Return and restart the app.

Mac
curl -fsSL https://claude.ai/install.sh | bash
Windows
irm https://claude.ai/install.ps1 | iex
Those are the only lines you paste

After this you talk to Claude in plain English, and Claude handles anything technical.

Start a project

  1. Click + next to Projects, choose New Folder, call it automations and click Open.
  2. Click + next to automations to add a folder for your job, such as rival-rag, then click it to open a tab.
  3. Type claude and press Return. The first time, a page opens so you can sign in to your Claude account.
Originate
rival-rag+

% claude

✻ Welcome to Claude Code

●What would you like to build?

New project from folder

Documents

Code

automations

automations
New FolderOpen

The code is public at github.com/Originate-Group/originate-terminal, under the MIT licence.

Permissions

Claude Code can read files, change them and run things on your computer. The mode you choose decides how much it does before checking with you.

Originate
rival-rag+
> Tidy up this folder

●I’ll remove the old drafts first.

Delete old-notes.txt?❯ 1. Yes2. No, tell Claude what to do instead

⎿ Done, and you stayed in charge of each step

ModeWhat it doesUse it for
PlanReads and explores, then shows you a plan before it changes anything.The start of any job
ManualAsks before it edits a file, runs something or goes online.Learning, and anything you’re unsure about
Accept editsWrites files without asking, and still asks about other actions.Building while you watch
AutoA second model checks each action and stops anything risky.Everyday work, once you’re comfortable

New sessions in a terminal start in Auto on current versions of Claude Code, so Claude won’t stop to ask about routine steps. To approve each step yourself, as in our pictures, press Shift and Tab to switch to Manual. The line under the prompt shows which mode you’re in. If you’re asked something you don’t understand, ask Claude to explain it before you answer.

Keeping API keys safe

An API key can spend your money and read your data, so every key gets a home, a limit and a way to be replaced. Claude only needs a key’s name, and it never needs to see the value.

Password managerThe master copy
Worker secretsLocked away on Cloudflare
Claude chatNever
Your codeNever
Email or a shared documentNever
Where a key can go
If Claude ever asks you to paste a key into the chat

Say no and ask for another way. Anything typed into the chat is kept in the session’s history.

Limit each key

ServiceHow to limit it
CloudflareOnly the permissions the job needs, one account and one domain. See Suggested Cloudflare setup
OpenRouterSet a credit limit. Once it’s used up, requests stop until you raise it
ApolloTick only the endpoints the job needs, and leave the master key toggle off
ResendSending access, limited to one domain

If a key leaks

  1. Delete it at the service, which stops it working straight away.
  2. Make a new one and save it in your password manager.
  3. Replace it on Cloudflare’s secrets page.
  4. Check the service’s usage page for anything you don’t recognise.
Originate
rival-rag+
> I think I pasted a key somewhere I shouldn’t have

●Delete it at the service now, then make a new one and replace it on Cloudflare. I’ve opened the page.

Your service, API keys
Your service
API keys
rival-rag…a1b2Delete

Deleted. That key stopped working straight away.

rival-rag 2…c3d4Copied

What is automation?

Automation is getting a computer to do a job you’d otherwise do by hand, starting at a set time or when something happens.

Key idea

What is automation?

Automation is getting a computer to do a job you’d otherwise do by hand, starting at a set time or when something happens.

By hand
You remember it’s Monday
You check each competitor
You search for their news
You write it all up
Automated
WhenMonday at 7am, or the moment an email arrives
WhatThe same job, done for you
ResultThe news in your inbox
Send an invoice reminder when a payment is lateAdd an enquiry to your CRM as soon as the email comes inEmail your team a report each Monday

What is an agent?

An agent is an AI model that can use tools and decide its own next step, working towards a goal until it’s done. Claude Code is an agent.

Key idea

What is an agent?

An agent is an AI model that can use tools and decide its own next step, working towards a goal until it’s done. Claude Code is an agent.

The goalFind out what this competitor did this week
ThinkWhat should I do next?
ActUse a tool: search, read, run
CheckDid that work? Am I done?

↻ Repeats until the goal is met

What it did

Reads their website and spots a new price

Opens the prices page to check it

Searches the news for more

Done: files the story, with its source

Script and agentic automation

Both run by themselves. A script follows fixed steps, and an agent is given a goal and works out the steps each time. An automation doesn’t have to use AI, and many jobs can be done entirely by script.

Key idea

Script and agentic automation

An automation doesn’t have to use AI. Many jobs can be done entirely by script.

Script automation

Follows the same steps, in the same order, every time.

“Every Monday, test these websites and email me the slow ones”

Python# Every Monday, the same stepsfor site in websites: score = pagespeed(site) if score < 50: slow.append(site)email_me(slow)
CostSmall and predictableGood forJobs that repeat exactly

Agentic automation

Gets a goal, and decides the steps as it goes.

“Find out what my competitors did this week and what it means for sales”

The AI, talking to itself

✻Home page first. What do they sell?

✻They list prices. I’ll open that page.

✻Is there any news? I’ll try their blog.

✻A new article, dated last week. Worth a story.

✻Can I prove it? I’ll quote the page.

✻That one’s covered. Who’s next?

CostVaries with each runGood forJobs that need judgement
All script, no AIOur website scanner

Checks a website’s PHP, WordPress and plugin versions against public lists, then emails a report.

Script with AI stepsProspect Scout

Finds slow websites every Monday. The steps never change, and AI only searches and writes them up.

AgenticThe Rival Rag

Gets one goal, then chooses what to read, what to search and when to stop.

Our website scanner is entirely script, with no AI in it. Prospect Scout, our weekly job that finds slow websites, is a fixed script with two AI steps. The Rival Rag is agentic: it gets a goal and chooses each step itself, and OpenRouter is how we bring in the model that does the choosing. Start with a script when the job is the same every time, and use an agent when the job needs judgement.

Claude desktop

You can do some of this in the Claude desktop app, with no code. A scheduled task gives Claude the same instructions each time, so it’s agentic automation.

ChatCode

New session

Scheduled

Customise

Scheduled tasksNew task
monday-enquiries
Read this week’s enquiries and draft a reply to each
Weekly, Monday, 08:00
Create
With the Xero connector

Send this invoice to Example Legal

The Xero connector is read only, so I can look at your invoices, but I can’t create or send them.

  1. In the Code tab, click Scheduled in the sidebar or its More menu, then New task. If a menu opens, choose Set up manually.
  2. Give it a name, write what Claude should do, pick a folder and choose how often it runs.
  3. Click Create, then Run now to try it.

You can also just ask: “Set up a task that reads this week’s enquiries every Monday at 8am and drafts a reply to each.”

Connectors are quick to add, and they have limits. The Xero connector in Claude desktop is read only, so Claude can look at your invoices but can’t create or send them. Why we use Claude Code shows the difference.

TypeWhere it runsGood to know
Local taskOn your computer, with your files and toolsOnly runs while the app is open and your computer is awake
Cloud taskOn Anthropic’s computersRuns even when your computer is off, and can’t see your local files
An automation on CloudflareOn Cloudflare’s computersWhat we built. Runs with your computer off, with limits you set on what it can spend

Why we use Claude Code

The basic integrations are a quick start. Going through Claude Code and the service’s API gives us much more control, and Xero is a good example.

Key idea

Why we use Claude Code

The basic integrations are a quick start. Going through Claude Code and the service’s API gives us much more control, and Xero is a good example.

XeroClaude desktop connectorClaude Code with the Xero API
Read invoices✓✓
Create and edit invoices✗✓
Send invoices✗✓

A connector can only do what its makers built. With Claude Code and an API, we choose what it can do, and we can have it ask before anything goes out.

Giving Claude more reach means taking more care. Limit each key to what the job needs, and keep Claude asking before anything goes out.

What is an API?

An API is an encrypted way to safely push or pull data from one program to another. It works like a cash machine, where you press a button and get what you asked for without ever going into the vault.

Key idea

What is an API?

An API is an encrypted way to safely push or pull data from one program to another. It works like a cash machine, where you press a button and get what you asked for without ever going into the vault.

Please take your cash
CashBalance
At a cash machine
With an API
Your card and PIN=
The API keyProves it’s you
The buttons on the screen=
The APIWhat you’re allowed to ask for
The bank’s systems=
The serviceDoes the work, out of sight
Your cash comes out=
The answerComes straight back
Your daily limit=
The key’s limitStops a mistake costing too much

For our job, the program asking is The Rival Rag, and one of the services answering is OpenRouter. Nearly every service you use has an API, including Stripe, Xero and Cloudflare, which is how Claude can connect them together for you.

API keys

An API key is a password for a program. It tells the service who’s asking and what they’re allowed to do.

Your jobSends a request and its key
KeyAnswer
The serviceChecks who’s asking
The right key
Here’s your data
An old key
Refused. Nothing comes back
Example

Most services let you choose what a key can do, so give each one the least it needs for its job. Some services call them tokens, and they work the same way.

Restricted keys and scopes

A scope is one thing a key is allowed to do. A restricted key has only the scopes its job needs, so a leaked key can’t do much harm. It’s like a card that can check your balance but can’t take out cash.

Key idea

Restricted keys and scopes

A scope is one thing a key is allowed to do. A restricted key has only the scopes its job needs, so a leaked key can’t do much harm. It’s like a card that can check your balance but can’t take out cash.

Restricted key
Look up companies and people
Send email from one domain
Change your account settings
Delete your data
Spend without a limit
How to restrict each one
ResendSending access, one domain
ApolloOnly the lookups it needs, master key off
OpenRouterA credit limit of US$5
CloudflareWorkers and one domain

Services use different names for this, including permissions, restrictions and endpoints. When you make a key, look for that section first and turn on only what the job needs. If the job later gets refused, add the one scope it was missing.

What is an MCP?

An MCP is a plug that connects a service to Claude. Plug one in, sign in once, and you can ask Claude about that service while you chat.

Key idea

What is an MCP?

An MCP is a plug that connects a service to Claude. Plug one in, sign in once, and you can ask Claude about that service while you chat.

Plug in a service
Apollo
Xero
Google Drive
Claude
Now you can ask

“Who runs this company?”

“Which invoices are overdue?”

“Find last month’s report”

An MCP suits you working with Claude. A job that runs at 7am with nobody signed in uses an API key.

To add one, ask Claude “What can you connect to?” or “Connect Apollo”. You sign in on the service’s own page, so there’s no key to copy.

GitHub and the GitHub CLI

GitHub is where code is kept online, with every version saved. The GitHub CLI is GitHub’s own tool, which lets Claude Code use GitHub for you.

Originate
rival-rag+
> Save this to GitHub as a private repository

●I’ll use the GitHub CLI. A page will open so you can sign in once.

⎿ Signed in to GitHub

⎿ Saved: rival-rag

> Add the change we just made

⎿ Saved, and the last version is still there if you need it

github.com/your-name/rival-rag

your-name / rival-rag Private

rival-rag

Every saved version of the job.

Add a fourth rival to the listSaved just now
First version of The Rival RagSaved 2 minutes ago
Your work is safe

Every version

You can go back to any earlier version, and nothing is lost if your laptop dies.

Private or public

Your choice

Start private. Originate Terminal and the create-automation skill are public, so anyone can use them.

Plain English

Ask to save

Say “save this to GitHub”. Claude can set up the GitHub CLI, and you sign in once on a web page.

Before anything goes public

Ask Claude to check it for keys and private details first. The create-automation skill includes a scan that does this.

Scheduled jobs

A scheduled job runs on its own at set times, such as our weekly competitor newspaper. Most systems write the timing as five values, called a cron expression. You won’t need to write one, because Claude does it.

0minuteat minute 0
7hourof 7am
*day of monthon any date
*monthin any month
1day of weekon a Monday

0 7 * * 1 means every Monday at 7am.

Times are in UTC, so 7am UTC is 8am during British Summer Time.

A job doesn’t have to wait for a set time. It can also start the moment something happens, such as an email arriving in your inbox. Cloudflare can do this for addresses on your own domain, using Email Workers, so tell Claude what should set the job off when you plan it.

Cloudflare and Workers

We make a Cloudflare Worker, which is where the job lives. It holds the code and the API keys, and it runs on Cloudflare’s computers, so your laptop can be off.

Cloudflare Workerrival-rag
The codeWhat Claude wrote: the job, step by step
The API keysStored as Worker secrets, locked away so nobody can read them back
The scheduleEvery Monday at 7am, with your computer off

Worker or container

Cloudflare WorkerCloudflare Container
What it isA small program that starts when it’s needed, does its job and stopsA full computer system in a sealed box, started by a Worker
Good forCalling APIs, sending email and short scheduled jobs, like oursJobs that need their own software, such as a real web browser
Which to pickStart hereOnly when a Worker can’t do the job
Where it lives

Worker or container

Fits a Worker

The Rival Rag

Asks other services to do the work, then passes on the answers.

WorkerThe codeThe keys
OpenRouterBrings in agentic AI
WebsitesPublic pages it reads
ApolloFinds the job adverts
ResendSends the email
Fits a container

Podcast clip maker

Cuts a recording into captioned clips, so it needs video software inside the box.

ContainerThe codeThe keysVideo softwareCaptions software

Clips ready, and emailed to you

If the job only calls other services, use a Worker. If it needs its own software in the box, use a container.

Connecting Claude to Cloudflare

The simplest way is to sign in. Claude opens a page, you click Allow, and that’s it.

Originate
rival-rag+

●I need to sign in to Cloudflare. I’ve opened the page beside us. Please click Allow.

⎿ Signed in to Cloudflare

dash.cloudflare.com/oauth2/auth

You can also make an API token, which lets you choose exactly what Claude can do. Suggested Cloudflare setup shows the permissions and zones to begin with.

Cloudflare permissions

Every permission has three parts: what it applies to (your account, a zone or your user), the area, and a level. Read lets a token look, and Edit lets it make changes. A zone is one domain on Cloudflare, with its DNS records and settings.

Originate
rival-rag+
> What does this permission mean?

●Each one has three parts: what it applies to, the area, and whether it can only look or can also change things.

dash.cloudflare.com/profile/api-tokens
CloudflareAPI Tokens
Permissions
Applies toAccount
AreaWorkers Scripts
LevelEdit

The least each job needs

JobPermissionsApplies to
Put a Worker on workers.devAccount · Workers Scripts · EditYour account
Put your site on your own domainAccount · Workers Scripts · Edit to attach it, and Zone · Zone · Read to find your domainYour account and that zone
Run a weekly jobNothing extra. Account · Workers Scripts · Edit covers cron triggers.Your account
Store files or dataAccount · Workers R2 Storage · Edit for files, Account · Workers KV Storage · Edit or Account · D1 · Edit for dataYour account
Change DNS recordsZone · DNS · EditThat zone only
Clear the cacheZone · Cache PurgeThat zone only
Read traffic numbersZone · Analytics · ReadThat zone only
Add a redirectZone · Single Redirect · EditThat zone only

Zone permissions

PermissionRead lets the tokenEdit lets the token
ZoneSee the domain and whether it’s active. Claude needs this to look up your domain’s zone ID.Manage the zone itself. A deploy never needs this.
DNSList the DNS records.Add, change and delete records, including the MX records your email depends on.
Workers RoutesSee which Workers run on the domain.Add and remove routes, which run a Worker on part of your domain.
Zone SettingsSee settings such as Always Use HTTPS.Change those settings.
SSL and CertificatesSee the SSL settings and certificates.Change SSL settings and manage certificates.
Cache PurgeThis one has a single level.Clear Cloudflare’s saved copies of your pages, so visitors get the new version straight away.
AnalyticsRead traffic and visitor numbers.There’s no Edit level.
Single RedirectSee your redirects.Add and change redirects, such as sending an old page’s address to a new one.
Email Routing RulesSee where forwarded email goes.Change where it goes.
LogsRead request logs.Set up log exports with Logpush.

Suggested Cloudflare setup

Begin with a token that can run Workers and can only look at one low-stakes domain. You can add more later, one permission at a time.

dash.cloudflare.com/profile/api-tokens
CloudflareCreate token
AccountWorkers ScriptsEdit
AccountWorkers KV StorageEdit
AccountWorkers TailRead
AccountAccount SettingsRead
UserUser DetailsRead
UserMembershipsRead
ZoneZoneRead
ZoneDNSRead
Zone ResourcesSpecific zonespare-domain.co.uk
  1. Sign in at dash.cloudflare.com, then open My Profile, API Tokens, Create Token.
  2. Next to Edit Cloudflare Workers, click Use template, then adjust the permissions to match the list above.
  3. Under Zone Resources, choose Specific zone and your domain. Under Account Resources, choose your account.
  4. Add an end date under TTL while you’re testing, then click Continue to summary and Create Token.
  5. Copy it into your password manager, because Cloudflare only shows it once. Then ask Claude how to add it safely, and don’t paste it into the chat.

Which zones to begin with

Start here

No zone at all

A Worker on its free workers.dev address needs no zone. The Rival Rag runs this way.

Next

One spare domain

Choose Specific zone and a domain nothing important depends on. Give it Read access first, then DNS Edit when you’re ready to practise.

Later

Your main domain

Add it once you’ve done the job on the spare one. Your email depends on its DNS records, so give DNS Edit an end date.

Leave these alone

All zones reaches every domain you can get to, including clients’. The Global API Key on your profile page can do almost anything. Neither is needed here.

Domains and DNS

A domain is your website’s name. DNS is the address book that turns that name into the place your website and email live.

Your browserWants yourdomain.co.uk
Where is it?
DNSThe address book
Here it is
Your websiteWhere it lives
Example
RecordWhat it does
A and AAAAPoint a domain at a server’s address.
CNAMEPoints one name at another, such as www at your main domain.
MXTells the world where your email goes. Change it carelessly and your email stops.
TXTProves you own the domain and protects your email, with SPF, DKIM and DMARC.

The automation

The Rival Rag is the automation we decided to create. Every Monday an AI agent finds out what our competitors did that week and what it means for our sales, then emails us the news as a tabloid newspaper.

mail.example.com
Inbox1 new
The Rival Rag
THE RIVAL RAG: Counter attack!Anytown Kitchens has knocked £200 off fitting
Sam Example
Re: Kitchen quoteThanks for this. We’d like to go ahead with
Accounts
Invoice 1042 paidPayment received, thank you
Sample Supplies
Your worktop orderDelivery is booked for Wednesday
Your bank
Your statement is readyYour November statement is ready to view

No email selected

THE RIVAL RAG: Counter attack!

The Rival Rag <rag@yourdomain.co.uk>

To Aaron Kennedy · Monday 07:02

The Rival Rag
3 rivals checked · 16 pages read · 7 searches · 2 stories
Price watch

Counter attack!

Anytown Kitchens has knocked £200 off fitting and is shouting about it on its home page. The offer runs to the end of the month.

mail.example.com
No. 1 · Monday 9 NovemberCost to make: 72 US cents
The Rival Rag
3 rivals checked · 16 pages read · 7 searches · 2 stories
Price watch

Counter attack!

Anytown Kitchens has knocked £200 off fitting and is shouting about it on its home page. The offer runs to the end of the month, so expect shoppers to wave it at you.

On their site now · Read it at anytownkitchens.example

Your move: You’ll hear this price on calls this week. Lead with your ten-year guarantee and ask what theirs covers.
Now hiring

Hired hands

Sample & Sons is advertising for three fitters, so it’s either busy or growing. Read the advert

The sales desk

1. “Ask what the guarantee covers before you compare prices.”

2. “We can start this month, while others are busy.”

Rival weatherAnytown Kitchens StormySample & Sons ChangeableExample Interiors Dead calm

It only reads public pages and never contacts anyone. Every story links to its source and has to show its proof, and the headlines are for fun. This example uses made-up businesses.

The real issue on the slides

The issue we showed in the session is real. We pointed the agent at Wix and told it to stick to AI news. It took 11 steps and 53 seconds, read 8 pages, ran 3 searches and cost 42 US cents. The fact check refused one of its stories, and the agent fixed it and filed it again.

Why it’s agentic

A script needs every step written out in advance. The agent gets the goal and works out the steps, so each competitor gets a different route. In our first full issue it found one rival’s updates page and followed up two launches, saw that another’s newest blog post was from 2025 and moved on, and reported that a third blocked most of its pages instead of guessing.

How it breaks down

We use Claude Code to write it. The rest runs online, like a small newsroom, and OpenRouter is there because it’s agentic.

The buildingCloudflare

Opens every Monday at 7am, with our computer off

The reportersIts tools

Search the web, read pages and compare with last week

The contacts bookApollo

Competitors’ staff numbers and job adverts

The editorOpenRouter

One API for all the AI models, and how we bring in agentic AI. It decides what to chase next

The lawyerThe guardrails

Refuse any story without proof, and stop it at its limits

The archiveIts memory

Last week’s pages and stories

The paper roundResend

Drops the paper in your inbox

The Rival Rag
Counter attack!

How it all pulls together

This is the design of the automation: what sets it off, the agent choosing its next step, the tools it can pick from, the guardrails, and where the results go.

CloudflareMonday, 7am
Agentic AI, via OpenRouterChooses its next step
ToolSearch the web
ToolRead a page
ToolCompare last week
Tool, using ApolloStaff and job adverts
Guardrails passedStory goes in the paper
The Rival RagLays out the tabloid
ResendEmail you the paper
CloudflareRemember this week
Passes the guardrails?
YesNo, try again↻ Repeats until every rival is coveredIt picks a tool at each stepWhen it’s finished

✓ Ready before you’ve had your coffee, and your computer can stay off

1. Planning

We describe the job in plain English, the way we’d brief a colleague. Claude asks what it needs to know, then writes the plan as a short document for us to approve. Changing a plan takes seconds, so this is where we get the job right.

Originate
rival-rag+
> Every Monday, find out what my competitors did that week and what it means for my sales. Send it to me as a fun tabloid newspaper.

●Which competitors should I keep an eye on?

> Anytown Kitchens, Sample & Sons and Example Interiors

●What should it never do?

> Make anything up. Every story needs a source.
our-brief.md
What we want
GoalWhat each competitor did this week
Look atTheir websites, the news and their job adverts
Work outWhat it means for our sales
WriteA tabloid newspaper, with a source for every story
Tell meOne email every Monday morning

Using the create-automation skill, Claude asks these questions for you. Or press Shift and Tab until you see plan mode, then paste this with your own details filled in:

Every Monday at 7am, run an agent that finds out what these competitors did that week and what it means for my sales: [YOUR COMPETITORS]. My business is [WHAT YOU SELL, AND WHO TO]. Give the agent tools to search the web, read public pages, compare a page with last week's copy and look up job adverts on Apollo, and let it choose its own steps. Refuse any story unless a line from the page it cites proves it. Send me the result as a fun tabloid newspaper through Resend, with a source link on every story and a suggestion for what to say on sales calls. Limit each run to 45 steps and US$1.50. Give me a test page with a practice issue that emails nothing and remembers nothing. Plan only, no code yet. List every account and API key you need, where I get each one, what it costs and the least access it needs. Never ask me to paste a key into this chat.

The plan

Originate
rival-rag+

✻ Stage 1 of 5: Plan

●Here’s the plan. Nothing gets built until you approve it.

Approve this plan?❯ 1. Yes2. Keep planning

⎿ Plan approved

plan.md
The Rival Rag plan
ScheduleEvery Monday at 7am
GoalWhat each rival did, and what it means for sales
The agent choosesWhat to read, what to search and when to stop
GuardrailsNo story unless the proof is on a page it has read
Limit45 steps and US$1.50 a run
Practice issueEmails nothing and remembers nothing
It neverContacts anyone, or goes past public pages

Decisions we made

QuestionWhat we chose
Who does it keep an eye on?A short list of rivals in one settings file, which we can change at any time
Can it stick to one topic?Yes. One setting tells it what to concentrate on, such as AI news, and it skips everything else
How does it choose what to check?It decides for itself, but it has to do a minimum number of searches and page reads before it can finish. We added that rule after its first try stopped at two steps
How do we stop it making things up?Code checks each story against the page it cites, and refuses it if the quoted line or any of its numbers aren’t there. The wording can still be wrong, so follow the link before you quote it
What stops it running away?45 steps and US$1.50 a run, and then it wraps up with what it has already proved
Why a tabloid?A competitor report is easy to ignore. A cheeky newspaper gets opened, and the useful part sits under each story
Who acts on it?You. It suggests what to say, and you decide

2. API keys we need

Four keys sit at the heart of what we do. This job only adds a password you choose, and yours may need more.

The four we use on everything
CloudflarePuts the job live and runs it on a scheduleUS$5 a month
OpenRouterOne API for all the AI models, and how we bring in agentic AIUS$0.40 to US$1 an issue so far
ApolloLooks up companies and the people in themCredits for each lookup
ResendSends email from your own domainOne email a week
Specific to this automation
Your rival listWho the agent keeps an eye onFree
Its memoryCloudflare storage for last week’s pages, with no extra keyIncluded
A password you chooseLets only you start a run by handFree
Why not use an MCP here?

An MCP signs in as you, which suits a session you’re sitting in. A scheduled job runs on Cloudflare with nobody signed in, so it calls each API with a key.

What you can build

With Cloudflare, OpenRouter, Apollo and Resend, you can create more or less anything.

CloudflareRuns it, on any schedule
OpenRouterOne API for all the AI models, and how we bring in agentic AI
ApolloKnows the companies and the people
ResendTells you, or anyone you choose
A list of new prospects every MondayA morning summary of every new enquiryA tabloid about your competitors every MondayA reminder when a customer goes quietA report for your team, written and sent for you

3. How we get them

Each service has a page for making a key. We make one, limit it and save a copy in a password manager, because many services only show a key once.

resend.com/api-keys
Cloudflare
Create a key
Edit Cloudflare Workers
Your account and one domain only ✓
Key created
••••••••••••••••••••••Copied
OpenRouter
Create a key
rival-rag
Credit limit: US$5 ✓
Key created
••••••••••••••••••••••Copied
Apollo
Create a key
People and organisation lookups
Master key: off ✓
Key created
••••••••••••••••••••••Copied
Resend
Create a key
Sending access
One domain only ✓
Key created
••••••••••••••••••••••Copied
ServiceWhere to get itLimit it to
CloudflareSign in when Claude asks, or make a token under My Profile, API TokensYour account and one domain
OpenRouteropenrouter.ai/keysA credit limit, such as US$5
ApolloSettings, Integrations, API Keys, Create new keyOnly the people and organisation endpoints, with master key off
ResendVerify your domain, then resend.com/api-keysSending access, one domain
Your passwordMake up a long one, or ask Claude to suggest oneKeep it in your password manager

4. Adding the keys

You add each key yourself on Cloudflare’s page, so it goes straight to where the job needs it and Claude never sees it. Cloudflare calls these Worker secrets.

Originate
rival-rag+

✻ Stage 3 of 5: Add keys

●I’ve opened Cloudflare’s secrets page for you. Paste each key there, and I’ll never see it.

⎿ All four added

●Each key is locked away, and even you can’t read it back. Keep a copy in your password manager.

dash.cloudflare.com
Cloudflarerival-rag · Settings
Variables and Secrets
OPENROUTER_API_KEYSecret, value hidden
APOLLO_API_KEYSecret, value hidden
RUN_TOKENSecret, value hidden
Secret
RESEND_API_KEY
••••••••••••••••••••
Deploy
RESEND_API_KEYSecret, value hidden
Add
  1. Claude puts a blank starter live on Cloudflare, so there’s somewhere to keep the keys, and opens the page for you.
  2. Under Variables and Secrets, click Add and choose Secret.
  3. Type the name Claude gave you and paste the key. Click Add variable for the next one.
  4. Click Deploy. Nobody can read a secret back after this, so keep your copy in a password manager.
  5. On the job’s test page, enter your password and click Check my keys.
Why we check first

When we built this, a stored Apollo key had stopped working, and we only found out when the job ran. Check my keys shows that in seconds.

5. The build

Claude writes the job and puts it live on Cloudflare. We read what it’s doing and answer when it asks.

Originate
rival-rag+

✻ Stage 4 of 5: Build

> Go ahead and build it

●Write(src/agent.ts)

⎿ Wrote 165 lines to src/agent.ts

●Write(src/tools.ts)

⎿ Wrote 352 lines to src/tools.ts

●Write(src/tabloid.ts)

⎿ Wrote 115 lines to src/tabloid.ts

●Write(src/rag.ts)

⎿ Wrote 47 lines to src/rag.ts

Bash commandnpx wrangler deployPut this live on CloudflareDo you want to proceed?❯ 1. Yes2. No

●Bash(npx wrangler deploy)

⎿ Deployed rival-rag triggers

schedule: 0 7 * * 1

●It’s live, and it will run every Monday at 7am.

You’ll see the commands Claude runs, and you never need to type them. When Claude asks before a step, say yes if you understand it and ask about it if you don’t. The skill always asks before putting anything live. Claude keeps everything you might change, such as your rivals and limits, in one settings file, so changes are quick.

Originate
rival-rag+
> Add Example Interiors to the rivals, and limit it to US$1 a run

⎿ Settings updated

Put this live on Cloudflare?❯ 1. Yes2. Not yet

●Done. It will use the new list next Monday.

6. Testing

We test in three steps, each one closer to the real thing, using a simple page with buttons. Our first full practice issue took 14 steps and cost 72 US cents. The next took 21 steps, about 2 minutes and US$1.03, because an agent’s route changes each time. A later real issue on one competitor took 11 steps, 53 seconds and 42 US cents.

Originate
rival-rag+

✻ Stage 5 of 5: Test

●I’ve opened the job’s test page. A practice issue emails nothing and remembers nothing.

●When you’re happy, send one real issue, then leave it to the schedule.

rival-rag.yourname.workers.dev
The Rival Rag
••••••••••••
Check my keysPractice issueSend this week’s issue

Reading anytownkitchens.example

Reading anytownkitchens.example/prices

Searching: Sample & Sons news

Apollo lookup: sampleandsons.example

Filed: Counter attack!

Filed: Hired hands

Practice issue finished. Nothing emailed or remembered.

StepWhat happens
Practice issueThe agent does all its work and you get a preview. It emails nothing and remembers nothing. It costs the same as a real run, and can use Apollo credits if the agent looks a rival up
One real issueIt emails you and keeps this week’s pages, so next week can compare. Follow each link and check the story against its source
The scheduleNothing else to do. Check the first Monday’s paper, then give it a month before you change anything
Monday, 7am UTCThe agent gets to work by itself
Monday morningThe Rival Rag lands in your inbox
During the weekYou follow the links and use what’s useful on your calls
Next MondayIt compares with last week and skips old news
How a week can look

To change it, pause it or find out what it did, ask Claude.

What went wrong for us

All of these happened during our own build, and each one took a few minutes to fix once we could see it. Tell Claude what you see, and it can usually do the same for you.

Originate
rival-rag+
> The paper says three rivals’ websites are off limits. Is that right?

●No. Their rules only block a few folders, and my check was reading the wildcards wrongly. I’ll fix it.

⎿ Fixed and put live

●Try a practice issue on the test page, and tell me what you see.

A key was refused

The stored Apollo key had stopped working. Check my keys showed it in seconds. The agent carries on without Apollo and the paper says so at the bottom.

“Reasoning is mandatory”

Our first run stopped straight away, because the model we chose has to think before it answers and we’d told it not to. We let it think and sent its thinking back with each step.

The agent stopped after two steps

It read five home pages, wrote two stories and called it done. We told it to look harder and added one rule: it can’t finish until it has done a minimum number of searches and page reads. The next run took 14 steps.

Three rivals looked off limits

Our code reads each site’s robots file, which says what bots may read. It treated a wildcard rule as blocking the whole site. The sites only blocked a few folders, so we fixed the check.

A logo on the front page

The picture a page sets for sharing is often just its logo. Now only dated articles get a picture.

A price that wasn’t on the page

Checking an issue by hand, we found a £9.99 that didn’t appear on the page the story cited. The code now refuses any story with a number that isn’t on its page.

A “new offer” with nothing to compare

The agent called an offer new when it had no earlier copy of the page. A story can now only be labelled new on the site if the page really has changed since last week.

Some websites refuse to be read

One rival’s server blocked most of its pages. The agent said so in the paper and printed nothing it couldn’t prove, which is what we want.

Public pages, facts and data

The job only reads and only emails you. Most of the rules apply to what you do with the paper next. They’re a starting point, so take advice if you’re unsure.

The agentFiles a story with its source
The codeChecks the proof is on the page
You read itAgainst the source
You checkIt’s still true
You use itIn your own words
Who does what
Reading websites

Public pages only

It reads what any visitor can see, follows each site’s robots file and never logs in. If a site blocks it, the agent leaves that site alone and says so.

Repeating what you read

Get it right

The paper is for you. If you use a rival’s price in your marketing, UK advertising rules expect the comparison to be accurate and provable, and an untrue claim about a named business can land you in legal trouble.

People’s details

UK GDPR

A name and work email are personal data. Our agent is told to leave staff and individuals out, and to stick to what the business is doing.

Other people’s work

Copyright

A short line and a link are fine for your own use. Don’t copy a rival’s words or pictures into your own marketing.

Pages can talk back

Anyone can write anything on a web page, including instructions aimed at an AI. Our agent can only read and write a draft for you, and it only ever emails you, so the worst a page can do is skew the paper. That’s why every story has a link for you to check.

The create-automation skill

A skill is a set of instructions Claude loads for a particular job. This one walks you through the same stages for any scheduled automation, and it stops at each one for you to check.

Originate
rival-rag+
> Install the create-automation skill from github.com/Originate-Group/create-automation

⎿ Installed

> /create-automation

✻ Stage 1 of 5: Plan

●What do you do by hand today?

github.com/Originate-Group/create-automation

Originate-Group / create-automation

create-automation

A Claude Code skill that takes you through building a scheduled automation, one stage at a time.

1. PlanClaude asks one question at a time and writes a plan
2. Keys neededA list of each key, where to get it and what it costs
3. Add keysYou add them yourself, and Claude only sees the names
4. BuildClaude builds it from a tested starting point
5. TestA practice run, one real run, then the schedule

To install it, ask Claude:

Install the create-automation skill from github.com/Originate-Group/create-automation

Then in a new folder, type /create-automation. The repository holds the instructions, starter code and two worked examples, The Rival Rag and Prospect Scout, with no keys or account details.

create-automation on GitHubgithub.com/Originate-Group/create-automation

Automation ideas

Jobs you could hand over. Some suit a simple script and some need an agent, so ask Claude which fits when you plan yours.

Your turn

Automation ideas

Chase late invoices every FridayDraft a reply to every new enquirySend me a cash summary each MondayTell me when a new review appearsAsk happy customers for a reviewTurn every enquiry email into a CRM recordWatch competitors’ pricesTell me when a competitor changes their websiteSummarise yesterday’s sales each morningSpot customers who’ve gone quietRemind customers before their renewalFollow up quotes nobody has answeredFind new tenders in my sectorFind planning applications near meCheck my website is up every hourTest my contact form each morningScan my website for out-of-date softwareTurn meeting notes into actionsWrite a first draft of the newsletterDraft a LinkedIn post from this week’s newsTurn a long report into one pageThank every new customerSend new starters their first-week emailsCollect timesheets every FridayPut receipts into a spreadsheetFlag invoices that look wrongAlert me when stock runs lowCompare supplier prices each monthTell me about bank payments I don’t recogniseBuild my Monday to-do list from my inbox

Things to ask Claude

You don’t need to remember any commands. Copy any of these, or say it your own way.

WhenAsk
Starting outWhat’s in this folder, in plain English?
PlanningPlan this with me first, and don’t change anything until I approve it.
UnderstandingExplain what you just did as if I’d never coded.
KeysWhich keys do you need? Tell me where to get each one, and don’t ask me to paste them here.
ChangingAdd this competitor to the list, and tell me what else that affects.
TestingOpen the test page for me.
PausingPause the Monday run until I say so.
SavingSave this to GitHub as a private repository.
Going wrongMy email says this: [paste the message]. What happened, and how do we fix it?

Troubleshooting

The Mac says the app is damaged or can’t be verified

That’s Apple’s check on apps that aren’t notarised. Open the Terminal app, paste this line once and press Return, then open the app again.

xattr -cr "/Applications/Originate Terminal.app"
The app says Claude Code isn’t installed

Follow Add Claude Code, then restart the app.

Claude Code asks me to log in again

Follow the page it opens. A paid Claude plan is needed, and the free plan doesn’t include Claude Code.

Claude asks for permission and I don’t understand

Choose no, and ask it to explain what it wants to do and why.

Check my keys says refused

Make a new key at that service, replace it on Cloudflare’s secrets page and click Deploy, then check again.

The test page says the password isn’t right

It’s the value of RUN_TOKEN on Cloudflare’s secrets page. You can’t read it back, so set a new one if you’ve lost it.

The paper is very short

A quiet week gives a short paper, because the agent won’t print what it can’t prove. Check the rival weather at the bottom to see what it looked at.

No email arrived on Monday

Ask Claude to check the job’s logs on Cloudflare. Remember that schedules run in UTC, and that Resend needs a verified domain.

Glossary

API
How one program asks another for something.
API key
A password for a program. Some services call it a token.
Claude Code
The version of Claude that can read and change files and run things on your computer, once you’ve said yes.
Cloudflare
The company whose computers run our job.
Credit
How some services, such as Apollo, charge for each piece of data you reveal.
Cron
A short way of writing a schedule, such as every Monday at 7am.
Deploy
Putting a new version live.
DNS
The address book that turns a domain into the place your website and email live.
GitHub
Where code is kept online, with every version saved.
Guardrail
A rule in code that an AI can’t talk its way past, such as a spending limit or a fact check.
GitHub CLI
GitHub’s own tool, which lets Claude Code use GitHub for you.
MCP
A standard way to plug a service into Claude while you work together.
OpenRouter
One API for all the AI models, and how we bring agentic AI into an automation.
Originate Terminal
Our free, open-source app for working with Claude Code.
Plan mode
A mode where Claude reads and suggests, and changes nothing.
Practice issue
A run that does the work but emails nothing and remembers nothing. Also called a dry run.
Repository
A project on GitHub, with its full history.
Robots file
A file on a website saying which parts bots may read.
Skill
A set of instructions Claude loads for a particular job.
Terminal
A window where you type instructions to your computer. You won’t need one for the build.
Worker
A small program that runs on Cloudflare’s computers. It’s where our job lives.
Container
A full computer system in a sealed box, for jobs a Worker can’t do. Our job doesn’t need one.
Worker secret
A key stored on Cloudflare, which your Worker can use and nobody can read back.
Workers KV
Simple storage on Cloudflare. It’s our job’s memory of last week.
Zone
One domain on Cloudflare, with its DNS records and settings.

Next steps

01

Get Originate Terminal

Install it and make a project called automations.

Originate Terminal on GitHubgithub.com/Originate-Group/originate-terminal
02

Plan your own automation

Pick one job you do every week and use the skill to plan it. No keys needed yet.

create-automation on GitHubgithub.com/Originate-Group/create-automation
03

Start small

Run it by hand first, then let the schedule take over once you trust the results.

The slides, these notes, Originate Terminal and the skill are all linked from links.weareoriginate.com.

Aaron Kennedy
Aaron KennedyFounder, Originate

Questions after the session? Email aaron@weareoriginate.com or visit weareoriginate.com.