Retrieving the Full Content of a Notion Page via n8n

Subject: Retrieving the Full Content of a Notion Page via n8n for LLM Summarization via OpenRouter

I want to create an n8n workflow that, when triggered by a webhook from a button on a Notion page, retrieves the complete content of that page: plain text, blocks and sub-blocks, as well as text from images via OCR.
This content should then be sent to an LLM via OpenRouter to generate a summary according to a specified format.

Problem:
The Notion webhook does not transmit the content of blocks and sub-blocks.
Using the Notion API seems to be the solution, but I am having trouble retrieving all blocks and sub-blocks, as well as text extracted from images.

Question to the community:
How can I retrieve all content from a Notion page (blocks, sub-blocks, image text via OCR) in n8n and then send it to an LLM via OpenRouter?

1 Like