After running action, Draft content blank

I have subscribed to Drafts on and off over the years but never quite integrated it into my workflow. I am trying it out again and tried to create a very simple action that just passes a draft through to iCloud Drive to save in the folder where the files reside for The Archive app. Yet, when I run the action on the draft, the result does not pass any text from the draft, only the template placeholders.

So, all of the stuff you see below ends up in a new file in the correct folder perfectly fine. But none of the body text of the note is passed on (i.e., other than the filler info below, the note is completely blank). This seems straightforward so I am missing something. And in fact, I swear years ago I had a similar action that did the same thing into an Obsidian vault but it worked. So, where am I being stupid here? Thanks in advance.

Keywords: test

[[title]]


Ref:

Can you share your action so we can have a look at😊?

If we can actually see how your action is configured, I’m sure we could explain - not sure if you are scripting something, or just using the ā€œFileā€ action step, etc. You can share it to the action directory (at the bottom of the action’s edit screen) as an unlisted action and post the link.

Hey guys, see here:

I didn’t want to upload a trash action, and didn’t know about the unlisted aspect! :joy:

So, what I try to do is type a note and then hit the New Note action to pass it through to the folder. Everything in the template passes through, but none of the note text is created. Much appreciated.

The file template does not include the content of the draft. You would need to have a [[body]] tag in there somewhere to send the the content (without the title, or [[draft]] for the whole text).

This article might help sort out how templates work:

Ahhh yes. See, I knew it was stupid. I will have a read of the Templates link. I’m sure I read it years ago and forgot it all.

One last quick question: in my template I put also the [[title]] placeholder in the Name field for the file. That works fine but for some reason it carts over the # as well and adds that to the filename. Given that’s being used as a markdown element, shouldn’t that be omitted? Thanks again.

See the available template tag documentation. If you using it for a file name, you probably want [[safe_title]] - if you want the version with header tags stripped only, you want [[display_title]].

I checked out the title tags, and [[display_title]] was exactly what I’m looking for. Thanks. Very simple little action, but helpful.