Skip to content

How can I use Templater to get a prompt for text, append it as a link in today's daily note, then create a page with that as the title? #1200

Closed Answered by Oneechan69
Oneechan69 asked this question in Help
Discussion options

You must be logged in to vote

I had asked Phind and Perplexity.ai how to solve this and they didn't give good answers, so I gave one web search plugin for ChatGPT Plus: Webpilot a shot. I did a bunch of back and forth with it for JS snippets, giving it the link https://docs.obsidian.md to look through. I did a bunch of editing and made this Templater template, which I added a hotkey for:

// Check if the page passed in exists, if not then create it.
function checkPage(pageName) {
    page = app.vault.getAbstractFileByPath(`${pageName}.md`)
    return page ? page : app.vault.create(`${pageName}.md`, '')
}
let task = `Tasks/${await tp.system.prompt("Enter task:")}`
// You can enter in whatever the date format is for your…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Oneechan69
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Oneechan69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants