mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-07 02:58:11 +00:00
feat: zapier page
This commit is contained in:
parent
ca3c13b946
commit
c352f41b18
10 changed files with 155 additions and 30 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -159,7 +159,8 @@
|
|||
{
|
||||
"group": "Integrations with no-code tools",
|
||||
"pages": [
|
||||
"n8n"
|
||||
"n8n",
|
||||
"zapier"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
BIN
apps/docs/images/add-gmail-node-zapier.png
Normal file
BIN
apps/docs/images/add-gmail-node-zapier.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
BIN
apps/docs/images/make-zap.png
Normal file
BIN
apps/docs/images/make-zap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 570 KiB |
BIN
apps/docs/images/map-content-to-gmail.png
Normal file
BIN
apps/docs/images/map-content-to-gmail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
apps/docs/images/zapier-output.png
Normal file
BIN
apps/docs/images/zapier-output.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
title: "n8n Integration"
|
||||
description: "Automate knowledge management with Supermemory in n8n workflows"
|
||||
icon: "workflow"
|
||||
sidebarTitle: "n8n"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
64
apps/docs/zapier.mdx
Normal file
64
apps/docs/zapier.mdx
Normal file
|
|
@ -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.
|
||||

|
||||
</Step>
|
||||
<Step title="Add Gmail node">
|
||||
Add a new Gmail node that gets triggered on every new email. Connect to your Google account.
|
||||

|
||||
</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.
|
||||
|
||||

|
||||
</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.
|
||||
|
||||

|
||||
</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)
|
||||
Loading…
Add table
Reference in a new issue