# Unable to call the node red flow with a parameter

**URL:** <https://discourse.nodered.org/t/unable-to-call-the-node-red-flow-with-a-parameter/86338>\
**Category:** General\
**Tags:** http-request\
**Created:** [11 March 2024 15:34 UTC](https://discourse.nodered.org/t/unable-to-call-the-node-red-flow-with-a-parameter/86338 "2024-03-11T15:34:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun932](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@Varun932](https://discourse.nodered.org/u/Varun932)\
**Post date:** [11 March 2024 15:34 UTC](https://discourse.nodered.org/t/unable-to-call-the-node-red-flow-with-a-parameter/86338/1 "2024-03-11T15:34:44Z")

</div>

Hello All,  
I am trying send a value to a node red flow which send an email using ChatGPT. The Parameter need to be in the subject line so that the solution becomes a generic solution.  
JSON Code:

```auto
[
    {
        "id": "0b9231e7bfc51957",
        "type": "function",
        "z": "dcd28f3683125a5c",
        "name": "",
        "func": "// @ts-nocheck\n// msg.headers = {\n// \"x-api-key\":\"sec_777Xibue1OqnClJ8OT7qI8y71hwWvbpX\"\n// }\nvar emailto = 'globant.hackathon@gmail.com';\nvar so = req.query.name;\nmsg.to = 'varun.kumar@globant.com'; // Send TO Email ID\nmsg.so = so;// Sales Order for Customer Reference\nmsg.payload = 'We have Created Sales Order number: ' \n + so\n + 'Starting with Hi Team, ' \n + 'Ending with: ' + 'Regards, Globant.automation@gmail.com'\n + 'If delay happens from our side. We will inform you'\nmsg.topic = 'Your Reference Sales Order:' + so;\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 421,
        "y": 326,
        "wires": [
            [
                "33d2854137e12005"
            ]
        ]
    }
]

```

Kindly help !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 June 2024 15:35 UTC](https://discourse.nodered.org/t/unable-to-call-the-node-red-flow-with-a-parameter/86338/2 "2024-06-09T15:35:21Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
