Read text file directly from SharePoint folder

Hello Community,

I need help with reading a text file from a SharePoint folder.

I have a project where I need to:

  1. get last text value from a text file
  2. update the last value within the workflow
  3. write the current value back into the text file as the new value.

This text file is on a SharePoint site because it is also accessed by other users.
I am working within the MicrosoftOffice365 Scope activity. After establishing connection to my SharePoint site, and getting the .txt file name with a Get File/Folder activity, I am trying to use a Read Text File activity to get the content of my file but this is producing an error, “Value of type DriveItem cannot be converted to string”. Is there any way to extract the file name from the DriveItem type so that I can use a Read Text File activity?

My workaround solution so far as been to use the Download File activity to download the file into my project folder before reading it. Then, uploading it to the SharePoint folder again. This approach is a little clumsy and not efficient. So, I am trying to see if there is a way to read the text file directly from the SharePoint folder without having to first download it.
Many thanks!

Hi ,

I would suggest you to sync Sharepoint folders to local folder → then you can access it using Read Text file activity

Thanks for your idea @Uthraa_S.