AppleScript: Create group in selected group and get URL of the new group

Hi, I could need a little help with an AppleScript I am trying to write. I would like to create a new group within the currently selected group. According to this forum

create record with {name: theName, type:group} in current group

will do this job (variable theName contains the name of my new group). Now I need the URL to open this new group from other applications (x-devonthink-item://…). How can I get this information via AppleScript?

Thanks a lot for your help!

1 Like

Like this:

set theGroup to create record with {name: theName, type:group} in current group
set theURL to reference URL of theGroup
1 Like

Thank you, exactly what I needed!!