Skip to main content
Choosing your approach

AI or script: which should you choose to automate a task?

You copy data, sort enquiries or regularly prepare the same report. Part of this work could be automated. To decide how, I start by looking at the inputs, rules and expected result. AI may have a place in this process; a script may also be enough.

AI & automationBy Julien BaillyText updated on 2 min estimated read

Two mint-glass paths, one carrying identical cubes and the other varied shapes, converge on the same platform

Key takeaway

Precise rules suit a script. Text that needs interpretation may justify AI. In both cases, define the expected result, acceptable errors and situations that require review.

Describe what you do today

Take a fictional example: every week, you receive a product file to reformat before importing it. Some columns change names, values are missing and you check the rows one by one. The first step is to make these decisions explicit.

A representative file, an example of the desired result and a few difficult cases provide a better basis for discussion than a general request for an AI agent. We also need to know how often the task occurs and who will use the tool.

Identify what follows a rule and what requires judgement

Renaming a column, converting a date or detecting a missing identifier can follow a rule written in advance. Understanding a freely worded request or suggesting a summary requires more interpretation. This distinction helps choose the tool's components.

Three situations to help scope an automation
TaskApproach to considerUseful check
Reformat an exportScript with explicit rulesReject incomplete rows
Suggest a classification for messagesAI within a defined scopeReview ambiguous cases
Prepare an annotated reportScripted collection, assisted summaryConnect conclusions to the data

Combine both when the need justifies it

A script can collect and check data, then an AI step can prepare a summary for review. An agent goes further by choosing its own next steps and tools. This flexibility adds decisions to check; it should address an identified need.

Anthropic distinguishes predefined workflows from agents that direct their own process, and recommends starting with a simple solution. For your project, I turn that principle into a question: which step actually needs interpretation?

Test before integrating into everyday work

The first trial should cover correct, incomplete and ambiguous inputs. We examine the result, review time and what happens on failure. If the tool prepares an import, the proposed data can be reviewed before sending it.

This test helps decide what comes next: adjust the rules, clarify instructions or reduce the scope. Any benefit is measured on your task, including corrections and tool maintenance.

Sources and references

Documentation consulted when writing this guide. Advice and procedures should be adapted to your own context.

Related projects