Solved

Web requests for Nintex Forms for O365

  • 27 June 2023
  • 4 replies
  • 173 views

Userlevel 1
Badge +9

Hello,

 

I have a form that will need to use web requests so that I am able to pull and or prepopulate other fields. I have a URL (api) that was provided to me to use for it. 

I cannot figure out the label text or what to enter in to begin making that connection to pull the info I need… I then have rules setup to push to the other text boxes you see but not sure if I’m approaching this correctly. I apologize and very new to using this, your help is greatly appreciated!

 

 

 

icon

Best answer by jpacheco 27 June 2023, 22:37

View original

4 replies

Userlevel 6
Badge +16

Hi @jpacheco 

You need to know the expected result from the Web Service Call. Use Postman. You may use your browser for simple web service calls,

 

Here is a Web Service which will return the IP of your machine
URL: https://ipv4.jsonip.com/

Running that on a browser, return the following JSON
{"ip":"2001:f10:1943:152:187f:1181:1cbc:11b","country":"MY","geo-ip":"https://getjsonip.com/#plus","API Help":"https://getjsonip.com/#docs"}

The JSONPath to the IP value is: $.ip

 

Below is the setting for the Web Service

 

The Result

 

It depends on the Web Service Server whether you receive the result instantly or may need to way.

Its best to test the Web Service Call first using Postman tool. Once the result is confirmed, then you can port the Web Service to your Form

Userlevel 1
Badge +9

@Garrett ,

Thanks for your response!! I have verified via https://httpie.io/app and able to receive the following below… maybe its my label text that’s incorrect? IDK….🤷🏻‍♀️

I’ve tried different variations such as $.vendorNumber and $.*.vendorNumber to input within the label text section but do not receive any output.

I also followed the video located below (time:2:22) and tried using the formula but could there still be an issue with my label text? Or is entered this correctly?

 

 

Userlevel 6
Badge +16

I suggest you to use JSONPATH tool eg https://jsonpath.com/ to check your JSON path.

Enter the full JSON result into the INPUT and the JSONPATH. 

 

Your partial image show the vendorNumber so your Jsonpath “$.vendorNumber” seems correct.
Are there other vendorNumber in the JSON eg multiple records returned?  

Userlevel 1
Badge +9

@Garrett ,

I appreciate all your assistance but I finally figured it out...I changed the request header info in my web request control where I enter in my vendor number to “Accept:application/json” and then for the rest of my web request controls I used a formula (like in the video) for the service url. As far as the request header info for the rest of my web request controls, I used the “x-api-key:” and now all is working !

Reply