Self-updating RudderStack data catalog in Notion

By General Input

Every Sunday night, refresh a Notion database with a plain-English page for every RudderStack transformation and library so the whole team can browse.

Integrations

  • RudderStack
  • Notion

Type

Agentic Task

Categories

  • Operations
  • Engineering

Build me an agent workflow that runs on a cron schedule every Sunday at 10pm in my local time zone. Its job is to keep a Notion database in sync with my RudderStack workspace so the database functions as a self-updating, browsable data catalog for my team. The output should read like documentation, not a governance audit.

Inputs I will provide when I publish the workflow: the Notion database ID for the catalog (a regular Notion database I have already shared with the General Input connection), the Notion page ID for a header summary page (also shared with the connection), and my RudderStack credential.

On each run the agent should do the following:

1. Use RudderStack List Transformations and List Libraries to pull the current state of the workspace. Keep both lists in memory for the rest of the run.

2. For each transformation, use Get Transformation to fetch the latest code and metadata, and List Transformation Versions (count=5, orderBy=desc) to fetch the last few revisions so you can write a short changelog.

3. Generate a plain-English doc for that transformation. It should cover what the code actually does in human terms (cleaning PII, enriching events, routing by traits, dropping test traffic, masking fields, joining lookup data, and so on), the language (javascript or pythonfaas), the libraries it depends on by name, and a short changelog summary inferred from the most recent revisions. Keep the tone like internal documentation a new teammate would read, not a security review.

4. Find the existing Notion page for that transformation. Use Notion Query a Database against the catalog database, filtered by a text property called "RudderStack ID" that equals the transformation's ID. If a row is returned, you have the existing page ID. If not, the page does not exist yet.

5. If the page exists, use Update Page Content as Markdown to replace its body with the freshly generated doc, then use Update a Page to refresh properties like Name, Language, Destinations, Libraries, Last Synced, and a short Description. If the page does not exist, use Create a Page as a child of the catalog database with those same properties set, then use Append Block Children (or Update Page Content as Markdown, whichever is cleaner) to write the body.

6. Repeat the same lookup-then-update-or-create pattern for each library in List Libraries, keyed by the library's RudderStack ID on the same catalog database (libraries and transformations share the database, distinguished by a Type property).

7. After every transformation and library is synced, refresh the header summary page using Update Page Content as Markdown. The summary should show total transformations, total libraries, a breakdown of languages in use, the destinations that transformations are connected to, and a short "What changed this week" section listing transformations whose latest revision was created in the last seven days.

Hard requirements: (a) the workflow must be safe to run weekly without creating duplicate Notion pages, so the Query a Database lookup by RudderStack ID is the chokepoint and must run before any create; (b) the agent must never modify, create, or delete anything in RudderStack itself, this is a read-only sync from RudderStack's side; (c) descriptions should read like reference docs aimed at a non-engineer browsing the catalog, so explain what the transformation does in business terms before getting into language and dependencies.

Property schema I expect on the Notion catalog database (the workflow should assume these exist and fail clearly if they do not): Name (title), Type (select: Transformation, Library), RudderStack ID (text), Language (select), Destinations (multi-select), Libraries (multi-select), Last Synced (date), Description (text).

Related prompts

Explore more prompts
Screen chartered vessels for AIS gaps and sanctions red flagsCompare candidate store locations with drive time trade areasBrowse every competitor ad and build a Notion swipe fileAudience persona studio for brand and product marketersArtwork desk for the Notion posts still missing an imageShare of voice dashboard for your brand and competitorsInfluencer campaign roster board with AI creator briefsSmart home entity health cockpit for Home AssistantOpen model approval desk for your production AI stackBid board that watches every procurement portal for you