sawhney17 / logseq-calendars-plugin

MIT License
127 stars 17 forks source link

Problem with custom google apps domains? #6

Open RichardFoxworthy opened 2 years ago

RichardFoxworthy commented 2 years ago

I can't get this to work at all for my work Google calendar...

Is it possible that using the private Gcal link from a custom domain is the problem?

I've uninstalled then reinstalled the plugin.

The menu icon appears as expected when its first reinstalled, then I updated the settings fie as follows:

{
  "disabled": false,
  "template": "{Start} - {End}: {Title}", 
  "templateLine2": "{Description}", 
  "accounts": {
    "Google Calendar": [
      "https://calendar.google.com/calendar/ical/my.name%40mydomain.com.au/private-98234e7210f186de0bbfad56a0867273/basic.ics"
    ],
  },
  "timeFormat": 12
}

Once my setting file is created, then the menu icon no longer appears in my Logseq...

sawhney17 commented 2 years ago

If you open the link in an incognito tab, does it download a file called basic.ics? On 9 Feb 2022, 8:39 AM +0400, Richard Foxworthy @.***>, wrote:

I can't get this to work at all for my work Google calendar... Is it possible that using the private Gcal link from a custom domain is the problem? I've uninstalled then reinstalled the plugin. The menu icon appears as expected when its first reinstalled, then I updated the settings fie as follows: { "disabled": false, "template": "{Start} - {End}: {Title}", "templateLine2": "{Description}", "accounts": { "Google Calendar": [ "https://calendar.google.com/calendar/ical/my.name%40mydomain.com.au/private-98234e7210f186de0bbfad56a0867273/basic.ics" ], }, "timeFormat": 12 } Once my setting file is created, then the menu icon no longer appears in my Logseq... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

RichardFoxworthy commented 2 years ago

Hi @sawhney17 Yes it does download the basic.ics file.

I think I figured out this part - I have only a single calendar, and I originally kept the comma after the calendar link.

When I remove the comma, then restart Logseq, the calendar icon loads in Logseq toolbar.

But another problem now occurs - when I click the calendar icon I see a pair modals telling me 'Fetching calendar items', then 'Parsing calendar items' which sounds right, but then it writes a new block into my page with words 'Google Calendar', and does not actually write any of the event details.

My settings file now looks like this :

{
  "disabled": false,
  "template": "{Start} - {End}: {Title}", 
  "templateLine2": "{Description}", 
  "accounts": {
    "Google Calendar": [
      "https://calendar.google.com/calendar/ical/my.name%40mydomain.com.au/private-98234e7210f186de0bbfad56a0867273/basic.ics"
    ]
  },
  "timeFormat": 12
}

I'm using plugin version 1.1.6 in Logseq v0.5.9

sawhney17 commented 2 years ago

Can you make sure that you actually have tasks for the day. Are any of the tasks recurring? I haven't implemented logic for that yet.

lukas-mertens commented 1 year ago

@sawhney17 Actually I am experiencing something similar. I am using the secret url from google, but I am using google workspace. The error I get is the following:

Here is my full settings json (I created a test-calendar with a test-event, so that you can try it with a real secret url):

{
  "template": "{Start} - {End}: {Title}",
  "useJSON": false,
  "IndentCommonBlock": false,
  "templateLine2": "{Description}",
  "timeFormat": [
    "12 hour time",
    "24 hour time"
  ],
  "calendar1Name": "PersonalCalendar",
  "calendar1URL": "https://calendar.google.com/calendar/ical/c_3a90a6087267d0c4c05cc2cbabd5d51ec4b5784b368d9d3727f43ff56a1b8356%40group.calendar.google.com/private-6a61a5c11efa33d6ca3d8ab6a5a830a9/basic.ics",
  "calendar2Name": "",
  "calendar2URL": "",
  "calendar3Name": "",
  "calendar3URL": "",
  "calendar4Name": "",
  "calendar4URL": "",
  "calendar5Name": "",
  "calendar5URL": "",
  "disabled": false,
  "accountsDetails": {
    "Calendar 1": "https://calendar.google.com/calendar/ical/..."
  }
}

The url allows me to download a ics in incognito. Is it possible that it isn't able to handle the %40 urlescape in the url properly? Or is that handled correctly?