If a Google Apps Script trigger stops running, the most common culprits are wrong ownership, missing permissions, or hidden errors in the execution log. By checking these three areas you can usually restore the automation within minutes.
Prerequisites – What You Need Before You Start
Make sure you have the following ready:
- A Google account that owns the script file (or a shared drive where the script lives).
- Editor access to the Google Sheet or other Google Workspace file the script interacts with.
- Basic familiarity with the Apps Script editor (open via Extensions → Apps Script).
- Permission to view execution logs – you must be the script owner or have View access in the project.
Step‑by‑Step Troubleshooting Process
1. Confirm the Trigger Exists and Is the Right Type
- Open the script editor and click the clock icon (Triggers).
- Check that the trigger you expect (time‑driven, on‑edit, on‑form‑submit, etc.) is listed.
- Verify the schedule – for a daily trigger, the time zone and hour must match your business hours.
If the trigger is missing, recreate it using the create button or the ScriptApp.newTrigger() method in code.
2. Verify Script Ownership and Sharing Settings
Triggers run under the identity of the script owner. If the script was copied or moved to a shared drive, ownership may have changed.
- In the Apps Script editor, click File → Project properties → Info and note the Owner field.
- If you are not the owner, request ownership transfer or ask the owner to recreate the trigger.
- When the script is stored in a shared drive, ensure the drive’s Sharing settings allow the owner to run installable triggers.
3. Review OAuth Scopes and Re‑authorize If Needed
Every Apps Script project declares the Google services it needs (OAuth scopes). If a new service was added after the trigger was created, the script may fail until the user re‑authorizes.
- Open Project settings (gear icon) and look at Scopes.
- If you see a warning about "Missing authorization", run any function manually from the editor. You will be prompted to grant the new permissions.
- After granting, test the trigger again.
4. Inspect Execution Transcript and Stackdriver Logs
Apps Script records each run in the Executions panel. This is the fastest way to spot runtime errors.
- In the editor, click Executions (clock with a check mark).
- Filter by the trigger name or by date.
- Look for rows marked Failed. Click to view the error message and the line number.
Common errors include:
- Exception: You do not have permission to call ... – indicates a missing scope or wrong ownership.
- ReferenceError: "myFunction" is not defined – the function name in the trigger does not match any function in the script.
- Quota exceeded – the script hit daily execution limits; consider reducing frequency or using a paid Google Workspace plan.
5. Fix Typical Mistakes
Below are the most frequent pitfalls and how to resolve them.
- Trigger points to a deleted function. Edit the trigger and select the correct function, or delete and recreate the trigger.
- Time‑driven trigger set to a past time. Adjust the schedule to a future hour; Apps Script will not run a trigger scheduled in the past.
- Spreadsheet protected ranges block script writes. Either grant the script editor permission to edit the range or modify the script to write only to allowed cells.
- Multiple owners on a shared drive cause “insufficient permission”. Consolidate ownership to a single user who manages all triggers.
Realistic Example: Daily Sales Summary Sheet
Imagine a small retailer in Pakistan who uses a Google Sheet to collect sales data from a POS system. They want a script that runs every night at 02:00 AM to:
- Copy the day’s rows to a “History” tab.
- Calculate total revenue and write it to a summary cell.
- Email the summary to the manager.
The script works when run manually, but the nightly trigger never fires. Using the steps above, the owner discovers two issues:
- The script was originally created in a personal Drive and later moved to a shared drive. Ownership changed, and the trigger still belonged to the former owner.
- After adding MailApp.sendEmail, a new OAuth scope (https://www.googleapis.com/auth/mail.send) was required, but the owner never re‑authorized.
Solution:
- Transfer ownership back to the current manager (or have the manager recreate the trigger).
- Open the script editor, run any function, and grant the new mail permission.
- Verify the trigger schedule (02:00 AM) and test by clicking Run → Run function → sendDailySummary.
After these fixes, the nightly automation runs without error, and the manager receives the email report each day.
Quick Troubleshooting Checklist
- Is the trigger listed in the Triggers panel?
- Does the trigger point to an existing function name?
- Are you the script owner? If not, request ownership or recreate the trigger.
- Have all required OAuth scopes been authorized?
- Do execution logs show a specific error? Address the error line.
- Is the schedule set to a future time and correct time zone?
- Are any sheet protections or API quotas blocking the script?
FAQs
Can I debug a trigger without running the function manually?
Yes. Use the Executions view to see the exact error message and stack trace. However, running the function manually once forces a fresh authorization prompt, which often resolves permission‑related issues.
Do installable triggers work on a Google Workspace free account?
They do, but free accounts have lower daily quotas (e.g., 90 minutes of total script runtime). If you hit a quota limit, the trigger will be skipped until the quota resets.
Next Steps
Now that you know how to locate and fix trigger problems, you can keep your Sheets automation reliable and avoid costly manual work. If you need a ready‑made workflow, check out our Apps Script ecommerce source‑code package. For custom deployment or complex trigger logic, feel free to contact us for support.