Help in creating a scenario of random assigning

Hello guys!

I’m trying to build a scenario to assign random app reviews that enter through slack to a random agent of a slack channel.

Per se, I have a public slack channel where everytime we get a review of our app, it pops up in that channel.

I want that each review that comes in, is assigned to a random agent that is a member of another smaller slack channel, and it is redirected to that channel with the review and the name of the agent assigned.

Would this be possible with a Make scenario? (I’m having problems especially with the part of assigning the message to a random agent :frowning: )

Thank you in advance for the help!

Welcome to the Make community!

Do you already have an existing scenario? You can use the special {{random}} variable, and then multiply it by the number of agents you have to get a random number. Then you can use that to pick that item’s index from an array of agents.

If you need further assistance, please provide the following:

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.


(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Input/Output bundles

Please provide the input and output bundles of the trigger/iterator/aggregator modules 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”.

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:

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.

Following these steps will allow others to assist you here. Thanks!

samliewrequest private consultation

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

1 Like

You can for sure do that.

This would take a couple of steps.
However if you do not care about mapping users and saving operation there you can do it the way below.

I am also not sure how you are triggering this scenario but you can just add you trigger before the listing of all users in my scenario.

steps 1. List all members in your channel
step 2. Iterate over the members to create one array.

step 3. Get a random bundle using the max bundle count

step 4. Iterate over the array we created will all of the members.

step 5. filter for the bundle that we got randomly

Step 6. get the user id from our random bundle

step 7. create your message

@rafaelantoniocosta Let me know if this helps you!

1 Like

great one @Mr.Make - thanks!
how would you choose two users randomly?