SlackMemory
/Documentation

n8n Integration

Workflows

Build automated workflows that search and analyze your Slack data.

Prerequisites

  • n8n instance (cloud or self-hosted)
  • A Slack Memory API key (create one in Settings)
  • Your workspace ID

Use Cases

Daily Digest

Send a daily summary of key discussions to email or another channel.

Sentiment Analysis

Search for feedback and run sentiment analysis on customer mentions.

Knowledge Base

Build a searchable knowledge base from Slack discussions.

Meeting Prep

Automatically gather context from Slack before calendar meetings.

Setup: HTTP Request Node

1

Add an HTTP Request node

In your n8n workflow, add an "HTTP Request" node. This will call the Slack Memory API.

HTTP Request Docs
2

Configure the request

Set up the HTTP Request node with these settings:

POST
https://your-app.vercel.app/api/query

Select "Generic Credential Type" → "Header Auth"

Name:X-API-Key
Value:sk_live_...
3

Set the request body

In the "Body" section, select "JSON" and add:

{
  "query": "{{ $json.searchQuery }}",
  "workspaceId": "YOUR_WORKSPACE_ID",
  "limit": 10
}

Use expressions like {{ $json.searchQuery }} to make the query dynamic.

4

Handle the response

The API returns results in this format. Use n8n expressions to access the data:

// Access first result
{{ $json.results[0].text }}

// Get all messages as text
{{ $json.results.map(r => r.text).join('\n') }}

// Get result count
{{ $json.count }}

Example: Daily Digest Workflow

Schedule Trigger
HTTP Request
Format Results
Send Email

This workflow runs daily, searches for key topics, and emails a summary.

{
  "nodes": [
    {
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [{ "field": "days", "triggerAtHour": 9 }]
        }
      }
    },
    {
      "name": "Search Slack",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://your-app.vercel.app/api/query",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "query", "value": "important decisions made yesterday" },
            { "name": "workspaceId", "value": "YOUR_WORKSPACE_ID" },
            { "name": "limit", "value": "20" }
          ]
        }
      }
    }
  ]
}

Creating n8n Credentials

For reusable authentication, create a credential in n8n:

  1. Go to SettingsCredentialsAdd Credential
  2. Search for "Header Auth"
  3. Set Name to X-API-Key
  4. Set Value to your Slack Memory API key
  5. Save and use this credential in your HTTP Request nodes

Tips

Rate Limiting

Add a "Wait" node between API calls if processing many queries to avoid rate limits.

Error Handling

Enable "Continue On Fail" or add an Error Trigger workflow to handle API errors gracefully.

Dynamic Queries

Use incoming webhooks or form triggers to let users submit search queries to your workflow.