How can I use subscenario module?

Greetings. I’m working on scenario that includes a single subscenario (starts with Telegram ‘watch updates’)

Intended workflow is followings;

  1. Send a Telegram message prior to call a subscenario
  2. subscenario which is monitoring new message from user, finds that there is a new message.
    (The message will contains “number” of news to filter. For example, if message said “1,2,3” then following workflow will filter out news, leaving only 1,2,3.
  3. I build scenario with scenario input and output, also adding ‘call a subscenario’ module in parent scenario too. (take a look at caputres)
  4. THE PROBLEM IS THAT CALL A SCENARIO MODULE IS NOT WAITING FOR AN OUTPUT FROM SUBSCENARIO. (I’VE ALREADY CHECK THE OPTION ‘WAIT FOR SUBSCENARIO OUTPUT’)
  5. In addition, I made a return output module in subscenario.

Anyone who has similar problem or know solution, please reply.

1 Like

Hi! Great to see how you’re aiming to use subscenarios.

In addition to using the Return Output module in your subscenario, did you define your scenario outputs from the bottom menu bar?

If so, could you post a screenshot and also a screenshot of the Return Output module parameters?

2 Likes

No I didn’t. I think that parent scenario does not need to define outputs because subscenario starts with Watch for update (needs input from Telegram only). So, I set it up only in subscenario to export output to parent scenario.

1 Like

Digging a little deeper …

From the subscenario execution history image you shared, it looks like the Telegram Watch Updates module didn’t find any new messages and so returned no output bundles for the scenario to continue with.

As a result, the following modules (OpenAI Create a Completion Prompt and Scenarios Return output) didn’t execute.

You’d probably be better having the Telegram Bot Watch Updates module in the parent scenario, using that as the trigger for the whole parent scenario (rather than the Router module, which seems like it’s not needed).

1 Like

Oh, actually there is other workflow prior to one in the image that I’ve attached. (sorry for misleading)

The whole automation process that I wanted to make was,

  1. Get 10 news articles from certain website.

  2. Using AI, make a group of articles (number of 3) to choose to deliver subscribers via Telegram.

  3. Send options to me (prior to confirm which articles to choose) then I choose articles to send.
    “This procedure was my intention to make on subscenario”

for example)
Bot) Here come several news articles

  1. titile
  2. titile
  3. titile

then, I would send " send it except 3" → This part is reason why I add “watch update” module in subscenario.

According to your comment, is it still available if I add watch update module in parent scenario rather than in sub one?

Thank you for kind comment by the way. :slight_smile:

According to your comment, is it still available if I add watch update module in parent scenario rather than in sub one?

Yes. Think of it this way … if the event that needs to start your scenario is a new Telegram message, then that should be the trigger for the whole scenario (rather than a schedule).

I’m not sure there’s actually any value in this case of having a subscenario.

Here’s what I’d suggest:

  • Swap the Router for the Telegram Watch Update module
  • Swap the Call a Subscenario module for the OpenAI Create a Completion module