T
Twenty•8mo ago
Rob

Calendar Functionality

Hi Twenty team! I love the product, thanks for sharing it with the community and creating such an awesome experience. I just updated my instance to v0.11.0 to try the new calendar functionality. The update went smoothly and my instance was up and running again in seconds. However, the new calendar functionality does not seem to be working for me. If I click in Settings - Accounts - Calendars, I get a nice message saying "Object metadata item "calendarChannel" cannot be found in an array of 24 elements" (screenshot attached). I tried the following things to solve the issue: - Removed the google account and readded it. - Checked that I had the google calendar api enabled in the google cloud console. Do you have any other suggestions as to how I might solve this error?
No description
25 Replies
charles
charles•8mo ago
Hi Rob! It's still not properly documented! You need to run yarn command:prod workspace:sync-metadata -w {your_workspace_id} -f to upgrade your workspace schema to the latest version (and to support calendar feature)
Rob
RobOP•8mo ago
Hi Charles! Thanks for helping me out! The code ran sucessfully, and now i can see the connect account link. However, when I click it, it just tries to get email permissions from google, not the calendar access.
It's still not properly documented!
I hope I am not jumping the start. I'm just excited to give it a try. I am happy to help with docs once we find a solution 🙂
No description
Unknown User
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
charles
charles•8mo ago
@amawe is your workspaceId correct, how do you get it? @Rob please use v0.11.1 🙂 (you can just use v0.11 btw, no breaking changes between patches)
Unknown User
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
charles
charles•8mo ago
it's not this one 🙂 You can find in by inspecting your database or inspecting dev tools network tab (GetCurrentUser query)
Unknown User
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
charles
charles•8mo ago
you are welcome 🙂
Rob
RobOP•8mo ago
Thanks for taking a look at this so quickly @charles !! And thanks for pushing an update 🙂 Unfortunately, I updated to 0.11.1 and see no change in functionality. I double checked I am running the new docker image, and I tried from a fresh PC to ensure the browser wasnt caching anything etc. Do you have any other suggestions? (as a reminder, the problem is that when I click to connect my google calendar, it is asking me for email permissions instead of calendar access)
charles
charles•8mo ago
@Rob sorry for the late answer, it has been quite busy these days It is not possible to only ask for calendar currently. It will ask for both calendar and emails, is this an issue? we were thinking about adding feature flag to disable the feature but this has not been done yet
Rob
RobOP•7mo ago
Sorry @charles, I wasn’t clear in my comment above. I’m not looking to only connect my calendar. I want to connect both my mail and calendar. But when I click “connect with Google” (from any of the email or calendar pages), the Google auth window only asks for email access. When I click ok, I can see that the emails are connected but not the calendar. Hope that’s clearer. Thanks for your help.
charles
charles•7mo ago
mmh ok, is: CALENDAR_PROVIDER_GOOGLE_ENABLED=true in your en variables?
Rob
RobOP•7mo ago
Hi @charles , thanks for helping me out, I really appreciate your help and the product you are building. I did have that env variable set to true. But maybe something else I've set is wrong. Here is my docker compose file
version: "3.8"

services:

twenty:
image: twentycrm/twenty:v0.11.1
volumes:
- {redacted}:/app/${STORAGE_LOCAL_PATH:-.local-storage}
ports:
- 3854:3854
environment:
PORT: 3854
PG_DATABASE_URL: {redacted}
SERVER_URL: https://{redacted}.com
FRONT_BASE_URL: https://{redacted}.com

ENABLE_DB_MIGRATIONS: "true"

SIGN_IN_PREFILLED: "false"
IS_SIGN_UP_DISABLED: "false"

STORAGE_TYPE: local

ACCESS_TOKEN_SECRET: {redacted}
LOGIN_TOKEN_SECRET: {redacted}
REFRESH_TOKEN_SECRET: {redacted}
FILE_TOKEN_SECRET: {redacted}

AUTH_GOOGLE_ENABLED: "true"
MESSAGING_PROVIDER_GMAIL_ENABLED: "true"
CALENDAR_PROVIDER_GMAIL_ENABLED: "true"
AUTH_GOOGLE_APIS_CALLBACK_URL: https://{redacted}.com/auth/google-apis/get-access-token
AUTH_GOOGLE_CALLBACK_URL: https://{redacted}.com/auth/google/redirect
AUTH_GOOGLE_CLIENT_ID: {redacted}
AUTH_GOOGLE_CLIENT_SECRET: {redacted}

REDIS_HOST: {redacted}
REDIS_PORT: 6379
CACHE_STORAGE_TYPE: redis
CACHE_STORAGE_TTL: 3600
MESSAGE_QUEUE_TYPE: bull-mq

twentyredis:
image: redis
ports:
- 6379:6379
version: "3.8"

services:

twenty:
image: twentycrm/twenty:v0.11.1
volumes:
- {redacted}:/app/${STORAGE_LOCAL_PATH:-.local-storage}
ports:
- 3854:3854
environment:
PORT: 3854
PG_DATABASE_URL: {redacted}
SERVER_URL: https://{redacted}.com
FRONT_BASE_URL: https://{redacted}.com

ENABLE_DB_MIGRATIONS: "true"

SIGN_IN_PREFILLED: "false"
IS_SIGN_UP_DISABLED: "false"

STORAGE_TYPE: local

ACCESS_TOKEN_SECRET: {redacted}
LOGIN_TOKEN_SECRET: {redacted}
REFRESH_TOKEN_SECRET: {redacted}
FILE_TOKEN_SECRET: {redacted}

AUTH_GOOGLE_ENABLED: "true"
MESSAGING_PROVIDER_GMAIL_ENABLED: "true"
CALENDAR_PROVIDER_GMAIL_ENABLED: "true"
AUTH_GOOGLE_APIS_CALLBACK_URL: https://{redacted}.com/auth/google-apis/get-access-token
AUTH_GOOGLE_CALLBACK_URL: https://{redacted}.com/auth/google/redirect
AUTH_GOOGLE_CLIENT_ID: {redacted}
AUTH_GOOGLE_CLIENT_SECRET: {redacted}

REDIS_HOST: {redacted}
REDIS_PORT: 6379
CACHE_STORAGE_TYPE: redis
CACHE_STORAGE_TTL: 3600
MESSAGE_QUEUE_TYPE: bull-mq

twentyredis:
image: redis
ports:
- 6379:6379
Any other suggestions as to why my setup is connecting my email but not my calendar? Any other info that i can share that might help us to debug this?
charles
charles•7mo ago
Have you configured your Oauth constent screen scopes properly in google cloud console?
leonard
leonard•7mo ago
Hi! Can you please elaborate on the needed scopes to be set ?
Rob
RobOP•7mo ago
This is what I have set, which is why I am surprised it doesnt ask me for calendar details... Am i missing anything?
No description
charles
charles•7mo ago
I don't get it, this is what we use for our setup:
No description
charles
charles•7mo ago
could you ssh into your server container and do "env" I'll try to reproduce locally
Rob
RobOP•7mo ago
Thanks @charles ❤️ I modified my scopes to match yours exactly. I pulled v0.11.2 I reset my database using docker exec -it server_twenty_1 npx nx database:reset (which reset everything and I had to create my workspace again, so I think this worked) still, when I click to connect to google it just asks for this...
No description
Rob
RobOP•7mo ago
and here is the output of env when I ssh'd in to the server
/app/packages/twenty-server $ env
CACHE_STORAGE_TYPE=redis
CACHE_STORAGE_TTL=3600
REDIS_PORT=6379
ENABLE_DB_MIGRATIONS=true
NODE_VERSION=18.17.1
SENTRY_RELEASE=
HOSTNAME=e34721835f5c
YARN_VERSION=1.22.19
REACT_APP_SERVER_BASE_URL=
SHLVL=1
PORT=3854
FRONT_BASE_URL={redacted}
CALENDAR_PROVIDER_GMAIL_ENABLED=true
HOME=/home/node
ACCESS_TOKEN_SECRET={redacted}
LOGIN_TOKEN_SECRET={redacted}
PG_DATABASE_URL={redacted}
AUTH_GOOGLE_CLIENT_ID={redacted}
AUTH_GOOGLE_CLIENT_SECRET={redacted}
AUTH_GOOGLE_ENABLED=true
STORAGE_TYPE=local
TERM=xterm
FILE_TOKEN_SECRET={redacted}
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REFRESH_TOKEN_SECRET={redacted}
SIGN_IN_PREFILLED=false
AUTH_GOOGLE_CALLBACK_URL={redacted}/auth/google/redirect
SERVER_URL={redacted}
MESSAGING_PROVIDER_GMAIL_ENABLED=true
REDIS_HOST=192.168.1.4
PWD=/app/packages/twenty-server
IS_SIGN_UP_DISABLED=false
AUTH_GOOGLE_APIS_CALLBACK_URL={redacted}/auth/google-apis/get-access-token
MESSAGE_QUEUE_TYPE=bull-mq
/app/packages/twenty-server $
/app/packages/twenty-server $ env
CACHE_STORAGE_TYPE=redis
CACHE_STORAGE_TTL=3600
REDIS_PORT=6379
ENABLE_DB_MIGRATIONS=true
NODE_VERSION=18.17.1
SENTRY_RELEASE=
HOSTNAME=e34721835f5c
YARN_VERSION=1.22.19
REACT_APP_SERVER_BASE_URL=
SHLVL=1
PORT=3854
FRONT_BASE_URL={redacted}
CALENDAR_PROVIDER_GMAIL_ENABLED=true
HOME=/home/node
ACCESS_TOKEN_SECRET={redacted}
LOGIN_TOKEN_SECRET={redacted}
PG_DATABASE_URL={redacted}
AUTH_GOOGLE_CLIENT_ID={redacted}
AUTH_GOOGLE_CLIENT_SECRET={redacted}
AUTH_GOOGLE_ENABLED=true
STORAGE_TYPE=local
TERM=xterm
FILE_TOKEN_SECRET={redacted}
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REFRESH_TOKEN_SECRET={redacted}
SIGN_IN_PREFILLED=false
AUTH_GOOGLE_CALLBACK_URL={redacted}/auth/google/redirect
SERVER_URL={redacted}
MESSAGING_PROVIDER_GMAIL_ENABLED=true
REDIS_HOST=192.168.1.4
PWD=/app/packages/twenty-server
IS_SIGN_UP_DISABLED=false
AUTH_GOOGLE_APIS_CALLBACK_URL={redacted}/auth/google-apis/get-access-token
MESSAGE_QUEUE_TYPE=bull-mq
/app/packages/twenty-server $
I also made sure that subscriptionStatus was active for the workspace in the database I feel I’m missing something really obvious. Thanks for your help @charles
charles
charles•7mo ago
hi @Rob, that's weird. I'm trying to replicate the issue with your env variables found it! it should be: CALENDAR_PROVIDER_GOOGLE_ENABLED not: CALENDAR_PROVIDER_GMAIL_ENABLED this is inconsistent on our side
Rob
RobOP•7mo ago
@charles thank you, i confirm this fixed it
Rob
RobOP•7mo ago
I opened a PR to fix the docs on the website with the wrong env variable name https://github.com/twentyhq/twenty/pull/5417
GitHub
docs: fix calendar enable environmental variable by rob-luke · Pull...
Hi twenty team, Thanks for making such a great product, it's a pleasure to use and see the rapid development. @charlesBochet helped me find this error in my setup
Rob
RobOP•7mo ago
again, thank you so much for the help and the great product!
charles
charles•7mo ago
Thank you ! ❤️
Want results from more Discord servers?
Add your server