interview:interview_agenda:integrate_notion:start

Integrate Notion

  • After that you will get a 'Integration Token'

  • Use browser to open the Notion Page
  • Get the id from url

  • The id is 498e7f9d5c244016af1abf53978272e3
POST https://api.notion.com/v1/databases/{database_id}/query

Headers
Authorization: Bearer <Your Integration Token>

Body
{
    "filter": {
        "and": [
            {
                "property": "Interview Email",
                "checkbox": {
                    "equals": false
                }
            },
            {
                "property": "Email time",
                "date": {
                    "after": "2022-10-22T22:30:00.000+08:00",
                    "before": "2022-10-25T22:40:00.000+08:00"
                }
            },
            {
                "property": "Status",
                "select": {
                    "equals": "Pending"
                }
            },
            {
                "property": "Post",
                "select": {
                    "does_not_equal": "QA"
                }
            },
            {
                "property": "Post",
                "select": {
                    "does_not_equal": "Design"
                }
            }
        ]
    }
}
  • Get result like that, so that we can get each page id

PATCH https://api.notion.com/v1/pages/{page_id}

Headers
Authorization: Bearer <Your Integration Token>,
Notion-Version: 2022-06-28

Body
{
    "properties": {
        "Interview Email": {
            "checkbox": true
        }
    }
}
  • interview/interview_agenda/integrate_notion/start.txt
  • Last modified: 2022/10/25 21:18
  • by joe.mao