cancel
Showing results for 
Search instead for 
Did you mean: 

Sample of http connector with post request

inderjeetksasan
Deputy Chef II
Deputy Chef II

Team,

I am trying to use http connector in workato, and looking for sample request with POST and body in it. Please share the sample if you have any.

 

Regards,

Inderjeet

1 ACCEPTED SOLUTION

You can construct the POST body however you need to, so long as it's a valid JSON.

If you want to parse the response of the request, this is also possible.

Here's what I usually do to set it up:

1. Set up the request above and test the recipe.

2. Go to the test job and look at the output of the request. Click "Copy Raw JSON"

workato_http_post_02.jpg

3. Go back to the HTTP action in the recipe editor, and in Response > Response Schema, click "Use JSON"

workato_http_post_02b.jpg

4. In the JSON editor, paste the raw JSON you copied in step 2. 

5. Delete everything except the "response" object (keep what is highlighted below)

workato_http_post_03.jpg

Like this:

workato_http_post_04.jpg

6. Click Next and then Generate, and this will create a schema of output data pills based on the JSON

workato_http_post_05.jpg

7. You can now access the data pills in subsequent steps in the recipe

workato_http_post_06.jpg

View solution in original post

3 REPLIES 3

gary1
Executive Chef III
Executive Chef III

Here you go:

workato_http_post.jpg

Thanks for your reply. Is it possible to parse the json in the body?

You can construct the POST body however you need to, so long as it's a valid JSON.

If you want to parse the response of the request, this is also possible.

Here's what I usually do to set it up:

1. Set up the request above and test the recipe.

2. Go to the test job and look at the output of the request. Click "Copy Raw JSON"

workato_http_post_02.jpg

3. Go back to the HTTP action in the recipe editor, and in Response > Response Schema, click "Use JSON"

workato_http_post_02b.jpg

4. In the JSON editor, paste the raw JSON you copied in step 2. 

5. Delete everything except the "response" object (keep what is highlighted below)

workato_http_post_03.jpg

Like this:

workato_http_post_04.jpg

6. Click Next and then Generate, and this will create a schema of output data pills based on the JSON

workato_http_post_05.jpg

7. You can now access the data pills in subsequent steps in the recipe

workato_http_post_06.jpg