Skip to content

feat(notion): add author mention callout block to exported pages#1055

Open
sh1nj1 wants to merge 1 commit into
mainfrom
feat/notion-author-mention
Open

feat(notion): add author mention callout block to exported pages#1055
sh1nj1 wants to merge 1 commit into
mainfrom
feat/notion-author-mention

Conversation

@sh1nj1

@sh1nj1 sh1nj1 commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Summary

When exporting Creatives to Notion, the created_by field always shows the integration bot due to a Notion API limitation. This PR adds a visible author attribution by inserting a callout block with a user mention at the top of each exported page.

Changes

NotionCreativeExporter

  • Added create_author_callout_block(notion_user_id) method that creates a Notion callout block (👤 icon) with an @mention of the authenticated user

NotionService

  • Page creation: Prepends author callout block when creating new Creative pages
  • Page resync: Re-adds author callout block at the top when sync_child_blocks rebuilds page content
  • Uses @account.notion_uid which already stores the OAuth user's Notion user ID

i18n

  • Added collavre_notion.export.author_label key (en: "Author: ", ko: "작성자: ")

How it looks in Notion

Each exported page will show at the top:

👤 Author: @Username

This leverages Notion's native user mention, so the author name is clickable and links to the user's profile.

Technical Notes

  • No migration needed — notion_uid (OAuth user ID) was already stored via the omniauth strategy
  • The callout block is re-created on every resync to ensure consistency
  • Gracefully skips if notion_uid is blank

When exporting Creatives to Notion, add a callout block at the top of
each page with a user mention of the OAuth-authenticated user. This
addresses the Notion API limitation where created_by always shows the
integration bot instead of the actual user.

- Add create_author_callout_block method to NotionCreativeExporter
- Prepend author callout on page creation in NotionService
- Re-add author callout on page resync (sync_child_blocks)
- Add i18n for author label (en: 'Author: ', ko: '작성자: ')
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant