Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

How do I send a POST Request to Sharepoint

pauchamb Indiana, USA Qubie ✭
edited June 2020 in Integrations

Hey all,

I'm trying to create an Action following a survey being submitted that sends a POST web service request to an internal SharePoint site. I've already configured a bearer token and whatnot. The problem I'm running into is that in *Postman* I can just construct the body (JSON ) to be the following:

{ "Title": "Some random title"}

and it will post fine to the list. When I come over to Qualtrics and use the same two headers for accept and content-type I get lost at the body. I pass in "Title" = "Some random title" (which then Qualtrics removes the quotes) but then on survey completion, the item is never pushed to the SP list. Is there something I'm missing? I've also tested this with and it posts fine so clearly I must not be putting the right body in this request for qualtrics.

Best Answer

  • pauchamb
    pauchamb Indiana, USA Qubie ✭
    Accepted Answer

    Hey Tom,

    Thanks for reaching out so quickly! What I ended up doing was calling a web service request inside the actual survey flow. With that, I was able to pass in a Query Parameter of {Accept: application/json;odata=verbose} and that seemed to do the trick. Additionally, I passed the {Authorization: Bearer [TOKEN]} in the Custom Headers portion. The advantageous part of including this in the survey flow rather than as an Action is that I was then able to save the returned data (specifically the date/time created) and add that as embedded data to show if/when the successful POST went through.

    The only limitation of this was that I couldn't pass the answers directly into the keys but instead had to save the answers in embedded data variables and pass those into the keys as values.