Skip to content

ProductivityTools-Tasks3/ProductivityTools.GetTask3.GoogleAppsScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GetTask3 - GoogleAppsScript

This is Google Apps Script which reads tasks from Google Tasks and move them to GetTask3 application.

Script properties

Script needs to have two script properties:

  • ParentId - which defines where new tasks will be created
  • webapikey - used for authentication

Webapikey

Needs to be taken from google cloud

The webapi key needs to be aligned with the service account file that is provided on the server side.

Service account key can be download in the firebase console.

Value on the server side is used in the startup

 public void ConfigureServices(IServiceCollection services)
        {
            string masterconfpath = Environment.GetEnvironmentVariable("MasterConfigurationPath");
            FirebaseApp.Create(new AppOptions()
            {
                Credential = GoogleCredential.FromFile($"{masterconfpath}\\ProductivityTools.GetTask3.ServiceAccount.json"),
            });
            services
             .AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
             .AddJwtBearer(options =>
             {
                 options.Authority = "https://securetoken.google.com/ptprojectsweb";
                 options.TokenValidationParameters = new TokenValidationParameters
                 {
                     ValidateIssuer = true,
                     ValidIssuer = "https://securetoken.google.com/ptprojectsweb",
                     ValidateAudience = true,
                     ValidAudience = "ptprojectsweb",
                     ValidateLifetime = true
                 };
             });
....

Schedule

To make the process automatic, trigger need to be added:

Services

Task service needs to be added to be able to call API.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published