Calling another scenario and wait for it to finish

I want to have one “main” scenario run other scenarios.
These scenarios watch for new emails or google sheet rows, and add them to a share data storage.
Then, I want the main scenario to continue running and get the results from the data storage.
Problem is - the main scenario doesn’t wait for them to stop running.
How do I solve that?
If I use webhooks and wait for a response for the sub scenarios, I won’t be able to use a trigger like “watch new emails”.

What would be the solution?

If you want to do it using multiple scenarios while awaiting completion,

The sub-scenarios need to be using Custom Webhook triggers and Webhook Response modules.

The main scenario needs to use HTTP Make a Request to those Webhooks in the other scenarios.

1 Like

Thank you, but as I mentioned - if I’ll use webhooks on the sub scenarios how can I use “watch new emails” or “watch new google sheets rows”?

Your setup depends on where the “action” starts. If your workflow is initiated by an email or a change on Google Sheets, you can insert a HTTP module at the end of those scenarios, that triggers the same webhook.

You can then insert that webhook, at the start of your other scenario, to do the work on the datastore.

2 Likes

So this will require additional scenario, wouldn’t it?
One that activates the scenarios, and one that listens for them to finish using a webhook?
But the problem is I want two scenarios to run, and only when the two are finished - run my main

It all depends on how your total workflow is structured. And for that, we lack a bit of information on what they are supposed to do exactly :slight_smile:
There may be optimizations to be done to avoid this.

If, let’s say as an example, your workflow starts with the Email. You can start there:

Scenario 1) New email arrives at your inbox - do something - fire webhook to trigger scenario 2
Scenario 2) Webhook is triggered - do something with Google Sheets and ClickUp - fire webhook to trigger scenario 3
Scenario 3) Webhook is triggered - do something with the datastore

In scenario 2, your webhook simulates the “watch new row” module, as it will also kickstart your scenario. You then just follow the webhook with something that looks up the newest row and performs actions on that row (or with the data stored within that row).

Alternatively, you could potentially combine this within 1 scenario as well, and use a router. Routers follow their paths from top to bottom (if you haven’t filtered things obviously).

Hope that helps,

Thomas - Nola Digital

2 Likes

Thanks @NolaDigital, but I still don’t understand - if a scenario is triggered by a webhook, how do I “watch new emails” and “watch new rows”? These are triggers, and can’t be used if the trigger is a webhook

I’ll give more details so you can help me figure this out -
Every X minutes I want to check for new emails and new rows in the google sheet (with timestamps).
I want to combine them together, sort them using timestamps, and then throw them into clickup.

For this, I now have what I described above, where the main triggers the other scenarios, but it doesn’t wait for them which is my problem.

What do you suggest at this point?