Twitter Tool Not Returning Data in Workflow - Gemini Model Error ("I need some data to work with")

Hi all,

I’m building an n8n workflow to fetch 10 tweets with “development sports -filter:retweets lang:en” as the search text to extract a trending topic, and generate a quiz with the Gemini Model. But the Twitter Tool returns no data (empty output), and Gemini errors with: “I need some data to work with. Please provide the Twitter data (10 tweets).”

Setup:

  • Nodes: Trigger → Twitter → Gemini.
  • Twitter: Connected, valid credentials, enough credits.
  • Gemini: Works with static data.

Issue:

  • Twitter Node outputs nothing (debug shows ).
  • Tried simpler queries, re-authenticated—still no data.

Workflow Screenshot:

Why isn’t Twitter fetching tweets? API change? How to fix/debug?

any help here will be appreciated.
thanks :slight_smile:

Hi @solomon @ThinkBot , can you please take a look at this ? not able to figure out whats going wrong here

Can you please share your workflow code with us?
You can copy and paste it inside a code block.

To create a code block you just have to click here:
image

Your workflow will show up like this:

1 Like

Yes, there you go @solomon

I don’t think this type of search works:

Something like this works, though:

{{ $fromAI("search_term","The search term to use. Can be development, bitcoin or sports","string") }}

But I don’t know if you can filter results and use OR in your search term.
Try using the normal Twitter node and make sure the settings work before using them in a tool node.
.

1 Like

thanks for the comment. even this ain’t giving the same error. i tried connecting the chat message with the normal twitter node(attached the workflow code below) but now it gives this error : [ERROR: No execution data available]

Hey @saad_abban,

The $fromAI function is used only with AI Agents, because the AI will see that function and define the value it’s going to insert in its place.

What you should try instead is write “development” or “bitcoin” in you Twitter node and make sure it is returning some data and your credentials are working.

For example:

Once you can make that work, you can adjust your Twitter tool to run similar values with AI.

Please see documentation about the $fromAI function: