You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,14 @@
1
1
# Notion
2
2
3
-
This plugin enables interaction with Notion-based knowledge repositories,
4
-
allowing users to query and retrieve answers from both public and private Notion pages.
5
-
The plugin integrates with OpenAI to provide high-certainty answers based on the content
6
-
available in Notion and suggests follow-ups in case of missing content.
3
+
Connery plugin for retrieving content from Notion pages.
4
+
5
+
The Plugin currently contains only one action: `Get Notion Page Content`.
6
+
7
+
- Allows you to chat with the content of a Notion page. Can be used for FAQ, Knowledge Base, etc.
8
+
- The action extracts all content elements including text, media, and toggles, and returns the page content as a single string. It does not extract content form inline DBs.
9
+
- Allows you to provide additional instructions for the Connery assistant on how to handle the content.
10
+
- This can be useful if the table contains additional information that should not be used for answering the question.
11
+
- It can also be used to provide more context or output formatting instructions.
import{Client,iteratePaginatedAPI,isFullBlock}from'@notionhq/client';// Import Client and types from Notion
3
-
importOpenAIfrom'openai';
4
3
5
4
constactionDefinition: ActionDefinition={
6
5
key: 'askNotionPage',
7
-
name: 'Ask Notion Page',
6
+
name: 'Get Notion Page Content',
8
7
description:
9
-
'This action enables users to ask questions and receive answers from a knowledge base hosted on a private Notion page. The action accesses the Notion page via its URL using the Notion API and an API key. Users’ questions are processed by OpenAI, which generates answers based on the content retrieved from the page. The action supports all content elements, including toggles.',
8
+
'This action retrieves the content of a Notion page using its URL and the Notion API. It can optionally include instructions before the page content. The action required the Notion page URL and Notion API key connected to this URL. It fetches all content elements including text, media, and toggles, and returns the page content as a single string. It does not extract content form inline DBs.',
10
9
type: 'read',
11
10
inputParameters: [
12
11
{
13
12
key: 'notionPageUrl',
14
13
name: 'Notion Page URL',
15
-
description: 'The URL of the private Notion page to fetch knowledge content from.',
14
+
description: 'The URL of the private Notion page to fetch content from.',
// Create the system message with instructions for the model
117
-
constsystemMessage=`You are an FAQ expert. When asked a question or given a request related to a specific topic, you provide an accurate and concise answer based strictly on the content provided.
118
-
You respond in the same language as the user’s input and adjust your answer to fit the context of the request, whether it’s a direct question or an indirect inquiry.
119
-
You never guess or paraphrase — only answer if the explicit content for that request is available.
120
-
If there are any disclaimers or indications in the content that it should not be shared with clients or is a work in progress, include that information only if it is explicitly mentioned.
121
-
Here is the content you should use to generate your answer:
122
-
”${pageContent}”
123
-
`;
124
-
125
-
// Set the user's question separately
126
-
constuserQuestion=`Based on this content, please respond to the following request or question with high confidence:
127
-
”${question}”.
128
-
If you are not confident that the content fully addresses the request, respond with:
129
-
‘I don’t have enough information to answer your question.’
130
-
`;
131
-
132
-
// Request completion from OpenAI using the specified model
0 commit comments