Use this powerful n8n workflow to automatically create and synchronize new OneNote files in NextCloud/WebDAV whenever a new entry is added to a Notion database, complete with robust locking logic.
Download this n8n workflow template and start using it instantly.
Users who manage tasks or notes in Notion but prefer editing and storing content in OneNote (via NextCloud).
Automation developers needing advanced examples of n8n flow control using Redis locks.
Technical users managing file operations via WebDAV within an n8n workflow.
Anyone looking for complex, integrated n8n templates involving multiple cloud services.
Managing documentation across multiple platforms can be challenging. This sophisticated n8n workflow solves the problem of keeping Notion and OneNote synchronized when creating new notes. When a new entry is created in a designated Notion database, this n8n automation checks if a corresponding OneNote file exists in a structured NextCloud folder path. If the file is missing, the n8n workflow copies an 'empty.one' template to the correct location and then updates the original Notion page with a direct link to the newly created OneNote file. It employs a crucial Redis locking mechanism (using the n8n Redis node) to prevent infinite loops, ensuring the subsequent Notion update doesn't immediately re-trigger the n8n trigger webhook. This is a high-utility example of advanced n8n workflow design.
The logical flow of this n8n workflow is tightly controlled and proceeds as follows:
Webhook when a Notion page is updated or created. The very next n8n node, Redis, attempts to read a lock key associated with that Notion page ID. Filter node checks the Redis response. If the key value is 'Update' (meaning this n8n workflow recently processed this item), the flow stops, preventing a loop.Get Notion page n8n node retrieves the full details of the specific Notion page.Switch n8n node checks if the 'Notes' URL property in Notion is currently empty. The creation logic only proceeds if the URL is empty.Mapping code n8n node dynamically constructs the required NextCloud WebDAV destination path and the local OneNote link using the Notion page's Name and Subject properties.HTTP Request1 n8n node performs a PROPFIND WebDAV request on the target directory path in NextCloud.Match titiles code n8n node parses the complex XML response from NextCloud/WebDAV to determine if a OneNote file with the exact same name already exists in that specific folder.If n8n node branches: If the file does not exist (match=false), the flow proceeds to copy the template. HTTP Request n8n node (using the COPY method) duplicates an empty template file to the new destination. Following this, the Update task in Notion n8n node patches the original Notion page with the generated OneNote URL.Store Redis n8n node sets the lock key to 'Updated' with an 80-second TTL, temporarily disabling the n8n trigger for this item.To use this n8n workflow, follow these steps:
Get Notion page and Update task in Notion nodes. Ensure the integration has access to the relevant database.Redis (Get) and Store (Set) nodes, essential for the locking mechanism.HTTP Request nodes to perform file operations (COPY, PROPFIND).Webhook n8n trigger and link its URL to your Notion database to fire on page creation/update events.Mapping code node and the HTTP Request nodes to ensure the hardcoded NextCloud paths (https://nextcloud.yuvrajsingh.icu/...) match your actual NextCloud environment and file structure. Adjust the empty.one template location as necessary. Webhook (n8n trigger): Serves as the starting point, listening for POST requests (likely from Notion).
Redis (Get & Store n8n node): Acts as a critical flow control mechanism, implementing a short-lived lock (lock{{ $json.body.entity.id }}) to prevent automation loops after Notion is updated by the n8n workflow itself.
Filter (n8n node): Checks if the Redis lock is active (if key value is 'Update'). If locked, it halts execution.
Get Notion page (n8n node): Retrieves the necessary metadata (Name, Subject, ID) from the page that initiated the n8n trigger.
Switch (n8n node): Gates the file creation logic, only proceeding if the Notion property intended for the OneNote URL (propertynotes) is empty.
Mapping (Code n8n node): Generates the dynamic file destination path for WebDAV (destination) and the final URL link (url) based on data retrieved from Notion.
HTTP Request (PROPFIND & COPY n8n nodes): Uses the WebDAV protocol to interact with NextCloud. HTTP Request1 checks directory contents (PROPFIND), and HTTP Request copies the template file (COPY) to create the new OneNote document.
Match titiles (Code n8n node): Performs complex parsing of the PROPFIND XML response and robust string comparison to verify if the file already exists before the n8n workflow attempts creation.
Build a Retrieval Augmented Generation (RAG) assistant using this n8n workflow. Connect OpenAI's GPT-4o to your Notion database for instant, accurate answers from internal company data.

Automate instant alerts when Notion database items change status. Use this powerful n8n workflow to trigger notifications in Slack, Telegram, WhatsApp, Discord, or Email automatically.

Automate Notion using AI Agents with this powerful n8n workflow. Expose dozens of granular Notion API functions (Pages, Blocks, Databases) through a specialized n8n trigger.

Use this powerful n8n workflow to automatically sync Notion database pages to a Pinecone vector store using Gemini embeddings. Essential n8n templates for building real-time RAG systems.

Use this powerful n8n workflow to create a private AI nutrition assistant in Telegram. Log meals instantly via text, voice, or image, analyze macros using Gemini, and store data in Google Sheets.









































