TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
103 stars 55 forks source link

Ability to change the Notion page icon? #52

Closed tdnzr closed 10 months ago

tdnzr commented 10 months ago

By default, the Notion icon for the Voice Note pages is the robot emoji (which looks like 🤖 on Github, but differently in Notion). I wish I could change this. Either to arbitrary other Notion-supported emoji icons, or especially to those much prettier icons from the Icons dataset which can be set to a bunch of different colors.

(I figured I could make this change myself by editing the code of the automation, specifically the lines here. In the older version of the automation, the one that was super time-consuming to setup, the Notion automation component was IIRC a Node.js component where one could see and edit the code itself. From what I can tell, this is no longer possible, hence this Github issue.)

tdnzr commented 10 months ago

Addendum: If I understand the Notion API docs correctly, it might not currently be possible to set the superior Notion-style Icons, just either emojis or Custom icons (= via URL):

icon | File Object (only type of "external" is supported currently) or Emoji object | Page icon.

TomFrankly commented 10 months ago

@tdnzr just updated the workflow to add a Note Icon property, with all current emoji as choices. You're correct that Notion's own icon set isn't available via the API yet – hopefully this will work well enough!

You'll need to update your workflow to see the change: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update

tdnzr commented 10 months ago

You are amazingly fast and responsive <3.

Out of curiosity, where is the emoji list in the Pipedream automation from? I tried to set the 🎙️ emoji, which is a valid Notion page emoji, but it doesn't seem to be in the Pipedream emoji list, or at least pasting the 🎙️ emoji into the list doesn't find it. Same with the 💬 emoji. In contrast, the 🎤 emoji was available and searchable in Pipedream. That said, even though the 🎙️ emoji wasn't in the list, the automation worked anyway when I set this emoji icon as a "custom expression".

TomFrankly commented 10 months ago

@tdnzr I've generated a simple array of emoji that I'm importing in the main script: https://github.com/TomFrankly/pipedream-notion-voice-notes/blob/main/helpers/emoji.mjs

This list comes from a github gist: https://gist.github.com/leon-do/8dfcb6ffefb9bb0c20e5b74e080177b1 - which I flattened into a single array.

🎙️ was in the list, but was near the camera emoji instead of the other mic emoji. I've added 💬 - you can update again to see it! But as you discovered, you can also just type the emoji you want 🙂

I tried to use some more robust libraries that allow for filtering by keywords (emojilib and Emojibase), but neither are working in Pipedream for various reasons. And I can't add a huge database with search terms manually – at least not easily – because individual Pipedream files have a 65kb limit.