SlackMemory
/Documentation

ChatGPT Integration

Custom GPT

Create a Custom GPT that can search your Slack history using natural language.

Prerequisites

  • ChatGPT Plus or Enterprise subscription
  • A Slack Memory API key (create one in Settings)
  • Your workspace ID

Setup Steps

1

Create a new Custom GPT

Go to ChatGPT and click on your profile, then "My GPTs" → "Create a GPT".

Open GPT Editor
2

Configure the GPT

In the "Configure" tab, set up your GPT with these settings:

Slack Search
Search my Slack workspace using AI-powered semantic search.
You are a helpful assistant that searches the user's Slack workspace.

When a user asks a question:
1. Use the searchSlackMessages action to find relevant messages
2. Summarize the key findings from the search results
3. Include links to the original messages when available
4. If no results are found, suggest alternative search terms

Always be concise and helpful. Quote relevant message snippets to support your answers.
3

Add the Action

Scroll down to "Actions" and click "Create new action". Import the OpenAPI schema:

https://your-app.vercel.app/openapi.json

Or paste this schema directly:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Slack Memory API",
    "version": "1.0.0",
    "description": "Semantic search for Slack messages"
  },
  "servers": [
    {
      "url": "https://your-app.vercel.app"
    }
  ],
  "paths": {
    "/api/query": {
      "post": {
        "operationId": "searchSlackMessages",
        "summary": "Search Slack messages",
        "description": "Search for Slack messages using semantic/AI search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["query", "workspaceId"],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Natural language search query"
                  },
                  "workspaceId": {
                    "type": "string",
                    "description": "Your Slack Memory workspace ID"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "description": "Max results to return"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": { "type": "string" },
                          "channelName": { "type": "string" },
                          "userDisplayName": { "type": "string" },
                          "messageDate": { "type": "string" },
                          "permalink": { "type": "string" },
                          "similarity": { "type": "string" }
                        }
                      }
                    },
                    "count": { "type": "integer" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
4

Configure Authentication

In the Action settings, set up authentication:

Auth Type:
API Key
Auth Type:Custom
Header Name:X-API-Key
API Key:Your Slack Memory API key (sk_live_...)
5

Set the Workspace ID

Update the GPT instructions to include your workspace ID, or add it as a conversation starter:

Always use workspace ID: YOUR_WORKSPACE_ID when calling the API.

Find your workspace ID in Settings.

6

Test and Save

Click "Preview" to test your GPT. Try asking questions like:

  • "What did we discuss about the product roadmap?"
  • "Find messages about the Q4 goals"
  • "Who mentioned the new feature last week?"

Once everything works, click "Save" and choose whether to keep it private or share it.

Troubleshooting

Getting "Invalid API key" error?

Make sure your API key starts with sk_live_ and is entered correctly in the Action authentication settings.

Getting "Access denied" error?

Verify that the workspace ID in your query matches the workspace your API key was created for.

No results found?

Make sure your Slack workspace has been synced and messages have been indexed. Check the Dashboard for sync status.