kentico-ericd / kontent-google-sheets-add-on

Using this Google Sheets add-on, you can import new content items in Kentico Kontent, or update existing items. This can be handy when migrating content from an external database or CMS, or if your editors prefer to work in spreadsheets.
MIT License
4 stars 3 forks source link

Allow Selection of Types to export instead of exporting everything, always #17

Closed timfenton-shaw closed 2 years ago

timfenton-shaw commented 3 years ago

Currently, when using the new(ish) export functionality it exports everything, always. I would like to have the ability to select the content types that I will export. One of our projects is so large that it times out the export feature and i think being able to select which content types we want to export would help that a ton.

ileshmistry commented 2 years ago

@kentico-ericd I would like this too, I agree with @timfenton-shaw that currently there are lots of components (Content Types) in a project, and it doesn't go through the full process for me, it shows an error.

I guess being able to select a content type ourselves, will allow us to focus on only the ones we need exporting

adolina-shaw commented 2 years ago

Is there any update on this issue? This feature would be greatly appreciated!

ileshmistry commented 2 years ago

@kentico-ericd Not sure if you have an update on this? As it would be really beneficial for us to export a single Content Types content and then use this to form a template to import back into Kontent

kentico-ericd commented 2 years ago

@timfenton-shaw @ileshmistry @adolina-shaw Apologies for the long wait, I've joined the Xperience Integration team so I have been busy! I released v65 which changes the behavior to only export a single content type at a time. This means a bit more clicking, but hopefully that takes care of timeouts. Let me know if you have any feedback on it!

adunderground commented 2 years ago

@adolina-shaw @kentico-ericd Hey Eric, thanks for the update. I can see the content type dropdown now. However when I click Export I still get the "Add-on error" message. I also verified that this content type has 40 rows, unlike some other content types that we use that have around 1k. I also reinstalled the add-on and updated the API keys as a precaution.

Here's the screenshot of my network tab – maybe it would come in handy when you're looking into this.

image

kentico-ericd commented 2 years ago

@adunderground I've found some errors in Google App Scripts mentioning "Limit Exceeded: URLFetch header size." After some testing it seems that under some circumstances, the continuation_token used by the Management API items feed can become very large and exceed the 8KB limit for request headers. I'll keep digging!

kentico-ericd commented 2 years ago

@adunderground I spoke to developers on the Kontent team and unfortunately it is expected that the continuation_token exceeds 8KB. This is not a problem for standard HTTP requests as there's no header size limit- 8KB is a limit imposed by Google App Scripts. So at the moment, it seems that the Management API /items endpoint is not entirely compatible with Google Apps Script.

In the future, it's possible that the add-on could be re-worked to not use the /items endpoint. If you're interested, I would recommend creating a separate GitHub issue for tracking that solution. Thank you!