What this workflow does
This workflow checks a local scanner server every hour for new scanned PDF files.
It downloads those files and uploads them to a Nextcloud folder automatically.
This saves you from manually moving files, avoiding mistakes and saving time.
Tools and services used
- ScanServJS API: Provides access to scanned PDF files from the USB scanner.
- Nextcloud API: Allows uploading files to your cloud storage folder.
- n8n Workflow Automation: Runs the tasks on schedule to connect the scanner and Nextcloud.
Inputs, processing, and output
Inputs
- Hourly schedule trigger to run the workflow.
- ScanServJS API returning a list of scanned file names in JSON.
Processing
- For each file name from the API, make an HTTP request to download the PDF as binary data.
- Prepare the binary data for upload to Nextcloud.
Output
- Upload each scanned PDF file to the specified
/Scansfolder in Nextcloud, using the original file names. - Files are stored safely and ready to access from any device via Nextcloud.
Beginner step-by-step: How to run this workflow in n8n production
Step 1: Download the workflow file
- Use the Download button below to grab the workflow file.
Step 2: Import workflow in n8n
- Inside the n8n editor, click on the top-right menu and choose “Import from File”.
- Select the downloaded JSON workflow file.
Step 3: Add your API credentials
- Add credentials for the Nextcloud API inside the Nextcloud node.
- Confirm access to ScanServJS API (usually no credential needed for local API).
Step 4: Update paths if needed
- Change the Nextcloud upload folder in the Nextcloud node if you want to store scans in a different place.
- Ensure the ScanServJS API URL matches your scanner’s IP and port.
Step 5: Test the workflow
- Run the workflow manually once to make sure it downloads files and uploads them as expected.
Step 6: Activate for automatic running
- Turn on the workflow to active so the hourly schedule trigger runs it for you without manual steps.
- Check execution logs regularly to catch any errors early.
Common customization ideas
- Change the schedule to run every few minutes or once a day by adjusting the Schedule Trigger.
- Rename files before upload by adding a Function node that adds date or client codes.
- Filter files by type or name with an IF node to download only PDFs or certain scan batches.
- Modify upload path to organize files into subfolders based on date or project name.
Issues and fixes
- ScanServJS API returns empty: Make sure your scanner server is on and reachable. Double-check the API URL and port.
- Nextcloud upload errors: Confirm that the credentials inside n8n Nextcloud node are correct and not expired.
- File downloads incomplete or corrupted: Check the HTTP Request node’s URL uses {{ $json.name }} properly and headers include accept: */*.
Deployment tips
If you are running n8n on server, make sure network access to both the scanner API IP and Nextcloud server is allowed.
Monitor the workflow executions from the n8n UI to be sure no failures happen silently.
Consider setting alerting or notifications using other n8n nodes if the workflow fails for quick response.
Summary
✓ Saves time and stops manual upload mistakes
✓ Automatically moves scanned PDFs from local scanner to Nextcloud
✓ Runs hourly without user action
✓ Keeps scanned files safe and available everywhere

