Read only one row from Google Sheets

How can I create an automation that reads some titles from a Google Sheets file, sends that title to an AI and then publishes it in WordPress?

I have almost everything done, but I can’t get it to read just one title, it takes them all at once and publishes them all at once.

I have done this:

Any ideas?

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:

We’ve created a new category for help with designing workflows, and I’ve moved your question there: Help me Build my Workflow. Find out how this category works by reading this topic.

I use the web version, not the one installed locally.

If you just want one row from your Google Sheet you could put a ‘limit’ node after the node where you read from your sheet.

You don’t actually need the loop since n8n nodes run once for each item, but if you want to keep it (for more control) you need to move the agent and Wordpress nodes inside the loop (replace the ‘replace me’ node with them). Right now the loop isn’t doing anything since there’s nothing inside it.

That is possible in older versions of the node, but sadly, it got removed at some point. We should really bring it back.

Anyway, you can still use old versions of a nodes(even though we will probably deprecate them at some point). It is for sure less convenient to use as more modern version (as you have to manually copy in the IDs of Sheet and so on), but at least like that, you can target rows and columns very specifically and is probably the most efficient way to read only parts of a sheet.

Here is the node for you to copy:

2 Likes

ok thanks a lot, that does what I want, the problem now is that it only takes the first line always and I can’t choose a sheet, I don’t know if you know anything about how to solve that

and from what I understand that is a module from an old version so in a while it will stop working, right?

You can fix that by changing the value in “Range”.

So if you want to read the first row (columns A->F) from the sheet “Names” it would be:
Names!A1:F1
if you want to read from the sheet “Orders” the 13th row (columns B-> AZ) it would be:
Orders!B13:AZ13

You can obviously do all of that dynamically by converting that parameter to an expression.

Yes, it will stop working at some point, but there is currently nothing set when we deprecate old node versions. It would also not happen before another major version. So it is probably still quite a while away, and by then, we will hopefully extend the new version of the Sheet node to make that also there possible again.

1 Like

I’m really glad i found this comment. It’s sad the old node was removed

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