EspoCRM - OnlyOffice Integration Extension

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kpuc
    Member
    • Nov 2020
    • 51

    #1

    EspoCRM - OnlyOffice Integration Extension


    Click image for larger version  Name:	espo_onlyoffice_showcase.jpg Views:	0 Size:	42.5 KB ID:	125323

    Click image for larger version  Name:	image.png Views:	0 Size:	57.7 KB ID:	125324

    Click image for larger version  Name:	onlyoffice_showcase4.png Views:	0 Size:	148.0 KB ID:	125325

    Initially my idea for this project was to integrate EspoCRM with Nextcloud for managing and opening documents, but since it is always better to keep the documents in Espo itself, I decided to integrate directly with OnlyOffice since it is a very nice project.

    After years of manually managing documents inside my EspoCRM instance, I’m happy to share a new extension that integrates OnlyOffice Document Server directly into EspoCRM, allowing users to open, edit, and collaborate, translate, chat on documents directly inside the CRM interface.

    No downloads, no switching tabs, no external editors, no outdated documents — everything happens inside EspoCRM.

    This integration embeds the OnlyOffice editor directly into EspoCRM so users can work with documents attached to any record, any entity.

    Typical use cases:
    • Editing documents attached to records in any entities
    • Collaborating on Proposals or document Offers
    • Updating spreadsheets shared between team members
    • Viewing and editing PDFs stored in the CRM

    All documents open in a fullscreen editor within EspoCRM, and changes are saved back automatically.

    Key Features

    In-place Editing
    An “Open in OnlyOffice” button appears next to supported attachments in record detail views (single-file and multi-file fields).

    Fullscreen Embedded Editor
    Documents open in a fullscreen modal inside EspoCRM, keeping users in the same interface.

    Real-Time Collaborative Editing
    Multiple users can edit the same document simultaneously. You get a notification for someone joining the document and you can see their activity while editing.

    Each collaborator is identified by:
    • EspoCRM display name
    • Fallback to username if display name is not set
    Automatic Save-Back
    When the editor is closed, the updated document is saved back to EspoCRM without changing the ID of the attachment.

    If multiple users collaborate, OnlyOffice saves changes automatically when each user exits.

    File Format Support
    Editable formats
    • docx
    • xlsx
    • pptx
    • odt
    • ods
    • odp
    • rtf
    • txt
    • csv

    View-only legacy formats
    • doc
    • xls
    • ppt
    • pdf

    Admin Configuration Panel
    Admins can configure the integration from:
    Administration > OnlyOffice

    Settings include:
    • Document Server URL
    • JWT secret key

    Multilingual
    The extension includes 37 interface translations, matching EspoCRM language support.

    Requirements
    EspoCRM 8.0+
    OnlyOffice Document Server 7.x+
    PHP 8.1+
    PHP extension curl
    Important
    The OnlyOffice Document Server must be able to access your EspoCRM instance over HTTPS.

    For collaborative editing, it is recommended that both services:
    • share the same root domain, or
    • allow cross-origin requests (CORS).


    Installation
    1. Download the latest .zip release.
    2. Go to:
    Administration → Extensions
    1. Click Upload
    2. Select the extension package.
    3. Follow the installation steps.


    Configuration


    After installation open:
    Administration → OnlyOffice

    and configure:

    Document Server URL

    Example:
    Secret Key

    JWT secret configured in OnlyOffice during initial installation.
    JWT is recommended for production deployments.

    Finally:
    Administration > Clear Cache

    How It Works

    The extension integrates with EspoCRM using:
    • client-side UI enhancements
    • authenticated entry points
    • secure callbacks from the document server

    Architecture overview:

    EspoCRM client
    • Injects OnlyOffice buttons into attachment fields
    • Opens the editor in a fullscreen modal iframe

    EspoCRM server
    • editor session initialization
    • document download for OnlyOffice
    • save callbacks when documents are updated

    Security protections include:
    • attachment ACL checks
    • HMAC link tokens
    • optional JWT validation
    • callback host validation to prevent SSRF


    Supported Languages

    The extension includes 37 translations, including:
    • English
    • German
    • French
    • Spanish
    • Bulgarian
    • Italian
    • Japanese
    • Chinese
    • Ukrainian
    • and many others.

    Gallery




    If you need help with setting up OnlyOffice Document Server feel free to contact me on PM or after purchase directly on email. I'll be happy to help. The setup of Onlyoffice involves Docker + Apache/Nginx/Caddy and takes no more than 10 mins of effort overall.

    ​Buy now: https://buy.stripe.com/8x2aEW11QeLTb0fa2OdIA00
    Last edited by Kpuc; Today, 09:06 AM.
  • emillod
    Active Community Member
    • Apr 2017
    • 1571

    #2
    Wow! Looking good!

    Comment

    • Kpuc
      Member
      • Nov 2020
      • 51

      #3
      I forgot to add something important:

      - The extension respects both the portal record ACL, field level ACL
      - The extension respects normal users' role settings and both record ACL, field level ACL checks

      Edit mode is granted only when ALL of the following are true:
      1. The file extension supports native round-trip editing (docx, xlsx, …).
      2. The user has 'edit' access to the parent record the attachment belongs to.
      3. The attachment field on that parent entity is not read-only for the user.

      Comment

      • sapyantuk
        Senior Member
        • Oct 2020
        • 284

        #4
        Can we have a demo please .

        Comment

        Working...