how to get sharepoint list data into node.js

%3CLINGO-SUB%20id%3D%22lingo-sub-1033051%22%20slang%3D%22en-US%22%3Ehow%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1033051%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20created%20bot%26nbsp%3B%20using%20below%20link%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-in%2Fmicrosoftteams%2Fplatform%2Fget-started%2Fget-started-nodejs-app-studio%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-in%2Fmicrosoftteams%2Fplatform%2Fget-started%2Fget-started-nodejs-app-studio%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20want%20sharepoint%20list%20data%20into%20bot%20%2Chow%20do%20i%20get%20sharepoint%20list%20data%20into%20bot%20using%26nbsp%3B%20node.js%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1033051%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1035357%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1035357%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F468082%22%20target%3D%22_blank%22%3E%40tejaswini1010%3C%2FA%3E%26nbsp%3Byou%20can%20use%20the%20SharePoint%20API's%20to%20get%20the%20required%20data%20into%20your%20bot.%20Check%20below%20API%20documents.%20Please%20let%20me%20know%20if%20you%20are%20looking%20for%20something%20else.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsp-add-ins%2Fsharepoint-net-server-csom-jsom-and-rest-api-index%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsp-add-ins%2Fsharepoint-net-server-csom-jsom-and-rest-api-index%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1038100%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1038100%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F322587%22%20target%3D%22_blank%22%3E%40Abhijit_MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehii%20%2C%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20reply%2C%20i%20have%20implemented%20that%20code%26nbsp%3B%20in%20node%20.js%26nbsp%3B%20%26nbsp%3Bfor%20bot%20%2C%20i%20have%20made%26nbsp%3B%20changes%26nbsp%3B%20in%20bot.js%20file%20but%20still%20i%20get%20no%20reply%20from%20bot%2C%20my%20requirement%20is%20that%20%2C%20I%20have%20sharepoint%20list%20%2C%20in%20which%26nbsp%3B%20i%20have%20saved%20questions%20and%20answer%20%2C%20i%20have%20made%20bot%20using%20following%20link%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-in%2Fmicrosoftteams%2Fplatform%2Fget-started%2Fget-started-nodejs-app-studio%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-in%2Fmicrosoftteams%2Fplatform%2Fget-started%2Fget-started-nodejs-app-studio%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20want%20when%20user%20ask%20question%20%2C%20if%20it%20matches%20with%20sharepoint%20column%20of%20list%20that%20answer%26nbsp%3B%20should%20displays%20in%20bot%2C%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1038187%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1038187%22%20slang%3D%22en-US%22%3EPlease%20provide%20me%20steps%20how%20to%20do%20that%20%2C%3CBR%20%2F%3EI%20have%20sharepoint%20list%20with%20question%20and%20answer%20column%20%2C%3CBR%20%2F%3EI%20have%20made%20bot%20as%20mention%20earlier%3CBR%20%2F%3EI%20did%20not%20get%20replay%20which%20is%20saved%20in%20sharepoint%20list%20if%20question%20asked%20in%20bot%20matches%20with%20question%20which%20present%20in%20sharepoint%20list%2C%20if%20it%20matches%20thats%20answer%20should%20get%20displays%20in%20bot%2C%3CBR%20%2F%3EPlease%20provide%20me%20steps%20as%20soon%20as%20possible.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1039907%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1039907%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F468082%22%20target%3D%22_blank%22%3E%40tejaswini1010%3C%2FA%3E%26nbsp%3BFor%20the%20scenario%20that%20you%20mentioned%2C%20looks%20like%20the%20QnA%20bot%20is%20the%20best%20suit.%20try%20this%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FBotBuilder-Samples%2Ftree%2Fmaster%2Fsamples%2Fcsharp_dotnetcore%2F11.qnamaker%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EQnA%3C%2FA%3E%26nbsp%3Bbot%20sample%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040169%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040169%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F322587%22%20target%3D%22_blank%22%3E%40Abhijit_MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20i%20am%26nbsp%3B%20new%26nbsp%3B%20%2C%20i%20get%20confused%2C%20please%20provide%20me%20step%2C%20in%20that%20exsitance%20app%20how%20do%20i%20get%20sharepoint%20list%20data%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040197%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040197%22%20slang%3D%22en-US%22%3Ei%20have%20used%20node.js%20for%20app%20%2C%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040248%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040248%22%20slang%3D%22en-US%22%3Ehi%2C%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EJust%20tell%20me%20the%20steps%20through%20which%20i%20wiill%20get%20sharepoint%20list%20data%20in%20that%20app%20using%20node.js%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1041822%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1041822%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F468082%22%20target%3D%22_blank%22%3E%40tejaswini1010%3C%2FA%3E%26nbsp%3BYou%20need%20to%20use%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsp-add-ins%2Fworking-with-lists-and-list-items-with-rest%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESharepoint%20Api's%3C%2FA%3E%26nbsp%3Bto%20access%20the%20Sharepoint%20data%20in%20your%20Nodejs%20app.%3C%2FP%3E%0A%3CP%3E-%20Call%20sharepoint%20authentication%20api%3C%2FP%3E%0A%3CP%3E-%20Once%20token%20is%20obtained%20in%20authentication%20response%2C%20call%20api%20to%20get%20the%20sharepoint%20list%3C%2FP%3E%0A%3CP%3E-%20Create%20model%20to%20handle%20the%20response%20of%20the%20previous%20api%3C%2FP%3E%0A%3CP%3E-%20You%20need%20to%20write%20the%20logic%20to%20find%20the%20answer%20from%20the%20sharepoint%20list%20that%20you%20received%20in%20previous%20response.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20getting%20data%20from%20sharepoint%20in%20case%20if%20your%20bot%20is%20not%20responding%20-%20please%20cross%20verify%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbots%2Fhow-to%2Fcreate-a-bot-for-teams%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EBot%20settings%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1041844%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20get%20sharepoint%20list%20data%20into%20node.js%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1041844%22%20slang%3D%22en-US%22%3EHii%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3Ehow%20to%20call%20sharepoint%20authentication%20api%3F%3C%2FLINGO-BODY%3E
Occasional 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?