Skip to content
← Insights
Nov 15, 20264 min read

Before the agent builds an integration, make it find the existing operation

Require evidence of a missing capability before adding custom services to an automation workflow.

A magnifying glass over a ready-made connector beside a small invoice card and a single modular adapter.

An automation can finish with a working custom service and still miss the request. If an existing connector already performs the required operation, the new service brings another component to deploy and maintain.

Before asking an agent to build an integration, establish whether the operation is already available. That investigation should produce evidence: the documented endpoint, the available credential type and the missing capability, if there is one.

Make discovery a deliverable

Imagine a hypothetical workflow that needs to retrieve an invoice from a service. The request names the service and the invoice identifier. An agent proposes a new intermediary API before checking the existing integration.

The first useful result is a capability check. Does the connector support retrieval? If its built-in action is incomplete, can its credentials be used for the documented API operation? What limitation remains after that check?

n8n's HTTP Request documentation describes using predefined credential types for supported services and making custom API requests. An absent menu action does not necessarily mean an absent integration path.

This is a reason to inspect the existing path. It is not a promise that every API can be safely connected through one generic node. Authentication and the service's own behavior still need review.

Write the discovered operation into the proposed change. A reviewer can then assess why a custom component is necessary, instead of inferring that decision from a large generated diff.

Put predictable work into an explicit path

If the workflow always retrieves the supplied invoice, its next operation is already known. A direct API node can express that step without asking a model to choose it on every run.

An agent is useful when the next step genuinely depends on interpretation. n8n's AI Agent documentation describes a model deciding which connected tools to call. That capability has a purpose; it also adds a decision that a fixed retrieval path may not need.

Draw the proposed path before implementing it. Mark the steps that require language judgement. For the remaining steps, ask whether a configured operation would produce the same required result.

Avoid removing a verification step simply because it costs another request. A read-back after a consequential write can establish something the write response did not. The question is whether a step supplies evidence needed for completion.

Likewise, a model pass that rewrites an already valid identifier has little reason to exist. Its additional flexibility can introduce another place for a previously correct value to change.

Compare accepted outcomes, including repair work

A shorter workflow is easier to inspect, but shorter alone is an incomplete evaluation. One path may make fewer calls while returning the wrong invoice for ambiguous inputs.

Use representative cases. Include a missing invoice and an expired credential. Decide what the workflow should report in each case before comparing implementations.

n8n's evaluation guidance describes testing known cases and adding discovered failures to regression datasets. That approach can reveal whether an extra reasoning step contributes to the result.

Record total execution cost where the provider exposes it. Include unsuccessful attempts and human repair time. A cost comparison limited to the successful final model call can hide most of the work.

There is no need to infer a platform's motive from that measurement. Metered use creates a cost you must manage. It does not establish that a particular retry or default was designed to waste money. Inspect the behavior you can observe.

Make the maintenance owner visible

A custom component needs someone who can update it when authentication changes. It also needs an operational home when the original author is away.

Before approving that component, identify what the existing integration fails to provide. A missing security control or unsupported API behavior can justify custom code. A model's preference for writing a wrapper is a weaker reason.

Keep the new component's scope narrow enough to explain. If its job is adapting one response format, avoid turning it into an independent orchestration platform. Review the diff for responsibilities that arrived without a requirement.

Then check the result at the user's boundary. The expected invoice should be retrieved from the intended account, and the workflow should report a useful failure when it cannot retrieve it.

The discovery record becomes part of the explanation for the implementation. It lets the next maintainer revisit the choice when the built-in connector gains a capability or the custom adapter becomes harder to support.

Automationn8nArchitecture