How to 'auto convert' rich text field into another entity?

Hi,

Ideally I want to be able to move an entity from one database to another database. So that all references remains the same.

Since that is not possible, I’m trying to find the best way to ‘auto convert’ one entity into another entity.

Use case

  • My clients ‘dump’ their head into their Second brain.
  • Sometimes it’s a task, sometimes it’s a note, sometimes it’s something else

If they need to convert each item, they need to:

  • Find the right database. We have a lot databases. And since they normally don’t see databases, that can be overwhelming
  • Then afterwards delete the ‘original’ entity → that’s the most annoying thing I want to solve

So ideally I create buttons to ‘auto convert’ one entity to another. For example buttons to convert:

  • A note into a task
  • A task into a project (because it’s too big)
  • etc.

In that way the user only needs to click the button which saves a lot of time.

Creating a new entity and deleting the old one is not a problem. But what is the best way to get the rich text field (usually description) from the original entity into the new entity? And will images still be available?

Thanks!

One way to do it is to set up an automation in the destination database, which will trigger when an entity is created, if there is a ‘source’ entity connected.
(note: assumes the dbs are connected)
Then you can use the ‘Overwrite Description’ action (or whatever the destination rich text field is called) and get the content of the source entity using markdown - using something like {{Source.Description}}

Alternatively, you can use scripting :nerd_face:

Thanks for your insanely quick response ChrisGPT. Since the databases are connected; this works :partying_face::partying_face: And images are also kept :smirk:

Note that when using javascript, you must use the HTML (not MD) content type in order to preserve all formatting and some Rich Text features not supported by MD.

2 Likes