# File Events

**File Events** in Alfred's Event API are a cornerstone in monitoring and managing the document processing workflow within the platform. These events are specifically designed to respond to a variety of actions or status changes related to files, making them a crucial element in tracking document progression and managing the automated workflow. Each File Event, such as "FileAddToJobEvent," "FileDoneEvent," or "FileFailedEvent," is triggered by a specific action, like adding a file to a job, completing file processing, or encountering a processing failure. This enables a responsive and interactive environment where changes in the file status are closely monitored and acted upon. These events are vital for applications that need to track the progress of files in **real-time**, manage document processing stages efficiently, and respond promptly to any changes in the file lifecycle.

Receiving **File Events** is streamlined through the Events API, which sends JSON-based payloads to a specified Webhook endpoint. This process is a part of the Event Loop, an event-driven sequence that starts with a user-triggered event, leading to the receipt of a JSON payload describing the event.&#x20;

The system then acknowledges the event, and the server performs any required actions based on the event details. This loop, documented on the [Event Loop documentation](/event-api.md) page, allows for a dynamic interaction between the Alfred platform and the user's application, ensuring that each significant file-related action is captured and can be acted upon in a timely manner.

### File Event List

<table><thead><tr><th width="285">Event Type</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/-MjCnOE6zokrysPEZBhz"><strong>FileAddToJobEvent</strong></a></td><td>Triggered when a file is added to a job for processing.</td></tr><tr><td><a href="/pages/-MjD67ANTU87qUmI2pPz"><strong>FileCategoryCreateEvent</strong></a></td><td>Occurs when a new category is created for a file.</td></tr><tr><td><a href="/pages/-MjD66yCvfOrd9p4ihJl"><strong>FileCategoryDeleteEvent</strong></a></td><td>Signals the deletion of a file's category.</td></tr><tr><td><a href="/pages/-MjCnontH3dJp5KJL8JS"><strong>FileChangeTagEvent</strong></a></td><td>Indicates a change in the tag associated with a file.</td></tr><tr><td><a href="/pages/-MjCnoVAQZ3f8VH3kq3R"><strong>FileDoneEvent</strong></a></td><td>Marks the completion of file processing.</td></tr><tr><td><a href="/pages/-MjCnmDf3wRjokN1bhJt"><strong>FileExtractedDataCreateEvent</strong></a></td><td>Triggered when new data is extracted from a file.</td></tr><tr><td><a href="/pages/-MjCno7t0WntUH4r8psO"><strong>FileExtractedDataDeleteEvent</strong></a></td><td>Occurs when extracted data from a file is deleted.</td></tr><tr><td><a href="/pages/-MjD4L5pZcEIiAejjzjr"><strong>FileFailedEvent</strong></a></td><td>Indicates a failure in file processing.</td></tr><tr><td><a href="/pages/-MjCnlr1L84VIgq8jOpn"><strong>FileMoveEvent</strong></a></td><td>Signals the movement of a file within the system.</td></tr><tr><td><a href="/pages/-MjCnl9HClf2TCyqi5W2"><strong>FileMoveToPendingEvent</strong></a></td><td>Triggered when a file is moved to a pending state.</td></tr><tr><td><a href="/pages/-MjCnkIrJhqRigglmThK"><strong>FileMoveToRecycleBinEvent</strong></a></td><td>Indicates movement of a file to the recycle bin.</td></tr><tr><td><a href="/pages/-MjCnjGOsCJBGxdV9zWJ"><strong>FilePropertyCreateEvent</strong></a></td><td>Reflects the creation of a file property.</td></tr><tr><td><a href="/pages/-MjCniuv3DHOu-pk347i"><strong>FilePropertyDeleteEvent</strong></a></td><td>Signals the deletion of a file property.</td></tr><tr><td><a href="/pages/-MjCnhKWHhM3azg_oLwB"><strong>FileRemoveTagEvent</strong></a></td><td>Signals the removal of a tag from a file.</td></tr><tr><td><a href="/pages/-MjCq67R3LS54dhOB7TX"><strong>FileStatusUpdateEvent</strong></a></td><td>Indicates an update in the file's status.</td></tr><tr><td><a href="/pages/-MjCq5k_ORasoERP0AK1"><strong>FileUpdateEvent</strong></a></td><td>Triggered when a file is updated in any manner.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tagshelf.dev/event-api/fileevents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
