RPA or API integration: which solution should you choose?
Updated:
Illustrative situation: a company needs to transfer orders. Orders from its online store are entered into the accounting system manually, and there are many of them. A robot could do this: it would open the online store, open the accounting system, and transfer the data. But the online store has an interface through which orders can be downloaded directly, and the accounting system can accept a batch import. If this connection covers the required process, there is a reason to assess it before a robot.
Common problem: a robot is used even when a direct connection exists
A software robot controls a computer as a person would. It clicks a button, completes a field, and downloads a file. It works through the screen, through what the system shows to people.
Integration through an application programming interface (API) works directly with data. The systems exchange information without clicking through screens. A supported file export or import can fulfil a similar role. We use direct database access only when it is safe and supported by the vendor.
The difference between the two solutions lies in what they depend on. A robot may be affected by a change to a screen or sign-in process. An API is intended for machine communication, but it also has versions, authentication, limits, and changes that need to be monitored.
How to choose the right solution
First, we check for a supported API or export. If it covers the required data and the costs make sense, it tends to be the more stable choice. A robot is suitable when a direct interface is unavailable, does not cover the complete process, or would be disproportionately expensive to make available.
A robot built on top of a system with a suitable interface adds a dependency on the user interface. It needs to wait for pages to load, and changes to controls may require an update. A direct connection therefore tends to be more stable, although an API also has versions, limits, and operating costs.
For every project, we therefore begin by asking whether the data can be accessed another way. We look at your system’s documentation, ask the vendor, and check whether an export exists that nobody uses because nobody knows about it. The export’s availability and scope need to be verified.
When a robot makes sense
An interface may not be available or may not cover the required process. A robot can make sense, for example, in these situations:
-
An older internal or ERP system has no API, and modifying it would be disproportionately expensive.
-
A government or institutional portal offers only a user interface.
-
A vendor makes an interface available only in a package that is not worthwhile at the given volume.
-
A required step in processing attachments or PDFs is available only through the user interface. A typical example is automated invoice processing.
A combination of both options may be suitable. We solve one side of the process through an interface and the other with a robot because no alternative exists there. Divide the process according to the available options.
An API’s existence does not establish that it fits the process
Use documentation and trial access to establish whether the interface can read and write the data you need. An order export is insufficient if the process also requires approval, attachments or record corrections that the API does not support. Check available fields, permissions, supported versions, the test environment and how results are confirmed.
Also establish the volume and required freshness of data. A daily file import may suit accounting but be unsuitable for reserving stock during a purchase. Assess pagination, request limits and behaviour during an outage. For example, Microsoft Graph returns some results in pages. The first successful response may therefore omit some data. Check this mechanism against the particular API.
Include supported file imports in the comparison
| Method | When to assess it | What remains to be addressed |
|---|---|---|
| API or connector | You need regular transfers, ongoing results or subsequent operations. | Operation coverage, permissions, limits, versions and error handling. |
| Supported file export and import | The system accepts batches and the agreed delay suits the process. | Format, validation, duplicates, rejected rows and import confirmation. |
| Robot using the UI | The required step is available only through the screen, or a direct connection is not reasonably available. | Reliable elements, sign-in, the operating environment and checking the saved result. |
A PDF or email attachment does not, on its own, require clicking through a screen. A file can be received, processed and passed through a supported interface. Decide according to the missing step, rather than the input format’s name.
Likewise, an RPA platform does not require all its steps to control the UI. Power Automate for desktop also supports HTTP calls, which can access APIs without a browser. Choosing a platform and choosing a communication method are separate decisions.
What happens after a lost connection or partial write
Imagine that the target system saves an order, but its confirmation is lost in transit. Repeating the entire operation could create another record. A timeout does not automatically mean “nothing happened”, whether the write used an API or a robot.
An API may support idempotent requests, where repeating the same operation does not create a second result. Stripe documents the use of an idempotency key, but the rules depend on its interface and version. This is not a property of every API. Check key validity, retry rules and what happens when request data changes.
If the interface lacks this protection, agree on how to check the result using a stable identifier and handle an uncertain state. Looking up a record before writing does not necessarily prevent concurrent duplicates. For a file batch, distinguish accepted and rejected rows. For a robot, do not restart a write merely because the form reappeared after a failure.
Retries must also respect operational limits. Stripe recommends controlled retries when requests are limited. Define the exact procedure according to the target system. Unlimited retries may overload the service and delay processing.
Divide a combined process into clear steps
An illustrative journey might work as follows: an API retrieves orders, a validation step checks their data, a supported import sends them to accounting and a robot performs the missing approval step through the UI. At each transition, it must be clear which record continues and what result is expected.
Record the source and target identifiers, last confirmed step, error and next action. Invalid records need exception handling rather than endless retries. If a person has changed the target data in the meantime, define a conflict rule before automation overwrites their changes.
Cost the entire operation: API access, connector licences, a machine for the robot step, data preparation, monitoring and maintenance. The desktop flow connector documentation also specifies licensing and access conditions. An available connector does not automatically provide every required operation or eliminate costs.
Check completeness and recovery in the pilot
In a controlled test environment, use a normal record, a missing required field, a duplicate input and an interruption after a write. An illustrative batch might contain a hundred orders, two of which lack required data. Under this specification, the expected outcome is 98 accepted orders and two exceptions with explanations. This count is not a measured project result.
Check the target data and rejection reasons, rather than only a robot-completion message. Under the agreed rule, repeated input must not create another copy of orders already processed. Also track time, manual interventions and whether a worker can resume unfinished processing from the report.
The outcome should be a decision about which steps will use an API, file or UI and who will maintain them. If the pilot reveals a missing supported operation or an uncertain write result, revise the design before routine operation begins.
What the right choice gives you
A solution with proportionate maintenance and a clear reason for the choice. We connect systems directly where this is supported and use a robot for steps that cannot reasonably be automated another way.
You also know the operational risks in advance. A robot may require an update after a change to an external interface. An integration needs its API versions, credentials, and limits monitored. A combined solution may be the most practical.
Next step
Contact us with the systems you need to connect. We will check whether a simpler route than a robot exists and explain the reason for our recommendation.