Git Product home page Git Product logo

Comments (9)

DWilliames avatar DWilliames commented on May 24, 2024

Thanks @leedat. Sorry for the delay.
I've made a couple of changes in a beta version, can you download this and see if it works:
https://github.com/DWilliames/Google-sheets-content-sync-sketch-plugin/archive/develop.zip

If it's still not working, are you able to provide the publish link to your Google Sheet?

Regards.

from google-sheets-content-sync-sketch-plugin.

leedat avatar leedat commented on May 24, 2024

Thanks your reply. But it were not fixed. Please check.

from google-sheets-content-sync-sketch-plugin.

leedat avatar leedat commented on May 24, 2024

My public link https://docs.google.com/spreadsheets/d/e/2PACX-1vS4-SZ1_zwLU0GmyEt6f41NT2h_vGX7ySukP-hbeinT_TC_evU15yJ9NggjUZIqw79lBvUzvx5oBDFo/pubhtml
Thanks

from google-sheets-content-sync-sketch-plugin.

DWilliames avatar DWilliames commented on May 24, 2024

Thanks for that @leedat.
It appears there is an issue with your URL — the typical behaviour it expects is for the url to be:
https://docs.google.com/spreadsheets/d/[sheetID]/pubhtml

However yours has an additional /e/ in it for some reason.
To extract the data from the sheet, I create a URL in the form...
https://spreadsheets.google.com/feeds/list/[sheetID]/[sheetNumber]/public/values?alt=json
Using the sheet ID obtained from the URL — but yours does not seem to work in this format.

Are you able to double check how you published the sheet?
Try going 'File > Publish to Web > Stop publishing to web' — then republish it — 'publish'
Can you see if it generates a URL without the /e/ after the /spreadsheets/d ?

Thanks.

from google-sheets-content-sync-sketch-plugin.

xiaodoudou avatar xiaodoudou commented on May 24, 2024

Hey @DWilliames, the extra e is for Google Enterprise ;)

Cheers

from google-sheets-content-sync-sketch-plugin.

xiaodoudou avatar xiaodoudou commented on May 24, 2024

Hey @DWilliames
I have to dig a little bit the issue regarding why some user can't get the link established.

The issue is linked to Google Enterprise model. On my company, the security rule disallows public documents to be accessible to anonymous users; it means, if you go to the public URL it will prompt you a login and a password.
The only solution that I have found, that your plugin follows Google standard of OAuth, then the user could use the private URL, then you will be able to reach the page thanks to it.

Here I totally understand that's a heavy change, but this way will solve all the issues of your users having trouble with their documents stored on a Google Enterprise account.

A bad workaround, if someone still wants to go that road, is to use a private google account with google drive. As you may bypass your company policies, you risk yourself to some other complications...

from google-sheets-content-sync-sketch-plugin.

DWilliames avatar DWilliames commented on May 24, 2024

Awesome. Thanks for the explanation @xiaodoudou.

I have started looking into doing proper OAuth through the plugin — which would involve writing the plugin again from scratch. But I think this current Proof of Concept appears to have driven enough usage to make it worthwhile. I'll start looking into it further.

from google-sheets-content-sync-sketch-plugin.

xiaodoudou avatar xiaodoudou commented on May 24, 2024

I was planning to use your plugin for the company I work for.
Got to inspect your code to see what was going on. The fact that your parsing JSON catch doesn't throw an error, people don't get it doesn't work properly.

You should show a toast returning the error on a toast, like: "Failed to get the document data."

Also, the structure for me should be vertically described and not vertically inside the GSheet.
I mean, as for a user doing copy, having a list from top to bottom is easier to deal with compare to left / right.

Good luck with the OAuth part, you can find nice documentation here:
https://developers.google.com/api-client-library/javascript/features/authentication

from google-sheets-content-sync-sketch-plugin.

DWilliames avatar DWilliames commented on May 24, 2024

Thanks again @xiaodoudou.
I just made an update which adds the additional messaging on the JSON catch — and also some more URL validation.

from google-sheets-content-sync-sketch-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.