Logic to forms in interfaces

Problem

Currently, there’s no way to create nested if-else conditions within an interface inside a flow. This makes it difficult to control question visibility based on user responses. I tried using two flows and setting one as a sub-flow, but interfaces don’t support input items, so there’s no way to direct the logic properly. If there’s a workaround, I haven’t found it, and this limitation is frustrating.

Feature/Solution

Adding support for conditional logic between questions in interfaces would solve this. Ideally, users should be able to define rules to show or hide questions based on previous answers within the same interface. This would allow for more dynamic and flexible flows without needing workarounds or splitting logic across multiple flows.

Let me know if this is possible or if there’s another way to achieve this.

Hey @d.yanes,

If I understand correctly, what you’re trying to accomplish is:

  • Conditionally render input fields on an interface
  • Based on responses users provide to previous input fields?

Could you provide a description of the exact use case? We currently don’t support this, but if I have more information regarding your interface and what you’re trying to achieve, I could suggest a workaround or add as a new feature to our backlog. Thanks!

Hey @kaustav_gumloop ,
Thanks for replying.
We’re automating the internal generation of client proposals. Our company offers different services and each service has its own details to be filled.

The ideal interface would be one that as I’m choosing specific services (checking in an element for example), the related questions to the services dynamically appear in the interface so the user can fill the information.

In the end the goal is for the Flow to generate a Google Doc with the proposal but we need to have all the services and details for each specific client.

I was thinking to solve this by having separate flows and adding them as subflow from a master flow, but interfaces don’t support input from other nodes (or at least I tried).

How would you approach this?

I see. I have added conditional rendering of interface fields to our backlog, we will evaluate based on user’s needs if this is worth supporting.

The best workaround for your use case:

Interface

  • Have a required field for dropdown which specifies all services you offer
  • List ALL the questions you have for each service as optional fields
  • Each service would have a Title and a description where you tell the user they should only fill out that set of questions

Example:

Flowbook logic

Then, in your flow logic, the top level flow includes an interface connecting all the inputs via combine text to the Ask AI node. The Ask AI node should be prompted to determine, based on the user’s interface inputs to output:

a) if they provided the appropriate inputs to the respective service (return NO if not)
b) the name of the service if they filled in the appropriate inputs (service 1 or service 2 etc.)

Then you would attach an If-Else node to the output of Ask AI, and each condition represents the subflow you trigger to handle logic for each service and a “NO” option in case the user did not fill in the fields correctly (you can also have Ask AI provide some feedback to the user accordingly).

Then you connect each condition to its respective subflow, combine text with the outputs of all subflows (only one output should be there in the end because of the If-Else logic), and then you connect that to our Google Docs Reader to create the proposal on your end, and transmit a success response to the user accordingly.

Let me know if that makes sense.

Thanks for your reply. I thought about this too but it seems like a huge workaround for something that could easily be done by adding logic to the forms (which perhaps is a complex feature to add idk).

I hope this gets added to the backlog and that it doesn’t get deprioritized, I’m sure this is a flow many users will need when they start automating their processes.

Thanks @kaustav_gumloop !

Hey @kaustav_gumloop !

I’m implementing your suggested solution, the issue I found is that when I add the Ask AI node to the If Else node, I only get two outputs from the if else node one if it’s true and one if it’s “else” but I have 5 services, how could I make it that I have an output for each condition as you mentioned?

You can add conditions by clicking on “Add Condition”!

Yes but there are no outputs for each condition, just more conditions to the if condition, I want to create a different output from each result

I think you might be looking for an ‘ELSE-IF’ condition here which is not possible directly. You’ll have to use multiple IF-ELSE nodes for that.

Here’s an example: https://www.gumloop.com/pipeline?workbook_id=7vSNcdXcFxSPfcAg4KzPLs&run_id=NF99SXjjz3ER7vRjjRRcCE

Let me know if this works for you.

1 Like

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