aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-10-13 12:14:56 -0700
committerGitHub <[email protected]>2025-10-13 12:14:56 -0700
commit17fa79cba898bc2648948c81589854febeab6fd3 (patch)
treee69fd92ff01b73e36572698379314efc13fec595
parentfeat: project selection, creation for each connectors (#486) (diff)
parentfeat: zapier page (diff)
downloadsupermemory-17fa79cba898bc2648948c81589854febeab6fd3.tar.xz
supermemory-17fa79cba898bc2648948c81589854febeab6fd3.zip
Merge pull request #488 from naman06dev/main
feat: n8n + zapier integration page
-rw-r--r--apps/docs/add-memories/overview.mdx41
-rw-r--r--apps/docs/docs.json7
-rw-r--r--apps/docs/images/add-gmail-node-zapier.pngbin0 -> 129172 bytes
-rw-r--r--apps/docs/images/bearer-auth-add-n8n.pngbin0 -> 232975 bytes
-rw-r--r--apps/docs/images/core-http-req.pngbin0 -> 101351 bytes
-rw-r--r--apps/docs/images/gmail-content.pngbin0 -> 222364 bytes
-rw-r--r--apps/docs/images/gmail-trigger.pngbin0 -> 280553 bytes
-rw-r--r--apps/docs/images/make-zap.pngbin0 -> 583488 bytes
-rw-r--r--apps/docs/images/map-content-to-gmail.pngbin0 -> 58286 bytes
-rw-r--r--apps/docs/images/zapier-output.pngbin0 -> 91501 bytes
-rw-r--r--apps/docs/memory-api/track-progress.mdx36
-rw-r--r--apps/docs/n8n.mdx92
-rw-r--r--apps/docs/search/overview.mdx40
-rw-r--r--apps/docs/zapier.mdx64
14 files changed, 252 insertions, 28 deletions
diff --git a/apps/docs/add-memories/overview.mdx b/apps/docs/add-memories/overview.mdx
index 6294147e..5b1ecaf0 100644
--- a/apps/docs/add-memories/overview.mdx
+++ b/apps/docs/add-memories/overview.mdx
@@ -6,6 +6,47 @@ sidebarTitle: "Overview"
Add any type of content to Supermemory - text, files, URLs, images, videos, and more. Everything is automatically processed into searchable memories that form part of your intelligent knowledge graph.
+## Prerequisites
+
+Before adding memories, you need to set up the Supermemory client:
+
+- **Install the SDK** for your language
+- **Get your API key** from [Supermemory Console](https://console.supermemory.ai)
+- **Initialize the client** with your API key
+
+<CodeGroup>
+
+```bash npm
+npm install supermemory
+```
+
+```bash pip
+pip install supermemory
+```
+
+</CodeGroup>
+
+<CodeGroup>
+
+```typescript TypeScript
+import Supermemory from 'supermemory';
+
+const client = new Supermemory({
+ apiKey: process.env.SUPERMEMORY_API_KEY!
+});
+```
+
+```python Python
+from supermemory import Supermemory
+import os
+
+client = Supermemory(
+ api_key=os.environ.get("SUPERMEMORY_API_KEY")
+)
+```
+
+</CodeGroup>
+
## Quick Start
<CodeGroup>
diff --git a/apps/docs/docs.json b/apps/docs/docs.json
index 219be1ca..9ccea103 100644
--- a/apps/docs/docs.json
+++ b/apps/docs/docs.json
@@ -157,6 +157,13 @@
]
},
{
+ "group": "Integrations with no-code tools",
+ "pages": [
+ "n8n",
+ "zapier"
+ ]
+ },
+ {
"group": "Migration Guides",
"pages": ["migration/from-mem0"]
},
diff --git a/apps/docs/images/add-gmail-node-zapier.png b/apps/docs/images/add-gmail-node-zapier.png
new file mode 100644
index 00000000..c06b7a4c
--- /dev/null
+++ b/apps/docs/images/add-gmail-node-zapier.png
Binary files differ
diff --git a/apps/docs/images/bearer-auth-add-n8n.png b/apps/docs/images/bearer-auth-add-n8n.png
new file mode 100644
index 00000000..32fa8a26
--- /dev/null
+++ b/apps/docs/images/bearer-auth-add-n8n.png
Binary files differ
diff --git a/apps/docs/images/core-http-req.png b/apps/docs/images/core-http-req.png
new file mode 100644
index 00000000..5ae65c17
--- /dev/null
+++ b/apps/docs/images/core-http-req.png
Binary files differ
diff --git a/apps/docs/images/gmail-content.png b/apps/docs/images/gmail-content.png
new file mode 100644
index 00000000..babbf170
--- /dev/null
+++ b/apps/docs/images/gmail-content.png
Binary files differ
diff --git a/apps/docs/images/gmail-trigger.png b/apps/docs/images/gmail-trigger.png
new file mode 100644
index 00000000..5b14af94
--- /dev/null
+++ b/apps/docs/images/gmail-trigger.png
Binary files differ
diff --git a/apps/docs/images/make-zap.png b/apps/docs/images/make-zap.png
new file mode 100644
index 00000000..17974a86
--- /dev/null
+++ b/apps/docs/images/make-zap.png
Binary files differ
diff --git a/apps/docs/images/map-content-to-gmail.png b/apps/docs/images/map-content-to-gmail.png
new file mode 100644
index 00000000..b0924a5a
--- /dev/null
+++ b/apps/docs/images/map-content-to-gmail.png
Binary files differ
diff --git a/apps/docs/images/zapier-output.png b/apps/docs/images/zapier-output.png
new file mode 100644
index 00000000..8f9687f2
--- /dev/null
+++ b/apps/docs/images/zapier-output.png
Binary files differ
diff --git a/apps/docs/memory-api/track-progress.mdx b/apps/docs/memory-api/track-progress.mdx
index 60126dab..97a7f5bc 100644
--- a/apps/docs/memory-api/track-progress.mdx
+++ b/apps/docs/memory-api/track-progress.mdx
@@ -31,7 +31,8 @@ Monitor all documents currently being processed across your account.
<CodeGroup>
-```typescript
+```typescript Typescript
+
// Direct API call (not in SDK)
const response = await fetch('https://api.supermemory.ai/v3/documents/processing', {
headers: {
@@ -43,7 +44,7 @@ const processing = await response.json();
console.log(`${processing.documents.length} documents processing`);
```
-```python
+```python Python
# Direct API call (not in SDK)
import requests
@@ -56,7 +57,7 @@ processing = response.json()
print(f"{len(processing['documents'])} documents processing")
```
-```bash
+```bash cURL
curl -X GET "https://api.supermemory.ai/v3/documents/processing" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY"
```
@@ -103,7 +104,7 @@ Track specific document processing status.
<CodeGroup>
-```typescript
+```typescript Typescript
const memory = await client.memories.get("doc_abc123");
console.log(`Status: ${memory.status}`);
@@ -116,7 +117,7 @@ while (memory.status !== 'done') {
}
```
-```python
+```python Python
memory = client.memories.get("doc_abc123")
print(f"Status: {memory['status']}")
@@ -129,7 +130,7 @@ while memory['status'] != 'done':
print(f"Status: {memory['status']}")
```
-```bash
+```bash cURL
curl -X GET "https://api.supermemory.ai/v3/documents/doc_abc123" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY"
```
@@ -250,25 +251,4 @@ async function addWithRetry(content: string, maxRetries = 3) {
}
}
}
-```
-
-## Processing Times by Content Type
-
-Documents: Created near instantly (200-500ms)
-
-Memories: Supermemory creates a memory graph understanding based on semantic analysis and contextual understanding.
-
-| Content Type | Memory Processing Time | Notes |
-|--------------|------------------------|-------|
-| Plain Text | 5-10 seconds | Fastest processing |
-| Markdown | 5-10 seconds | Similar to plain text |
-| PDF (< 10 pages) | 15-30 seconds | OCR if needed |
-| PDF (> 100 pages) | 1-3 minutes | Depends on complexity |
-| Images | 10-20 seconds | OCR processing |
-| YouTube Videos | 1-2 min per 10 min video | Transcription required |
-| Web Pages | 10-20 seconds | Content extraction |
-| Google Docs | 10-15 seconds | API extraction |
-
-<Note>
-**Pro Tip**: Use the processing status endpoint to provide real-time feedback to users, especially for larger documents or batch uploads.
-</Note>
+``` \ No newline at end of file
diff --git a/apps/docs/n8n.mdx b/apps/docs/n8n.mdx
new file mode 100644
index 00000000..d3f50bd5
--- /dev/null
+++ b/apps/docs/n8n.mdx
@@ -0,0 +1,92 @@
+---
+title: "n8n Integration"
+description: "Automate knowledge management with Supermemory in n8n workflows"
+sidebarTitle: "n8n"
+---
+
+Connect Supermemory to your n8n workflows to build intelligent automation workflows and agents that leverage your full knowledge base.
+
+## Quick Start
+
+### Prerequisites
+
+- n8n instance (self-hosted or cloud)
+- Supermemory API key ([get one here](https://console.supermemory.com/settings))
+- Basic understanding of n8n workflows
+
+### Setting Up the HTTP Request Node
+
+The Supermemory integration in n8n uses the HTTP Request node to interact with the Supermemory API. Here's how to configure it:
+
+1. Add an **HTTP Request** node to your workflow (Core > HTTP Request)
+![](/images/core-http-req.png)
+2. Set the **Method** to `POST`
+3. Set the **URL** to the appropriate Supermemory API endpoint:
+ - Add memory: `https://api.supermemory.ai/v3/documents`
+ - Search memories: `https://api.supermemory.ai/v4/search`
+4. For authentication, select **Generic Credential Type** and then **Bearer Auth**
+5. Click on **Create New Credential** and paste the Supermemory API Key in the Bearer Token field.
+![](/images/bearer-auth-add-n8n.png)
+6. Check **Send Body** and select **JSON** as the Body Content Type. The fields depend on what API endpoint you're sending the request to. You can find detailed step-by-step examples below.
+
+## Step-by-Step Tutorial
+
+In this tutorial, we'll create a workflow that automatically adds every email from Gmail to your Supermemory knowledge base. We'll use the HTTP Request node to send email data to Supermemory's API, creating a searchable archive of all your communications.
+
+### Adding Gmail Emails to Supermemory
+
+Follow these steps to build a workflow that captures and stores your Gmail messages:
+
+#### Step 1: Set Up Gmail Trigger
+
+![](/images/gmail-trigger.png)
+
+1. **Add a Gmail Trigger node** to your workflow
+2. Configure your Gmail credentials (OAuth2 recommended)
+3. Set the trigger to **Message Received**
+4. Optional: Add labels or filters to process specific emails only
+
+#### Step 2: Configure HTTP Request Node
+
+1. **Add an HTTP Request node** after the Gmail Trigger
+2. **Method**: `POST`
+3. **URL**: [`https://api.supermemory.ai/v3/documents`](/api-reference/manage-documents/add-document)
+4. Select your auth credentials you created with the Supermemory API Key.
+
+#### Step 3: Format Email Data for Supermemory
+
+In the HTTP Request node's **Body**, select **JSON** and **Using Fields Below**
+
+And create 2 fields:
+
+1. name: `content`, value: `{{ $json.snippet }}`
+2. name: `containerTag`, value: gmail
+
+
+![](/images/gmail-content.png)
+
+#### Step 4: Handle Attachments (Optional)
+
+If you want to process attachments:
+
+1. **Add a Loop node** after the Gmail Trigger
+2. Loop through `{{$json.attachments}}`
+3. **Add a Gmail node** to download each attachment
+4. **Add another HTTP Request node** to store attachment metadata
+
+
+#### Step 5: Add Error Handling
+
+1. **Add an Error Trigger node** connected to your workflow
+2. Configure it to catch errors from the HTTP Request node
+3. **Add a notification node** (Email, Slack, etc.) to alert you of failures
+4. Optional: Add a **Wait node** with retry logic
+
+#### Step 6: Test Your Workflow
+
+1. **Activate the workflow** in test mode
+2. Send a test email to your Gmail account
+3. Check the execution to ensure the email was captured
+4. Verify in Supermemory that the email appears in search results
+
+Refer to the [API reference](/api-reference/manage-documents/add-document) to learn more about other supermemory API endpoints. \ No newline at end of file
diff --git a/apps/docs/search/overview.mdx b/apps/docs/search/overview.mdx
index f1d65e2a..d95b611d 100644
--- a/apps/docs/search/overview.mdx
+++ b/apps/docs/search/overview.mdx
@@ -4,6 +4,46 @@ description: "Semantic and hybrid search with metadata filters, scoring, and pre
sidebarTitle : "Overview"
---
+## Prerequisites
+
+Before searching memories, you need to set up the Supermemory client:
+
+- **Install the SDK** for your language
+- **Get your API key** from [Supermemory Console](https://console.supermemory.ai)
+- **Initialize the client** with your API key
+
+<CodeGroup>
+
+```bash npm
+npm install supermemory
+```
+
+```bash pip
+pip install supermemory
+```
+
+</CodeGroup>
+
+<CodeGroup>
+
+```typescript TypeScript
+import Supermemory from 'supermemory';
+
+const client = new Supermemory({
+ apiKey: process.env.SUPERMEMORY_API_KEY!
+});
+```
+
+```python Python
+from supermemory import Supermemory
+import os
+
+client = Supermemory(
+ api_key=os.environ.get("SUPERMEMORY_API_KEY")
+)
+```
+
+</CodeGroup>
## Search Endpoints Overview
diff --git a/apps/docs/zapier.mdx b/apps/docs/zapier.mdx
new file mode 100644
index 00000000..d1e48b40
--- /dev/null
+++ b/apps/docs/zapier.mdx
@@ -0,0 +1,64 @@
+---
+title: "Integrate supermemory in your Zapier workflows"
+sidebarTitle: "Zapier"
+description: "Learn how to use the code block to integrate supermemory with Zapier and add memory to your automations."
+---
+
+With Supermemory you can now easily add memory to your Zapier workflow steps. Here's how:
+
+## Prerequisites
+- A Supermemory API Key. Get yours [here](console.supermemory.ai)
+
+## Step-by-step tutorial
+
+For this tutorial, we're building a simple flow that adds incoming emails in Gmail to Supermemory.
+
+<Steps>
+ <Step title="Make a flow">
+ Open your Zapier account and click on 'Zap' to make a new automation.
+ ![make a zap - annotated](/images/make-zap.png)
+ </Step>
+ <Step title="Add Gmail node">
+ Add a new Gmail node that gets triggered on every new email. Connect to your Google account.
+ ![add gmail](/images/add-gmail-node-zapier.png)
+ </Step>
+ <Step title="Add code block">
+ Now, add a new 'Code by Zapier' block. Set it up to run Python.
+
+ In the **Input Data** section, map the content field to the Gmail raw snippet.
+
+ ![](/images/map-content-to-gmail.png)
+ </Step>
+ <Step title="Integrate Supermemory">
+ Since we're ingesting data here, we'll use the [add documents endpoint.](/api-reference/manage-documents/add-document)
+
+ Add the following code block:
+
+ ```python
+ import requests
+
+ url = "https://api.supermemory.ai/v3/documents"
+
+ payload = { "content": inputData['content'], "containerTag": "gmail" }
+ headers = {
+ "Authorization": "Bearer YOUR_SM_API_KEY",
+ "Content-Type": "application/json"
+ }
+
+ response = requests.post(url, json=payload, headers=headers)
+
+ print(response.json())
+ ```
+
+ The `inputData['content']` field maps to the Gmail content fetched from Zapier.
+
+ ![](/images/zapier-output.png)
+ </Step>
+</Steps>
+
+<Note>
+ Sometimes Zapier might show an error on the first test run. It usually works right after. Weird bug, we know.
+</Note>
+
+
+You can perform other operations like search, filtering, user profiles, etc., by using other Supermemory API endpoints which can be found in our [API Reference.](api-reference/search/search-memory-entries) \ No newline at end of file