Talk to AI Agent in Slack and have it able to search Slack channel for past messages

Describe the problem/error/question

I want the AI agent to search the channel it’s in to help answer the user’s questions about messages in the channel.

I’ve added the tool for the AI agent to search Slack messages, it has the scopes to search in the channel it’s in, but when I ask the AI agent a question about messages in the channel it does not use the search tool. The AI Agent responds with:

How can I get an AI agent to listen to my messages in a slack channel, use what message history content is available in Slack, and respond to the user as if it was able to read the entire Slack channel messages? For example, one use-case is to help users understand critical things in Slack that the user may have missed during their workday. So they ask it, “What were the 3 most critical sounding things today?” and it answers them correctly.

Information on your n8n setup

Running n8n in the n8n cloud on free trial.

Hi @darius
Welcome to the n8n community! :wave:

A couple of suggestions:

  1. The scope required to do that type of search is search:read and it seems to be available only as a “User Token Scopes”
  2. If the tool is not used, try to tweak the “Tool Description” to make it easier for the Agent to understand when to use that tool
  3. Consider that by default that tool will only return a limited number of messages, so if you ask for the first one, it could not have access to that. You can switch “Return All” ON, but that I could retrieve a lot of messages, and I’m not sure if it can handle that or not (worth trying anyway)

I hope this helps :slight_smile:

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