Contacts

A personal address book. Store names, phone numbers, emails, and addresses with auto-formatted titles.

A contacts template for keeping track of people. Create a ContactsFolder note as the root, then add Contact notes as children. The folder view shows a summary table of all contacts with phone, mobile, and email at a glance.

Contacts template screenshot

Downloads

How to use

  1. Import contacts.rhai in Settings → Scripts → Import Script
  2. Create a new note and choose ContactsFolder as the type
  3. Add children and choose Contact as the type for each
  4. Fill in the contact details — name, phone, email, address
  5. Click the ContactsFolder note to see a table of all contacts

How it works

Contact schema — on_save hook

When you save a Contact, the title is automatically set to “Last, First” format using the first_name and last_name fields. This keeps the contact list sorted by surname in the tree view.

ContactsFolder — on_view hook

The folder view builds a table of all child Contact notes showing name (as a clickable link), email, phone, and mobile columns. An optional notes field on the folder is displayed below the table if present. Empty folders show a helpful placeholder message.

Hover previews

Hovering over a ContactsFolder shows the total contact count. Hovering over a Contact shows available phone, mobile, and email details.

Schema

schema("ContactsFolder", #{
    version: 1,
    children_sort: "asc",
    allowed_children_schemas: ["Contact"],
    fields: [
        #{ name: "notes", type: "textarea", required: false },
    ],
});

schema("Contact", #{
    version: 1,
    title_can_edit: false,
    allowed_parent_schemas: ["ContactsFolder"],
    fields: [
        #{ name: "first_name",      type: "text",  required: true  },
        #{ name: "middle_name",     type: "text",  required: false },
        #{ name: "last_name",       type: "text",  required: true  },
        #{ name: "phone",           type: "text",  required: false },
        #{ name: "mobile",          type: "text",  required: false },
        #{ name: "email",           type: "email", required: false },
        #{ name: "birthdate",       type: "date",  required: false },
        #{ name: "address_street",  type: "text",  required: false },
        #{ name: "address_city",    type: "text",  required: false },
        #{ name: "address_zip",     type: "text",  required: false },
        #{ name: "address_country", type: "text",  required: false },
        #{ name: "is_family",       type: "boolean",  required: false },
    ],
    on_save: |note| {
        let last  = note.fields["last_name"];
        let first = note.fields["first_name"];
        if last != "" || first != "" {
            set_title(note.id, last + ", " + first);
        }
        commit();
    }
});