netDocShare Sync - Power Automate Bidirectional (SharePoint - NetDocuments)

netDocShare Sync - Power Automate Bidirectional (SharePoint - NetDocuments)


A close up of a signDescription automatically generated

 

User Guide 

netDocShare Sync

Power Automate - Bidirectional (SharePoint - NetDocuments)


A screenshot of a computerDescription automatically generated




1. About This Flow 

This Power Automate cloud flow keeps NetDocuments and SharePoint Online in sync. On a schedule, it reads a control list in SharePoint, and for each row it can create a SharePoint site library, create (or reuse) a NetDocuments Saved Search, and set up a sync job between the two - or remove an existing sync job. Each row's status is written back to the control list, so the flow is safe to re-run. 

1.1 Workflow Overview 

  1. The flow starts on a schedule (Recurrence) or when you run it manually. 
  2. It reads your identity and checks that you are authorized to run it. 
  3. It reads the control list (PA-SavedSearch-Control) in SharePoint. 
  4. For each row it performs the requested action: remove a job or create the site library + saved search + sync job. 
  5. It updates each row with the result (created / job ID / errors). 

2. Quick Start (End Users) 

Follow these steps every time before you run the flow. You do not need to understand the internal logic - just set the values listed here. 

  1. Open the flow: In Power Automate, go to My flows (or the shared environment), find Final - PA-Bulk-Sync-ND<->SP-SavedSearch-Site, and click Edit. 
  2. Check the connections: At the top, the Get my profile (V2) and SharePoint actions must show a valid (green) connection. If any shows a warning, click it and re-authenticate with your account. 
  3. Update the settings tiles: Open each of the purple Compose tiles near the top and set its value - see Section 3. These are: licenseKey, tenantID, savedSearchContainerId, spTenantUrl 
  4. Set the schedule (optional): Open the Recurrence trigger and set how often it should run (for example, every day at 6:00 AM). Leave as-is if you will run it manually. 
  5. Prepare the control list: In SharePoint, open the PA-SavedSearch-Control list and add or update one row per user/site you want to process - see Section 4. 
  6. Save: Click Save (top right). Saving is required for your changes to take effect.
  7. Test first: Click Test then Manually then Run flow. Watch each step turn green. Then open the control list to confirm rows updated as expected.

3. Settings You Must Update 

These are the tiles at the top of the flow, in the order they appear. To change one: click the tile to expand it, edit the value in the input box, then click away. Remember to Save the flow when done. 

Setting (tile)

What it is / what to enter

Update frequency

licenseKey

License key for the integration. Confidential.

When renewed

tenantID

Your NetDocuments tenant (repository) identifier.

Rarely

savedSearchContainerId

ID of the NetDocuments container (cabinet/workspace) where saved searches are created or reused.

When target container changes

spTenantUrl

Your SharePoint Online tenant root URL

Rarely


4. The Control List (PA-SavedSearch-Control) 

The flow reads this SharePoint list and processes one row at a time; each row represents one user/site. The columns below show the type, who sets the value (you or the flow), and what to enter. Add a row to onboard a user/site; set the flags to control the action. 

Column

Type

Purpose / what to enter

Email

Single line of text

User's email

DisplayName

Single line of text

User's name

Site_Created

Yes/No

Set NO

Site_URL

Single line of text

The resulting SharePoint site/library URL (written back by the flow).

Saved_Search_Created

Yes/No

Set Yes when the NetDocuments saved search is created or reused.

Saved_Search_ID

Single line of text

ID of the created/reused saved search (written back).

Job_ID

Single line of text

ID of the sync job. Written back on create;  

Remove_Job

Yes/No

Set No

Last_Run_On

Date and Time

Timestamp of the last time the flow processed this row.

Last_Error

Multiple lines of text

Error detail written when a step fails for this row. Blank = success.


4.1 How to use it 

  1. To onboard a new user/site: add a row with the user's Email (and Title/DisplayName), Remove_Job = No, and Site_Created = No. The flow will create the library, saved search, and sync job. 
  2. To remove a sync: set Remove_Job = Yes on the existing row (it must still hold its Job_ID). The flow deletes the job and resets the row. 
  3. To re-run safely: leave completed rows as they are - the flow skips work already marked done (Site_Created = Yes, Saved_Search_Created = Yes).  

5. Admin Reference - What Each Stage Does 

This section explains the flow's logic for administrators who maintain it. End users can skip this. 

5.1 Setup and authorization 

  1. Recurrence - trigger; defines the schedule. 
  2. Get my profile (V2) - reads the running user's Office profile (used for the authorization check and email). 
  3. baseUrl ... savedSearchEndDate - Compose tiles holding configuration (see Section ).
  4. HTTP - Get User isAuthorised + Parse User Authorized - calls the API to confirm the user may run the sync, then parses the response. 
  5. Initialize variable - siteOk / savedSearchOk - boolean flags reset per row to track partial success. 
  6. Authorization Check (Condition) - True branch runs the sync; False branch does nothing (user not authorized).

5.2 Per-row processing (Apply to each row) 

Runs over every item returned by Get items - PA-SavedSearch-Control. 

  1. Reset siteOk / savedSearchOk - clears the success flags for this row. 
  2. Compose Email / SiteAlias / LibraryName / SavedSearchName / SiteUrlForThisUser - builds the per-user names and URL from the row data and spTenantUrl. 
  3. Condition - Remove Job (True): if Job_ID is not empty, HTTP - Delete Sync Job, then on success Update item - Reset row; on failure Update item 1. 
  4. Condition - Remove Job (False): if Site_Created = No, HTTP - Create Site Library, then on success Update item - Mark Site Created (sets siteOk); on failure Update item 3. If already created, Set variable 2 marks siteOk. 
  5. HTTP - Create or Reuse Saved Search: on success Update item - Mark Saved Search Created (sets savedSearchOk); on failure Update item 5. 
  6. Condition - Ready to create job (both flags true): HTTP - Resolve ND Folder, HTTP - Resolve SP Folder, HTTP - Create Sync Job, then Update item 6 on success or Update item 7 on failure. 

6. Running and Troubleshooting 

6.1 Running the flow 

  1. Manual: open the flow then Test then Manually then Run flow. Use this for first-time and verification runs. 
  2. Scheduled: once saved with a Recurrence schedule, it runs automatically. Check Run history to confirm. 
  3. Review results: after a run, open PA-SavedSearch-Control and check the result columns on each row. 

6.2 Common issues 

Symptom

Likely cause & fix

Flow stops at Authorization Check (False branch)

The running user is not authorized. Confirm the account and that 'HTTP - Get User isAuthorised' returns authorized = true.

HTTP actions fail (401 / 403)

Bad or expired apiKey, licenseKey, tenantID, or referer. Re-enter current credentials in the Compose tiles and Save.

HTTP actions fail (404 / bad URL)

Check baseUrl, spTenantUrl, and savedSearchContainerId for typos.

Site library not created

Connection lacks SharePoint permission, or the site/library already exists. Check the 'HTTP - Create Site Library' response.

Saved search not created

Verify savedSearchStartDate/EndDate format and that the container ID is valid.

Sync job not created

'Ready to create job' requires both siteOk and savedSearchOk true. Fix whichever earlier step failed, then re-run.

Row shows an error after running

Read Last_Error, fix the noted cause, and re-run - completed rows are skipped.