Flow control, how to call a specific module after it has already been invoked once?

Hello everyone!

Can anyone please advise if there’s a way in Make to call a specific module after it has already been invoked once?

Here’s my situation: Module #81 (Search Objects) queries the Notion database to find a page that matches a project_id in GitLab. If such a page doesn’t exist, I would like to create it and fill it with data from the GitLab Module #10 (watch merge request). This happens in Notion Module #84 (Create database item). Now, once the page is created and populated, I would like to return to Module #81 (Search Objects) so that the page can be found, and I can use its data further. I’m almost 100% sure there is a simple solution for this in Make, but I haven’t been able to find it myself.

Thanks in advance for your time and help!

Hi there,
After creating the item in the Notion database with Module #84, you might want to save the ID or some identifier of the newly created page to a variable using the Data Store or Set Variable modules. This helps to identify the newly created item when you loop back.

After the “Create database item” module (Module #84), if you want to loop back to the “Search Objects” module, you should use another router here.
Connect an output of this second router back to the input of the first router (before Module #81). In order to loop back, you may need to use a combination of routers and/or filters to control the flow correctly.

2 Likes

Hi! Thanks for reply!

It seems that routers do not work in that way, or I did not quite understand what you mean

That’s what the error directive Resume does.

The if-exists-ignore throws the error, which the Resume directive can be used to return the item from the Search module.

Screenshot_2023-12-30_141250

I explained this in a similiar older post Can I skip a module based on a filter? - #3 by samliew

If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.

Sorry for the earlier confusion, After Creating the data base Item at module 84 you will have to create another search module and proceed further with single route, similar to the route after module 81 when the project is found
you can copy the same route.

for easy understanding
After Create a database item module 84, you will have to insert a new search module and then copy the route after the search module 81 when the project is found and past it after the new search module that you just made.

1 Like

I managed to do as you suggested, and the problem can be considered resolved. However, looking at it from a different angle, in my case, this scenario involves many modules that will use the page_id, and I would like to obtain them from one place, i.e., from module #81 (search search objects), not from module #84 (create database item). Otherwise, I’ll have to specify in the other modules that the page id is either coming from here #81 or here #84.

As far as I understand, my desire might be fulfilled by the Make module, to restart the scenario with the same data, so that it is passed during the process, but to pass the same data I need Scenario inputs, which are available starting from the Pro plan. But even here, I am not sure that it will be possible to restart the scenario with the same input that was passed at the start of the launch.

Anyway, thanks for the help!

It seems that the problem is completely solved. I don’t want to write a lot of text, so I simply recorded a video for those who might also need a solution to this kind of problem. As seen in the video, if a page is not found, it is created and stored in a variable. If the page is found, it is also stored in the variable, bypassing the page creation module.

Thank you again for your help.

1 Like

Hello there @Albert_Medov :blob_wave:

I just want to quickly step in to say awesome work getting this up and running with the assistance of @samliew and @ThakurHemansh :clap:

Also, thank you so much for jumping back in here with the recording of your final setup! This is incredibly valuable and has the potential to help many others down the road :pray:

2 Likes