AI agent and batch processing

I am running an RSS aggregation workflow that feeds the output into an AI agent (prompted to evaluate them, remove items that don’t fit a statement of interest and reorder the remaining).

The input JSON into the AI agent (via an Edit Fields node) is several dozen snippets that look like the sample below. The agent seems to process each one through a separate API call, making the whole process take ages. However, if I were to paste the full input JSON of RSS feeds and provide the same prompt directly to an LLM chatbot, it is able to process and return the results within seconds.

Is it possible to configure the workflow so that the AI agent processes all the RSS items and the prompt in one payload?

{
“title”:
“Do people trust Temu or Amazon? What shoppers are choosing amid Trump tariffs.”,
“link”:
https://news.google.com/rss/articles/CBMilwFBVV95cUxPNzVkWXUyUzhEa2xPMkVvdEJSUld2ZHF0N1dESkJOSHozSkZVeDBtRWx1cHE4T1ZvMDFfVnktT1Nyang0R3ptWTdrQWs3T3pIUmdfa2hrT1JDZDVIc0JqUnA1TDFCQ1o0SnBDcVpmTHEtM1l0enVaVE4wdmd4d3RVZTNsZHlWSTBuMjdnRlRIbE9jYjdOeGU0?oc=5”,
“pubDate”:
“Wed, 19 Feb 2025 11:28:58 GMT”,
“content”:
Do people trust Temu or Amazon? What shoppers are choosing amid Trump tariffs.  USA TODAY”,
“contentSnippet”:
“Do people trust Temu or Amazon? What shoppers are choosing amid Trump tariffs. USA TODAY”,
“guid”:
“CBMilwFBVV95cUxPNzVkWXUyUzhEa2xPMkVvdEJSUld2ZHF0N1dESkJOSHozSkZVeDBtRWx1cHE4T1ZvMDFfVnktT1Nyang0R3ptWTdrQWs3T3pIUmdfa2hrT1JDZDVIc0JqUnA1TDFCQ1o0SnBDcVpmTHEtM1l0enVaVE4wdmd4d3RVZTNsZHlWSTBuMjdnRlRIbE9jYjdOeGU0”,
“isoDate”:
“2025-02-19T11:28:58.000Z”,
“extractedSource”:
“USA TODAY”
},

I am using the community version of n8n 1.77.3.
Thanks!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Amir_HK

Yes, technically you can using the “Execute once” setting in the AI Agent node - AI Agent node > Settings Tab > Execute once

Once this setting is enabled, you can use the following expression to get all the results at once

{{ $input.all().map(item => item.json).toJsonString() }}

Do note that depending on the LLM model you’re using, input context may not fit the entire RSS as a json object. You may want to be selective instead ie. ids, title, body, date, url and get rid of the rest.

Hope this helps!

1 Like

Thank you, this is great

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