T
Twenty5mo ago
leonard

Multiple Google accounts

Hi, I'm self-hosting the app. Is there a way to connect multiple Google Workspace accounts ? I created apps in one, with proper scopes and redirect URLs, but afaik, only one google ID and secret can be set up as environment variables. Did anybody find a workaround for this ?
8 Replies
charles
charles5mo ago
Hi @leonard, why would you need multiple google account to be setup?
leonard
leonard4mo ago
Hi @charles, I want to sync multiple calendars and email accounts Hi @charles , any news on this ?
charles
charles4mo ago
Hi @leonard, you can already do that in Twenty. There is a difference between your google cloud account that is needed to set up the google API access (you'll need a client_id and secret) and the multiple connectedAccount that you can connect (these ones will leverage the google API access). For example for our cloud (which is using the exact same source code as self-hosting), we have setup a an account on https://console.cloud.google.com/, got our use case reviewed by Google, and then we can pull the data from anybody going through (and ofc accepting) the oAuth flow to allow our account to access its gmail data
Google Cloud Platform
Google Cloud Platform lets you build, deploy, and scale applications, websites, and services on the same infrastructure as Google.
charles
charles4mo ago
so you should only need one google ID and secret and should be able to connect as many account as you want
leonard
leonard4mo ago
ok @charles , so I just need to make my Google cloud app (which is internal now) external ? I put it "external" in "testing" mode (so I don't have to provide a privacy policy neither a youtube video), and added 3 Test Users (the 3 workspace accounts I want to connect). Then, I can start adding an account, confirm that I'm a developer willing to use this unverified app, grant permissions , but I'm landing on a HTTP ERROR 500 What's going wrong ?
charles
charles4mo ago
yes, that's correct @leonard 🙂 Regarding the 500 error, what do you have in your server logs? I'm going to close this because of inactivity, feel free to ping us here if needed and I'll re-open it
leonard
leonard4mo ago
Hi @charles , sorry for the late answer, I have a poor notifications tuning on discord. Below are my server logs :
db-1 | 2024-07-03 11:48:33.312 GMT [240] ERROR: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
db-1 | 2024-07-03 11:48:33.312 GMT [240] CONTEXT: unnamed portal parameter $5 = '...'
db-1 | 2024-07-03 11:48:33.312 GMT [240] STATEMENT: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
db-1 | VALUES ($1, $2, $3, $4, $5, $6)
db-1 | 2024-07-03 11:48:33.312 GMT [240] ERROR: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
db-1 | 2024-07-03 11:48:33.312 GMT [240] CONTEXT: unnamed portal parameter $5 = '...'
db-1 | 2024-07-03 11:48:33.312 GMT [240] STATEMENT: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
db-1 | VALUES ($1, $2, $3, $4, $5, $6)
server-1 | query failed: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
server-1 | VALUES ($1, $2, $3, $4, $5, $6) -- PARAMETERS: ["[REDACTED]","[REDACTED]","email","leonard@[REDACTED]","SHARE_EVERYTHING","ONGOING"]
server-1 | error: error: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
server-1 | query failed: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
server-1 | VALUES ($1, $2, $3, $4, $5, $6) -- PARAMETERS: ["[REDACTED]","[REDACTED]","email","leonard@[REDACTED]","SHARE_EVERYTHING","ONGOING"]
server-1 | error: error: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
db-1 | 2024-07-03 11:48:33.312 GMT [240] ERROR: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
db-1 | 2024-07-03 11:48:33.312 GMT [240] CONTEXT: unnamed portal parameter $5 = '...'
db-1 | 2024-07-03 11:48:33.312 GMT [240] STATEMENT: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
db-1 | VALUES ($1, $2, $3, $4, $5, $6)
db-1 | 2024-07-03 11:48:33.312 GMT [240] ERROR: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
db-1 | 2024-07-03 11:48:33.312 GMT [240] CONTEXT: unnamed portal parameter $5 = '...'
db-1 | 2024-07-03 11:48:33.312 GMT [240] STATEMENT: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
db-1 | VALUES ($1, $2, $3, $4, $5, $6)
server-1 | query failed: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
server-1 | VALUES ($1, $2, $3, $4, $5, $6) -- PARAMETERS: ["[REDACTED]","[REDACTED]","email","leonard@[REDACTED]","SHARE_EVERYTHING","ONGOING"]
server-1 | error: error: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
server-1 | query failed: INSERT INTO workspace_[REDACTED]."messageChannel" ("id", "connectedAccountId", "type", "handle", "visibility", "syncStatus")
server-1 | VALUES ($1, $2, $3, $4, $5, $6) -- PARAMETERS: ["[REDACTED]","[REDACTED]","email","leonard@[REDACTED]","SHARE_EVERYTHING","ONGOING"]
server-1 | error: error: invalid input value for enum workspace_[REDACTED]."messageChannel_visibility_enum": "SHARE_EVERYTHING"
charles
charles4mo ago
Ok! it seems that your data model is corrupted. What version of twenty are you using?
Want results from more Discord servers?
Add your server