Slack automation for a noob

Hi all,

Nooby here. I’m trying to create a stupidly simple automation using slack.

  1. Watch private channel for the message “start”
  2. When it notices start, then I want it to send a message “Welcome to XYZ, paste your comment below”
  3. Then I want it to watch the channel for what I message next.
  4. Lets say I send the message “hello”
  5. Then I want it to respond with “your last message was “hello”.

I’m stuck on -

  1. Watch private channel messages
  2. Create a message
  3. Get a private channel message (throwing an error) → Error: invalid_ts_latest (200).
  4. Create a message

Once I understand this, I’ll be able to build more on top.

Thank you!

Hello, @jral !

To create the Slack automation you described using Make.com, here’s a step-by-step guide, starting from setting up the bot in Slack to configuring the flow in Make. Let’s get started!

Step 1: Creating a Slack Bot with the Necessary Scopes

First, you’ll need to set up a bot in Slack with specific permissions to monitor and send messages in private channels. Here’s how:

  1. Access the Slack Apps Dashboard and create a new app:

    • Name the app (e.g., “Bot XYZ”) and select the workspace where it will be used.
  2. Configure the App’s Permissions (Scopes):

    • In the app dashboard, go to OAuth & Permissions and add these scopes:
      • channels:read and groups:read: to allow the bot to monitor messages in private channels.
      • chat:write: to send messages on behalf of the bot.
      • im:history: to access direct messages (if needed).
      • channels:history and groups:history: to access the message history in the channels it interacts with.
  3. Install the App in the Workspace:

    • Click “Install App to Workspace” and authorize the installation.
    • Copy the Bot Token (starts with “xoxb-”) to use in Make.com.
  4. Configure Event Subscriptions:

    • In the app dashboard, go to Event Subscriptions and enable it. Then, add webhook URLs as Make.com requires.
    • Also, add the event message.channels to monitor messages in channels (including private channels).

Step 2: Creating the Flow in Make.com

Now that the bot is set up, let’s move to configuring the flow in Make.com to create the automation.

  1. Set Up the Trigger to Monitor the Channel:

    • In Make.com, select Slack as the app and choose the Watch Messages in a Private Channel module.
    • Enter the bot authentication token created earlier.
    • Specify the private channel the bot should monitor.
  2. Set the Trigger to Detect “start”:

    • Create a condition in the monitoring module to trigger only when the message is “start.”
    • When the “start” condition is detected, configure the Create a Message module to send the message: “Welcome to XYZ, paste your comment below.”
  3. Monitor the Next Message:

    • Add a second Watch Messages in a Private Channel module to monitor the next message sent after “start.”
    • Configure the Create a Message module to respond with “your last message was ‘[last message]’,” storing the previous message as a variable for reuse.
  4. Resolving the invalid_ts_latest (200) Error:

    • This error occurs when the message timestamp is invalid. To prevent this, ensure Make.com is using a valid timestamp when retrieving messages.
    • Another solution is to set up the modules to read messages from a fixed timestamp or omit this specification if it’s not essential.

Following these steps, you should be able to create and test the basic automation! Once this initial setup is working, you can expand and adjust the flow as needed.

If you have any questions, we’re here to help! :blush:

@Jorge_Pedro Thanks so much for your help! Exactly what I needed.

I’m stuck on this part here. See screenshots below.


Can you please advise?

Thanks!

Jerry

Hi @Jorge_Pedro

I’ve managed to complete Step 1 now. See screenshot below.

I’m stuck on Step 1 of Part 2 - Setting up the trigger to monitor the channel.
You mentioned to Enter the bot authentication token. I don’t see that option in the “watch private channel message” below. Can you please advise?

Can you please advise?

Thanks!

Jerry

Click on Add there. The field will appear to add your Token.
Uploading: IMG_3737.jpeg…
Uploading: IMG_3738.jpeg…

See if this works and let me know.

Hi @Jorge_pedro I can’t see the images. Can you please re-share?

Thank you!

Sorry, my friend. Here are the pictures.

When you click on Add, you will have access to the fields to enter the token.

In my case, I already have the credentials, so it is like this.

Finally, you will use the scopes you configured earlier here.

Test it and let me know if it worked.