Skip to content

Commit 10be25f

Browse files
committed
feat(evernote): add Evernote integration with 11 tools
1 parent 0a52b09 commit 10be25f

File tree

34 files changed

+3137
-0
lines changed

34 files changed

+3137
-0
lines changed

apps/docs/components/icons.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,6 +1806,14 @@ export function Mem0Icon(props: SVGProps<SVGSVGElement>) {
18061806
)
18071807
}
18081808

1809+
export function EvernoteIcon(props: SVGProps<SVGSVGElement>) {
1810+
return (
1811+
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='#7fce2c'>
1812+
<path d='M29.343 16.818c.1 1.695-.08 3.368-.305 5.045-.225 1.712-.508 3.416-.964 5.084-.3 1.067-.673 2.1-1.202 3.074-.65 1.192-1.635 1.87-2.992 1.924l-3.832.036c-.636-.017-1.278-.146-1.9-.297-1.192-.3-1.862-1.1-2.06-2.3-.186-1.08-.173-2.187.04-3.264.252-1.23 1-1.96 2.234-2.103.817-.1 1.65-.077 2.476-.1.205-.007.275.098.203.287-.196.53-.236 1.07-.098 1.623.053.207-.023.307-.26.305a7.77 7.77 0 0 0-1.123.053c-.636.086-.96.47-.96 1.112 0 .205.026.416.066.622.103.507.45.78.944.837 1.123.127 2.247.138 3.37-.05.675-.114 1.08-.54 1.16-1.208.152-1.3.155-2.587-.228-3.845-.33-1.092-1.006-1.565-2.134-1.7l-3.36-.54c-1.06-.193-1.7-.887-1.92-1.9-.13-.572-.14-1.17-.214-1.757-.013-.106-.074-.208-.1-.3-.04.1-.106.212-.117.326-.066.68-.053 1.373-.185 2.04-.16.8-.404 1.566-.67 2.33-.185.535-.616.837-1.205.8a37.76 37.76 0 0 1-7.123-1.353l-.64-.207c-.927-.26-1.487-.903-1.74-1.787l-1-3.853-.74-4.3c-.115-.755-.2-1.523-.083-2.293.154-1.112.914-1.903 2.04-1.964l3.558-.062c.127 0 .254.003.373-.026a1.23 1.23 0 0 0 1.01-1.255l-.05-3.036c-.048-1.576.8-2.38 2.156-2.622a10.58 10.58 0 0 1 4.91.26c.933.275 1.467.923 1.715 1.83.058.22.146.3.37.287l2.582.01 3.333.37c.686.095 1.364.25 2.032.42 1.165.298 1.793 1.112 1.962 2.256l.357 3.355.3 5.577.01 2.277zm-4.534-1.155c-.02-.666-.07-1.267-.444-1.784a1.66 1.66 0 0 0-2.469-.15c-.364.4-.494.88-.564 1.4-.008.034.106.126.16.126l.8-.053c.768.007 1.523.113 2.25.393.066.026.136.04.265.077zM8.787 1.154a3.82 3.82 0 0 0-.278 1.592l.05 2.934c.005.357-.075.45-.433.45L5.1 6.156c-.583 0-1.143.1-1.554.278l5.2-5.332c.02.013.04.033.06.053z' />
1813+
</svg>
1814+
)
1815+
}
1816+
18091817
export function ElevenLabsIcon(props: SVGProps<SVGSVGElement>) {
18101818
return (
18111819
<svg

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
ElasticsearchIcon,
4141
ElevenLabsIcon,
4242
EnrichSoIcon,
43+
EvernoteIcon,
4344
ExaAIIcon,
4445
EyeIcon,
4546
FirecrawlIcon,
@@ -202,6 +203,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
202203
elasticsearch: ElasticsearchIcon,
203204
elevenlabs: ElevenLabsIcon,
204205
enrich: EnrichSoIcon,
206+
evernote: EvernoteIcon,
205207
exa: ExaAIIcon,
206208
file_v3: DocumentIcon,
207209
firecrawl: FirecrawlIcon,
Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
---
2+
title: Evernote
3+
description: Manage notes, notebooks, and tags in Evernote
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="evernote"
10+
color="#E0E0E0"
11+
/>
12+
13+
## Usage Instructions
14+
15+
Integrate with Evernote to manage notes, notebooks, and tags. Create, read, update, copy, search, and delete notes. Create and list notebooks and tags.
16+
17+
18+
19+
## Tools
20+
21+
### `evernote_copy_note`
22+
23+
Copy a note to another notebook in Evernote
24+
25+
#### Input
26+
27+
| Parameter | Type | Required | Description |
28+
| --------- | ---- | -------- | ----------- |
29+
| `apiKey` | string | Yes | Evernote developer token |
30+
| `noteGuid` | string | Yes | GUID of the note to copy |
31+
| `toNotebookGuid` | string | Yes | GUID of the destination notebook |
32+
33+
#### Output
34+
35+
| Parameter | Type | Description |
36+
| --------- | ---- | ----------- |
37+
| `note` | object | The copied note metadata |
38+
|`guid` | string | New note GUID |
39+
|`title` | string | Note title |
40+
|`notebookGuid` | string | GUID of the destination notebook |
41+
|`created` | number | Creation timestamp in milliseconds |
42+
|`updated` | number | Last updated timestamp in milliseconds |
43+
44+
### `evernote_create_note`
45+
46+
Create a new note in Evernote
47+
48+
#### Input
49+
50+
| Parameter | Type | Required | Description |
51+
| --------- | ---- | -------- | ----------- |
52+
| `apiKey` | string | Yes | Evernote developer token |
53+
| `title` | string | Yes | Title of the note |
54+
| `content` | string | Yes | Content of the note \(plain text or ENML\) |
55+
| `notebookGuid` | string | No | GUID of the notebook to create the note in \(defaults to default notebook\) |
56+
| `tagNames` | string | No | Comma-separated list of tag names to apply |
57+
58+
#### Output
59+
60+
| Parameter | Type | Description |
61+
| --------- | ---- | ----------- |
62+
| `note` | object | The created note |
63+
|`guid` | string | Unique identifier of the note |
64+
|`title` | string | Title of the note |
65+
|`content` | string | ENML content of the note |
66+
|`notebookGuid` | string | GUID of the containing notebook |
67+
|`tagNames` | array | Tag names applied to the note |
68+
|`created` | number | Creation timestamp in milliseconds |
69+
|`updated` | number | Last updated timestamp in milliseconds |
70+
71+
### `evernote_create_notebook`
72+
73+
Create a new notebook in Evernote
74+
75+
#### Input
76+
77+
| Parameter | Type | Required | Description |
78+
| --------- | ---- | -------- | ----------- |
79+
| `apiKey` | string | Yes | Evernote developer token |
80+
| `name` | string | Yes | Name for the new notebook |
81+
| `stack` | string | No | Stack name to group the notebook under |
82+
83+
#### Output
84+
85+
| Parameter | Type | Description |
86+
| --------- | ---- | ----------- |
87+
| `notebook` | object | The created notebook |
88+
|`guid` | string | Notebook GUID |
89+
|`name` | string | Notebook name |
90+
|`defaultNotebook` | boolean | Whether this is the default notebook |
91+
|`serviceCreated` | number | Creation timestamp in milliseconds |
92+
|`serviceUpdated` | number | Last updated timestamp in milliseconds |
93+
|`stack` | string | Notebook stack name |
94+
95+
### `evernote_create_tag`
96+
97+
Create a new tag in Evernote
98+
99+
#### Input
100+
101+
| Parameter | Type | Required | Description |
102+
| --------- | ---- | -------- | ----------- |
103+
| `apiKey` | string | Yes | Evernote developer token |
104+
| `name` | string | Yes | Name for the new tag |
105+
| `parentGuid` | string | No | GUID of the parent tag for hierarchy |
106+
107+
#### Output
108+
109+
| Parameter | Type | Description |
110+
| --------- | ---- | ----------- |
111+
| `tag` | object | The created tag |
112+
|`guid` | string | Tag GUID |
113+
|`name` | string | Tag name |
114+
|`parentGuid` | string | Parent tag GUID |
115+
|`updateSequenceNum` | number | Update sequence number |
116+
117+
### `evernote_delete_note`
118+
119+
Move a note to the trash in Evernote
120+
121+
#### Input
122+
123+
| Parameter | Type | Required | Description |
124+
| --------- | ---- | -------- | ----------- |
125+
| `apiKey` | string | Yes | Evernote developer token |
126+
| `noteGuid` | string | Yes | GUID of the note to delete |
127+
128+
#### Output
129+
130+
| Parameter | Type | Description |
131+
| --------- | ---- | ----------- |
132+
| `success` | boolean | Whether the note was successfully deleted |
133+
| `noteGuid` | string | GUID of the deleted note |
134+
135+
### `evernote_get_note`
136+
137+
Retrieve a note from Evernote by its GUID
138+
139+
#### Input
140+
141+
| Parameter | Type | Required | Description |
142+
| --------- | ---- | -------- | ----------- |
143+
| `apiKey` | string | Yes | Evernote developer token |
144+
| `noteGuid` | string | Yes | GUID of the note to retrieve |
145+
| `withContent` | boolean | No | Whether to include note content \(default: true\) |
146+
147+
#### Output
148+
149+
| Parameter | Type | Description |
150+
| --------- | ---- | ----------- |
151+
| `note` | object | The retrieved note |
152+
|`guid` | string | Unique identifier of the note |
153+
|`title` | string | Title of the note |
154+
|`content` | string | ENML content of the note |
155+
|`contentLength` | number | Length of the note content |
156+
|`notebookGuid` | string | GUID of the containing notebook |
157+
|`tagGuids` | array | GUIDs of tags on the note |
158+
|`tagNames` | array | Names of tags on the note |
159+
|`created` | number | Creation timestamp in milliseconds |
160+
|`updated` | number | Last updated timestamp in milliseconds |
161+
|`active` | boolean | Whether the note is active \(not in trash\) |
162+
163+
### `evernote_get_notebook`
164+
165+
Retrieve a notebook from Evernote by its GUID
166+
167+
#### Input
168+
169+
| Parameter | Type | Required | Description |
170+
| --------- | ---- | -------- | ----------- |
171+
| `apiKey` | string | Yes | Evernote developer token |
172+
| `notebookGuid` | string | Yes | GUID of the notebook to retrieve |
173+
174+
#### Output
175+
176+
| Parameter | Type | Description |
177+
| --------- | ---- | ----------- |
178+
| `notebook` | object | The retrieved notebook |
179+
|`guid` | string | Notebook GUID |
180+
|`name` | string | Notebook name |
181+
|`defaultNotebook` | boolean | Whether this is the default notebook |
182+
|`serviceCreated` | number | Creation timestamp in milliseconds |
183+
|`serviceUpdated` | number | Last updated timestamp in milliseconds |
184+
|`stack` | string | Notebook stack name |
185+
186+
### `evernote_list_notebooks`
187+
188+
List all notebooks in an Evernote account
189+
190+
#### Input
191+
192+
| Parameter | Type | Required | Description |
193+
| --------- | ---- | -------- | ----------- |
194+
| `apiKey` | string | Yes | Evernote developer token |
195+
196+
#### Output
197+
198+
| Parameter | Type | Description |
199+
| --------- | ---- | ----------- |
200+
| `notebooks` | array | List of notebooks |
201+
202+
### `evernote_list_tags`
203+
204+
List all tags in an Evernote account
205+
206+
#### Input
207+
208+
| Parameter | Type | Required | Description |
209+
| --------- | ---- | -------- | ----------- |
210+
| `apiKey` | string | Yes | Evernote developer token |
211+
212+
#### Output
213+
214+
| Parameter | Type | Description |
215+
| --------- | ---- | ----------- |
216+
| `tags` | array | List of tags |
217+
218+
### `evernote_search_notes`
219+
220+
Search for notes in Evernote using the Evernote search grammar
221+
222+
#### Input
223+
224+
| Parameter | Type | Required | Description |
225+
| --------- | ---- | -------- | ----------- |
226+
| `apiKey` | string | Yes | Evernote developer token |
227+
| `query` | string | Yes | Search query using Evernote search grammar \(e.g., "tag:work intitle:meeting"\) |
228+
| `notebookGuid` | string | No | Restrict search to a specific notebook by GUID |
229+
| `offset` | number | No | Starting index for results \(default: 0\) |
230+
| `maxNotes` | number | No | Maximum number of notes to return \(default: 25\) |
231+
232+
#### Output
233+
234+
| Parameter | Type | Description |
235+
| --------- | ---- | ----------- |
236+
| `totalNotes` | number | Total number of matching notes |
237+
| `notes` | array | List of matching note metadata |
238+
239+
### `evernote_update_note`
240+
241+
Update an existing note in Evernote
242+
243+
#### Input
244+
245+
| Parameter | Type | Required | Description |
246+
| --------- | ---- | -------- | ----------- |
247+
| `apiKey` | string | Yes | Evernote developer token |
248+
| `noteGuid` | string | Yes | GUID of the note to update |
249+
| `title` | string | No | New title for the note |
250+
| `content` | string | No | New content for the note \(plain text or ENML\) |
251+
| `notebookGuid` | string | No | GUID of the notebook to move the note to |
252+
| `tagNames` | string | No | Comma-separated list of tag names \(replaces existing tags\) |
253+
254+
#### Output
255+
256+
| Parameter | Type | Description |
257+
| --------- | ---- | ----------- |
258+
| `note` | object | The updated note |
259+
|`guid` | string | Unique identifier of the note |
260+
|`title` | string | Title of the note |
261+
|`content` | string | ENML content of the note |
262+
|`notebookGuid` | string | GUID of the containing notebook |
263+
|`tagNames` | array | Tag names on the note |
264+
|`created` | number | Creation timestamp in milliseconds |
265+
|`updated` | number | Last updated timestamp in milliseconds |
266+
267+

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"elasticsearch",
3636
"elevenlabs",
3737
"enrich",
38+
"evernote",
3839
"exa",
3940
"file",
4041
"firecrawl",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { createLogger } from '@sim/logger'
2+
import { type NextRequest, NextResponse } from 'next/server'
3+
import { checkInternalAuth } from '@/lib/auth/hybrid'
4+
import { copyNote } from '@/app/api/tools/evernote/lib/client'
5+
6+
export const dynamic = 'force-dynamic'
7+
8+
const logger = createLogger('EvernoteCopyNoteAPI')
9+
10+
export async function POST(request: NextRequest) {
11+
const authResult = await checkInternalAuth(request, { requireWorkflowId: false })
12+
if (!authResult.success) {
13+
return NextResponse.json({ success: false, error: 'Unauthorized' }, { status: 401 })
14+
}
15+
16+
try {
17+
const body = await request.json()
18+
const { apiKey, noteGuid, toNotebookGuid } = body
19+
20+
if (!apiKey || !noteGuid || !toNotebookGuid) {
21+
return NextResponse.json(
22+
{ success: false, error: 'apiKey, noteGuid, and toNotebookGuid are required' },
23+
{ status: 400 }
24+
)
25+
}
26+
27+
const note = await copyNote(apiKey, noteGuid, toNotebookGuid)
28+
29+
return NextResponse.json({
30+
success: true,
31+
output: { note },
32+
})
33+
} catch (error) {
34+
const message = error instanceof Error ? error.message : 'Unknown error'
35+
logger.error('Failed to copy note', { error: message })
36+
return NextResponse.json({ success: false, error: message }, { status: 500 })
37+
}
38+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { createLogger } from '@sim/logger'
2+
import { type NextRequest, NextResponse } from 'next/server'
3+
import { checkInternalAuth } from '@/lib/auth/hybrid'
4+
import { createNote } from '@/app/api/tools/evernote/lib/client'
5+
6+
export const dynamic = 'force-dynamic'
7+
8+
const logger = createLogger('EvernoteCreateNoteAPI')
9+
10+
export async function POST(request: NextRequest) {
11+
const authResult = await checkInternalAuth(request, { requireWorkflowId: false })
12+
if (!authResult.success) {
13+
return NextResponse.json({ success: false, error: 'Unauthorized' }, { status: 401 })
14+
}
15+
16+
try {
17+
const body = await request.json()
18+
const { apiKey, title, content, notebookGuid, tagNames } = body
19+
20+
if (!apiKey || !title || !content) {
21+
return NextResponse.json(
22+
{ success: false, error: 'apiKey, title, and content are required' },
23+
{ status: 400 }
24+
)
25+
}
26+
27+
const parsedTags = tagNames
28+
? typeof tagNames === 'string'
29+
? tagNames
30+
.split(',')
31+
.map((t: string) => t.trim())
32+
.filter(Boolean)
33+
: tagNames
34+
: undefined
35+
36+
const note = await createNote(apiKey, title, content, notebookGuid || undefined, parsedTags)
37+
38+
return NextResponse.json({
39+
success: true,
40+
output: { note },
41+
})
42+
} catch (error) {
43+
const message = error instanceof Error ? error.message : 'Unknown error'
44+
logger.error('Failed to create note', { error: message })
45+
return NextResponse.json({ success: false, error: message }, { status: 500 })
46+
}
47+
}

0 commit comments

Comments
 (0)