-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Name of app / service
Pipedream's Notion actions have a common failure point (which all other automation apps share). The Notion API has a large list of request limits, which often cause workflow runs to fail.
A very common one is the tendency for input content (e.g. the contents of an email) to feature nested bullet lists. Pipedream already uses the martian package to convert markdown to Notion blocks, but this package does nothing to handle the Notion API's limits.
My package – notion-helper – does this. My suggestion is that notion-helper be used in Pipedream's Notion actions that create new pages or append blocks to existing pages.
Alternatively, that the code from my package's requests API specifically be incorporated into these Notion actions. A fork of the package might be the best way to do this.
For creating pages, the createPage()
function can be used, and for appending blocks, there is appendBlocks()
.
I've put a large amount of time into building a block-splitting algorithm in appendBlocks()
that respects every Notion API limit regarding the body of requests:
- Deeply nested child blocks
- Arrays containing more than 100 blocks
- The 1,000 total-block per-request limit
- All character limts
When strings go over the character limit, the package splits them intelligently and creates multiple Rich Text Objects where possible. When requests are too big, have too many blocks, or nest too deeply, the algorithm splits them into multiple requests as efficiently as possible.
I find myself having to regularly write my own custom Pipedream actions that do the exact same thing that Pipedream's native actions do, simply so that I can use my package and harden my workflows against these common, limit-based API failures.
I'd love to see my work incorporated into these native steps so that I can start using the native actions!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status