Automated Nextcloud Uploads for Scanned Documents via Local API - n8n Workflow

Use this powerful n8n workflow to automatically fetch PDF scans from a local ScanservJS API and upload them directly to your Nextcloud instance. Ideal for creating seamless n8n templates for document management.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Individuals or businesses running local scanning solutions (like ScanservJS).

  • Users who need scheduled synchronization between local hardware output and cloud storage.

  • n8n users looking for practical n8n templates involving HTTP requests and cloud file operations.

  • Automation specialists building comprehensive document archival n8n workflow solutions.

Overview

Managing physical documents digitized via a local scanner can be tedious, requiring manual file transfer and organization. This innovative n8n workflow solves that problem by providing a fully automated bridge between a local scanning API (such as ScanservJS) and your Nextcloud instance.

Running on a schedule defined by the n8n trigger, this system ensures that as soon as a document is scanned and available on the local network API, the n8n workflow processes the file, downloads its binary content, and uploads it securely to a designated folder within Nextcloud. This n8n automation reduces manual labor, ensures compliance, and provides instant digital backup, making it one of the most useful n8n templates for home or office document management.

How it Works

This n8n workflow is designed to run hourly, ensuring timely synchronization of scanned documents.


  1. Scheduled Retrieval (n8n Trigger): The n8n workflow starts with a Schedule Trigger, set to activate once every hour. This periodic check initiates the automation.

  2. Fetch File List (n8n node): The first HTTP Request n8n node queries the local API (http://192.168.1.100:8080/api/v1/files) to retrieve a list of recently scanned document file names. This assumes the local API, like ScanServJS, returns a list of files available for download.

  3. Download Binary Data (n8n node): The second HTTP Request n8n node uses expressions ({{ $json.name }}) to dynamically construct a URL for each file identified in the previous step. It sends a request to download the raw binary content of the scanned document (e.g., the PDF file).

  4. Upload to Nextcloud (n8n node): Finally, the Nextcloud n8n node receives the binary data. It uses the file name passed through the flow to create the target path (/Scans/{{ $json.name }}) and uploads the document directly to the specified directory in Nextcloud. This completes the automatic movement of the document using this powerful n8n workflow.

Installation Guide

To implement this n8n template, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Configure Credentials:

You must set up credentials for the Nextcloud n8n node, providing the necessary URL, username, and password/token for your Nextcloud installation.

  1. Local API Configuration:

The HTTP Request n8n node currently points to a specific internal IP (http://192.168.1.100:8080). You must update the URLs in both HTTP Request n8n nodes to match the IP address and port of your local scanning API (e.g., ScanServJS).

  1. Activate the n8n Trigger: Ensure the Schedule Trigger n8n node is configured to run at your desired frequency, and then activate the entire n8n workflow to begin synchronization.

Node Details

Schedule Trigger (n8n Trigger):
Function: Starts the n8n workflow automatically.
Key Configuration: Set to run hourly (interval: hours). This reliable n8n trigger ensures documents are moved promptly.
HTTP Request (File List):
Function: Queries the local scanning API (e.g., ScanServJS) for a list of files pending transfer.
Key Configuration: URL is set to http://192.168.1.100:8080/api/v1/files.
HTTP Request1 (File Download):
Function: Downloads the actual binary content of the scanned file identified in the previous step.
Key Configuration: URL uses an expression http://192.168.1.100:8080/api/v1/files/{{ $json.name }} to fetch each file dynamically.
Nextcloud (n8n node):
Function: Uploads the binary document data to Nextcloud.
Key Configuration: Uses binary data upload and sets the target path dynamically to /Scans/{{ $json.name }}. This is a crucial n8n node for cloud integration.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by

Automation consultant with 30+ years of IT experience. Specialized in building efficient workflows with n8n for freelancers and small to medium-sized businesses.

Featured*