# $fromAI not working

**URL:** <https://community.n8n.io/t/fromai-not-working/293902>\
**Category:** Questions\
**Tags:** workflow-building\
**Created:** [May 4, 2026, 7:23am UTC](https://community.n8n.io/t/fromai-not-working/293902 "2026-05-04T07:23:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkaras](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mkaras](https://community.n8n.io/u/mkaras)\
**Post date:** [May 4, 2026, 7:23am UTC](https://community.n8n.io/t/fromai-not-working/293902/1 "2026-05-04T07:23:32Z")

</div>

## Describe the problem/error/question

Hi, I am trying to connect Github Tool to AI Agent. The Github Tool by itself works if I manually enter path for example “/doc”. However when I set up the path to take the input from AI agent like {{ $fromAI(‘path’, ‘The file path in the GitHub repository, e.g. /docs’, ‘string’) }} the execution ends in error “Problem in node 'PartialExecutionToolExecutor Error executing tool: Receiced tool input did not match expected schema ✖ Required → at Path”. However if I check the tool input the AI agent sends the correct format, the tool path is green and showing the correct path. If I try manually executing just the tool and leave the path as {{ $fromAI(‘path’, ‘The file path in the GitHub repository, e.g. /docs’, ‘string’) }} I am prompted to enter the path. I enter /docs and get the same error. If I remove {{ $fromAI(‘path’, ‘The file path in the GitHub repository, e.g. /docs’, ‘string’) }} and enter directly /docs it executes correctly. I was advised by the n8n AI agent to use subworkflows and call them as tools but I faced the same issue. Any idea how to fix this? I am sharing just the nodes I am now testing in isolation with agent system prompt removed

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

Problem in node 'PartialExecutionToolExecutor Error executing tool: Receiced tool input did not match expected schema ✖ Required → at Path

## Please share your workflow

## Share the output returned by the last node

## Information on your n8n setup

- **n8n version: 2.16.1**
- **Database (default: SQLite):** postgres
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** scaling (multi-main)
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** docker (self-hosted)
- **Operating system:** mozilla/5.0 (macintosh; intel mac os x 10\_15\_7) applewebkit/537.36 (khtml, like gecko) chrome/147.0.0.0 safari/537.36

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [May 4, 2026, 8:49am UTC](https://community.n8n.io/t/fromai-not-working/293902/3 "2026-05-04T08:49:36Z")

</div>

Hi @mkaras, welcome!  
This can be because, as I can see, both the tools use the same $fromAI path, so consider renaming each key to a different name, like `list_path` list tool and `get_path` in the file tool, like:

```auto
// List Repo Contents
{{ $fromAI('list_path', 'The folder path to list in the GitHub repository, e.g. /docs', 'string') }}

// Get File
{{ $fromAI('get_path', 'The file path to fetch from the GitHub repository, e.g. /docs/readme.md', 'string') }}

```

As the $fromAI key must be unique in all the tools connected, it can create conflicts as it might get passed down to all of them.

---

<div class="post-metadata">

**Author:** ![mkaras](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mkaras](https://community.n8n.io/u/mkaras)\
**Post date:** [May 4, 2026, 9:06am UTC](https://community.n8n.io/t/fromai-not-working/293902/4 "2026-05-04T09:06:09Z")

</div>

> [@Anshul\_Namdev](#):
>
> ```auto
> {{ $fromAI('get_path', 'The file path to fetch from the GitHub repository, e.g. /docs/readme.md', 'string') }}
> 
> ```

Hi @Anshul_Namdev unfortunately that is not the cause. I tested that option too, tried with connecting one tool only as well. The AI agent send the right path in the right format to the tool, the tool interprets it correctly but it returns the error every time. If I check the execution I can see that the input for the tool is correct.

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [May 4, 2026, 9:12am UTC](https://community.n8n.io/t/fromai-not-working/293902/5 "2026-05-04T09:12:48Z")

</div>

@mkaras, a few things to check does this work with other tools? Try changing the AI model to the most frontier models available and to use $fromAI correctly. Read this:

> **[Let AI specify tool parameters | n8n Docs](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/)**
>
> Understand how n8n's \`$fromAI()\` function works and how to use it to dynamically populate parameters for AI app tools, or use the built-in automation to complete them instead.

Also let me know if the issue persists, as I also use the github node and similar flows work perfectly fine.

---

<div class="post-metadata">

**Author:** ![mkaras](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mkaras](https://community.n8n.io/u/mkaras)\
**Post date:** [May 4, 2026, 10:23am UTC](https://community.n8n.io/t/fromai-not-working/293902/6 "2026-05-04T10:23:05Z")

</div>

Hi @Anshul_Namdev I tried changing the model but there is no change. The input to the GitHub tool is still correct. Spefifically:

[

{

“path”: “/docs/tableau”

}

]

If I try testing the tool node itself with the $fromAI expression I am prompted to enter the path. I enter /docs/tableau and get the error.  
If I remove the $fromAI expression and switch to Fixed and use /docs/tableau for path it works absolutely fine.  
So, the AI outputs the right path, the Github tool works but once I use the $fromAI expression I get the error.

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [May 4, 2026, 11:51am UTC](https://community.n8n.io/t/fromai-not-working/293902/7 "2026-05-04T11:51:45Z")

</div>

@mkaras understood, i think this is the problem:

> [@AI Agent sends nested input, causing placeholder misconfiguration in tool (Perplexity)](http://community.n8n.io/t/ai-agent-sends-nested-input-causing-placeholder-misconfiguration-in-tool-perplexity/105765):
>
> Describe the problem/error/question I’m using the AI Agent node along with a tool (Perplexity) in my workflow. The problem is that the AI Agent wraps the tool input in a nested object, which causes issues with placeholder resolution in the tool node. The tool expects: { “query”: “how old is bill gates” } But the AI Agent sends: { “query”: { “query”: “how old is bill gates” } } This breaks the placeholder configuration that expects a string (like {{query}}), resultin…

---

<div class="post-metadata">

**Author:** ![mkaras](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mkaras](https://community.n8n.io/u/mkaras)\
**Post date:** [May 4, 2026, 1:12pm UTC](https://community.n8n.io/t/fromai-not-working/293902/8 "2026-05-04T13:12:03Z")

</div>

> [@mkaras](#):
>
> Problem in node 'PartialExecutionToolExecutor Error executing tool: Receiced tool input did not match expected schema ✖ Required → at Path

I don’t think it’s the same case. The Ai agent does not duplicate anything. If I use the exactly same output as a test for a Github list node in manual trigger and set the path to {{ $json.path }} it works fine.  
The $fromAI reads the output from AI correctly, I attach the screenshot but it just does not execute the tool.  
I tried using HTTP node to stitch together the URL using [https://api.github.com/repos/eg-internal/tpsp-wfp/contents](https://api.github.com/repos/eg-internal/tpsp-wfp/contents){{ $fromAI(‘path’, ``, ‘string’) }}  
The issue is the same. The resulting URL is correct but the tool does not execute

 ![2026-05-04_15-09-27](https://europe1.discourse-cdn.com/n8n/original/3X/8/4/8471e45d2009635171f63e3e862b2ca639ea7bb8.jpeg)

---

<div class="post-metadata">

**Author:** ![mkaras](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mkaras](https://community.n8n.io/u/mkaras)\
**Post date:** [May 4, 2026, 1:53pm UTC](https://community.n8n.io/t/fromai-not-working/293902/9 "2026-05-04T13:53:39Z")

</div>

ahh I finally figured out the issue. I was trying to run the tests locally from the workflow without publishing it. Once I published it and triggered it using the Slack trigger (which is my intended use case) the AI agent calls the tools correctly. I still have a lot of work to make everything work well but at least I know how to test this properly. Apologies for taking your time I’m still quite new to this. Appreciate your support!

---

<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:** [August 2, 2026, 1:54pm UTC](https://community.n8n.io/t/fromai-not-working/293902/10 "2026-08-02T13:54:11Z")

</div>

Closed on August 2, 2026, 1:54pm UTC

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