Notion: List Databases

Posted by agiletortoise, Last update over 2 years ago

List databases shared with the Drafts integration in your Notion workspace. Meant only as a demo of making basic calls with the Notion script object.

For more information on Notion integration, see our Notion Integration Guide


  • script

    // list databases which have been shared with the Drafts integration
    // API Docs:
    let endpoint = ""
    // create Notion instance to make request
    // 'filter' specifies only database objects
    let notion = Notion.create();
    let response = notion.request({
    	"url": endpoint,
    	"method": "POST",
    	"data": {
    		"filter": {
    			"value": "database",
    			"property": "object"
    // result has JSON payload
    // with page properties
    if (response.statusCode == 200) {
    	alert(`Notion Databases Loaded:
    ${JSON.stringify(response.responseData, null, 2)}`)
    else {
    	alert(`Notion Error: ${response.statusCode}


  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.