Transfer file from /tmp/job-number/workflow/ to Sharepoint

Hey there,

thanks for the additional details.

If I understand correctly you want to unzip a file and transfer the files in that zip to sharepoint.

The files are located in the root of the workflow that you run (I assume you will have build the logic somehow for the zip file to get there…).

I’d try to do it without python as python is not very good for handling path-type variables:

You can use a node “Decompress files”.

The top branch gets the path to the current workflow (similar to what you do in Python) and then in Column Expressions (legacy) the fileName is added:

You can replace the first line with what the real filename is (“files.zip” as per your example)

You use this Path variable to define your Source - the zip-file you want to extract.

The bottom branch connects to your SharePoint and you use that file system as a target… for now I assume that you know how to establish a connection to SharePoint…

If you don’t know - for Hub use you’d best connect via App ID and Client Secret (you can use Secrets Manager to store all this information). Note: You either need to be tenant admin or need a tenant admin to set this up for you.

I covered how to do this in my latest video:

Alternatively you can connect and store your token in a local file (not recommended as not secure…) using this node:

Here is the Workflow (note: was not able to test on Hub…):

xferfiles.knwf (87.9 KB)

1 Like