With the retirement of Google sheets v3 api, replaced by v4, CHILI publish also implemented these changes.
The deprecation date for the v3 api is June 8, 2021.
CHILI publish has made changes in the setup to connect to this datasource, to allow you to keep using your datasource connection.
What to do?
On google cloud platform
https://console.cloud.google.com/apis/dashboard
Select your application that is used in CHILI publisher (on the top there is a dropdown) and hit ENABLE APIS AND SERVICES.
...
Select Google Sheets API and Drive API and enable both of them.
...
Google Drive API
...
Changes at the CHILI publisher side
In backoffice find your datasource and generate a new access code.
...
Push “Get new access” code, confirm your choice, copy the code into the datasource page and save the settings.
...
Use the right file type
On your Google Drive, make sure the source file type is Google Sheets, and not Excel.
...
Note |
---|
As of Oct 3, 2022 Google will stop supporting the current oAuth flow. |
You can use Google Sheets as a datasource to feed your CHILI publisher document with variable data.
Follow these steps to create the DataSource Setup in the CHILI publisher’s backoffice.
Setup
You’ll need a Google Cloud Platform account, with sufficient rights to create API credentials.
Project & Organisation
Create a new project.
...
API enabling
...
Choose the API and services > Enabled APIs and services
...
Click “+ Enable APIS and services”
...
We’ll need to enable Google Drive API & Google Sheets API
After enabling, check they are enabled.
...
oAuth Consent screen
When you’ll create the DataSource on the CHILI publisher’s side, Google will show an oAuth consent Screen. The information in this wizard will show in this screen, and provide information to your API consumers.
Some fields speak for themselves, we’ll list the one’s that are important for the DataSource setup
Scopes
Define the scope for your application.
Up to you if you want to limit the scope. As for the CHILI publisher datasource, this is not necessary.
Test users
Define the users that will be able to test, while you App in Google Cloud is in testing phase.
Credentials
Define the credentials, you’ll use to connect with the datasource.
...
Click “Create Credentials”, and choose OAuth client ID
...
Choose “Web Application”.
...
Fill in the App name and Authorised redirect URIs.
...
Redirect URI
The URI should look like this.
You’ll need to fill in [your-chilipublisher-url]
And the API version (e.g. v1.2)
Code Block |
---|
https://[your-chilipublisher-url]/rest-api/[api-version]/system/server/googleauthcode |
Once created, you’ll get a client ID and Client secret that you will need in the CHILI publisher BackOffice.
URI in http or https?
On premise hosting | CHILI publisher Online | |
---|---|---|
CHILI publisher is hosted in HTTP (non secure) | You must set the return API also to HTTP | Can NOT be hosted in HTTP |
CHILI publisher is hosted in HTTPS (secure) | You must set the return URI to HTTPS | You must set the return URI to HTTPS |
CHILI publisher side
In the CHILI publisher BackOffice, choose DataSources, and create a new DataSource, choose “Google Spreadsheets” as the type.
...
Provide the Client ID and Secret, and click “Authorize”.
Note |
---|
If you just created the Credentials, and enabled the API’s, it could take a while. Consult the Google Cloud documentation to see what appropriate times are. |
Fill in the created code in the field “Your Access Code“ in the BackOffice.
...
You’re all set
Sharing
If the file does not appear in the list of files for your datasource, you’ll need to share it, with the user you defined.
If you work from within a Google Organisation, the file might be shared with your user already. Just make sure the other users also have access.
...
You could remove the restrictions, but then your files / datasource might be accessible for too many people
Know restrictions
Applies when you have more than 1 Google SpreadSheet datasources defined.
When you have an open CHILI document, and want to select the second datasource, you’ll still see the files from the first selected datasource.
To see files from the other datasource, reload the file.