Updating many Notion items at once

Describe the problem/error/question

I’m trying to combine different user fields in one on a Notion page.
A few precisions :

  • Notion GET API for database pages seems to return users emails, not IDs
  • Notion PUT API for database pages only accepts users IDs to update the page
  • Notion GET many API for Users does not accept filters
    In my database, for each page update (sometimes multiple at once), the workflow fetches these updated pages, then gets the list of all users and updates the database page with the user IDs corresponding to the user emails that the Notion integration returns.

I’m using a Code node to filter the Users result, but I either return

  1. One object using Run once for all items
  2. As many objects as there are Users, using Run once per item
    Both of which do not get me where i would like, which would be just as many items as there are updated pages in the trigger.

What is the error message (if any)?

No error message

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hi @Ulysse_de_Wilde, welcome to the community :tada:

Unfortunately, you didn’t provide examples for the data returned by each of your relevant nodes, so it’s a bit hard to understand what exactly you’re working with.

If you are getting an email field from your getUpdatedFeedback node and want to match this with emails from your getUsers node you could consider using the Merge node for this - this allows a “left join” if you will, returning the exact amount of items from your getUpdatedFeedback node. Like so:

Here you can see how my first mock node returns data for a single page including a myEmail field. This field is then compared to the person.email field coming from my getUsers mock node:

Hope this helps! Please give me a shout if I misunderstood you here and this isn’t what you were looking for :slight_smile:

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