Quick overview
Quick overview This self-hosted n8n workflow scans a local folder for PDF and TXT files and bulk imports them into an Open Notebook notebook via its API, uploading PDFs as files and sending text files as JSON content. How it works Runs manually when you start the workflow. Calls the Open Notebook API to list available notebooks and finds the notebook ID that matches the configured notebook name. Uses a shell command to scan the configured local folder for .pdf and .txt files. Creates one item per file with its path, title, and extension for processing. Processes files one at a time, uploading PDFs to the Open Notebook /sources endpoint as multipart form data. Sends TXT file contents to the Open Notebook /sources/json endpoint using a Python requests call. Setup Use a self-hosted n8n instance with the Execute Command node enabled and local filesystem access. Ensure the n8n host has curl and python3 installed, and install the Python requests package. Set the folder path to scan, the exact Open Notebook notebook name, and the Open Notebook API base URL in the configuration step. Make sure Open Notebook is running and reachable from n8n at the configured API base URL. Requirements A self-hosted n8n instance with the Execute Command node enabled. This template does not run on n8n Cloud. curl and python3 available on the n8n host, with the Python requests package installed. A running Open Notebook instance whose API is reachable from n8n. A notebook already created in the Open Notebook UI, matching the configured name exactly. Read access to the local folder that holds the .pdf and .txt files. Customization Replace the manual trigger with a Schedule Trigger to import new files on a recurring basis. Edit the find command to include other extensions such as .md or .csv. Change the notebook name in the configuration step to target a different notebook. Adjust the batch size on the loop node to control how many files are handled per cycle. Disable async processing if you want Open Notebook to finish ingesting each source before the next upload starts. Additional info Tested on a self-hosted n8n instance against a live Open Notebook API. File names containing quotes, backticks, dollar signs and non-ASCII characters are shell-quoted before being passed to the Execute Command node, so they do not break the run. An n8n automation workflow template by 池田 誠.
池田 誠
web
free
No benchmark results have been added yet.