Notion Get Many


I’m trying to migrate data from a Google Spreadsheet to a Notion database.
Some rows are already in Notion the others need to be created.

When I do “Notion / Get Many” using the relevant fields I can get existing rows.
But then all the outputs are merged together and thus there is later no way to tell which needs to be updated and which need to be created.

I could certainly come up with a complex solution but here I’m looking for a simple and nice solution.
In particular it would make sense to me to have an option (such as “Execute Once”, “Always Output Data”…) which the following behavior:

Each input item produces it’s own list of outputs. We end up in a nested list of items.

For instance with inputs: i0, i1, ... iN, instead of concat(f(i0), f(i1), ..., f(iN)) we would get [f(i0), f(i1), ..., f(iN)].

Then in later nodes if my item is an empty list, not only I can branch to a node to create the page but I can also reach for the data from the previous nodes.

What do you think?

Hi @npou :wave: Welcome to the community :tada:

Can you share the workflow you’ve tried building for this? If you hit ctrl/cmd + a and then ctrl/cmd + c in the workflow editor, and then paste that between two sets of three backticks (```) you can share it on the forums :+1: Sharing any and all example data that you can (such as how your data looks in Google sheets, etc.) would be helpful, too.

It’d also be great to know these bits of information:

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

Hi @EmeraldHerald !

Here is a simplified snippet to show my issue.

Considering the following workflow:

When the Notion node runs, I only get the results for the cases where the identifier is actually in the database. What I would like is an option which would pair all the results of the request being empty or not to the input. This way I can go to a branch which deals with existing records and an another one for the new records.

Hi @npou :wave: Thanks for explaining!

If you check out this workflow template, I think it might give an example of what you’re looking for:

While this is obviously for Pipedrive and MySQL, it should give you the base to use this with Google Sheets and Notion :smiley:

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