API Overview
Use the QuickAdd API when a workflow needs scripted input, file operations, formatting, model calls, or access from another plugin.
If you only need to create a note or append text, start with Template Choices or Capture Choices. Add the API when the workflow needs logic.
Where the API is available​
| Context | Access pattern | Use it for |
|---|---|---|
| Macro user script | params.quickAddApi | Scripted macro steps |
| Inline script | this.quickAddApi | Small transformations inside templates or captures |
| Other plugin | app.plugins.plugins.quickadd.api | Calling QuickAdd from plugin code |
| Templater script | app.plugins.plugins.quickadd.api | Prompting or running choices from Templater |
Common tasks​
| Task | Method family | Reference |
|---|---|---|
| Ask for text, selections, dates, or grouped inputs | User input methods | QuickAdd API Reference |
| Run another choice from a script | Choice execution | Choice Execution |
| Read selected text or clipboard content | Utility module | Utility Module |
| Format dates | Date module | Date Module |
| Call configured AI providers | AI module | AI Module |
| Read field suggestions from the vault | Field suggestions module | Field Suggestions Module |
Recommended path​
- Read the scripting overview if you have not written a QuickAdd script before.
- Copy a working pattern from the examples overview.
- Use the QuickAdd API reference for exact signatures and edge-case behavior.
Minimal macro script​
module.exports = async ({ quickAddApi }) => {
const title = await quickAddApi.inputPrompt("Book title");
return `# ${title}`;
};
The returned value can be used by later macro steps or inserted through format syntax.