Capabilities, sharing and rate limits
Notion connections have explicit capabilities. Reading content and inserting content are separate, and a 403 means the connection lacks the capability, not that the database is broken. The connection also only sees pages shared with it; a missing database is often a sharing problem, not a wrong ID.
Notion enforces a per-connection request budget and a separate limit of about 3 requests per second for data source queries. A workspace-wide shared budget can also throttle requests even when one connection is within its own limit. Handle 429 by waiting the Retry-After seconds; a 529 is a temporary overload, retried the same way. A public_api_request_blocked reason means retrying will not help.
Queue bursts so one job does not consume the connection's budget. For a workspace-shared limit, Retry-After can exceed a minute. Prefer filter_properties when a query only needs certain schema fields, and follow next_cursor before concluding a database is empty.
A created page is real data in the user's workspace. Treat page creation and block appends as writes to verify, and keep a run safe to re-execute: query for the source record first, create only if absent, and never delete rows to hide a duplicate created by a retry.
Sources: Querying a data source, Creating pages, Blocks and page content, Rate limits and retries.