For integration with Tasker, Automate, etc.
The “arguments” to an action are supplied via the extras in the intent.
| Key | Type | Description |
|---|---|---|
BOOK_ID, PARENT_BOOK_ID | long | The internal ID of a notebook |
BOOK_NAME, PARENT_BOOK_NAME | string | The name of a notebook |
DIRECTION | string | The direction in which to move something |
NOTE_ID, PARENT_NOTE_ID | long | The internal ID of a note |
NOTE_IDS | long array | A list of internal note IDs |
NOTE_PATH, PARENT_NOTE_PATH | string | The path to a note, e.g. “My Book/Parent Note/Target Note” |
NOTE_PATHS | string array | A list of note paths |
NOTE_PAYLOAD | string | The contents of a new/edited note, in stringified JSON format; see the NotePayload type |
NOTE_QUERY, PARENT_NOTE_QUERY | string | An Orgzly search query to identify a note; errors if the query yields multiple notes |
PLACEMENT | string | Where to place a note relative to another; one of "ABOVE", "UNDER", "UNDER_AS_FIRST", "BELOW", "UNSPECIFIED" |
SAVED_SEARCH_ID | long | The internal ID of a saved search |
SAVED_SEARCH_NAME | string | The name of a saved search |
SAVED_SEARCH_NEW_NAME | string | The name for a new/edited saved search |
SAVED_SEARCH_NEW_QUERY | string | The search query for a new/edited saved search |
QUERY | string | An Orgzly search query |
WIDGET_ID | int | The internal ID of a home screen widget |
These are given in the style of TypeScript types.
type Book = {
id: number, // Notebook ID in Orgzly's internal database
title: string, // Notebook title
}type Note = {
id: number, // Note ID in Orgzly's internal database
title: string, // Note title
content: string | null, // Note content
tags: string[], // Own tags - inherited tags are not included
inheritedTags: string[], // Tags inherited from parent notes
bookName: string, // The containing notebook's name
scheduled: Timestamp | null, // Scheduled timestamp
deadline: Timestamp | null, // Deadline timestamp
closed: Timestamp | null, // Closed timestamp
priority: string | null, // Priority string, e.g. "A", "B", "C"
state: string | null, // To-do state, e.g. "TODO", "DONE"
createdAt: number | null, // UNIX timestamp of the note's creation
properties: Record<string, string>, // Map of the note's PROPERTIES
}type NotePayload = {
NOTE_PAYLOAD: {
title: string, // Note title
content?: string, // Note content
state?: string, // To-do state e.g. "TODO", "DONE"
priority?: string, // Priority string e.g. "A", "B", "C"
scheduled?: string, // Scheduled timestamp (in Org format)
deadline?: string, // Deadline timestamp (in Org format)
closed?: string, // Closed timestamp (in Org format)
tags?: string, // A space-separated list of tags
properties?: Record<string, string>, // A map of properties
}
}type Response<Data> = {
success: true, // Success case
result: Data | null, // Response data; see response types for specific actions
} | {
success: false, // Failure case
result: string, // An error message
}type SavedSearch = {
id: number, // Saved search ID in Orgzly's internal database
name: string, // Saved search name
position: number, // Position in the list of saved searches
query: string, // The search's query
}type Timestamp = {
rangeString: string, // Full timestamp string
timeTimestamp: number, // UNIX timestamp of the start of the time range
timeString: string | null, // String of the stamp's start time
timeEndString: string | null, // String of the stamp's end time
}In practice, all actions should be prefixed with "com.orgzly.android." , e.g. "com.orgzly.android.ADD_NOTE"
Adds a new note.
Arguments:
- One of:
PARENT_BOOK_IDPARENT_BOOK_NAMEPARENT_NOTE_IDandPLACEMENTPARENT_NOTE_PATHandPLACEMENTPARENT_NOTE_QUERYandPLACEMENT
NOTE_PAYLOAD
Returns: The internal ID of the newly-created note.
type AddNoteResponse = Response<number>Adds a new saved search.
Arguments:
SAVED_SEARCH_NEW_NAMESAVED_SEARCH_NEW_QUERY
Returns: The internal ID of the newly-created saved search.
type AddSavedSearchResponse = Response<number>Deletes one or more notes.
Arguments:
- One of:
NOTE_IDNOTE_IDSNOTE_PATHNOTE_PATHS
Returns: Nothing.
type DeleteNoteResponse = Response<null>Deletes a saved search.
Arguments:
- One of:
SAVED_SEARCH_IDSAVED_SEARCH_NAME
Returns: Nothing.
type DeleteSavedSearchResponse = Response<null>Edits a note.
Arguments:
- One of:
NOTE_IDNOTE_PATHNOTE_QUERY
NOTE_PAYLOAD
Returns: Nothing.
type EditNoteResponse = Response<null>Edits a saved search.
Arguments:
- One of:
SAVED_SEARCH_IDSAVED_SEARCH_NAME
SAVED_SEARCH_NEW_NAME; optional - left unchanged if absentSAVED_SEARCH_NEW_QUERY; optional - left unchanged if absent
Returns: Nothing.
type EditSavedSearchResponse = Response<null>Retrieves a list of all notebooks.
Arguments: None.
Returns: A list of all notebooks.
type GetBooksResponse = Response<Book[]>Retrieves a note.
Arguments:
- One of:
NOTE_IDNOTE_PATHNOTE_QUERY
Returns: The specified note.
type GetNoteResponse = Response<Note>Retrieves a list of all saved searches.
Arguments: None.
Returns: A list of all saved searches.
type GetSavedSearchesResponse = Response<SavedSearch[]>Retrieves a list of all home screen widgets.
Arguments: None.
Returns: A map of internal widget IDs to the saved search they’re set to
type GetWidgetsResponse = Response<Record<int, SavedSearch>>Moves one or more notes in the specified direction.
Arguments:
- One of:
NOTE_IDNOTE_IDSNOTE_PATHNOTE_PATHS
DIRECTION; one of"UP","DOWN","LEFT"or"RIGHT"
Returns: Nothing.
type MoveNoteResponse = Response<null>Moves a saved search up or down in the list of saved searches.
Arguments:
- One of:
SAVED_SEARCH_IDSAVED_SEARCH_NAME
DIRECTION; either"UP"or"DOWN"
Returns: Nothing.
type MoveSavedSearchResponse = Response<null>Refiles one or more notes to a specified location.
Arguments:
- One of:
NOTE_IDNOTE_IDSNOTE_PATHNOTE_PATHS
- One of:
PARENT_BOOK_IDPARENT_BOOK_NAMEPARENT_NOTE_IDandPLACEMENTPARENT_NOTE_PATHandPLACEMENTPARENT_NOTE_QUERYandPLACEMENT
Returns: Nothing.
type RefileNoteResponse = Response<null>Runs a search query, retrieving the results.
Arguments:
QUERY
Returns: A list of notes matching the query.
type SearchResponse = Response<Note[]>Sets the saved search displayed by a home screen widget.
Arguments:
WIDGET_ID- One of:
SAVED_SEARCH_IDSAVED_SEARCH_NAME
Returns: Nothing.
type SetWidgetResponse = Response<null>