Automate ONLYOFFICE DocSpace with n8n: build document workflows without writing a line of code

30 June 2026By Denis
0:00 / 16:31

Summary

You can automate ONLYOFFICE DocSpace using n8n without writing any code by leveraging its official nodes. This allows you to create workflows that connect DocSpace with other tools, enabling you to automate repetitive tasks such as account provisioning, document uploads, and notifications, streamlining your document management processes.

If you use ONLYOFFICE DocSpace as your document hub at your company, you’ve probably found yourself doing the same things by hand over and over. A new client signs: you open DocSpace, create a room, upload the contract template, invite them. A new employee joins: you provision their account, add them to the right rooms, send a welcome email. A form comes in: you forward it to the right folder, notify the team. These tasks are not complex, but quite tedious. The good news is from now on they can be fully automated.

ONLYOFFICE DocSpace now has official nodes for n8n, the open-source workflow automation platform. You can connect DocSpace to the tools your team already uses: Gmail, Slack, HubSpot, Airtable, your HR system, your CRM, and stop handling these tasks manually.

Automate ONLYOFFICE DocSpace with n8n: build document workflows without writing a line of code

What is n8n?

n8n is a workflow automation tool similar in spirit to Zapier or Make, but open source and runnable on your own infrastructure. For DocSpace users who self-host for data control reasons, that should be highly valuable.

n8n gives you a visual canvas where you connect nodes, each one representing an action in a service. When a trigger fires (a new email arrives, a form is submitted, a schedule runs), the workflow executes automatically, passing data from node to node until the job is done. With over 400 integrations available, it works with most of the tools your team already has.

What the DocSpace nodes cover

The package includes two nodes:

  • ONLYOFFICE DocSpace: an action node for performing operations via the DocSpace API
  • ONLYOFFICE DocSpace Trigger: an event node that fires your workflow when something happens in DocSpace

Action node operations

  • Files: upload, download, move, copy, update, delete, create, get info, generate shared links
  • Rooms: create, update, get info, search, archive, search, invite or remove users, update access roles, get shared links
  • Users: invite users, get a user, search, update roles, enable or disable accounts, delete
  • Folders: create, get info, get contents, get history, get shared link, move, copy, update, delete

Trigger node events

The Trigger node lets workflows react to DocSpace activity without polling. Supported events include:

  • Files: Created, Uploaded, Updated, Copied, Moved, Trashed, Deleted, Restored
  • Folders: Created, Updated, Copied, Moved, Trashed, Deleted, Restored
  • Rooms: Created, Updated, Copied, Archived, Deleted, Restored
  • Users: Created, Invited, Updated, Deleted
  • Groups: Created, Updated, Deleted

For example: a file upload triggers a Slack notification, a new room kicks off an approval workflow, a deleted user removes access in connected systems.

Five workflows you can run today

Here you can find five ready-to-build workflows.

1. Auto-create client collaboration rooms when a deal closes

When a deal is marked as won in your CRM, this workflow creates a named DocSpace collaboration room for the client, downloads a contract template from your library, uploads it to the room, invites the client, and sends them a welcome email with the shareable room link.

Step-by-step instructions
  1. <Set up your CRM system trigger node here>
  2. ONLYOFFICE DocSpace: Create a room
    • Set up ONLYOFFICE DocSpace credential (please refer to this documentation)
    • You can personalize the room title by putting your client’s name variable to the Title parameter (e.g. “{{ $json.client_name }} — Client Room “)
    • Choose the type of the room you want to create in Type parameter (for this workflow we recommend the collaboration room type)
  3. ONLYOFFICE DocSpace: Download a file
    • Insert the ID of the contract template that will be uploaded to the client’s room to the File ID parameter (you can check it in the URL address of the file stored in your DocSpace: e.g. https://***.com/doceditor?fileId=69313)
  4. ONLYOFFICE DocSpace: Upload a file
    • Insert the variable that stores ID of the room we created before to the Parent ID parameter (it should look like this: {{ $('Create a room').item.json.id }})
    • You can personalize the file name in File Name parameter (e.g. {{ $('Edit Fields').item.json.client_name }}_contract.docx)
    • Make sure the Binary File parameter is on
  5. ONLYOFFICE DocSpace: Invite a user to a room
    • Set Room ID parameter to Manual and fill it with a variable from the INPUT: {{ $('Create a room').item.json.id }}
    • Change User ID parameter to fixed and Manual, and fill in the User Email parameter with the client’s email address
    • Choose the client’s permissions in User Access -> From list
  6. ONLYOFFICE DocSpace: Get the shared link of a room
    • Fill in the Room ID parameter with a variable: {{ $('Create a room').item.json.id }}
  7. Gmail: Send a message
    • Choose a Gmail credential
    • Put client’s email address to To parameter
    • Set up Subject parameter
    • Write an email template using variables from previous steps

The trigger can be any CRM event (HubSpot, Pipedrive, Salesforce), a webhook, or a manual run. The client room is ready before anyone on your team has to think about it.

2. AI-powered document intake pipeline

This workflow watches a Gmail inbox for emails with attachments. When one arrives, it uploads the file to a designated DocSpace folder, extracts the text, and passes it to an AI model (GPT-4o mini by default). The model identifies the document type, extracts sender, date, and any monetary amounts, and writes a one-sentence summary. A Slack message with the full breakdown goes to your team.

Step-by-step instructions
  1. Gmail Trigger
    • Set up a Gmail OAuth2 credential
    • The filter is pre-set to `has:attachment` so the workflow only fires on emails with files
    • Polling interval is set to every minute by default — adjust this in the trigger settings if needed
  2. Gmail: Get Message
    • Enable Download Attachments in the Options section to make the attachment available as binary data for the next step
  3. ONLYOFFICE DocSpace: Upload a file
    • Set up your ONLYOFFICE DocSpace credential (please refer to this documentation)
    • Set the Parent ID parameter to the ID of the DocSpace folder where incoming documents should be stored (you can find the folder ID in the DocSpace URL when you open the folder)
    • Personalize the file name in the File Name parameter — for example `{{ $json.from.text }}: {{ $json.subject }}` names each file after the sender and email subject
  4. Extract from File
    • Set Operation to Extract From PDF to extract plain text from the uploaded PDF attachment
  5. OpenAI Chat Model (sub-node of Information Extractor)
    • Set up an OpenAI API credential
    • The model is set to gpt-5-mini by default — change this to any other model supported by your OpenAI account
  6. Information Extractor
    • The Text parameter is pre-filled with `{{ $json.text }}` from the previous extraction step
    • Five attributes are pre-configured: document_type, sender_name, document_date, total_amount, and summary — you can add, remove, or rename these to match your team’s needs
  7. Slack: Send a message
    • Set up a Slack OAuth2 credential
    • Set the Channel parameter to the Slack channel where your team should receive notifications
    • The message template is pre-filled with all five extracted fields — edit the text to match your preferred format

You can also use the DocSpace Trigger node to fire this workflow when a file is uploaded to DocSpace directly, skipping the email polling entirely.

Every inbound document (invoice, contract, NDA, purchase order) ends up filed and summarized. Your team sees what arrived without opening a single attachment.

3. Provision a DocSpace account when a new employee joins

When your HR system posts a new hire event via webhook, this workflow creates a DocSpace account for the employee, notifies IT in Slack, and sends the new hire a welcome email with their DocSpace link.

Step-by-step instructions
  1. Webhook Trigger
    • Copy the webhook URL from the node and configure your HR system to POST to it when a new employee is created
    • The expected payload fields are name, email, and department — the workflow handles both flat JSON (`{ "name": "..." }`) and body-wrapped payloads (`{ "body": { "name": "..." } }`) automatically

    Note: if your HR system has an official trigger for n8n, it is recommended to use it.

  2. Edit Fields
    • This step normalizes the incoming payload into three clean fields: fullName, email, and department
    • If your HR system sends different field names, update the expressions in this node accordingly
  3. ONLYOFFICE DocSpace: Invite User
    • Set up your ONLYOFFICE DocSpace credential (please refer to this documentation)
    • The Email, First Name, and Last Name parameters are filled automatically from the previous step
    • Type is set to `Room Admin` by default — change this if new employees should be provisioned with a different role
  4. Slack: Send a message
    • Set up a Slack OAuth2 credential
    • Replace the channel ID placeholder with your IT team’s Slack channel ID
    • The notification should be pre-filled with the new employee’s name, email, and department by using variables from previous steps
  5. Gmail: Send a message
    • Set up a Gmail OAuth2 credential
    • The To parameter is filled automatically from the normalized email field
    • Customize the email subject and body to match your company’s onboarding tone

It handles both flat JSON and body-wrapped payloads, so it works with most HR systems that can fire a webhook. Set it up once and new employees have accounts waiting before their first login.

4. Weekly cleanup of inactive collaboration rooms

Teams tend to accumulate rooms as projects end and clients move on, but few people bother to clean them up. This workflow runs every Monday at 9 AM, fetches all rooms from DocSpace, filters out any inactive for 90 or more days, archives them, and posts a summary to Slack.

Step-by-step instructions
  1. Schedule Trigger
    • The trigger is pre-configured to run every Monday at 9 AM — adjust the day, time, or frequency in the trigger settings to match your team’s schedule
  2. ONLYOFFICE DocSpace: Get All Rooms
    • Set up your ONLYOFFICE DocSpace credential (please refer to this documentation)
    • The Search Room operation fetches all rooms your account has access to — no additional parameters are required
  3. Code: Filter Rooms Inactive 90+ Days
    • This JavaScript node compares each room’s `updatedAt` timestamp against today’s date (see code script below)
    • To change the inactivity threshold, find the number `90` in the code and replace it with the number of days you prefer
    • Rooms that do not match the filter are silently dropped — the rest of the workflow only runs for rooms that qualify
  4. ONLYOFFICE DocSpace: Archive Inactive Room
    • The Room ID parameter is set to `{{ $json.id }}` and picks up the room ID from each filtered item automatically
    • This node runs once per room — if 12 rooms are inactive, it fires 12 times
  5. Slack: Send Archive Report
    • Set up a Slack OAuth2 credential
    • Replace the channel ID placeholder with your admin or operations Slack channel
    • Write a template using variables from previous steps
    • This node is set to run only once after all rooms have been processed, and posts a single message listing every room that was archived

JavaScript for step 3:

<code class="language-javascript">const cutoff = new Date();
cutoff.setDate(cutoff.getDate() - 90);
return items.filter(item => {
const updated = new Date(item.json.updatedAt || item.json.updated || 0);
return updated < cutoff;
});</code>

The inactivity threshold is a single number in a Code node. Change 90 to 60 or 180 as needed. When there is nothing to archive, the workflow runs silently.

5. Client project intake form to DocSpace room, automatically

This workflow starts with an n8n-hosted form: project name, client name, email, description. On submission, it creates a DocSpace room, retrieves the shareable link, emails the client their direct workspace URL, and notifies your team in Slack.

Step-by-step instructions
  1. n8n Form Trigger
    • The form has four fields pre-configured: Project Name (required), Your Name (required), Email Address (required), and Project Description (optional)
    • Copy the form URL from the node and share it with clients — the form is hosted directly by n8n, no external service needed
    • The confirmation message shown after submission is pre-filled — edit it in the Options section of the trigger node
  2. ONLYOFFICE DocSpace: Create a room
    • Set up your ONLYOFFICE DocSpace credential (please refer to this documentation)
    • The Title parameter is set to `{{ $json.project_name }} — {{ $json.client_name }}` so each room is named after the project and client automatically
    • Room Type is set to Collaboration Room — change this if a different room type fits your use case
  3. ONLYOFFICE DocSpace: Get the shared link of a room
    • The Room ID parameter is set to `{{ $json.id }}` and picks up the ID of the room created in the previous step automatically
  4. Gmail: Send a message
    • Set up a Gmail OAuth2 credential
    • The To parameter should be filled with the variable from the form’s email field
    • The Subject should be a text template with such variables as Project Name and/or Your Name from the step 1
    • The room link from the previous step should be embedded in the email body as `{{ $("Get Room Shared Link").item.json.sharedLink }}`
  5. Slack: Send a message
    • Set up a Slack OAuth2 credential
    • Replace the channel ID placeholder with the Slack channel where your team should be notified about new projects
    • The notification should include variables for the project name, client name, email address, and a direct link to the new DocSpace room

Getting started

You will need an n8n instance (cloud or self-hosted) and an ONLYOFFICE DocSpace account. To install the DocSpace node you can search for “ONLYOFFICE DocSpace” in the node search.

START FOR FREE             INSTALL ON-PREMISES

Authentication supports four methods: API Key (recommended), Basic Auth, OAuth2, and Personal Access Token. Once configured, the credential is shared across all DocSpace nodes in your instance. See the ONLYOFFICE DocSpace credentials documentation for setup details.

Recreate any of the five workflow templates by following the descriptions above, connect your credentials, swap in the right folder and channel IDs, and activate.

What to build next

The workflows above cover common cases. Beyond those, the same nodes support things like:

  • Expiry reminders: scan a contracts folder on a schedule, check file names or metadata for dates, send renewal reminders before they lapse
  • Access audits: a weekly report of all rooms, their members, and access levels, sent to a management channel
  • Event-driven archiving: use the Trigger node to move or archive files automatically when they reach a certain state
  • User lifecycle management: keep DocSpace accounts in sync with your directory service using Trigger events

The nodes expose most of what you would do in the DocSpace interface as API operations. n8n connects those to the rest of your stack.

Final thoughts

If any of the workflows above match something you are currently doing by hand, the setup is straightforward: install the node, connect your credentials, import the template, and activate. After that, DocSpace handles the routine work without you.

Create your free ONLYOFFICE account

View, edit and collaborate on docs, sheets, slides, forms, and PDF files online.