I'm using Nintex for O365 to create a simple workflow that posts to a Web Service using the Web Request action. I use string builder actions to build my JSON object in a variable, but when I use the variable in the body of my request I get an error returned stating "Request JSON object for insert cannot be null".
I've emailed the variable's value to myself and logged it to the history list, confirming that the variable has the correct value when I submit, and I can copy and paste the text into the request body and it works fine, just not when I actually use the variable as the request body. It almost seems like the variable is not encoded in a way the action can understand.
Has anyone else run across this problem? Thanks.
Solved! Go to Solution.
I think that it's a bug because I have the exact same behaviour.
I've found a workaround explained in this discussion:
Tell me if it's not clear
I figured out a solution.
Step 1:Create variables as plain text or strings and set your data from the SharePoint item to that.
Step 2: Build your json call using the build string action and pull in your workflow variables into that string
Step 3: In the Web Request, pull in the one string variable that contains your json code
This should work well. I am working on a similar solution which will be out shortly and as soon as I finish it I will share some code and info.
The biggest thing on this in my case was to ensure the json was formatted correctly to not throw an error on the web request.