bvstone

Step by Step Instructions for Registering Google Drive Service with GreenTools for GSuite (Google Apps)

Posted:

Step by Step Instructions for Registering Google Drive Service with GreenTools for GSuite (Google Apps)

This article will show you how easy it is to set up and start using the the Google Drive addon for GreenTools for G Suite.

Step 1: Run the G4G Register Service (G4GREGSVC) Command

After adding the G4G library to your library list, type G4GREGSVC on your command line and press F4 to prompt the command.  You should see a screen that looks like the following:

This command only has a couple options.

  • Google ID - Enter the Google ID you wish to use.  This can be a gmail.com address or even your own domain if it's hosted through Google.
  • Service - Enter the service you wish to register.  In this case we are registering Google Drive, so the value we use is *DRIVE
  • Redo Registration - This is only here in case you need to re-register the service.   
  • CCSID, Debug and Debug File are really only there for troubleshooting.  If you have issues I will have you change some of these parameters in order to collect information necessary for support.  Otherwise you don't need to worry about these parameters.

Step 2: Click on the Link (or Copy and Paste it) to Open Your Browser

Once you have the command set up, press enter and you will be brought to a new screen:

This next screen will include a link you will need to either click on (if your 5250 session allows) or you can simply copy the link text and place it in the location bar on your browser.

Once you finish this step, you will be brought to a BVSTools.com web page.

Step 3: Click on the Link Provided in Your Browser

You should now be at a BVSTools.com web page.  On this page there will be a link that you need to click on to start the registration process.

Click on the link provided.  If you have multiple Google Accounts you will next be shown a list of accounts to use.  Remember to select the same account that you used on Step 1 in the G4GREGSVC command.

If only have one Google Account and are already signed in, you will be brought to the next page.  If you are not signed in you will need to go through the steps to sign in to your Google Account.  

Step 4: Review and Accept the Permissions Required by the Google Service

Once you have selected and signed in to the appropriate Google Account you will be asked to review and accept the permissions required by the specific GreenTools for G Suite service you are registering.  In our case it was Google Drive:

Step 5: Return to your 5250 Session and Complete the Registration

Once you accept the permissions required for the specific G4G service you will return to the BVSTools.com web page that will have a specific authorization code.

You don't need to do anything with this code.  When you get to this point you can return to your 5250 screen and complete the registration by pressing the F6 button.  When you do this the application will connect with the BVSTools.com web page and retrieve the authorization code automatically for you.  Once that is complete your registration is complete:

Step 6: Use the Service!

You are now ready to start using the specific service you just registered.  In this example it was Google Drive, so let's try something simple like uploading a file to Google Drive  This is done using the G4GUPLOAD command.  (More commands and ILE interfaces for each specific interface can be found in the G4G Documentation).

  • Google ID - Specify the Google ID that you want to upload a file too.  (Remember, the Google ID should already be registered using the G4GREGSVC command).
  • File to upload - Enter the fully qualified path and filename of the file you wish to upload.  This file should already exist in the IFS.  
  • File name - This option can be used if you want to upload the file as a different name.  
  • File content type - This is used to specify the content type of the file you're uploading.  G4G comes with many content-types already set up in the G4GCTTPF file in the G4G library.  You can enter the content type here or use the default of *DFT to allow G4G to look this up for you.  

Next press your Page Down key to see the next page of available parameters:

  • Upload to folder - Enter the fully qualified path to the folder on your Google Drive that you want to upload the file to.  This folder name is case sensitive.
  • Replace file - Specify if you wish to replace the file if it already exists.  If you specify *YES the file will be replaced.  If you specify *NO and the file exists the file will not be uploaded.  If you specify *ADD the file will be uploaded but it will have a different file ID (yes, on Google Drive you can have two files with the same name).
  • Convert file - This is used if the file you are uploading should be converted to it's related Google Drive format.  This normally is for Word, Excel, etc documents.
  • Create parents - If the folder you want to upload the file to doesn't exist it and any folders in the path will be created if this is set to *YES.  
  • The remaining parameters are mainly for debugging and should be left as is in most cases.

Once you press Enter you should get a message that says the file was uploaded similar to this:

File uploaded with id 0B2Sd62H63YjoXzI3R0NBZjRGazA as test.pdf

You can now go to your Google Drive and the file should be there!  You will even see in the details bar to the right information about what was uploaded and how.  

 


Last edited 06/06/2017 at 07:47:35



Latest Posts:

MAILTOOL Updated to Allow G4GSMAIL as Option in Routers File MAILTOOL Updated to Allow G4GSMAIL as Option in Routers File
Posted by 3 days ago
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
BVSTools Now Offers Interface with Infor's ION APIs BVSTools Now Offers Interface with Infor's ION APIs
Posted by May 15, 2020
BVSTools >> BVSTools Announcements
More V7R4 IFS File CCSID Issues and The Fix More V7R4 IFS File CCSID Issues and The Fix
Posted by March 4, 2020
IBM Power Systems >> (QGPL) IBM i
Error Retrieving IP Address by Name Error Retrieving IP Address by Name
Posted by February 25, 2020
BVSTools >> BVSTools Software Discussion
Logging jobs that hit an outq Logging jobs that hit an outq
Posted by February 13, 2020
Programming >> CL Programming
GreenTools for Google Apps (G4G) v12.60 Released with Shared Drive Features and More... GreenTools for Google Apps (G4G) v12.60 Released with Shared Drive Features and More...
Posted by February 4, 2020
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
Allowing Requests over Port 80 For SSL Validation (ie, Namecheap, etc) Allowing Requests over Port 80 For SSL Validation (ie, Namecheap, etc)
Posted by January 31, 2020
Programming >> Web Programming
GreenTools for Slack (G4SLK) v3.00 Released GreenTools for Slack (G4SLK) v3.00 Released
Posted by January 17, 2020
BVSTools >> BVSTools Announcements >> GreenTools for Slack (G4SLK) Specific Announcements
Calling a QSH Command from RPG Calling a QSH Command from RPG
Posted by December 26, 2019
Programming >> RPG Programming
SPLTOOL Print Range (PRTRNG) Function Updated to Handle Spooled Files up to 999,999,999 Pages SPLTOOL Print Range (PRTRNG) Function Updated to Handle Spooled Files up to 999,999,999 Pages
Posted by December 14, 2019
BVSTools >> BVSTools Announcements >> Spooled File Tools (SPLTOOL) Specific Announcements
GreenTools for Microsoft Apps (G4MS) Updated to v6.00 - Now Uses Microsoft Graph APIs GreenTools for Microsoft Apps (G4MS) Updated to v6.00 - Now Uses Microsoft Graph APIs
Posted by November 24, 2019
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
V7R4 Changes CCSID of Compressed File Using PASE JAR Command - Here's The Fix V7R4 Changes CCSID of Compressed File Using PASE JAR Command - Here's The Fix
Posted by November 21, 2019
IBM Power Systems >> (QGPL) IBM i
Using GETURI to Make OAuth 2.0 Requests - Custom Headers for Access Tokens Using GETURI to Make OAuth 2.0 Requests - Custom Headers for Access Tokens
Posted by November 11, 2019
BVSTools >> BVSTools Software Discussion >> Get URI (GETURI) Specific Discussion
GreenTools for Microsoft Apps (G4MS) v5.00 Released with Updated OneDrive Support and 3rd Party Functionality GreenTools for Microsoft Apps (G4MS) v5.00 Released with Updated OneDrive Support and 3rd Party Functionality
Posted by October 20, 2019
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
BVSTools is Now Running V7R4M0 BVSTools is Now Running V7R4M0
Posted by September 28, 2019
BVSTools >> BVSTools Announcements

Reply




Copyright 1983-2020 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).