Import from Hotfolder
A hotfolder connector watches a folder and imports every new matching file into your project automatically. Each file becomes one transaction with one document, processed by your workflow like any uploaded file.
Typical uses: a scanner that saves PDFs to a network share, an ERP that drops documents into an exchange folder, or any legacy system that can write files but cannot call an API.
Availability
The hotfolder connector needs a real filesystem the application can see, so availability depends on your deployment:
| Deployment | Availability |
|---|---|
| Self-hosted (on-premises, Docker) | Available by default |
| Managed in Azure | Available on request: it is enabled as a deployment setting, and an Azure Files share is provisioned and mounted for you automatically. Contact your DocAI Fabric contact to switch it on. |
| SaaS (app.docaifabric.com) | Not available. Use Import from Email instead, or wait for the planned cloud storage connectors (your own bucket). |
If the folder options are hidden in the connector settings, your deployment does not offer them.
How it works
- The connector polls the watched folder on a schedule (default: every 60 seconds).
- A file is picked up only when it matches the filename mask and has been stable (no size or timestamp changes) for the stability wait. This prevents importing a file that is still being written.
- The file is copied into DocAI Fabric, a transaction is created, and the workflow starts.
- Only after the workflow has started is the source file released: moved to the
processedsubfolder (or deleted, per your settings). - If an import keeps failing, the file is moved to the
errorsubfolder after several attempts, so problems are always visible in the folder itself.
The same file is never imported twice. If you drop a new version of a file (same name, different content), it is imported again as a new transaction, which is usually what you want.
Setting up a connector
- Open your project and go to the Workflow tab.
- Select the Import activity. The Import Connectors panel appears in its settings.
- Click Add connector.
- Choose the folder mode:
- Managed (auto-created): DocAI Fabric creates a folder for you and shows its path after you save. You provision nothing; just drop files into that folder.
- Custom mounted path: you point the connector at a folder you have mounted yourself (for example an NFS or SMB share). Enter its path as seen inside the container.
- Adjust the settings if needed (see the reference below).
- Click Save.
Where the managed folder lives
- Self-hosted Docker: the managed folder is created inside the application data volume. With the standard Compose setup that maps
./data/storageto the container, the folder appears on the host under./data/storage/hotfolder/<key>. You can share that path over your network (SMB, NFS) or let another system write into it directly. - Managed in Azure: the managed folder lives on the Azure Files share that was mounted when the feature was enabled. Drop files into it with Azure Storage Explorer, the Azure portal, or by mounting the share on a workstation over SMB.
Testing before going live
Two buttons on each connector let you verify the setup safely:
- Test (dry-run): lists the files that would be imported right now, without importing anything. Use it to check the path and the filename mask.
- Import to Playground: imports the current files into the Playground dataset using your draft settings, so you can inspect the results in the transaction viewer. The files stay in the folder, so production still receives them later.
Production behavior
Automatic import targets the Production dataset and starts only once the project has a published version. Until you publish, the connector simply waits (files stay in the folder); it activates on its own when you publish. This means you can safely configure and test a connector while the project is still a draft.
Settings reference
| Setting | Description | Default |
|---|---|---|
| Folder | Managed (auto-created) or a custom mounted path | Managed |
| Watched folder path | Custom mode only: the folder to watch, as seen inside the container | (empty) |
| Filename mask (regex) | Regular expression a filename must match to be imported | .*\.pdf$ |
| Poll interval (s) | How often the folder is checked for new files | 60 |
| Stability wait (s) | How long a file's size and timestamp must be unchanged before it is picked up | 5 |
| On success | Move the file to a subfolder, or delete it | Move to subfolder |
| Success subfolder | Where successfully imported files go | processed |
| On failure | Move the file to a subfolder, or leave it in place | Move to subfolder |
| Failure subfolder | Where files that repeatedly failed to import go | error |
Notes:
- The
processedanderrorsubfolders are created inside the watched folder and are never scanned for new files. - To import images as well as PDFs, widen the mask, for example
.*\.(pdf|png|jpg|jpeg|tiff?)$. The Import activity converts them the same way it converts uploads. - The housekeeping of the
processedfolder is yours: DocAI Fabric moves files there but never deletes them. Set On success to Delete if you prefer not to accumulate them.