cancel
Showing results for 
Search instead for 
Did you mean: 

How do I enter values into Workato's OpenAI Custom Action?

JayMappus
Deputy Chef III
Deputy Chef III

Hi,

I used the "guided setup"  but I cannot figure out how to add datapills to the "Request body parameters" it created. Below is how I configured using the Guided Setup:

Setup OpenAI custom action from sample request

  Request type = JSON request body

  Response type = JSON response

  Request body
{ "model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Say this is a test!"}], "temperature": 0.7 }


Request headers:

Content-Type: application/json

Authentication: XXXX____XXX

Then clicked the "Send request" button and received a 200 - ok of the following Response Body:

{
id: chatcmpl-AvCBobEWR___exCiZYVkfd,
object: chat.completion,
created: 1738194916,
model: gpt-4o-mini-2024-07-18,
choices:
[

{
index: 0,
message:
{
role: assistant,
content: This is a test! How can I assist you further?,
refusal: null
},
logprobs: null,
finish_reason: stop
}
],
usage:
{
prompt_tokens: 13,
completion_tokens: 13,
total_tokens: 26,
prompt_tokens_details:
{
cached_tokens: 0,
audio_tokens: 0
},
completion_tokens_details:
{
reasoning_tokens: 0,
audio_tokens: 0,
accepted_prediction_tokens: 0,
rejected_prediction_tokens: 0
}
},
service_tier: default,
system_fingerprint: fp_72___b54c
}

But when I go to add values (either datapills or constants) to the fields, there is no place to put / enter them. The Input / "Request body parameters" have no input fields for the datapills.

I feel that I'm missing something obvious but the support docs and ChatGPT isn't helping. 

Thank you

3 REPLIES 3

Prudvi
Deputy Chef III
Deputy Chef III

Hi @JayMappus,
Did you try adding the JSON request body manually and see if you are still facing the same issue.
Regards,
Prudvi

vinay
Deputy Chef II
Deputy Chef II

Screenshot 2025-01-30 162333.pngHi @JayMappus 

I tried setting it up manually and was able to create the body and send datapills successfully. Please try the manual setup, as it is working.

I am unable to try the guided setup due to too many requests from OpenAI. Please let me know if it works for you.

Vinay Kumar N

shivakumara
Executive Chef II
Executive Chef II

Hi @JayMappus,

I’ve outlined the details of my approach along with my inputs below:

1. Guided Setup (See Attached Images):
-->  This is a straightforward and user-friendly method to configure the endpoint.
Steps to follow:
- Select Guided Setup:
- Choose the Method (POST)
- Specify the Path(e.g., `chat/completions`)
- Define the Request Type (JSON Request Body)
- Set the Response Type (JSON Response)
- Provide the Request Body(JSON structure)
- Configure the Request Header(Content-Type & Authorization)
-->  Once the request is sent:
- A successful response (HTTP 200) confirms proper setup.
- Workato automatically handles the request and response structure during the guided setup process.

2. Manual Setup (See Attached Screenshots):
--> Steps to configure manually:
- Select the Method (POST)
- Specify the Path(`chat/completions`)
- Define the Request Type(JSON Request Body)
- Set the Response Type (JSON Response)
- Manually construct the Request Body based on the API specifications
- Configure the Request Header (Content-Type & Authorization)
-->  Once the request is sent:
- A successful response (HTTP 200) confirms proper setup.
- Unlike the guided setup, you need to manually configure the request and response structure using sample data from the API documentations.

Thanks and Regards,
Shivakumar K A 
Guided Set up_request Taken care by WorkatoGuided Set up_request Taken care by Workatoguided_2.PNGRequest headerRequest headerRequest BodyRequest BodyManually adding request from sample JSON StructureManually adding request from sample JSON StructureOption to provide inputOption to provide inputGuided set up response auto added by Workato at the end point responseGuided set up response auto added by Workato at the end point response