Reference Value from HTTP module (OpenAI)

Hi guys, hope you are well!

Could someone please help me to reference the text value in this OpenAI HTTP module. I have tried just clicking text, putting 1’s and 0’s in and nothing has worked!


Its Data → Output → Content → Text

1 Like

You should be able to get the value using bracket notation. This is how to narrow it down to text from the top level:

Data[“output”][0][“content”][0][“text”]

Keep in mind this will only work if you’re looking to retrieve this value once. If this is part of loop then more steps will be required.

{{ 222.data.output.1.content.1.text }}

(copy-paste the above into the field, or type it exactly as shown)

Replace 222 with the module number (which you have not provided).

Hope this helps! Let me know if there are any further questions or issues.

@samliew

Hey! Thanks os much for your guys replies! Im still having an issue here…Any thoughts?

You probably need a lowercase d for data, as described in my previous post.

If you need further assistance, please provide the following:

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.

This will allow others to better assist you. Thanks!

Hope this helps! Let me know if there are any further questions or issues.

@samliew

HTTP Module Output :

[
    {
        "statusCode": 200,
        "headers": [
            {
                "name": "date",
                "value": "Thu, 29 May 2025 11:11:34 GMT"
            },
            {
                "name": "content-type",
                "value": "application/json"
            },
            {
                "name": "transfer-encoding",
                "value": "chunked"
            },
            {
                "name": "connection",
                "value": "keep-alive"
            },
            {
                "name": "x-ratelimit-limit-requests",
                "value": "5000"
            },
            {
                "name": "x-ratelimit-limit-tokens",
                "value": "800000"
            },
            {
                "name": "x-ratelimit-remaining-requests",
                "value": "4999"
            },
            {
                "name": "x-ratelimit-remaining-tokens",
                "value": "799575"
            },
            {
                "name": "x-ratelimit-reset-requests",
                "value": "12ms"
            },
            {
                "name": "x-ratelimit-reset-tokens",
                "value": "31ms"
            },
            {
                "name": "openai-version",
                "value": "2020-10-01"
            },
            {
                "name": "openai-organization",
                "value": "hive-ai-xy8gk3"
            },
            {
                "name": "x-request-id",
                "value": "req_870764c183c9b3e377f2fea29cf728cf"
            },
            {
                "name": "openai-processing-ms",
                "value": "7202"
            },
            {
                "name": "strict-transport-security",
                "value": "max-age=31536000; includeSubDomains; preload"
            },
            {
                "name": "cf-cache-status",
                "value": "DYNAMIC"
            },
            {
                "name": "set-cookie",
                "value": "__cf_bm=46kwHmwmzcVLg6rTxzOvKvKU2YQ7rtNMhYBIkm_75YA-1748517094-1.0.1.1-Zfegk.4HsahaJOC2jOF9JHOd7NjknpjYHVN5ZYv.d7IH_ijU2GpWACQN.POL48k4gxCJlF573u8n6RZVT48Y1CwhP7HvM.0DzlyHhfjD2WI; path=/; expires=Thu, 29-May-25 11:41:34 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None"
            },
            {
                "name": "x-content-type-options",
                "value": "nosniff"
            },
            {
                "name": "server",
                "value": "cloudflare"
            },
            {
                "name": "cf-ray",
                "value": "94758d1349fbbe52-DUB"
            },
            {
                "name": "content-encoding",
                "value": "br"
            },
            {
                "name": "alt-svc",
                "value": "h3=\":443\"; ma=86400"
            }
        ],
        "cookieHeaders": [
            "__cf_bm=46kwHmwmzcVLg6rTxzOvKvKU2YQ7rtNMhYBIkm_75YA-1748517094-1.0.1.1-Zfegk.4HsahaJOC2jOF9JHOd7NjknpjYHVN5ZYv.d7IH_ijU2GpWACQN.POL48k4gxCJlF573u8n6RZVT48Y1CwhP7HvM.0DzlyHhfjD2WI; path=/; expires=Thu, 29-May-25 11:41:34 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None",
            "_cfuvid=heSTsq6Ht1k6UJqR9EQajZOv17Z3SnzyOmGYR9fBUcI-1748517094919-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None"
        ],
        "data": {
            "id": "resp_683840dfa50c8198b2f47cc10a8a7b310a7a28c704c1c340",
            "object": "response",
            "created_at": 1748517087,
            "status": "completed",
            "background": false,
            "error": null,
            "incomplete_details": null,
            "instructions": null,
            "max_output_tokens": null,
            "model": "gpt-4.1-2025-04-14",
            "output": [
                {
                    "id": "ws_683840e086148198ae81c908e601a6c60a7a28c704c1c340",
                    "type": "web_search_call",
                    "status": "completed"
                },
                {
                    "id": "msg_683840e3e248819884f9da2ef6448aa30a7a28c704c1c340",
                    "type": "message",
                    "status": "completed",
                    "content": [
                        {
                            "type": "output_text",
                            "annotations": [],
                            "text": "Dear [Recipient's Name],\n\nWe represent Erin Crookes, Desert Eagle Trust, Robyn Crookes, and Tyson Crookes. Our clients have instructed us to demand payment of R80,000.00 for numerous unpaid school fees, along with interest at 7.75% per annum from the date of this letter until the date of final payment.\n\nPlease arrange payment or contact our offices to make satisfactory arrangements within ten (10) days from the date of this letter. Failure to do so will result in further action being taken against you without additional notice to recover the outstanding amount, including interest and costs.\n\nPayment should be made to the following bank account:\n\nBank: FNB  \nAccount Name: Graystone Fields  \nAccount Number: 123482728  \nFile Reference: 1112\n\nYours faithfully,\n\nGraystone & Fields Attorneys  \ninfo@graystonefields.com "
                        }
                    ],
                    "role": "assistant"
                }
            ],
            "parallel_tool_calls": true,
            "previous_response_id": null,
            "reasoning": {
                "effort": null,
                "summary": null
            },
            "service_tier": "default",
            "store": true,
            "temperature": 1,
            "text": {
                "format": {
                    "type": "text"
                }
            },
            "tool_choice": "auto",
            "tools": [
                {
                    "type": "web_search_preview",
                    "search_context_size": "medium",
                    "user_location": {
                        "type": "approximate",
                        "city": null,
                        "country": "US",
                        "region": null,
                        "timezone": null
                    }
                }
            ],
            "top_p": 1,
            "truncation": "disabled",
            "usage": {
                "input_tokens": 406,
                "input_tokens_details": {
                    "cached_tokens": 0
                },
                "output_tokens": 197,
                "output_tokens_details": {
                    "reasoning_tokens": 0
                },
                "total_tokens": 603
            },
            "user": null,
            "metadata": {}
        },
        "fileSize": 2433
    }
]

You have two outputs, so you’ll need map-first functions.

{{ first(map(222.data.output; "content.1.text"; "type"; "message")) }}

(copy-paste the above into the field, or type it exactly as shown)

Hope this helps! Let me know if there are any further questions or issues.

@samliew

Ah perfect!! Thanks man! And short for such quick replies appreciate it!

No problem, glad I could help you with “Reference Value from HTTP module (OpenAI)

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help as newer questions are displayed higher on the forum’s “new” page.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Hope this helps! Let me know if there are any further questions or issues.

@samliew