Hi. Try to create a new folder for example Report in the folder Upload and then set the pathToFolder “Report” if it didn’t work then you need to check your URL Path or something else.
Hi. Yes it my bug I fixe it later
Hi Rodney! I fixed and update new version.
If somebody want to upload the file to the library, only what you need it leave the field “pathToFolder” empty.
It works now. Thanks again for all your hard work on this. It is GREATLY appreciated.
Thanks Vitalii for creating this feature. I am getting the below error while using “SharePoint Session” activity.
Share point session Executing
Share point session Faulted
Share point session : Value does not fall within the expected range.
Do you know why I am getting it?
Main Executing
Flowchart Executing
Convert from string to secure string Executing
Convert from string to secure string Closed
Share point session Executing
Share point session Faulted
Share point session : Value does not fall within the expected range.
Flowchart Faulted
Main Faulted
Hello Rudravas.
I don’t believe what “I don’t require any username / pwd to access the SP site.” because every microsoft account have login and password, if your site is public why you wrote (http://teams.xxxx.com/), so this url is not full, look example. I can’t testing SP without login and password, I don’t have public SP, maybe you need create credential for your site.
Have a nice day.
I have MFA in my Sharepoint, and my Share point session features error “: Cannot contact web site ‘https…/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Forbidden’. The response headers are 'X-SharePointHealthScore=0…”.
How can I solve this problem?
Hello Leo. This activiti dosn’t working with MFA. You can create new user for bot and disable MFA for bot_user. Have a nice day.
I’m able to successfully upload a text file to my target document library but the output parameter for LinkPath is always null. I’m uploading to SharePoint Online. Any idea why the LinkPath isn’t returned?
Do we have any activity for getting list of the files in a sharepoint folder?
Hey Tyler can you share your example? I am having a hell of a time trying to get this thing to work. Can anyone show the full steps? I am assuming we start with Convert string to secure, sharepoint session then, upload?
Thanks,
John
John, I’ll list the steps it is pretty straightforward once I had it figured out.
- You are correct, you’d start with converting string to secure (or another method of getting your PW as a SecureString).
- You’ll then need to use the “Share point session” activity to initialize a “ClientContext” variable (for the “Upload” activity to use). I entered the url for my site collection as the “UrlPath” value, my email address used to access SP for the “UserName” value, and the secureString variable that was already created as the “UserPassword” value.
- Last you’ll use the “Upload” activity. Use the ClientContext variable you created as the “ClientContextSession” value, the name of the document library as the “LibraryName”, the path to the file you wish to upload as the “LocalPath”, and for the “PathToFolder” value I used the relative path of the document library that I named to upload the file to.
Interestingly, I had to go back through and recreate this (I’ve moved on to using the Graph API as I also want to populate metadata in the columns of the item) to answer your question and my LinkPath variable appears to work properly now. Not sure what I did differently this time though…
Hope this helps!
Hi @jboli48867,
You can try the other approach to upload the files to sharepoint using invoke code
with help of the Assembly microsoft.sharepoint.client
check the sample for further deep dive
Upload_share_point (2).zip (3.0 KB)
In the above sample am using different ways to uploading a file
-
SaveBinaryDirect method on the Microsoft.SharePoint.Client.File class
benefits
- No file size limits. Time-out occurs after 30 minutes.
- Only use this method if you’re using a user-only authentication policy. A user-only authentication policy is not available in a SharePoint Add-in, but can be used in native device add-ins, Windows PowerShell, and Windows console applications.
-
ContentStream property on the FileCreationInformation class.
Disadvantages
- file size limits.Upto 256 Mb
- Recommended for,SharePoint,ServerSharePoint Online
-
Content property on the FileCreationInformation class.
Disadvantages
Maximum file size that can be uploaded is 2 MB. Time-out occurs after 30 minutes.
Get the list of Files and Folder names from Share_point
Get List_of_files_and_folder_name_from_sharepoint.zip (2.8 KB)
Dependencies
- Microsoft.sharepoint.client.dll
- Microsoft.sharepoint.client.runtime.dll
Regards
Sanjay Shankhla
I am trying to use sharepoint activity to download files.
Sharepoint session activity give me error “The ‘username’ argument is invalid”
user name is a string variable. I am not sure what is wrong with it.
@Gowtham_M does you workflow run with no issues if you type in the user between quotation marks? (hard coded value)
Looks like i need to give @domainname.com along with username.
now i am getting another error which says “IDCRL response header from server is not valid”
Hi , I have a issue in connecting sharepoint session …value doesnot fall in expected range