cancel
Showing results for 
Search instead for 
Did you mean: 
priyaes
Nintex Newbie

How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

Can anyone suggest the steps to read and update data from sharepoint list using botflow.

0 Kudos
Reply
6 Replies
mbalslow
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

Hi @priyaes,

There are many ways of approaching this. First of all, it is relevant to consider what version of Sharepoint you are using as that dictates the available options.

Potentially, you could:

- Access; read, write, update data in Sharepoint lists using an API, which you can call either using the REST action or one of the programming actions like Python.

- Access your Sharepoint via the UI in a browser like you would manually, then you would build the steps of opening the browser, signing in, navigate to the list, and the perform the relevant steps using the bot like you would manually. Here, depending on the objective, you can apply different approaches. For example, if you want to read a lot of data, you could use the function in Sharepoint to export the list to Excel and then read the data from Excel.

 

So there are various options. It depends on your available options and the objectives. I have made plenty of solutions with both approaches.

Reply
priyaes
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

Thank you for your sugesstion.I am using sharepoint online environment.

It will be help if you can share images of the settings for REST call for GET,POST method.

I tried the GET method but unable to read data.

Facing the below issue.

err nbr = 5 err desc = The remote server returned an error: (403) Forbidden.

0 Kudos
Reply
priyaes
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

Hi @mbalslow ,

Today I tried the approach of export to excel in sharepoint list.But I am stuck in the step to detect the save action.Can you let me know the best action that can be used to save or open the excel.I have tried targetting and mouse records both is not working.

Your thoughts will be helpful on this.

0 Kudos
Reply
priyaes
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution
Hi @mbaslow,

Greetings for the day.Any thoughts on my below query.
0 Kudos
Reply
mbalslow
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

Hi @priyaes,

 

Apologies for the late response - busy days...

 

To answer your different points:

  1. API call to Sharepoint Online
    • This is not possible with the standard REST action in Foxtrot, unfortunately, as it is not advanced enough. You will need to write a bit of code to get started. One way is to use Python and this package. If you have no to limited programming experience, this might be too complicated and complex. Of course, if you would like our assistance in implementing this, let me know. Here is an example snippet getting all the items of a list:
      from settings import settings
      from office365.runtime.auth.authentication_context import AuthenticationContext
      from office365.sharepoint.client_context import ClientContext
      
      
      ctxAuth = AuthenticationContext(url=settings["sharepoint_url"])
      if ctxAuth.acquire_token_for_user(username=settings["sharepoint_username"], password=settings["sharepoint_password"]):
          ctx = ClientContext(settings["sharepoint_url_site"], ctxAuth)
      else:
          print(ctxAuth.get_last_error())
      
      def get_data(list):
          list_object = ctx.web.lists.get_by_title(list)
          items = list_object.get_items()
          ctx.load(items)
          ctx.execute_query()
      
          data = []
      
          for item in items:
              data.append(item.properties)
      
          return data
      
      get_data("Name of your Sharepoint list")
  2. Saving the file after downloading it.
    • This is a standard scripting question. I made a very simple (no audio) video some time ago to another client illustrating how you would go about clicking to download a file and then save it using standard actions. Of course, how you click to download the file in the first place is a bit different on Sharepoint compared to the video, but the concept afterwards with the download bar should be the same.
    • Video: https://www.screencast.com/t/aUGqz9LVX

View solution in original post

Reply
priyaes
Nintex Newbie

Re: How to read and update data in a Sharepoint list using Foxtrot RPA

Jump to solution

@mbalslow ,

 

Thank You, this perfectly suits my secnario.

Kudos to you.

0 Kudos
Reply