Skip to main content Link Search Menu Expand Document (external link)

Overview

Creating a Jancy Google Cloud Workspace Project

Prerequisites

The following instructions assume you have a Google Workspace account. If you just have a regular Google account they won’t work unfortunately.

A Google Workspace account can be acquired here https://workspace.google.com/pricing.html. All you need is the Business Starter plan.

When setting up your Google Workspace account, it’s necessary to have both a custom domain and a paid google workspace plan. The steps explained below cannot be completed with a free account or without a custom domain.

Steps

In order for Jancy to access resources (e.g. Gmail accounts) managed by your Google workspace you first need to create a Google cloud project that the browser can authenticate against.

  1. Go to your Google Cloud Console in your regular browser (not Jancy) by going here https://console.cloud.google.com/welcome

  2. If you’re logged into more than one Google account, make sure your Workspace account is selected in the Google Cloud Console.

    image info

  3. First we need to create a new project
    1. Select the Create Project option under the IAM & Admin submenu (Hamburger Menu → IAM & Admin → Create Project)

      image info

    2. Give the project a name and press the Create button. I suggest the project name Jancy because that’s what I use through out the rest of the instructions. You can leave the Organization and Location fields as they are unless you know what you’re doing.

      image info

  4. The Jancy project you just created should be selected in the menu at the top

    image info

  5. Add the Gmail API to the Jancy project.
    1. Go to the APIs & services Library (Hamburger Menu → APIs & services → Library)

      image info

    2. Find and click the Gmail API square

      image info

    3. Enable the API by clicking the Enable button

      image info

  6. Add the Google sheet API to the Jancy project.
    1. Go to the APIs & services Library (Hamburger Menu → APIs & services → Library)

      image info

    2. Find and click the Google Sheets API square

      image info

    3. Enable the API by clicking the Enable button

      image info

  7. Configure your OAuth consent screen for the Jancy project
    1. Go to the APIs & services OAuth consent screen (Hamburger Menu → APIs & services → OAuth consent screen)

      image info

    2. Select the Internal User Type image info
    3. Click the Create button
    4. Now we update our App information
      1. Type Jancy for the App name and select an email address from the User support email drop down image info
      2. Enter your email address in the Developer contact Information image info
      3. Press Save and Continue at the bottom
  8. Now we have to add Scopes to our Jancy project
    1. Click the Add or Remove Scopes button

      image info

    2. Find and check the Gmail API read only scope

      image info

    3. Find and check the Google Sheets API scope and Google Sheets API read only scope

      image info

    4. Press the Update button at the bottom
    5. You should see the Gmail read only scope in the Restricted scopes section and the Google sheet read only scope in the Sensitive Scopes

      image info

    6. Press Save and Continue
  9. You should now be at the Oauth consent screen summary for the Jancy project. Press Back to Dashboard.

    image info

  10. Now we have to make OAuth credentials for the Jancy browser to use so you can grant it access to an email account managed by your Google workspace.
    1. Select Credentials from the APIs and services submenu (Hamburger Menu → APIs and services → Credentials)

      image info

    2. Select Create Credentials at the top.

      image info

    3. Select OAuth client ID from the dropdown

      image info

    4. Select Desktop app from the Application type dropdown

      image info

    5. Name it Jancy Browser

      image info

    6. Press the Create button
    7. In the popup window that appears, click the Download JSON button and then Press the ok button to close the window. Make a note of the name of the file and where it was downloaded to on your computer. You’ll need it later.

      image info

Giving Jancy Permission to Access Your Google Workspace Account

  1. Go to the Google Accounts settings panel in Jancy (File → Settings → Google Accounts)
  2. Click the Add Account button
  3. In the Add Google Account dialog
    1. Give your account a name that makes it easy to recognize what the account is accessing.
    2. Click the ellipses button next to the Credentials file field and in Open dialog select the file you downloaded from the step 9g in the previous section.
    3. Select the Gmail: Read-only scope to give Jancy permission to read emails belonging to your Google Workspace Account.
    4. Select the Google Sheet: Read-only scope to give Jancy permission to read the contents of Google sheets belonging to your Google Workspace Account.
    5. Select the Google Sheet: Read/Write scope to give Jancy permission to read and write to a Google Sheet belonging to your Google Workspace Account.
    6. Click Save

      image info

  4. You’ll be presented with a window asking you to choose a Google account that you want to give Jancy access to. Select or add your Google Workspace Account.

    image info

  5. Confirm that you want to allow the Jancy Google Workspace Project you created in the first section access to the account you selected in the previous step.

    image info

  6. If everything worked you should see the Google Account you just added in the list.

    image info

Pulling Emailcodes from the Google Workspace Account

If you are looking to use your Google workspace account as a catchall for the emails in your profile CSV, this section will cover how to add this into your profile CSV.

  • First, you will need to follow all of the steps above on how to set up your Google Workspace Account
  • Second, you will need to make sure you selected the Gmail: Read-only scope when adding your Google Workspace Account to Jancy
  • Third, make sure you have the correct Google workspace ID that you made while setting up the account. The screenshot below will show where to find this.

    image info

  • You will now need to add your resolver under your Site collumn in your profile CSV

    image info

  • For this example I will use the most basic resolver that pulls email codes for ticket master accounts.

    image info

You will need to add this resolver to all the profiles from which you want to pull emails. After following these steps, you will be able to populate email codes for your Jancy profiles. To do this, click the refresh button next to the email code box in the tab panel while on the specific site.

image info

Remember, resolvers are site-specific, so you will need to be on the specific site for Jancy to pull the email codes. Also, depending on your setup and what you are trying to accomplish, the resolver may be different from the one in the example above. Refer to the documentation if your case is different.

Additional documentation on profile resolvers can be found here.

Additional documentation on the Gmail resolver can be found here.

Reading Profiles from a Google Spreadsheet Associated with a Google Workspace Account

Jancy can read profiles from a Google spreadsheet that your Google workspace account has access to.

If you previously setup your Google workspace account in Jancy before there was a Google Sheet: Read-only or Google Sheet: Read/write scope options, please follow the instructions below that explain how to retroactively add the Google spreadsheet API to your Jancy Google Cloud Workspace project.

  • Third, make sure you have the correct Google workspace ID that you made while setting up the account. The screenshot below will show where to find this.

    image info

  • Fourth, you’ll need the URL of the Google spreadsheet and the name of the sheet you want to read profiles from. image-info

Creating a Google Sheet Profile Provider

  1. Open the Profile setting panel (File → Settings → Profiles)
  2. Click the + Add a profile provider button and select the Load profiles from a Jancy profile formatted Google Sheet option.
  3. In the Load Profiles from a Jancy Profile Formatted Google Sheet dialog that appears:
    1. In the Name field, give your sheet a custom name
    2. In the Workspace ID field, select the correct Google Workspace Account from the dropdown menu
    3. In the Spreadsheet URL or ID field, copy and paste the URL of the spreadsheet

      image-info

    4. In the Sheet Name field, type the name of the Sheet that contains your profiles

      image-info

  4. If resolvers under site columns contain a comma or a colon, they should be preceded with a backslash and the “Allow comamas and colons in Site columns with use of backslash” feature should be checked.

    image info

  5. Click the Add button

If everything works, you should see a configured profile provider that looks like this: image info

You can add multiple providers for the same spreadsheet with different Sheet Names if you’ve spread your profiles accross different sheets on the same spreadsheet.

The columns and formatting rules that apply to the Google sheets are the same that apply to Jancy formatted CSV files.

Retroactively Adding the Google Spreadsheet API to Your Jancy Google Cloud Workspace Project

  1. Go to your Google Cloud Console in your regular browser (not Jancy) by going here https://console.cloud.google.com/welcome

  2. If you’re logged into more than one Google account, make sure your Workspace account is selected in the Google Cloud Console.

    image info

  3. Click the Dashboard link

    image info

  4. Make sure the Jancy project is selected.

    image info

  5. Click the Library menu option from the APIs & Services menu

    image info

  6. In the search box type google sheets api and select the option presented.

    image info

  7. Click the Google Sheets API search result.

    image info

  8. Click the enable button

    image info

  9. After the API is enabled it should take you to this screen and the Status should read enabled.

    image info

  10. Click the OAuth consent screen menu option from the menu on the left.

    image info

  11. Click the Edit App button next the project name near the top.

    image info

  12. Don’t edit anything on the first page of the Oauth consent screen just press the Save and Continue button at the bottom.

    image info

  13. Click the Add or Remove Scopes button on the Scopes screen of editing the Oauth consent screen.

    image info

  14. In the Update selected scopes dialog that appears from the right, type “Google Sheets API” in the Filter field and select the corresponding search result.

    image info

  15. In the filtered results select the one with the scope of ../auth/spreadsheets and ../auth/spreadsheets.readonly.

    image info

  16. Click the Update button at the bottom.

    image info

  17. The right hand panel should disappear and back on the Scopes screen you should see the Google Sheets API with read only scope under Your sensitive scopes.

    image info

  18. Click Save and Continue at the bottom of Scopes screen.

    image info

  19. Click the Back to Dashboard on the Summary screen.

    image info

  20. That’s it. You’ve enabled the Google Sheets API and configured your Jancy app to have Google sheet read only and read/write permissions.

You cannot update an existing Google workspace account in Jancy to have the Google Sheet: read-only scope. If you currently have a Google workspace account configured with just the Gmail: Read-only scope and you’d like it to also have the Google Sheet: Read-only scope, you need to delete the existing workspace account and re-add it and this time select both the Gmail: read-only and Google Sheet: Read-only scopes. Be sure to re-add the workspace account using the same name as the one you used previously so any Gmail profile resolvers still continue to work.

Alternatively, instead of deleting and re-adding the same account, you can add another Google workspace account using the same client secret file and give it just the Google Sheet: Read-only scope and use that workspace account exclusively for reading data from spreadsheets.

Using Google Sheets for Namath

You can use your Google Account to record purchases and potential purchases. Unlike discord and slack there is no way to respond back to the user sending for purchase coordination. You will have to communicate with them outside of Namath.

  1. The first thing you need is a Google Sheets document created and we need the Sheet ID from the URL. It will be a string of characters like 190-tTNPzD60KG92EOLUllQMqB3DEAQkUECfRzAIVnKf and is in the URL like this image:

    image info

  2. Then you need to get the name of the sheet at the bottom or name it something meaningful, like “carts” or “purchases” - you can have multiple sheets in this one document, but Namath will only send to one for each Namath provider you create.

    image info

  3. Then in Jancy start creating a Google Sheet provider for carts or purchases. The fields to fill out are:
    • Name - what you want to name it and the label that Namath will use for identifying it
    • Workspace ID - a select box to choose the Google account to use
    • Spreadsheet URL or ID - the ID from your Google Sheets document URL, or the whole URL
    • Sheet Name - the name like “Carts” you gave to the sheet in the document
    • Columns dropdown - this can be used to select which columns you want to show in the document

      image info image info

  4. Once it is showing up in the list of Namath providers you can press the test button. Your sheet should get populated with an entry like the following image:

    image info