n8n Integration
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
Add an HTTP Request node
In your n8n workflow, add an "HTTP Request" node. This will call the Slack Memory API.
HTTP Request DocsConfigure the request
Set up the HTTP Request node with these settings:
https://your-app.vercel.app/api/querySelect "Generic Credential Type" → "Header Auth"
X-API-Keysk_live_...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.
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
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:
- Go to Settings → Credentials → Add Credential
- Search for "Header Auth"
- Set Name to
X-API-Key - Set Value to your Slack Memory API key
- 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.