Send Slack Message using random Tokens

Hi guys.
I hope you are doing well.

I have a process which sends slack alerts using Slack Scope and Send Message Activity from the Slack Activities.
I can send alerts using my token, now my question is how to make it do send messages using random tokens:

I have an array of tokens. But here in the configuration it gets one string and one non string variable and when I provide tokens(0) it gives me an error.

Any Idea?

1 Like

Hello @hurmet.noka!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hey @hurmet.noka

You want to use random API tokens or you want to send some random tokens in slack message ?

Kindly confirm or please explain the exact scenario

Thanks
#nK

1 Like

I want to send messages using random tokens.
Thanks

1 Like

Hey @hurmet.noka

So the challenge here for you is to generate some random tokens right ?

Thanks
#nK

1 Like

I have the tokens,
One is mine one is of a collegue of mine.
I want to send today messages using my token and tomorrow using his token.

Thank you

1 Like

Hey @hurmet.noka

Okay clear. But what is the actual rule for this to send which token when will help in building the logic.

Thanks
#nK

Random. Pick a token randomly from the array of tokens.

Thanks

1 Like

Hey @hurmet.noka

Just try this please

strArr_Tokens((new Random).Next(strArr_Tokens.Length))

nmnithinkrishna_RandomArrayElement.zip (2.0 KB)

Hope this helps

Thanks
#nK

1 Like

This is helpful.
My question was regarding the configuration of SLACK Activities. because once you configure it with one token then it doesnt work with the other.
So instead of using the token itself how can i configure using the variable ?

Thank You

1 Like

funny @hurmet.noka Forgive my bad ! will come up with an update on it :smiley:

1 Like

I appreciate your help.
Many thanks.

1 Like

Hey @hurmet.noka

Is this the activity you are using & what type of auth ?

Thanks
#nK

1 Like

This one,
Thanks

1 Like

Hey @hurmet.noka

Here you find the sample. I don’t have the API key so just made a sample array. Kindly replace it with your valid one.

nmnithinkrishna_UiPath_SlackIntegration with random tokens

PFA - nmnithinkrishna_SlackRandomTokenUseForAuth.zip (4.1 KB)

Thanks
#nK

1 Like

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