Linking multiple Notion pages found via Search Object to a single Relation property?

Hi there,

I have a very simple Scenario that functions like this:

  1. Search for objects in Database 1 which filters for pages with Relation A being currently empty.
  2. Search for objects in Database 2 which filters for pages with a Select property set to Active.
  3. Update Database 1 pages found in Module 1 by adding Database 2 pages found in Module 2 to the Relation A property.

However, my Scenario runs into an issue when there are multiple pages in Database 2 with the Select property set to Active. At the 3rd step, the module will only input 1 of the identified objects into the Relation A property. It looks like the module is adding these pages consecutively to Relation A, but as it does so it replaces the page added just before it, so there is only 1 page added in the end. The Scenario does not throw any error, it just seems to overwrite its own activity.

How can I fix this to add all pages found in Module 2 to the Relation A property rather than replace them? Please let me know if you can help, thank you.

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.json file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hi @Carter_Bass ,

You certainly have to use an iterator to loop on all the results from module 2.

But please add more information (and follow the excellent advice from samliew).

BR,

PBI

3 Likes

Hi everyone,

My apologies for not providing more information earlier. Thankfully I’ve figured out a solution:

  1. Search Objects in Database 1 for items with the Select property set to Active.
  2. Convert the Page IDs of all of these bundles into an array using an Array Aggregator.
  3. Search Objects in Database 2 for items with the Relation A property currently empty.
  4. Update items in Database 2 (with Page ID matching objects found in Module 3) by mapping the array created in Module 2, using id as the key.

I’m certain this isn’t the prettiest way to do this, but it’s a solution that seems to work. Thanks everyone! Here’s a screenshot for reference.

3 Likes

Hello @Carter_Bass welcome to the community :wave:

Awesome to hear that you managed to figure out the solution :clap:

Thank you very much for stepping back in here to share your final setup and findings so that others can benefit from what you learned. This is super valuable and we 100% appreciate it :pray:

1 Like