Skip to content

Extract Notion AI Meeting Summaries with Python SDK

The Advanced Use-Case: Automated Insight Distribution

Section titled “The Advanced Use-Case: Automated Insight Distribution”

Modern engineering and product teams use Notion AI to transcribe meetings and generate high-level summaries automatically. However, these insights often remain “trapped” within the Notion UI.

An advanced workflow requires moving these AI-generated summaries into external systems—such as posting a meeting recap to a specific Slack channel, updating a Jira ticket with AI-identified action items, or archiving transcripts in a dedicated data warehouse. To do this, we must bridge the gap between Notion’s asynchronous AI processing and the Notion API.

The “Aha!” Solution: Treating AI Properties as Static Data

Section titled “The “Aha!” Solution: Treating AI Properties as Static Data”

The secret to accessing Notion AI content via the API lies in understanding how Notion stores AI outputs. Whether it is an AI Summary, AI Key Info, or AI Custom Autofill property, the Notion API treats these as standard rich_text or text fields once the AI has finished its generation task.

The challenge is timing: Notion AI runs asynchronously. If your script triggers the moment a page is created, the AI property will likely be empty. The solution is a Polling Pattern or a Delayed Webhook that queries the page after the last_edited_time indicates the AI has completed its write operation.

First, ensure your integration has “Read Content” capabilities.

  1. Navigate to Settings & Members > Connections > Develop or manage integrations.
  2. Create a new integration or select an existing one.
  3. Under Capabilities, ensure Read content is checked.
  4. Copy your Internal Integration Token.
  5. Go to your Meeting Notes database and click the three dots (…) > Connect to and select your integration.

Ensure you have the official Python client installed:

Terminal window
pip install notion-client

The following Python script targets a specific database page and extracts both the AI Summary property and the transcript stored within the page blocks.

from notion_client import Client
import time
notion = Client(auth="your_integration_token")
def get_notion_ai_content(page_id):
# Retrieve the page properties
page = notion.pages.retrieve(page_id=page_id)
# 1. Accessing an AI Autofill Property (e.g., "AI Summary")
# Note: Replace 'AI Summary' with the exact name of your property
properties = page.get("properties", {})
ai_summary_data = properties.get("AI Summary", {}).get("rich_text", [])
summary_text = ""
if ai_summary_data:
summary_text = "".join([t.get("plain_text", "") for t in ai_summary_data])
# 2. Accessing the Transcript (Page Content)
blocks = notion.blocks.children.list(block_id=page_id).get("results", [])
transcript = []
for block in blocks:
if block["type"] == "paragraph":
text_content = block["paragraph"]["rich_text"]
if text_content:
transcript.append(text_content[0]["plain_text"])
return {
"summary": summary_text,
"transcript": "\n".join(transcript)
}
# Execution with a simple retry logic to account for AI latency
page_id = "your_page_id_here"
content = get_notion_ai_content(page_id)
if not content["summary"]:
print("AI is still thinking... Retrying in 10 seconds.")
time.sleep(10)
content = get_notion_ai_content(page_id)
print(f"Summary: {content['summary']}")

When the Notion API returns an AI-generated property, it follows the rich_text JSON structure. Your application should be prepared to parse the following schema:

Key Type Description
properties Object Root object containing all page metadata.
AI Summary Object The custom name of your AI Autofill property.
rich_text Array An array of text objects (AI outputs are stored here).
plain_text String The actual string value generated by Notion AI.

Required JSON Response Structure from Notion API:

{
"properties": {
"AI Summary": {
"id": "abc123",
"type": "rich_text",
"rich_text": [
{
"type": "text",
"text": { "content": "The meeting covered the Q4 roadmap...", "link": null },
"plain_text": "The meeting covered the Q4 roadmap...",
"annotations": { "bold": false, "italic": false }
}
]
}
}
}
  • Generation Latency: Notion AI takes 5–30 seconds to populate properties after a transcript is added. Implement a “Wait” step in your automation (e.g., using a tool like Zapier or a Python time.sleep) or verify the last_edited_by is the Notion AI “system user.”
  • Property Mapping: If you change the name of the “AI Summary” column in the UI to “Key Insights,” your Python code must be updated to match the new key.
  • Transcript Length: If the transcript is extremely long, it will be split across multiple blocks. You must iterate through notion.blocks.children.list using the start_cursor parameter to ensure you capture the full text.
  • Permissions: If the integration was added to the database before the AI properties were created, you may need to re-share the page or refresh the connection to ensure the API can see the new property schemas.