Problem in searching channel history in slack by using slack node

I have tried to use the slack channel history search function to search the message. However, it returns as follows:

//ERROR: UNKNOWN ERROR - check the detailed error for more information

Slack error response: {“ok”:false,“error”:“not_in_channel”}//

I have checked as i should grant the searching history access on slack side. And attached is the screenshot of my setting.

Could someone help me?

Hey @tomtsang!

Welcome to the community :sparkling_heart:

Did you add the bot to the channel n8n-testing? The bot needs to be added in the same channel whose history it needs to read.

Let me know if you still face any issues :slight_smile:

Thanks. I have added the bot in the same channel. (I am using n8n-testing for testing and there are some message in the slack alr)

So i wonder what’s goes wrong.

These are the steps I followed:

  1. Add channels:history and channels:read scopes to the bot.
  2. Reinstall the Slack App on the workspace.
  3. Run the Channel > Get All operation to get the channel ID.
  4. Copy the Channel ID.
  5. Set the operation to History and in the Channel field, paste the Channel ID.
  6. Toggle Return All to true.

Here’s a screenshot of the final node:

2 Likes