Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

As of Oct 3, 2022 Google will stop supporting the current oAuth flow.
Please consult this link to read the Blog Post from Google.

You can use Google Sheets as a datasource to feed your CHILI publisher document with variable data.

...

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

...

Might seem a bit counter intuitive, but choose “Desktop App”. (you’ll be able to connect to CHILI publisher online or on-prem)

...

Name your OAuth 2.0 connection. This comes in handy, when you have multiple applications.

...

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
http://[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.

...

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 “Get Access code”.

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 respective field “Your Access Code“ in the BackOffice.

...

You’re all set

Important change: Google API v4 - June 8 - 2021

With the retirement of Google sheets v3 api, replaced by v4, CHILI publisher 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.

...

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