3
votes

I have a working apps script project that connects google sheets & big query to create materialized views within the big query. I am scheduling a couple of functions to run on a periodic basis. Everything is working fine under my account except when I share the sheets & scripts to another account, they cannot see the project triggers which is scheduled using my account.

How to enable the visibility of project triggers across all users? Otherwise, we have the high probability to end up scheduling same functions or if the other person needs to change the scheduling time. Please let me know if I am doing anything wrong.

Triggers enabled via app script: enter image description here

The sheets & scripts are shared via https://script.google.com

enter image description here

Triggers not visible for another user: enter image description here

1
I don't think that's really possible. Best is to create the triggers programmatically so that all users can see and edit them.Diego
for enterprise environments, consider using Cloud Composer youtube.com/watch?v=GeNFEtt-D4kFelipe Hoffa
This looks interesting, we are already using apache airflow for production-grade etls, this process we created for the BI & analysts who need to create materialized views & data marts for their analysis in a simple & less programmatic way.Logan
By definition users cannot see triggers created by other users - it's explicitly stated behavior by Google.tehhowch

1 Answers

1
votes

Implementing programmatic triggers makes much more sense than manual triggers to share scripts across users:

https://developers.google.com/apps-script/guides/triggers/installable#managing_triggers_programmatically

/**
 * Creates a two time-driven triggers.
 */
function createTimeDrivenTriggers() {
  // Trigger every 6 hours.
  ScriptApp.newTrigger('myFunction')
      .timeBased()
      .everyHours(6)
      .create();

  // Trigger every Monday at 09:00.
  ScriptApp.newTrigger('myFunction')
      .timeBased()
      .onWeekDay(ScriptApp.WeekDay.MONDAY)
      .atHour(9)
      .create();
}