# Errors in First Workflow - Need Help - Urgent

**URL:** <https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164>\
**Category:** Questions\
**Created:** [August 4, 2025, 9:12pm UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164 "2025-08-04T21:12:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 4, 2025, 9:12pm UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/1 "2025-08-04T21:12:19Z")

</div>

## Describe the problem/error/question

I am creating my first workflow. But getting errors "cannot read properties of null (reading ‘length’).. Seems the OpenAI chat model is providing the output, but the AI agent is seeing some errors. Not able to debug.. Tried various things such as different API keys.. but nothing seems to work.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/4/a41bd01f49190a6fa220ee548b2aa89f149bc914.png)

## What is the error message (if any)?

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/3/53a08e937dfd5d8eccd67ca814bfe0423d1fbb70.jpeg)

## Please share your workflow

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/3/5/3520487162274a3d2ed7176ec63f690769a9060f.png)

```auto
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

```

## Share the output returned by the last node

## Information on your n8n setup

- \*\*n8n version: 1.105.2
- \*\*Database (default: SQLite): default
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- \*\*Running n8n via (Docker, npm, n8n cloud, desktop app): npm (mac)
- \*\*Operating system: Sequoia 15.5 MacOS

---

<div class="post-metadata">

**Author:** ![rbreen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rbreen/32/106993_2.png) [@rbreen](https://community.n8n.io/u/rbreen)\
**Post date:** [August 5, 2025, 12:50am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/2 "2025-08-05T00:50:35Z")

</div>

Hi @Ranjitha

Its difficult to tell from your images. Copy this template from here into your n8n instance. Its set up be your first AI Agent. All workflows can be copied and pasted between instances.

Hope this helps!

❤If this response helped you, please click the heart to show that it is useful  
✅If this response solved your issue, mark it as the solution to help the community

---

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 5, 2025, 1:38am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/3 "2025-08-05T01:38:57Z")

</div>

Thanks for the response @rbreen. I took the exact json file you provided, but still the same error. I am thinking something wrong with the environment or I am missing something. Here is the workflow I have.. Nothing fancy, just the basics. This is my first workflow and unfortunately I am stuck.

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [August 5, 2025, 1:42am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/4 "2025-08-05T01:42:49Z")

</div>

most probably you are out of credits.

---

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 5, 2025, 2:01am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/5 "2025-08-05T02:01:43Z")

</div>

Which credits? I am using the community edition (self hosted) of N8N. And I am getting responses from the gpt model. Do I need any other credits? I am new to N8N, so not sure.. I was told that we could use community edition for free? I am just starting to figure out. Thanks @moosa

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/d/5/d58c5c4124e11a381393a6345ebd2eb281e658d8.jpeg)

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [August 5, 2025, 2:25am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/6 "2025-08-05T02:25:50Z")

</div>

sorry my bad i was refering to openai credits.  
but you clearly have these.  
I also ran same workflow and it ran smothly.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/2/5/25e00340119f6c0695d3e037856457acf389453a.png)

maybe try changing version of n8n?

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [August 5, 2025, 2:30am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/7 "2025-08-05T02:30:33Z")

</div>

also when i tried copy pasting your workflow it gave me this:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/e/4e7bd86d2040b38b91006462f76b162dc053b6a1.png) ![image](https://europe1.discourse-cdn.com/n8n/original/3X/0/0/00952d6a4f54f728b8bb0f6ae80193c257c651e2.png)

it did not recognized chat trigger node.

---

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 5, 2025, 3:04am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/8 "2025-08-05T03:04:01Z")

</div>

@moosa I think we are close.. what I found out was I have the latest N8N (1.105.2) and it’s creating the agent of typeVersion 2.2.. somehow this agent didnt work. My friend gave me typeVersion 1.8 (exact same code) and it worked. So not sure how I can change the agent version from N8N. Any solution for this? Or should I go back a version in N8N?

{  
“parameters”: {  
“options”: {}  
},  
“type”: “@n8n/n8n-nodes-langchain.agent”,  
“typeVersion”: 2.2,  
“position”: [  
-32,  
-48  
],  
“id”: “d352a32a-47d0-406a-8801-f270e1c411ca”,  
“name”: “AI Agent”  
},

---

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 5, 2025, 3:47am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/9 "2025-08-05T03:47:46Z")

</div>

Please suggest what version I should deploy, so that I wont step on any version related issues? Because I am starting to learn, would like to play with stable stuff. Thanks

---

<div class="post-metadata">

**Author:** ![rbreen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rbreen/32/106993_2.png) [@rbreen](https://community.n8n.io/u/rbreen)\
**Post date:** [August 5, 2025, 10:55am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/10 "2025-08-05T10:55:32Z")

</div>

@Ranjitha

I’m on version 1.97.1 Try upgrading to that. Its an odd error.

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [August 5, 2025, 1:34pm UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/11 "2025-08-05T13:34:51Z")

</div>

maybe try switching to new stable version: `n8n@1.105.3`

---

<div class="post-metadata">

**Author:** ![arifsetyawan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/arifsetyawan/32/107433_2.png) [@arifsetyawan](https://community.n8n.io/u/arifsetyawan)\
**Post date:** [August 6, 2025, 5:28am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/12 "2025-08-06T05:28:21Z")

</div>

In my case upgrading also doesn’t resolve the AI Agent node having that issue. but adding `output parser` may solve the issue for now.

---

<div class="post-metadata">

**Author:** ![Ranjitha](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@Ranjitha](https://community.n8n.io/u/Ranjitha)\
**Post date:** [August 6, 2025, 4:25pm UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/13 "2025-08-06T16:25:59Z")

</div>

@arifsetyawan Can you please tell me what is the output node?

---

<div class="post-metadata">

**Author:** ![Anthony\_Gerke](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anthony_gerke/32/45210_2.png) [@Anthony\_Gerke](https://community.n8n.io/u/Anthony_Gerke)\
**Post date:** [August 7, 2025, 1:58am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/14 "2025-08-07T01:58:56Z")

</div>

@Ranjitha I have been experiencing the same issue and just figured out a work around based on this chat.

I am running n8n v 1.105.3 but this issue has been happening with any n8n version after 1.102.4. I believe it is linked to the langchain version update.

simple flow but it results in the error “Cannot read properties of null (reading ‘length’)” from the agent.

However if I copy the flow, paste it in vscode and override the version of the agent node from 2.1 to 1.8 and paste it back into the n8n canvas, it works just fine.

```auto

      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        208,
        0
      ]

```

I haven’t experimented with any other @n8n/n8n-nodes-langchain.agent agent versions.

I forgot to mention that I am using LiteLLM as a proxy and overriding the url for the OpenAI node to use it in n8n

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [November 5, 2025, 1:59am UTC](https://community.n8n.io/t/errors-in-first-workflow-need-help-urgent/162164/15 "2025-11-05T01:59:28Z")

</div>

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