how to get sharepoint list data into node.js

Copper Contributor

I have created bot  using below link

https://docs.microsoft.com/en-in/microsoftteams/platform/get-started/get-started-nodejs-app-studio

 

I want sharepoint list data into bot ,how do i get sharepoint list data into bot using  node.js

9 Replies

@tejaswini1010 you can use the SharePoint API's to get the required data into your bot. Check below API documents. Please let me know if you are looking for something else.

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/sharepoint-net-server-csom-jsom-and-rest-...

@Abhijit_MSFT 

hii , 

Thanks for reply, i have implemented that code  in node .js   for bot , i have made  changes  in bot.js file but still i get no reply from bot, my requirement is that , I have sharepoint list , in which  i have saved questions and answer , i have made bot using following link

https://docs.microsoft.com/en-in/microsoftteams/platform/get-started/get-started-nodejs-app-studio

 

I want when user ask question , if it matches with sharepoint column of list that answer  should displays in bot,  

Please provide me steps how to do that ,
I have sharepoint list with question and answer column ,
I have made bot as mention earlier
I did not get replay which is saved in sharepoint list if question asked in bot matches with question which present in sharepoint list, if it matches thats answer should get displays in bot,
Please provide me steps as soon as possible.



Thanks,

@tejaswini1010 For the scenario that you mentioned, looks like the QnA bot is the best suit. try this QnA bot sample code.

@Abhijit_MSFT 

  

As i am  new  , i get confused, please provide me step, in that exsitance app how do i get sharepoint list data

i have used node.js for app ,
hi,,


Just tell me the steps through which i wiill get sharepoint list data in that app using node.js

@tejaswini1010 You need to use Sharepoint Api's to access the Sharepoint data in your Nodejs app.

- Call sharepoint authentication api

- Once token is obtained in authentication response, call api to get the sharepoint list

- Create model to handle the response of the previous api

- You need to write the logic to find the answer from the sharepoint list that you received in previous response.

 

After getting data from sharepoint in case if your bot is not responding - please cross verify the Bot settings 

 

 

Hii,


how to call sharepoint authentication api?