OriginateAutomation with Claude Code · NatWest session
NatWest session

Automation with Claude Code

How we built a weekly AI agent that keeps an eye on your competitors and sends you the news in a tabloid.

Presented byAaron Kennedy, Originate
SessionNatWest, November 2026
Originate
rival-rag+

✻ Welcome to Claude Code

> Every Monday, find out what my competitors did and send me a tabloid newspaper about it

●I can build that for you. Let’s plan it first.

OriginateAutomation with Claude Code · NatWest session
Where we work

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.

  • New projectWe make one called automations.
  • New folderOne for each job, like rival-rag.
  • BrowserPlans and results open beside Claude.

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

Originate
rival-rag+

% claude

✻ Welcome to Claude Code

●What would you like to build?

New project from folder

Documents

Code

automations

automations
New FolderOpen
OriginateAutomation with Claude Code · NatWest session
The skill

create-automation skill

A skill is a set of instructions Claude loads for a particular job. This one takes you through building an automation and stops at each stage for you to check.

  • Ask for it by nameClaude installs it for you.
  • Five stagesThe same route for any weekly or daily job.

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

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
OriginateAutomation with Claude Code · NatWest session
The document

Course notes

Everything from today in one document, from installing the app to adding keys and testing the job. You keep it, so you don’t need to take notes.

weareoriginate.com/webinars/natwest/notes
Course notes
Automation with Claude Code
InstallThe app, the skill, your Claude account
Keeping keys safeWhere they live, how to limit them, what to do if one leaks
Key ideasWhat an API is, what an MCP is, Cloudflare and zones
The buildPlanning, keys, adding keys, build, test
RulesPublic pages, facts and data
GlossaryEvery new word in plain English
OriginateAutomation with Claude Code · NatWest session
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
OriginateAutomation with Claude Code · NatWest session
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

OriginateAutomation with Claude Code · NatWest session
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.

OriginateAutomation with Claude Code · NatWest session
Key idea

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.

  • Local taskUses your files, and only runs while the app is open and your computer is awake.
  • Cloud taskRuns even when your computer is off.
  • ConnectorsQuick to add, with limits. The Xero connector is read only.
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.

OriginateAutomation with Claude Code · NatWest session
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.

OriginateAutomation with Claude Code · NatWest session
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
OriginateAutomation with Claude Code · NatWest session
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
OriginateAutomation with Claude Code · NatWest session
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.

OriginateAutomation with Claude Code · NatWest session
Key idea

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.

  • Your work is safeGo back to any earlier version.
  • Private or publicPrivate by default. Our app and skill are public.
  • Ask in plain EnglishClaude runs the GitHub CLI when you ask it to save.
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
OriginateAutomation with Claude Code · NatWest session
The automation

The Rival Rag

The automation we’ve decided to create. We describe the job in plain English, the way we’d brief a colleague, and Claude asks what it needs to know.

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 competitor should I keep an eye on?

> Wix, and just its AI news

●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
OriginateAutomation with Claude Code · NatWest session
What we planned

What we planned

Claude writes the plan as a short document. Changing a plan takes seconds, so this is where we get the job right.

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
OriginateAutomation with Claude Code · NatWest session
The automation

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!
OriginateAutomation with Claude Code · NatWest session
The automation

Where it lives

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.

Everything the job needs is in one place, and none of it is on your laptop.

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
OriginateAutomation with Claude Code · NatWest session
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.

OriginateAutomation with Claude Code · NatWest session
The automation

API keys we need

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
OriginateAutomation with Claude Code · NatWest session
The automation

How we get them

We make each key, limit it and save a copy in a password manager.

  • CloudflareMy Profile, API Tokens
  • OpenRouteropenrouter.ai/keys
  • ApolloSettings, Integrations, API Keys
  • Resendresend.com/api-keys
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
OriginateAutomation with Claude Code · NatWest session
Add keys

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.

  • Limit each keySet a spending limit when you create it.
  • Never in the chatOr an email, a shared document or a screenshot.
  • If one leaksDelete it at the service and make a new one.
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
OriginateAutomation with Claude Code · NatWest session
The design of the automation

How it all pulls together

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

OriginateAutomation with Claude Code · NatWest session
Build

The build

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

  • It asks firstThe skill waits for a yes before anything goes live.
  • Easy to changeAsk Claude to change the rivals or the limit, any time.
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.

OriginateAutomation with Claude Code · NatWest session
Test

Testing

We test in three steps, each one closer to the real thing, using a simple page with buttons.

  • Practice issueOur first took 14 steps, read 16 pages and cost 72 US cents.
  • One real issueCheck each story against its source.
  • The scheduleMondays at 7am from then on.
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

Searching: Wix AI news

Filed: Wix Gets Two Smart: Studio Two Brings Aria 2.0 To Agencies

Reading wix.com/updates

Fact check said no: Wix Lets AI Do The Paperwork

Filed: Wix Lets AI Do The Paperwork

Searching: Wix pricing plans UK AI website builder 2026

3 stories, 11 steps, about US$0.42

OriginateAutomation with Claude Code · NatWest session
The result

In your inbox

The real email the agent sent me. On its schedule it’s waiting there every Monday, with my computer off.

  • Sent by ResendFrom your own domain.
  • Start to inboxAbout a minute for this issue.
  • Only to youIt never emails anyone else.

The other emails in this list are made up.

mail.example.com
Inbox1 new
The Rival Rag
THE RIVAL RAG: Wix Gets Two Smart: Studio Two Brings Aria 2.0 To AgenciesWix has unveiled Studio Two, an AI-native editor
Sam Example
Re: Website quoteThanks for this. We’d like to go ahead with
Accounts
Invoice 1042 paidPayment received, thank you
Your registrar
Domain renewalYour domain renews next month
Your bank
Your statement is readyYour November statement is ready to view

No email selected

THE RIVAL RAG: Wix Gets Two Smart: Studio Two Brings Aria 2.0 To Agencies

The Rival Rag <rag@mail.weareoriginate.com>

To Aaron Kennedy · Wednesday 20:33

The first issue of The Rival Rag
OriginateAutomation with Claude Code · NatWest session
The result

The Monday email

This is the real first issue, exactly as the agent wrote it and sent it to my inbox: Wix’s AI news, and what it means for our sales.

  • StoriesWhat Wix did, with a link to the source.
  • Your moveHow to use it when you’re selling.
  • The sales deskLines for this week’s calls.

11 steps, 8 pages read, 3 searches and 42 US cents.

Your inbox
The first issue of The Rival Rag, with three stories about Wix and AI, the sales desk and the rival weather
OriginateAutomation with Claude Code · NatWest session
Guardrails

What it never does

It gathers the news and suggests what to do, and a person stays in charge of what happens next.

The course notes cover public pages, facts and data rules.

The Rival Rag and you

Who does what

  • Print a story with no proofIts quote and numbers must be on the page, or the code refuses it
    Never
  • Contact your competitorsIt only reads public pages
    Never
  • Go past its limit45 steps and US$1.50 a run
    Never
  • Read each storyFollow the link before you quote it
    You
  • Decide what to doIt suggests, and you choose what to say
    You
OriginateAutomation with Claude Code · NatWest session
The bigger picture

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
OriginateAutomation with Claude Code · NatWest session
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
OriginateAutomation with Claude Code · NatWest session
Questions

Next steps

01

Get Originate Terminal

Free and open source.

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

Add the skill

Pick one job you do every week and plan it. No keys needed yet.

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

Follow the course notes

Every step from today, including how to keep your keys safe.

Aaron Kennedy

Aaron Kennedy

Founder, Originate

Leads website strategy and development, including the AI systems that support our work.

OriginateAutomation with Claude Code · NatWest session