Count the number of selected textual choice by customer

I have a workflow that collects customer information and sends emails based on what they fill out in the form. I use Google Forms to collect feedback. So, I have a problem. In my workflow, I would like to convert into a number the choices made by the client when filling out the form. As you can see in the image, if the client makes at least 4 choices of treatments, whether it be Morning or Evening, regardless of the choices or the order in which they are made, I must send them a message by email. My problem is how to translate into my Make flow the number of choices the client will make. As presented in the form, if the client chooses: “Lotion”, or “Serum” or “Cream”, etc… if they check “Morning” or “Evening”, the collected data is “Morning” or “Evening”. So, how to convert when they choose at least 4 Mornings or 4 Evenings into the number 4? I want to integrate into a filter or a condition of my flow the ability to detect when we have at least 4 Mornings or 4 Evenings, to send a specific message. I need your help at this level. Thank you in advance.
blueprint (2).json (273.6 KB)

Hey @Lagloire

You can convert this data into an array using toArray() function and then can use map() function and calculate the length of choices.

For better assistance, you need to share the json of the payload.

Regards,
Msquare Automation - Gold Partner of Make

Free Consultation | Live Implementation

Visit us here | Youtube Channel

Hey @Msquare_Automation

Thank you for your reply. Could you show me an example of using toArray() function and then use map() in a flow?

Which json are you looking for? I uploaded the blueprint in my request.

Looking forward to hearing from you.

Welcome to the Make community!

Please provide the output bundles of the trigger module by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

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

This will allow others to better assist you. Thanks!

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!