1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AIエージェントでGASを監視・継続実行する

1
Last updated at Posted at 2026-07-13

Google Apps Script(GAS)のログはどこで確認していますか?

Logger.log()console.log() の出力は Apps Scriptエディタの「実行ログ」で確認できますが、開発・デバッグ向けで検索性が低く、短時間しか保持されません。
スプレッドシートへログを書き出す方法もありますが、シート容量や書き込み性能、同時更新などがボトルネックになります。

おすすめは、GASを標準のGoogle Cloudプロジェクトに紐づける方法です。
ログをCloud LoggingのLogs Explorerから検索・絞り込みできるようになり、AIエージェントからの監視や分析も容易になります。

GASは1回あたり最大6分しか実行できませんが、clasp などで外部からGAS関数を実行できます。
処理を小さな単位に分割し、PropertiesやFirestoreなどに処理位置を保存して、再実行しても問題が起きないように設計しておけば、下のような長時間のワークフローをすべてAIエージェントに任せられます。

・GASを実行
・Cloud Loggingで進捗やエラーを確認
・失敗原因を分析してコード修正、再デプロイ
・GASを再実行

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?