Building Agentic
Workflows
with Claude Code
What This Manual Covers
This manual walks you through building a fully automated, AI-powered newsletter system using Claude Code. You will learn how to set up the WAT framework (Workflows, Agent, Tools), plan and build agentic workflows in plain English, troubleshoot issues in real time, and deploy your finished system to run on a schedule.
Time to complete: 1–3 hours · No developer background required
Before touching any tools, it helps to understand what you're building and why the market is moving in this direction. This is not just hype — there is real money moving into real technology.
Tools like n8n and Zapier require you to map every step, connect every node, and manually handle every edge case. When something unexpected happens, the workflow breaks and a human has to step in to fix it. That's maintenance — that's time — that's money.
Think of traditional automation as laying a train track rail by rail, switch by switch, connection by connection — all by yourself. Agentic workflows are like hiring a construction crew and telling them where you need the track. They figure out the obstacles during construction. You approve the final result.
The self-healing capability is real, but only while you're actively working alongside the agent. When you trigger a workflow in Claude Code and say "go research these competitors and build me a report," the agent is right there with you. If something breaks, it catches it mid-run, adjusts its approach, updates its tools, and keeps going.
Once you deploy that workflow to run on a schedule or via webhook, you are deploying the code and tools — not the live agent. At that point it behaves more like traditional automation. This is actually a good thing: deployed automations are predictable and deterministic — exactly what you want in production.
You do not need to be a developer to use Claude Code. However, you will build better workflows if you understand the following basics:
- What a webhook is and how it triggers a workflow
- How APIs work at a basic level
- How to spot when an automation is behaving incorrectly
- What a cron schedule is (for deployment)
Follow these steps in order before writing a single prompt. This entire setup takes about 15–20 minutes.
If you want Claude to make file edits automatically without asking for approval on each one, you need to enable Bypass Permissions:
- Go to VS Code Settings (Cmd+, on Mac, Ctrl+, on Windows)
- Search for "Claude Code"
- Find "Allow Dangerously Skip Permissions" and enable it
- This unlocks "Bypass Permissions" mode in the Claude Code panel dropdown
WAT stands for Workflows, Agent, and Tools. This three-layer structure is what makes your automation both powerful during development and reliable in production. Everything you build will follow this pattern.
When you type a prompt like "Write me a newsletter about Agentic AI," Claude Code reads the relevant workflow file, sees that step 1 is "run the research tool," calls that tool, receives the results, then moves to step 2, and so on. The workflow is the brain. The tools are the hands.
One of the most powerful features of this framework: as Claude Code builds and uses your workflows and tools, it improves them over time. If it makes a mistake, it updates the workflow or tool file so that mistake does not happen again. The more you use a project, the better it gets.
After initializing a project, Claude creates a folder structure like this:
- claude.md — Your system prompt / project instructions
- /workflows/ — Markdown files describing each automation process
- /tools/ — Python scripts or API connectors for specific actions
- /.env — Your secret API keys (never committed to Git)
- /brand_assets/ — Logos, style guides, reference files
This is the most important section. Rushing into building without planning is the most common mistake new builders make. Claude Code has a built-in Plan Mode specifically to prevent this — use it every time.
- In the Claude Code agent panel, find the mode dropdown (top of the panel)
- Switch from "Bypass Permissions" or "Edit Automatically" to Plan Mode
- In Plan Mode, Claude will ask clarifying questions and propose a complete plan before touching a single file
- You review, adjust, and approve the plan — then Claude builds
Your first prompt does not need to be perfect. Write what you want in plain English, even if it's vague. The goal is to give Claude enough direction to ask smart clarifying questions. Here is the exact prompt used in this tutorial:
Notice how this prompt is descriptive but not exhaustive. It gives Claude a clear goal without specifying every technical decision — those decisions are exactly what Claude will ask about.
After submitting your prompt, Claude will ask targeted questions before building anything. For the newsletter example, it asked about four things:
Claude returns a complete plan — including tech stack decisions, step-by-step workflow outline, and a list of things you probably haven't considered yet. Read every line carefully before approving. Claude will flag things like:
- Human review / approval checkpoints
- Email subject line and metadata handling
- Brand consistency rules
- Error recovery logic
- Archiving and logging
- If something in the plan is wrong, type your correction in plain English and Claude revises
- If the plan looks good, switch the dropdown to Bypass Permissions
- Claude will then execute the entire build automatically, creating a to-do list and checking items off as it goes
- You can work on something else and check back in — Claude handles it
Once you approve the plan, Claude Code switches into build mode. It creates an internal to-do list and checks items off one by one. Here is what to expect.
For the newsletter example, Claude created all of the following without any additional prompting from the user:
Claude creates an .env file with clearly labeled placeholder values. Before running any test, open the .env file and replace each placeholder with your real API key. For the newsletter example you will need:
- Anthropic API key — from console.anthropic.com
- Perplexity API key — from perplexity.ai developer settings
- key.ai API key — for AI-generated infographic images
- Gmail OAuth credentials — Claude provides step-by-step setup instructions
- Google Sheets ID — for archiving completed newsletters
Open your workflow markdown file and read through it. It should look like plain English instructions, using headers to separate phases and bullet points to describe each step. You should be able to read and understand every line — that is the design intent of the WAT framework. If something looks wrong, just tell Claude in natural language and it will fix it.
Your first test run is the most critical phase. Do not expect it to be perfect. Expect to find issues — and fix them. This is the battle-testing phase that gives you the confidence to deploy. The more edge cases you catch here, the more reliable your deployed workflow will be.
Trigger your workflow with a simple natural language prompt. For the newsletter example, the entire trigger was:
That's it. Claude reads the workflow file, identifies which tools to run at each step, and executes the full sequence. Watch the output panel to see exactly what it's doing at each stage. Claude narrates its progress, so you always know where it is in the process.
During the first test of the newsletter workflow, the following issues came up and were resolved entirely without manual intervention:
- Unicode encoding error — Claude detected, diagnosed, and fixed automatically mid-run
- Wrong API endpoint for key.ai — Claude searched the documentation, found the correct endpoint, updated the tool file, and retried
- Corrupted HTML email output — Claude diagnosed the rendering issue, updated the HTML assembly tool, and resent a corrected version
Your workflow may include built-in pauses where Claude asks for your approval before continuing. In the newsletter example, Claude paused before sending and asked:
- To review and approve one of five generated subject line options
- To confirm the recipient list before sending
These checkpoints are intentional. They give you control over critical moments. Once you trust the workflow completely, you can remove them — or keep them for quality assurance purposes.
If something in the output looks incorrect, describe the problem to Claude in plain English. Do not try to debug code manually. Example of how this was handled during the tutorial:
Claude diagnosed the HTML rendering issue, fixed the assembly tool, confirmed the fix was in place, and sent a corrected version — all without the user touching a single file.
After the issues were resolved, the newsletter output included:
- Brand logo in the header, styled correctly
- Brand fonts and colors applied throughout
- Three AI-generated infographics on market growth, Gartner roadmap, and impact metrics — each branded
- Four content sections with sourced statistics and clickable source links
- A call to action and key takeaways section at the bottom
- Sent directly to the specified Gmail recipients
Skills are reusable system prompts — essentially saved sets of instructions — that Claude loads on demand to dramatically improve its performance on specific tasks. You can use skills that already exist or create your own from scratch.
When Claude receives a task, it checks all available skills to see if any are relevant to the current request — similar to how it decides whether to use a tool or not. If a skill matches, Claude reads it before proceeding. This makes outputs far more consistent, polished, and predictable across runs.
- Skills live in a designated folder in your project (or a shared skills library)
- Claude reads the relevant skill files before executing a task
- Skills can be shared across multiple projects
- You can build an entire library of skills that compounds in value over time
There is, for example, a front-end design skill that makes Claude Code dramatically better at designing web interfaces. To use it:
- Add the skill file to your project's skills folder
- Tell Claude in your claude.md file to always invoke the front-end design skill when building web interfaces
- Every web output from that project will now follow better design principles automatically — without you having to re-explain them every time
Once you identify something your workflow does consistently well, or a set of standards you want applied reliably, turn it into a skill. For the newsletter project, a good custom skill would be:
Claude will write a complete skill file and store it. From that point forward, every time it generates an infographic, it reads that skill first — making every output consistent with your brand standards automatically.
- Brand guidelines skill — enforce colors, fonts, logo rules across all outputs
- Email formatting skill — HTML email best practices, rendering compatibility
- Infographic style skill — composition, labeling, color usage for charts
- Error recovery skill — common API errors and how to handle them
- Quality check skill — criteria for reviewing outputs before delivery
Once you have tested your workflow thoroughly and trust its outputs, you can deploy it to run automatically on a schedule — without you needing to trigger it manually each time.
You do not deploy Claude Code itself. You deploy the workflow files and tool scripts that Claude built for you. These files get pushed to a deployment platform that handles scheduling, execution, and logging.
- trigger.dev — Best for event-driven and scheduled automations. Clean dashboard. Good for most use cases.
- Modal — Best for compute-intensive Python workflows. Scales automatically. Great for image generation pipelines.
- Vercel — Best if your workflow involves web endpoints, API routes, or serverless functions.
Knowing how to build agentic workflows is only half the picture. Here is how to position, price, and sell this work at rates that reflect its true value — not your hourly output.
Business owners do not care that you build agentic workflows in Claude Code. They care about their problems. Lead with outcomes, not tools.
- I build agentic workflows in Claude Code
- I use AI and automation
- I can build you a newsletter system
- My hourly rate is $X
- I work with LLMs and APIs
- I can save you X hours per month
- I can reduce this process's error rate by X%
- This system saves $10K/month in labor costs
- This delivers $X in monthly value to your business
- You'll recoup the cost in two weeks
A pharmacist fills a prescription that someone else wrote. A doctor asks questions, runs diagnostics, and prescribes based on what is actually wrong. Most AI builders are pharmacists — they take whatever the client asks for and build it. The best-paid builders are doctors.
Sit down with a business, understand their operations deeply, and identify the real constraint — the clog in the pipe. Most businesses are out here trying to pour more water into a clogged pipe by hiring more people or throwing random AI tools at problems. What they actually need is someone to find the clog and clear it. That skill is worth far more than any individual build.
If you build something in 30 minutes that saves a business 20 hours per week, that is not a 30-minute job. That is tens of thousands of dollars in annual value. Pricing yourself hourly puts a ceiling on your income and completely ignores the value you're actually delivering.
- Price hourly only when you're starting out and building trust
- Once you can clearly demonstrate ROI, move to project-based or value-based pricing
- Track the metrics yourself — hours saved, errors eliminated, revenue generated
- Proactively share these numbers with clients. Do not wait to be asked.
- Building is getting easier and more commoditized. Your value is in finding and solving the right problems — not just executing builds.
A $3,000 build can become a $50,000/year relationship if you stay engaged, track results, and keep finding new opportunities inside the business. Here is the path:
Everything you need in one place. Bookmark this for daily use.
