Sharepoint folder locations as flow variables

I have an existing KNIME workflow using shared network locations that I want to update to use Microsoft sharepoint locations. The existing workflow uses a table of strings that become path flow variables that are used later in excel reader, rule engine and empty table switch logic, and various file manipulation nodes (transfer files node, writing multiple processed files that have some logic based on what is in the data).

I have done testing on very simple sharepoint node workflow that simulates the start of my existing workflow with simulated files in the sharepoint locations, and I cannot determine how to create a proper flow variable that the excel reader node (for example) can utilize for the file location. The workflow will read a target file just fine if I manually brows to the sharepoint location, but I have tried many permutations of formats / inputs and always results in an error saying “does not exist”.

I assume that this should work, but I am assuming the error is not getting the proper format into the variable for sharepoint (I have tried with and without “string to path (variable)” node).

If anyone can provide some insight would be extremely helpful, the use case will have multiple benefits if I can get this to work using Sharepoint file system.

Hi @jwfott,

Can you possibly take a screenshot of both your workflow as well as an example of your file path flow variable and share it here?

Here is an example of a file path that has worked in the past with Sharepoint as a reference:

Cheers,
Dashiell

1 Like

Hello, thank you for the prompt response. With some iterative attempts, I was able to get the flow into a state that the variables work mostly as I would like (it does seem that the sharepoint “Path” is a bit confusing as to the format that gets used and when - I see a version of the path that looks like “(CONNECTED, microsoft-sharepoint, /Documents/ABC/abc)” and I see a version that looks more like “/Documents/ABC/abc”.

The “working mostly” comment is that it seems like there is no option to start with a “variable” in the node for sharepoint connector.

I will likely bump into another question as I move further into this modification to use sharepoint, I process data in the workflow, and then move the post processed files into subdirectories and delete the original files, then the workflow goes into a loop that looks for a “new” file to show up and be processed - if no file the workflow waits for a few minutes, then checks again, etc.

Will the sharepoint Microsoft Authentication “time out” and fail to connect after some xxx time, and any suggestions on how this could be handled? This workflow is intended to run continuously and process the data as it arrives, the prior networked folder connection did not have a login that would “time out”, so there was no need to handle this sort of situation.

This is the flow that I was able to pass in a variable to the excel reader on the original question:

Thanks again for the help!

1 Like

Hi @jwfott,

I’m glad to hear that you’ve had some success with the path flow variables so far.

When you say “start with a ‘variable’ in the [SharePoint connector] node” do you mean creating a flow variable within the node itself or sending a flow variable to the SharePoint connector node at the start of the workflow process?

I believe that the Microsoft Authentication will time out as KNIME has a global database operation timeout. To increase or change the timeout:

  • Open KNIME
  • Go to File → Preferences
  • In the Preferences dialog go to KNIME->Databases
  • Change the timeout
  • Close the dialog with the OK button

Feel free to reach out with any other questions or comments you might have!

Cheers,
Dash

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.