Skip to content

5pecia1/n8n-workflow

Repository files navigation

My n8n workflow

Contribution Welcome!

Table of contents generated with markdown-toc

Notion mind map

Example

Feature

  • 1 way sync(notion -> mind map)
  • sync every 1 second
  • Image
  • Table

Use

Prerequisites

  • linux
  • docker
  • docker-compose
  • node v18

Set And Run

  1. install npm(only linux)
    $ cd notion-mindmap
    $ npm install
  2. run docker container
    $ docker-compose up -d
  3. open and import workflow
    1. open http://localhost:5678
    2. Click Workflows(upper left)
    3. Click Add workflow
    4. Click three dot button and Import from File
    5. Select ./notion-mindmap/Notion__Mindmap.json
  4. Set Notion Credentials in n8n
  5. Change your notion information in workflow nodes(Send notion credential)
  6. Set your n8n url in Set Environments node (ex. http://localhost:5678)
  7. Active this workflows
    check Active button (upper right)

USAGE

  1. Copy notion page url(ctrl + l)
  2. Add n8n connections in page(ref: Set And Run > 4. Set Notion Credentials in n8n)
  3. embed mindmap url in notion page (ex: http://localhost:5678/workflow/xxxx-xx-xx-xx?notion={notion url})

[Upgrading]notion & google calendar 2 way sync

Feature

  • sync every 20 minutes(default, you can change it)
  • create
    • notion -> gcal
    • gcal -> notion
  • update

    There is a bug with alternating updates for ranged all day. The result is no problem.

    • notion -> gcal
    • gcal -> notion
  • delete
    • notion -> gcal
    • gcal -> notion

      Notion do not support delete api

  • support recurring events(coming soon)
  • easy setup
    • combine setting data in workflow
  • using offical n8n

    When the task is finished, you can use it without installing docker.

    • contribute bug fix

Use

Prerequisites

  • docker

Set And Run

  1. Pull and run docker container
    $ docker run -d --restart always -e N8N_PORT=5678 -v ./n8n:/home/node/.n8n -p 5678:5678 --name n8n 5pecia1/n8n-custom:latest

    Current latest offical n8n have bug about notion and gcal.
    So, You use my custom n8n image.

  2. Open and import workflow
    1. open http://localhost:5678
    2. Click Workflows(upper left)
    3. Click Import from File
    4. Select ./notion-gcal-2way-sync/Notion__Calendar_Sync.json
  3. Set Google OAuth Credentials, Notion Credentials in n8n
  4. Make properties in Notion Page in DB
    • name: GCal Id, type: text
  5. Change your calendar, notion information in workflow nodes
    Nodes Chekclist
    • Set Environments
      • notion date property's Value
        Start-End Time change to your date property name in notion db
      • time zone's Value find your timezone in TZ database name
    • Get Notion
      • Notion API
      • Database ID
    • Get Calendar,
      • Google Calendar OAuth
      • Calendar ID
    • Create Evnet, Update Description, Update Evnet, Delete Event
      • Google Calendar OAuth
    • Create Page, Create Page Range Date, Update Page, Update Page Range Date
      • Notion API
  6. Set Interval
    1. set interval in Interval node
  7. test workflow
    Click Execute Workflow(bottom)
  8. Active this workflows
    check Active button (upper right)

USAGE

  • sync page to event
    • new page
      Creating a property(ex. Start-End Time) of the base date in the page creates a new event.
    • update page
      If you modify the property of the standard date in the page, the existing event is updated.
    • delete page
      If you delete the property of the base date in the page, the event is deleted.
  • sync evnet to page
    • new event
      If you create an event by writing the event name after notion:, a new page is created.
      example. notion: this is new event name
    • update evnet
      Modifying the date of the event also modifies the date on the page.

Develop

notion-gcal-2-way-sync#README.md

Action Maker

Workflow