Duck
Tutorials6 min read

How to set up AI workflows

Samet Turan— Editor··6 min read

Learn to build reliable AI workflows with real prompts, tool picks, and debugging tips — plus a ready-to-deploy blueprint.

How to set up AI workflows

Learning how to set up AI workflows changed the way I handle repetitive tasks, moving from manual chat prompts to a system that runs on its own.

You’ll see how to pick a trigger, connect a model, and store the result where you need it.

By the end, you’ll have a working example you can copy and a clear path to debug when things go sideways.

What most guides get wrong about AI workflows

Most tutorials treat the AI model as a magic black box that you just plug into a Zapier step and forget.

They ignore the fact that models need clear input formatting, token limits, and error handling.

When you skip those details you end up with workflows that look fine in a demo but choke on real data.

I’ve seen guides suggest sending raw HTML straight to GPT‑4 and wondering why the output is gibberish.

The truth is you need to sanitize, truncate, and sometimes summarise before the model sees it.

Another common mistake is treating the workflow as linear when in reality you often need branching logic based on the model’s confidence score.

Guides that skip branching leave you stuck manually rerunning cases that fall below a threshold.

Finally, many posts pretend that pricing is flat and ignore how usage spikes can blow your budget overnight.

If you don’t monitor token usage per run you’ll get a surprise bill the next month.

Why does my workflow break when I add a second model?

Adding a second model introduces two new failure points: mismatched output formats and competing rate limits.

The first model might return JSON while the second expects plain text, causing a parse error that stops the whole scenario.

I ran into this when I tried to chain a summarisation model (Claude‑2) after a data‑extraction model (GPT‑4).

The extractor gave me a JSON array, but the summariser choked on the brackets and returned an empty string.

Fixing it required a simple transformation step that strips the outer array and joins the items with new lines.

The second issue is rate limits: each provider has its own quota, and when you hit one the other keeps trying and fills up your operation log.

I once burned through my monthly GPT‑4 tokens in two hours because the summariser kept retrying after each failure.

The solution is to add a conditional break that stops the scenario if the first model returns an error code.

That way you don’t waste tokens on a dead end.

A real example: scraping leads with GPT‑4 and Make

Let’s walk through a concrete workflow I use every week to turn a list of LinkedIn URLs into qualified leads.

First, I grab the URLs from a Google Sheet using Make’s HTTP module.

Next, I send each URL to a scraping API that returns the raw HTML of the profile page.

I then feed that HTML into GPT‑4 with a prompt that asks for the person’s name, title, company, and a short pain point based on the post.

The prompt looks like this:

  • Extract the following from the LinkedIn profile HTML:
    - Full name
    - Current title
    - Company
    - One sentence describing a recent challenge they posted about
    Return as JSON with keys name, title, company, pain_point.
  • If any field is missing, return null for that key.

I wrap the prompt in a text aggregator so the HTML doesn’t exceed the model’s token limit.

If the HTML is longer than 3 000 characters I truncate it to the first 3 000 chars and add a note that the rest was omitted.

After GPT‑4 returns JSON I use Make’s JSON parser to map the fields into a new row in a second Google Sheet.

If the parser fails because the model returned plain text instead of JSON I route the output to an error log sheet for manual review.

This little safeguard has saved me from dozens of bad runs where the model decided to be chatty.

I run the scenario every night at 02:00 AM via a time trigger.

In the morning I have a fresh sheet of leads ready to import into my CRM.

The whole thing costs me about $0.012 per lead in API calls, which is cheap enough to scale to thousands.

How to debug when this breaks

When the workflow stops I start by checking the scenario history in Make.

Each module shows a status icon: green for success, red for failure, yellow for a warning.

I click the red module and look at the raw input and output fields.

If the HTTP module shows a 429 error I know I’ve hit a rate limit on the scraping API.

In that case I add a sleep module (wait 5 seconds) before retrying, and I enable exponential backoff in the module settings.

If the GPT‑4 module returns an empty response I first verify the prompt length.

I copy the exact string that was sent to the model and paste it into the OpenAI playground to see if the model refuses due to policy.

Sometimes the HTML contains a script tag that confuses the model; stripping scripts fixes it.

When the JSON parser fails I enable the “raw output” toggle in the GPT‑4 module and re‑run the scenario.

I then examine the raw text to see if the model wrapped the JSON in markdown code fences.

If it did I add a text transformer step that removes the triple backticks before parsing.

Finally, I check the error log sheet for any rows that were routed there.

Those rows give me a quick sample of what the model actually returned, which is often more helpful than the generic error message.

By following these steps I can usually pinpoint the issue within five minutes and get the scenario back online.

Pricing and tools I actually pay for

I use Make for the orchestration because its visual scenario builder lets me see data flow at a glance.

The core plan costs $29 per month and gives me 10 000 operations, which is more than enough for my lead‑gen workflow plus a few smaller automations.

I tried the free tier but it caps at 1 000 operations and blocks premium HTTP modules, making it useless for anything that talks to external APIs.

For the AI side I rely on OpenAI’s GPT‑4 turbo via their API.

At $0.03 per 1 000 tokens the cost per lead is low, but I keep an eye on monthly usage because a sudden spike in traffic can push the bill past $50.

I think the $29 / mo Make plan is fair for the amount of automation it enables, but the $169 / mo team plan feels ridiculous for a solo operator who hardly needs collaboration features.

One gripe I have is that Make’s error handling hides the raw HTTP status code unless you dig into the module’s advanced settings.

It took me an hour to find where to toggle “show raw response” and I wish it were visible by default.

On the love side, I adore Make’s scenario history with the one‑click replay feature.

Being able to re‑run a failed scenario with the exact same inputs saved me hours during a debugging session last month.

For more on this exact angle, deeper coverage of AI agent platforms.

(Which, yes, is annoying when Alyssa from support tells me to “just look at the logs” without mentioning the replay button.)

If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault.

— The Colophon

One AI tool. Tested. Reviewed.
In your inbox every Sunday.

~3 minute read. Real outcomes from operators, not marketers.

Free. One email per Sunday. Unsubscribe in one click.