First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
I have a frontmatter text field called id with <% crypto.randomUUID() %> to create a unique identifier for a note and this works great for any new note created in the vault. What I am looking for is a way to have any Web Clipper saved item also get a UUID without my having to post process the file later.
Things I have tried
I only tried adding the field and the formula in the Web Clipper template but that didn’t trigger the actual formula to run.
Any thoughts or pointers on this question are greatly appreciated.
I solved it. I read the Templater docs but wasn’t understanding the information given. So, with the help of https://deepwiki.com/ and looking through the GitHub - SilentVoid13/Templater: A template plugin for obsidian · GitHub code, I found the already existing trick.
I added my Templater formula in the Web Clipper template which for me is id: <% crypto.randomUUID() %> and then in the Templater settings in Obsidian I went to File creation > Trigger Templater on new file creation and turned it on and left Template matching mode as None.
When I save something from the interwebs, the formula is carried into the folder and after some delay for the Web Clipper write to complete, the formula runs.
edit: typo