mixpanel / sheets

🔄 integrate mixpanel with google sheets
3 stars 2 forks source link

Sync Failing #22

Open jb-ut opened 10 months ago

jb-ut commented 10 months ago

Getting following response after clicking "Run" for Google Sheets connector.

✖️ RUN FAILED ... got error: Authorization is required to perform that action.

Confirmed Mixpanel Service Account User access level set at: Admin Verified Service Account Secret

ak--47 commented 10 months ago

@jb-ut are you on a free plan trying to export mixpanel => sheets?

SarahTastewise commented 7 months ago

@ak--47 I am experiencing the same exact issue. Confirmed Mixpanel Service Account User access level set at: Admin

I am not on a free plan on Mixpanel.

Any additional suggestions ?

tomredman commented 1 month ago

@SarahTastewise, I just ran into this.

This error is actually coming from Google Scripts -- if you're logged into multiple Google Account, add the Mixpanel <> Sheets add-on to each Google account. (My technical assumption here is that GScripts run as whoever is logged in as "/u/0").

Second, to make edits to a lookup table it looks like it needs to (A) exist and (B) be "Shared" first: Image

And the lookup table ID is found here (I thought it was the table name, but it's the pre-existing ID): Image

Would be nice to see complete end-to-end instructions in the readme @ak--47 :)

tomredman commented 1 month ago

Hmm, nevermind. Can't get my service account to work, even though it's an Owner in the org, has Owner access to the project:

Image

Image

tomredman commented 1 month ago

Looks like the issue is with the validate() function. It actually returns:

{ error: 'data, missing or empty', status: 0 }

Which is not what is expected in https://github.com/mixpanel/sheets/blob/main/utilities/validate.js#L46-L64

Updating the expected value to this works for my case (service account & updating lookup table):

const expected = {
  error: "data, missing or empty",
  status: 0,
};

PR here https://github.com/mixpanel/sheets/pull/33