# Error when using expression for URL parameter in HTTP Request Node

**URL:** <https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213>\
**Category:** Questions\
**Tags:** node\
**Created:** [June 10, 2021, 4:36am UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213 "2021-06-10T04:36:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IbnJubayr](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ibnjubayr/32/4728_2.png) [@IbnJubayr](https://community.n8n.io/u/IbnJubayr)\
**Post date:** [June 10, 2021, 4:36am UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/1 "2021-06-10T04:36:45Z")

</div>

Hi all,  
I am using an expression for the URL parameter in the HTTP Request node. The expression reads a value via the $node syntax. The expression is valid as I can see a valid URL when building the expression.

However, when executing the workflow, this step fails with the error ‘Error: options.uri is a required argument’. If I manually put the URL in, the node works as expected.

The expression is:  
{{$node[“Config”].json[“config”][“parserXMLUrl”]}}

Where my Config node is a function node where I manually set some config values in the JSON to help during testing and development

I am running the latest version of n8n 0.123.1

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [June 10, 2021, 9:38am UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/2 "2021-06-10T09:38:29Z")

</div>

Hey @IbnJubayr!

Thanks for the detailed explanation. Can you let us know if all the items in the output of the Function node contain `parserXMLUri` value? It would be helpful if you can share the output of the Function node. Please replace any sensitive information with some dummy data 🙂

---

<div class="post-metadata">

**Author:** ![IbnJubayr](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ibnjubayr/32/4728_2.png) [@IbnJubayr](https://community.n8n.io/u/IbnJubayr)\
**Post date:** [June 10, 2021, 10:05am UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/3 "2021-06-10T10:05:35Z")

</div>

Hey,  
The function node only has a single item as its the first node after start - is that the problem? Should I be referencing the specific index - seems obvious now!  
The data from this node is not passed along the chain as I was expecting to just reference this node directly further down in the workflow

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [June 10, 2021, 12:07pm UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/4 "2021-06-10T12:07:51Z")

</div>

Are you using the Function node to simply set some values? If yes, you can use the Set node instead.

> Should I be referencing the specific index - seems obvious now!

It is difficult to give a confirmation on this without knowing the data structure of the output.

---

<div class="post-metadata">

**Author:** ![IbnJubayr](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ibnjubayr/32/4728_2.png) [@IbnJubayr](https://community.n8n.io/u/IbnJubayr)\
**Post date:** [June 10, 2021, 12:22pm UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/5 "2021-06-10T12:22:40Z")

</div>

Contents of the function node below.

```
items[0].json.config= {
  "parserXMLUrl": "https://mydomain.com/,
  "fromEmailAddress": "xxx@xxx.com",
  "errorEmailAddress": "xxxx@xxx.com"
};
return items;

```

As mentioned, it it is the first node after start and I reference it directly much later in the workflow - these properties are no longer available on the input items hence the reason I try reference directly via $node

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [June 10, 2021, 12:39pm UTC](https://community.n8n.io/t/error-when-using-expression-for-url-parameter-in-http-request-node/6213/6 "2021-06-10T12:39:55Z")

</div>

Thanks for sharing. To make sure I understand it correctly, your HTTP Request node is not directly connected with the Function node, there are other nodes in between.

If that’s the case you will have to use `$item(0).$node["Config"].json["config"]["parserXMLUrl"]`
