Send API Request: AI value prompt doesnt seem to work.

  • Douglas_Jerum
    Asked on March 8, 2025 at 10:51 PM
    The other issue i seem to have is the ai value prompt doesnt seem to work.
  • Keenly JotForm Support
    Replied on March 8, 2025 at 11:11 PM

    Hi Douglas_Jerum,

    Could you share the details about the key and the value prompt you used, which seemed not to be working? Additionally, are you working on the same API endpoint or API request for this one?

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • Douglas_Jerum
    Replied on March 8, 2025 at 11:16 PM

    Yes same api and requests- player information. Key in using is player and the value prompt is simply telling the agent to insert the name of the player the user request info on into the value prompt as ‘firstname last name’ of ‘lastname.

  • Keenly JotForm Support
    Replied on March 9, 2025 at 12:26 AM

    Hi Douglas_Jerum,

    I'll need more time to look into it. I'll get back to you as soon as I can.

    In the meantime, let us know if you have any other questions.

  • Keenly JotForm Support
    Replied on March 9, 2025 at 9:04 AM

    Hi Douglas_Jerum,

    Could you share a screen capture of the actual key and value prompt you used for this API request? You can directly attach the image to your reply.

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • Douglas_Jerum
    Replied on March 9, 2025 at 10:52 AM

    Hi, attached are the following screen shots:

    1. current corrupted bot
    2. result if I try to edit it
    3. new version of same bot showing the inputs

    Note: There is a chicken and egg issue with populating the api execution message if using ai generated values. When testing there doesnt seem to be a way to give the test request a prompt to have the ai generate the value prompt, so the api returns a null result and so there are no values to insert in the api execution message content window. If I add static values i can get all the available values from the api and insert them into the message, but as soon as I go back and readd the ai generated values to the data request it forces me to test the api again, which then returns the null values and invalidates the values in the execution message content, and the system doesnt let me save the API tool with what it sees as 'invalid' values. Send API Request: AI value prompt doesnt seem to work Screenshot 40Send API Request: AI value prompt doesnt seem to work Screenshot 51Send API Request: AI value prompt doesnt seem to work Screenshot 62

  • Keenly JotForm Support
    Replied on March 9, 2025 at 12:14 PM

    Hi Douglas_Jerum,

    Thanks for sharing the screen captures. I'll need some time to review the details and do some testing to check if I can replicate the issue. I'll get back to you as soon as I have more information or a solution to share.

    In the meantime, let us know if you have any other questions.

  • Douglas_Jerum
    Replied on March 9, 2025 at 12:30 PM

    Hi, are you able to share how the api test is supposed to work using AI generated Value Prompts, since it doesnt have anything to generate the prompt from?

  • Keenly JotForm Support
    Replied on March 9, 2025 at 1:27 PM

    Hi Douglas_Jerum,

    I am currently doing some testing, and I understand the issue. I’ll need some time to work out a solution and gather some information. I’ll get back to you as soon as I can.

    Thanks for your patience and understanding, we appreciate it.

  • Douglas_Jerum
    Replied on March 9, 2025 at 4:08 PM

    No problem. thank you.

  • Keenly JotForm Support
    Replied on March 9, 2025 at 4:43 PM

    Hi Douglas_Jerum,

    After running some tests and replicating the issue on our end, I am now escalating this to our Developers so they can look further into it. While we don't have a specific timeline for the fix yet, we’ll circle back to this thread and let you know if there are any updates.

    Thanks for your patience and understanding, we appreciate it.

    Send API Request: AI value prompt doesnt seem to work Screenshot 20

  • Douglas_Jerum
    Replied on March 14, 2025 at 3:25 AM

    Hi, any updates on this issue?


  • Lara JotForm Support
    Replied on March 14, 2025 at 3:59 AM

    Hi Douglas,

    There haven’t been any updates yet. I know that it’s taking some time to resolve. I’ve reached out to our Developers again. We’ll let you know as soon as there’s an update.

    Thanks for your patience and understanding, we appreciate it.

  • pavlomaistrukjob
    Replied on March 18, 2025 at 10:04 AM

    Hi, we have the same problem, but instead of "Oop, something went wrong." we get an empty object "{}" but in Postman it works just fine.
    Are there any updates?

  • Reymae JotForm Support
    Replied on March 18, 2025 at 10:39 AM

    Hi Douglas,

    We’re working on a solution as fast as we can. Rest assured that we’ll get back to you with an update as soon as we have one.

    We really appreciate your patience and understanding while we’re looking into this.

  • Alper Product Manager
    Replied on March 19, 2025 at 9:49 AM

    Hi Douglas,

    I'm Alper, Product Manager from Jotform. Thank you for bringing this issue to our attention. We've implemented a solution to address the problem you described with AI-generated values in the API execution message.

    We've added a new step that asks you to add Test Values specifically for AI-Generated Values before running the test.Send API Request: AI value prompt doesnt seem to work Screenshot 30Once you enter these Test Values, you will be able to run the test using these temporary values, insert the response values into your API Execution Message, and keep your AI-Generated Values in the actual data request.

    Send API Request: AI value prompt doesnt seem to work Screenshot 41

    This way, you can properly configure your message with placeholder values from a successful test, while maintaining the dynamic AI-generated values in your final implementation.

    Please give this new flow a try and let us know if you have any questions or if there's anything else we can help with.

  • pavlomaistrukjob
    Replied on March 19, 2025 at 12:42 PM

    Hi Alper,

    I still get an error with API request, can you please take a look?
    Send API Request: AI value prompt doesnt seem to work Screenshot 30Send API Request: AI value prompt doesnt seem to work Screenshot 41

  • Bojan Support Team Lead
    Replied on March 19, 2025 at 1:18 PM

    Hi Douglas,

    Thank you for the additional information. We have forwarded it to the related team. As soon as we have more information, we'll let you know.

    Thank you for your patience.

  • Onur Yüksel JotForm Developer
    Replied on March 20, 2025 at 6:15 AM

    Hi pavlomaistrukjob,

    We've identified the issue regarding the request failure. The target site is rejecting requests based on the User-Agent header. When using our proxy, the request includes a different User-Agent than Postman, which the target server does not accept.

    To resolve this, you need to update your request to include an accepted User-Agent. Based on our tests, the following User-Agent works correctly:

    User-Agent: PostmanRuntime/7.43.0


    Alternatively, you can use a common browser User-Agent like:

    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36


    To change the User-Agent, open your AI Agent’s action settings and navigate to the Send API request action. In this section, find the HTTP Headers section, then:

    1. Turn on the HTTP Headers section by switching the HTTP Headers toggle to the "on" state.
    2. Click the "Add new key" button in the HTTP Headers section.
    3. Enter "User-Agent" in the Key field.
    4. Enter "PostmanRuntime/7.43.0" or your desired User-Agent in the Value field.

    Send API Request: AI value prompt doesnt seem to work Screenshot 30

    Once you have updated the settings, you should be able to see the API response successfully, as shown in the screenshot

    Send API Request: AI value prompt doesnt seem to work Screenshot 41

    Let us know if you need any further assistance!

  • Douglas_Jerum
    Replied on March 21, 2025 at 10:45 AM

    Thank you Alper!


Your Answer