APIs and automation

File transformation states: progress, errors, and downloads without confusion

A practical guide to defining clear states in file conversions, distinguishing originals from results, and coordinating API, webhooks, and support.

Apification
Visual flow of file transformation states from upload to download

The problem: “uploaded,” “processed,” and “ready” are not the same thing

File transformation states are often confused because the same file goes through several different realities. A user may have uploaded a document correctly, but that does not mean it is valid for the requested action. A conversion job may also have been created, but there may not yet be a downloadable result. If the interface summarizes everything as “processed,” support ends up receiving inevitable questions: where the file is, whether the original was lost, whether the result is new, or whether an error requires repeating the operation.

The solution is not to show more technical jargon, but to separate events that have different consequences. “Received” confirms input. “Validated” confirms compatibility. “Transformation requested” confirms that an action was requested. “In progress” indicates that the job is still open. “Ready” must mean that a specific output exists. “Failed” must explain whether the user can correct something. “Replaced” or “withdrawn” prevents an old download from appearing current.

  • Do not use “ready” if only the request has been accepted.
  • Do not use “processed” to mix validation, execution, and download.
  • Do not hide the original when a new output is generated.
The problem: “uploaded,” “processed,” and “ready” are not the same thing

A minimum state model for operating without ambiguity

A minimum operating model can start with seven states: received, validated, transformation requested, in progress, ready, failed, and withdrawn or replaced. “Received” corresponds to the file arriving. “Validated” indicates that the type, subtype, or extension allows an action. In Apification Cloud, the detected type, subtype, and extension determine the previews, editor, transformations, and download formats available, so this separation helps explain why some options appear and others do not.

“Transformation requested” should record the intent: convert, split, merge, optimize, or process. In integrations, Apification treats long transformations as asynchronous jobs outside the original HTTP request, so “requested” should not be confused with “finished.” “In progress” covers execution time. “Ready” requires a generated output. “Failed” requires an actionable message. “Replaced” or “withdrawn” protects against obsolete links and results that should no longer be presented as current.

  • Received: the file exists in the system.
  • Validated: the file is compatible with the action.
  • Ready: a generated, downloadable result exists.
  • Withdrawn: the result should not be used as the current version.
A minimum state model for operating without ambiguity

What the end user should see

The user view should answer five questions without asking for additional context: which file was received, which action was requested, when it happened, what result is expected, and whether a download is already available. The original file name should remain visible even when a new output is generated. It is also useful to show the expected format when relevant, because many confusions come from downloading a correct result that is different from the input file.

The error message should be written for the action, not for the internal component. Instead of a generic text, it is better to say whether the file is not compatible, whether parameters are missing, whether the job failed and can be retried, or whether the download no longer corresponds to the current version. In Apification, the File Transformer guides the user by type or subtype, compatible files, action, parameters, result generation, and download or saving in Cloud; that pattern reduces invisible decisions and gives each step a clear expectation.

  • Show the original name and the result name.
  • Show the requested action and parameters relevant to support.
  • Differentiate “download available” from “job in progress.”
  • Write errors that indicate a possible correction when one exists.

What the system should store to explain what happened

The system needs more than a visible label. It must keep an internal resource identifier, the relationship with the source file, the transformation parameters, the generated output, and the change history. In Apification Cloud, files, folders, editable services, and generated results can be kept within the same workspace. This makes it easier for operations and support teams because they do not have to reconstruct the history by searching through separate tools.

The relationship with permissions and sharing must also be stored. New resources in Apification Cloud remain private until their visibility is changed or sharing recipients are configured. That property matters a great deal: a “ready” result should not be communicated as accessible to everyone if it has not yet been shared. In addition, Cloud lets you inspect saved versions, download previous content, and restore a previous state, providing a recovery path when someone published, replaced, or edited an item by mistake.

  • Internal identifier of the file or service.
  • Source file and generated result related to each other.
  • Transformation parameters used.
  • Status of permissions, links, users, or groups.
  • History and versions for operational auditing.

Manual flow versus integrated flow

The manual flow is enough when volume is low, a person makes the decision, and the goal is to prepare specific files. Apification’s File Transformer works as a step-by-step assistant that proposes valid operations for one or more Cloud files without modifying the originals. Its documented flow includes selecting the type or subtype, choosing compatible files, selecting an action, configuring parameters, generating the result, and downloading it or saving it in Cloud.

The integrated flow is useful when another product needs to create jobs, check progress, save results, or react to events without manual intervention. Apification’s REST API includes endpoints for Cloud resources, folders, transformations, users, and webhooks. The reference is generated from the same OpenAPI 3.1 contract used by client generators and integration tests, which helps align development, documentation, and technical validation. For integrations, Apification recommends dedicated API keys with the minimum necessary permissions.

  • Use a guided assistant for one-off tasks reviewed by a person.
  • Use the API when you need to automate job creation, querying, or retries.
  • Use OpenAPI to coordinate contracts between technical teams.
  • Use minimum permissions for each integration.

Webhooks: useful, but they should not promise absolute immediacy

Webhooks are suitable for reporting completion or failure without continuous polling. Apification describes its webhooks as HMAC-signed events, with delivery history and retries. It also includes endpoints to create webhooks, test deliveries, view paginated history, and manually re-enqueue a delivery. This allows each notification to be treated as operational evidence, not just a simple ephemeral message.

Even so, the interface and processes should not depend on the consumer always being available. If the receiving system was down, the event may require retries or reconciliation. Apification indicates that polling can be useful during development, while in production completion and failure webhooks avoid unnecessary requests and provide a clearer trace. A balanced practice is to receive webhooks, verify the signature, record the event, and, when there is doubt, query the job’s status, progress, usage, and results through the API.

  • Verify the webhook signature before acting.
  • Record the event identifier and related job.
  • Support retries without duplicating effects.
  • Reconcile through the API when a delivery is missing or there are doubts.
  • Use delivery history for support and diagnosis.

Common errors and how to avoid them

The first common mistake is mentally overwriting the original. A transformed result should not make the input file disappear or be presented as if it were the same object. In Apification, the File Transformer keeps originals intact; when it generates and saves in Cloud, it creates a private file, and the result can be managed, versioned, downloaded, or shared from Cloud. That separation should be reflected in the interface and in support messages.

The second mistake is showing an old download as if it were new. If the user repeats a transformation with different parameters, the screen should indicate which result belongs to which request. The third is duplicating transformations after a timeout: if an HTTP request ends without a clear response, it is best to check the job status before launching another one. In the Apification assistant, the button is temporarily disabled to prevent duplicates when saving in Cloud; in integrations, the same principle should be transferred to the design of the client application.

  • Do not hide the original after generating a conversion.
  • Do not reuse old links without indicating version or date.
  • Do not repeat jobs automatically without verifying status.
  • Do not share results without reviewing permissions.
  • Do not treat a duplicate webhook as a new order.

How Apification fits into a clear state design

Apification fits best when Cloud is used as the organized, versioned base of the flow. Files, folders, editable services, and generated results can coexist there. The user can share items through links, users, or groups, and provide original or transformed downloads. In addition, the ability to review history, download previous versions, and restore content helps resolve incidents without relying only on screenshots or memory.

For development teams, the combination of REST API, OpenAPI, asynchronous jobs, and signed webhooks makes it possible to build a complete cycle: upload with validations for extension, detected MIME, size, and default application; create transformation jobs; query status, progress, usage, and results; cancel or retry when appropriate; and download the original file or an authenticated result. The key point is not to delegate all clarity to the technology: those data points must be translated into states that users and support can understand.

  • Cloud to organize source, output, history, and permissions.
  • File Transformer for guided operations without modifying originals.
  • REST API/OpenAPI for repeatable integrations.
  • Signed webhooks with retries and history for events.
  • Controlled sharing for originals or transformed downloads.

Frequently asked questions

What is the most important state in a file transformation?

The most critical one is “ready,” because it should only be used when a generated, downloadable result exists. Before that, it is best to distinguish between received, validated, requested, and in progress.

Should I show the original file after converting it?

Yes. Keeping the original visible reduces doubts and prevents the user from thinking it was overwritten. In Apification, the File Transformer keeps originals intact.

When should I use webhooks instead of querying through the API?

Use webhooks to receive completion or failure events in production, and query through the API when you need to reconcile states, debug, or recover from a consumer outage.

How can I avoid duplicate transformations after a timeout?

Do not launch another transformation immediately. Check the job status or available history, record identifiers, and design the webhook consumer to tolerate retries without repeating effects.

Sources and further reading

Documentation consulted while preparing this article.

Explore Apification

Related articles

Back to the blog