diff options
| author | Naman Bansal <[email protected]> | 2025-10-13 17:10:57 +0800 |
|---|---|---|
| committer | Naman Bansal <[email protected]> | 2025-10-13 17:10:57 +0800 |
| commit | c352f41b18ebc7355b8e061c9512542580c77e31 (patch) | |
| tree | 91e244d43ccc0e4fcd634d531e8ca95ae0dd2e0b /apps | |
| parent | feat: n8n integration page (diff) | |
| download | supermemory-c352f41b18ebc7355b8e061c9512542580c77e31.tar.xz supermemory-c352f41b18ebc7355b8e061c9512542580c77e31.zip | |
feat: zapier page
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/docs/add-memories/overview.mdx | 41 | ||||
| -rw-r--r-- | apps/docs/docs.json | 3 | ||||
| -rw-r--r-- | apps/docs/images/add-gmail-node-zapier.png | bin | 0 -> 129172 bytes | |||
| -rw-r--r-- | apps/docs/images/make-zap.png | bin | 0 -> 583488 bytes | |||
| -rw-r--r-- | apps/docs/images/map-content-to-gmail.png | bin | 0 -> 58286 bytes | |||
| -rw-r--r-- | apps/docs/images/zapier-output.png | bin | 0 -> 91501 bytes | |||
| -rw-r--r-- | apps/docs/memory-api/track-progress.mdx | 36 | ||||
| -rw-r--r-- | apps/docs/n8n.mdx | 1 | ||||
| -rw-r--r-- | apps/docs/search/overview.mdx | 40 | ||||
| -rw-r--r-- | apps/docs/zapier.mdx | 64 |
10 files changed, 155 insertions, 30 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 207f2224..9ccea103 100644 --- a/apps/docs/docs.json +++ b/apps/docs/docs.json @@ -159,7 +159,8 @@ { "group": "Integrations with no-code tools", "pages": [ - "n8n" + "n8n", + "zapier" ] }, { diff --git a/apps/docs/images/add-gmail-node-zapier.png b/apps/docs/images/add-gmail-node-zapier.png Binary files differnew file mode 100644 index 00000000..c06b7a4c --- /dev/null +++ b/apps/docs/images/add-gmail-node-zapier.png diff --git a/apps/docs/images/make-zap.png b/apps/docs/images/make-zap.png Binary files differnew file mode 100644 index 00000000..17974a86 --- /dev/null +++ b/apps/docs/images/make-zap.png diff --git a/apps/docs/images/map-content-to-gmail.png b/apps/docs/images/map-content-to-gmail.png Binary files differnew file mode 100644 index 00000000..b0924a5a --- /dev/null +++ b/apps/docs/images/map-content-to-gmail.png diff --git a/apps/docs/images/zapier-output.png b/apps/docs/images/zapier-output.png Binary files differnew file mode 100644 index 00000000..8f9687f2 --- /dev/null +++ b/apps/docs/images/zapier-output.png 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 index 352a088c..d3f50bd5 100644 --- a/apps/docs/n8n.mdx +++ b/apps/docs/n8n.mdx @@ -1,7 +1,6 @@ --- title: "n8n Integration" description: "Automate knowledge management with Supermemory in n8n workflows" -icon: "workflow" sidebarTitle: "n8n" --- 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. +  + </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)
\ No newline at end of file |