Move Documents between SharePoint and NetDocuments using Power Automate

For many organizations, both SharePoint and NetDocuments (NetDocs) are essential tools for document management and collaboration. While both platforms offer powerful features on their own, integrating them can provide even greater benefits, such as seamless access to NetDocs documents within SharePoint and enhanced collaboration capabilities. One way to achieve this integration is by using Power Automate, a cloud-based workflow automation tool developed by Microsoft. In this post, we’ll explore how to move documents between SharePoint and NetDocs using Power Automate, and how this integration can help businesses to streamline their document management processes, improve collaboration, and increase productivity.

What is NetDocs?

NetDocuments (also known as NetDocs) is a cloud-based document and email management system designed to help businesses store, manage, and collaborate on their files and documents. It was founded in 1999 and is now a popular document management system used by many law firms and other professional service organizations.

NetDocs provides a centralized platform for storing and organizing documents, making it easier for teams to collaborate and work on projects. It includes features such as version control, document sharing, email management, and secure access controls to help organizations ensure that their sensitive information is protected.

One of the key benefits of NetDocs is that it is a cloud-based system, which means that documents can be accessed from anywhere and on any device with an internet connection. This makes it a popular choice for businesses that have remote workers or that need to collaborate with clients or partners who are located in different locations.

Overall, NetDocs is a powerful document management system that helps businesses of all sizes to streamline their document management processes, increase collaboration, and improve productivity.

What is SharePoint?

SharePoint is a web-based collaboration and document management platform developed by Microsoft. It is a versatile tool that enables organizations to create and manage custom sites and applications for a variety of purposes, such as document management, project management, business intelligence, intranets, and extranets.

SharePoint allows users to create and manage web pages, documents, lists, and libraries, which can be accessed from anywhere and on any device with an internet connection. It includes a wide range of features such as version control, document collaboration, social networking, search, and workflow automation, which help users to manage their content effectively and collaborate with team members.

What is Power Automate?

Power Automate is a cloud-based workflow automation tool developed by Microsoft. It allows users to create automated workflows between different applications and services without needing to write any code. These workflows can be used to streamline business processes, automate repetitive tasks, and integrate different systems and applications.

Power Automate includes a library of pre-built connectors that allow users to connect to a wide range of apps and services, including Microsoft applications such as Office 365, Teams, and SharePoint, as well as third-party services such as Twitter, Dropbox, and Salesforce. Users can also create their own custom connectors to connect to proprietary or in-house applications.

Scenario

A legal firm has been using NetDocs to manage its documents for several years, but its team members have found it challenging to collaborate on documents in real-time. The firm has recently adopted SharePoint to enable better communication and collaboration among its staff and external users. The legal firm has not provided external users access to the NetDocs. So, there is a need for certain documents to be stored on SharePoint as well as on NetDocs. However, the firm is now facing challenges with document synchronization across both systems.

Solution

To address these challenges, the firm decides to integrate SharePoint and NetDocs to create a seamless document management process. The integration allows the legal firm to use the best features of both platforms. NetDocs remains the primary system for document storage and management, while SharePoint becomes the hub for communication, collaboration, and workflow automation.

Here are some potential benefits of the integration:

  1. Centralized document storage: NetDocs remains the primary system for document storage and management, but Power Automate will allow you to synchronize the documents between SharePoint and NetDocs.
  2. Improved collaboration: SharePoint enables real-time collaboration and communication among team members. With the integration, internal staff and external users can collaborate on documents and the documents will be synchronized with NetDocs.
  3. Streamlined workflows: The integration enables automated workflows that streamline document management processes, such as document review and approval.
  4. Enhanced metadata management: The legal firm can leverage SharePoint’s metadata capabilities to organize and manage metadata across both systems, making it easier to find and access documents.

Overall, integrating SharePoint and NetDocs can enhance a business’s document management processes, improve collaboration, and streamline workflows. By leveraging the strengths of Power Automate, SharePoint and NetDocs, businesses can create a powerful document management system that meets their unique needs.

Here are the steps of how Power Automate can be used to copy documents between SharePoint and NetDocs, in both directions.

SharePoint to NetDocs

What you will need?

  • Power Automate License
  • SharePoint Online site
  • NetDocs Destination Container ID

Trigger for the Workflow

We will be utilizing the SharePoint Trigger – When a file is created or modified (propertiers only)

Parameters:

  • Site Address: Choose the SharePoint Online site address.
  • Library Name: Choose the name of the library from which the document should be synchronized to NetDocs.

Actions used:

Action: SharePoint Action – Get File Content

The Power Automate action “Get File Content” for SharePoint is a feature that allows you to retrieve the content of a specific file from a SharePoint document library. Once the file content is retrieved, you can then use it in subsequent actions in your workflow.

To use the “Get File Content” action, you’ll need to provide the file’s URL or relative path within the SharePoint document library. After the file content is retrieved, you can use it in subsequent actions, such as copying the content to another location or sending it in an email.

Parameters:

  • Site Address: Choose the SharePoint Online site address.
  • File Identifier: Choose the identifier from the Trigger item mentioned in previous section.

Action: NetDocuments Create Document:

The Power Automate action “NetDocuments Create Document” is a feature that allows you to create a new document in a specific location within NetDocuments, a cloud-based document management system.

To use the “NetDocuments Create Document” action, you’ll need to provide the document’s name, location, and metadata values (if applicable). You can also choose to create a document from a template, specify the document type, and set other optional parameters.

Once the document is created, you can then use it in subsequent actions in your workflow. This action can be particularly useful for automating workflows that involve creating new documents in NetDocuments, such as onboarding new clients or creating new projects.

Overall, the “NetDocuments Create Document” action allows you to create new documents in NetDocuments directly from within Power Automate, streamlining your document management and workflow processes.

Parameters:

  • Description: Specify the destination Container ID from NetDocs
  • Document Content: The file content body that is returned from action item Get File Content.
  • Document Content(File Name): Specify a file name or we can use the File Name with Extension from the Trigger of the flow.
  • Add to recent: This can be set to Yes or No depending on your requirements.
  • Document Profile: If any profile properties needs to be passed to NetDocs. This is in JSON format.

Action: Compose

The Power Automate action “Compose” is a basic building block that allows you to create a custom output value by combining multiple inputs or expressions. It is a versatile action that can be used to manipulate and format data in various ways, such as concatenating strings, formatting dates, or creating arrays.

We will use this to store the id that is returned from the action NetDocuments Create Document.

Parameter:

Inputs: Choose the id from the previous action item NetDocuments Create Document

Entire Flow

NetDocs to SharePoint

Unfortunately, NetDocuments does not offer a trigger to activate when a file is uploaded or modified. Therefore, we must employ the Power Automate Schedule Trigger to automate the synchronization of documents from NetDocuments to SharePoint.

Trigger for the Workflow

Scheduled Cloud Flow

The Power Automate trigger “Scheduled Cloud Flow” is a feature that allows you to schedule a workflow to run at specific times or intervals. This trigger enables you to automate tasks that need to occur on a regular basis

Actions required

Action: NetDocuments – Get Container Contents

The “NetDocuments Get Container Contents” action in Power Automate allows users to retrieve a list of documents and subfolders contained within a specific container in their NetDocuments account. This action is useful when users want to automate a process that requires them to gather information about the documents and folders contained within a specific container, such as moving or copying files, or sending notifications when a new document is added.

Parameters

  • Container ID: Specify the container identifier from NetDocuments.
  • Information to return: I have just specified name. I still need to come across some documentation that provides all the properties we can return back.

Action: Parse JSON

The “Parse JSON” action in Power Automate is used to convert a JSON string into an object that can be used in subsequent actions in a flow. JSON, or JavaScript Object Notation, is a lightweight data interchange format that is commonly used to transmit data between a server and a web application.

Parameters:

  • Content: The output from NetDocuments Get Container Contents
  • Schema: You can use Generate from Sample by running a test on Get Container Contents or use the following Schema
{
    "type": "object",
    "properties": {
        "statusCode": {
            "type": "integer"
        },
        "headers": {
            "type": "object",
            "properties": {
                "Pragma": {
                    "type": "string"
                },
                "NDRestAPIAllowance": {
                    "type": "string"
                },
                "NDRestAPIAllowanceUsed": {
                    "type": "string"
                },
                "NDRestAPICost": {
                    "type": "string"
                },
                "ND-UID": {
                    "type": "string"
                },
                "ND-Repo": {
                    "type": "string"
                },
                "ND-Client": {
                    "type": "string"
                },
                "Timing-Allow-Origin": {
                    "type": "string"
                },
                "x-ms-apihub-cached-response": {
                    "type": "string"
                },
                "x-ms-apihub-obo": {
                    "type": "string"
                },
                "Cache-Control": {
                    "type": "string"
                },
                "Date": {
                    "type": "string"
                },
                "Content-Length": {
                    "type": "string"
                },
                "Content-Type": {
                    "type": "string"
                },
                "Expires": {
                    "type": "string"
                }
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "Results": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "DocId": {
                                "type": "string"
                            },
                            "EnvId": {
                                "type": "string"
                            },
                            "DocNum": {
                                "type": "integer"
                            },
                            "LimitAccess": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "DocId",
                            "EnvId",
                            "DocNum",
                            "LimitAccess"
                        ]
                    }
                },
                "TotalFound": {
                    "type": "integer"
                }
            }
        }
    }
}

Action: Apply to each

The “Apply to each” action is commonly used in scenarios where there is a need to perform an action on multiple items or records, such as processing a list of items retrieved from a SharePoint list, a database query, or an array of objects. With the “Apply to each” action, you can iterate over each item in the collection and perform a set of actions on them.

The apply to each runs on the Results Collection from the previous Action Parse JSON.

Following actions are included within the Apply to each Block

Action: Get Document profile

The “NetDocuments Get Document Profile” action in Power Automate is used to retrieve the metadata associated with a specific document stored in a NetDocuments repository.

Parameters:

  • Document ID: DocID from the Parse JSON Object.

Action: Parse JSON

In order to obtain the document profile information from the preceding “Get document profile” action, it is necessary to use the “NetDocuments Get Document Profile” action. This action retrieves details about the file name and extension, which can then be concatenated to create the file name that will be used when storing the document on SharePoint.

Parameter:
  • Content: Specify the output from the previous action Get Document Profile.
  • Schema: The schema can be generated using the sample by testing the Get Document Profile with some document ID or use the following schema.
{
    "type": "object",
    "properties": {
        "statusCode": {
            "type": "integer"
        },
        "headers": {
            "type": "object",
            "properties": {
                "Pragma": {
                    "type": "string"
                },
                "NDRestAPIAllowance": {
                    "type": "string"
                },
                "NDRestAPIAllowanceUsed": {
                    "type": "string"
                },
                "NDRestAPICost": {
                    "type": "string"
                },
                "ND-UID": {
                    "type": "string"
                },
                "ND-Repo": {
                    "type": "string"
                },
                "ND-Client": {
                    "type": "string"
                },
                "Timing-Allow-Origin": {
                    "type": "string"
                },
                "x-ms-apihub-cached-response": {
                    "type": "string"
                },
                "x-ms-apihub-obo": {
                    "type": "string"
                },
                "Cache-Control": {
                    "type": "string"
                },
                "Date": {
                    "type": "string"
                },
                "Content-Length": {
                    "type": "string"
                },
                "Content-Type": {
                    "type": "string"
                },
                "Expires": {
                    "type": "string"
                }
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "customAttributes": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "description": {
                                "type": "string"
                            },
                            "id": {
                                "type": "integer"
                            },
                            "value": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "description",
                            "id",
                            "value"
                        ]
                    }
                },
                "eSign": {},
                "location": {
                    "type": "object",
                    "properties": {
                        "account": {
                            "type": "string"
                        },
                        "cabOptions": {
                            "type": "integer"
                        },
                        "cabinet": {
                            "type": "string"
                        }
                    }
                },
                "misc": {
                    "type": "object",
                    "properties": {
                        "approved": {
                            "type": "boolean"
                        },
                        "archived": {
                            "type": "boolean"
                        },
                        "autoversioning": {
                            "type": "boolean"
                        },
                        "deleted": {
                            "type": "boolean"
                        },
                        "echo": {
                            "type": "boolean"
                        },
                        "external": {
                            "type": "boolean"
                        },
                        "externalUser": {
                            "type": "boolean"
                        },
                        "favorite": {
                            "type": "boolean"
                        },
                        "locked": {
                            "type": "boolean"
                        },
                        "officialLocked": {
                            "type": "boolean"
                        },
                        "queueForIndexing": {
                            "type": "boolean"
                        },
                        "signed": {
                            "type": "boolean"
                        }
                    }
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "administer": {
                                "type": "boolean"
                            },
                            "cabDefault": {
                                "type": "boolean"
                            },
                            "edit": {
                                "type": "boolean"
                            },
                            "noAccess": {
                                "type": "boolean"
                            },
                            "persistent": {
                                "type": "boolean"
                            },
                            "share": {
                                "type": "boolean"
                            },
                            "view": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "administer",
                            "cabDefault",
                            "edit",
                            "noAccess",
                            "persistent",
                            "share",
                            "view"
                        ]
                    }
                },
                "standardAttributes": {
                    "type": "object",
                    "properties": {
                        "LatestVersionLabel": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "VersionLabel": {
                            "type": "string"
                        },
                        "aclStatus": {
                            "type": "string"
                        },
                        "created": {
                            "type": "string"
                        },
                        "createdBy": {
                            "type": "string"
                        },
                        "createdByGuid": {
                            "type": "string"
                        },
                        "envId": {
                            "type": "string"
                        },
                        "extension": {
                            "type": "string"
                        },
                        "id": {
                            "type": "string"
                        },
                        "latestVersionNumber": {
                            "type": "integer"
                        },
                        "locked": {
                            "type": "boolean"
                        },
                        "modified": {
                            "type": "string"
                        },
                        "modifiedBy": {
                            "type": "string"
                        },
                        "modifiedByGuid": {
                            "type": "string"
                        },
                        "name": {
                            "type": "string"
                        },
                        "officialVer": {
                            "type": "integer"
                        },
                        "size": {
                            "type": "integer"
                        },
                        "syncMod": {
                            "type": "integer"
                        },
                        "url": {
                            "type": "string"
                        },
                        "versions": {
                            "type": "integer"
                        }
                    }
                }
            }
        }
    }
}

Action: Compose

To retrieve the file name for a document that is to be stored in SharePoint, it is necessary to use this action.

Parameters:

  • Inputs: name from the Parse JSON output and the extension from the Parse JSON output.

Action: Get Document Content

The “NetDocuments Get Document Content” action in Power Automate is used to retrieve the content of a specific document stored in a NetDocuments repository.

Parameters:

  • Document ID: The DocId from the Apply to each results.
  • Base64 encoded: No

Action: Parse JSON

After using the “Get Document Content” action, a JSON object is returned. To obtain the file content, it is necessary to parse the JSON object.

Parameters:

  • Content: Output from the Get Document Content Action.
  • Schema: Following schema can be used to get the content information
{
    "type": "object",
    "properties": {
        "statusCode": {
            "type": "integer"
        },
        "headers": {
            "type": "object",
            "properties": {
                "Pragma": {
                    "type": "string"
                },
                "Transfer-Encoding": {
                    "type": "string"
                },
                "NDRestAPIAllowance": {
                    "type": "string"
                },
                "NDRestAPIAllowanceUsed": {
                    "type": "string"
                },
                "NDRestAPICost": {
                    "type": "string"
                },
                "ND-UID": {
                    "type": "string"
                },
                "ND-Repo": {
                    "type": "string"
                },
                "ND-Client": {
                    "type": "string"
                },
                "Timing-Allow-Origin": {
                    "type": "string"
                },
                "x-ms-apihub-cached-response": {
                    "type": "string"
                },
                "x-ms-apihub-obo": {
                    "type": "string"
                },
                "Cache-Control": {
                    "type": "string"
                },
                "Date": {
                    "type": "string"
                },
                "Content-Disposition": {
                    "type": "string"
                },
                "Content-Type": {
                    "type": "string"
                },
                "Expires": {
                    "type": "string"
                },
                "Last-Modified": {
                    "type": "string"
                },
                "Content-Length": {
                    "type": "string"
                }
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "$content-type": {
                    "type": "string"
                },
                "$content": {
                    "type": "string"
                }
            }
        }
    }
}

Action: Create File

The “SharePoint Create File” action in Power Automate is used to create a new file in a specified document library within a SharePoint site. This action can be used to upload a file to SharePoint from a variety of sources, including OneDrive, a local file system, or an email attachment.

Parameters:

  • Site Address: Choose the SharePoint Online site where you want to store the document.
  • Folder Path: Document library where you want to store the document.
  • File Name: The output of the Compose action for File Name.
  • File Content: The body attribute from the previous action Parse JSON to get information on the document content returned.

That’s it. This will copy the file from NetDocuments to SharePoint Online.

In this blog we have provided a step-by-step guide on how to use Power Automate to move documents between SharePoint and NetDocuments, two popular cloud-based document management systems. The post explains how to set up the necessary connections and actions in Power Automate, including retrieving document metadata and content, and creating new files in the destination system. The guide includes screenshots and detailed instructions to help users automate document transfers and streamline their workflow.

black judge giving yellow envelope to young businesswoman