Close out a sandbox when its Drive source is deleted
When a source file is removed, a workflow can terminate the sandbox tied to that work, helping keep unneeded runtimes from lingering.
Trigger
File Deleted or Trashed
Triggers when a file is moved to trash or permanently deleted in Drive.
Action
Delete Sandbox
Tool to terminate and permanently delete a running E2B sandbox instance. Use when you need to kill a sandbox that is no longer needed. Once terminated, the sandbox cannot be resumed.
Why this helps
Discarded project files can leave related compute sandboxes running until someone remembers to clean them up.
- Tie a deletion event to a sandbox cleanup decision
- Reduce manual runtime cleanup
- Include the termination result in the run report
Setup
Build it in a few focused steps.
- 1Connect Google Drive and E2B once in the Notis portal.
- 2Create an automation in Automations, New Automation, and give it a name.
- 3In one instruction, tell Notis how to identify the sandbox associated with the deleted file and confirm it is safe to terminate.
- 4Choose the Google Drive File Deleted or Trashed trigger and select where run reports should go.
- 5Test with one real deletion event and review the run report.
Questions about this workflow
Can a deleted sandbox be resumed?
No. Delete Sandbox permanently terminates the instance and it cannot be resumed. Use this only when the association and cleanup decision are clear.
Does the event cover both trash and permanent deletion?
Yes. The listed event fires when a file is moved to trash or permanently deleted in Drive.
When this happens · Trigger
Do this · Action
Supported Triggers and Actions
Notis builds workflows that link Google Drive to E2b. A trigger fires from one place; an action lands in another.
Google Drive triggers
E2b actions
Recurring trigger
Notis starts this workflow on a schedule, such as daily, weekly, or during business hours.
Connect to Sandbox
Tool to connect to an existing E2B sandbox and retrieve its details. Use when you need to reconnect to a sandbox from different environments or resume a paused sandbox. The TTL is extended upon connection.
Webhook trigger
Notis starts this workflow when an external tool or custom backend sends an HTTP request.
Create Template
Tool to create a new E2B template with specified configuration. Use when you need to define a new sandbox template that can be used to spawn sandbox environments.
Comment Added (Docs/Sheets/Slides)
Triggers when a new comment is added to Google Docs, Sheets, or Slides.
Create Webhook
Tool to register a new webhook to receive sandbox lifecycle events for the team. Use when you need to set up notifications for sandbox lifecycle events such as creation, updates, or termination.
File Created
Triggers when a new file is created in Google Drive.
Delete Sandbox
Tool to terminate and permanently delete a running E2B sandbox instance. Use when you need to kill a sandbox that is no longer needed. Once terminated, the sandbox cannot be resumed.
File Deleted or Trashed
Triggers when a file is moved to trash or permanently deleted in Drive.
Delete Webhook
Tool to unregister a webhook and stop receiving lifecycle events. Use when you need to remove a webhook that is no longer needed or to clean up webhook registrations.
File Shared (Permissions Added)
Triggers when new sharing permissions are granted to a file or folder. Uses Drive's `changes.list` endpoint with inline `permissions` in the `fields` mask so each change carries the file's current permission set provider-atomically. We diff that against `seen_permission_keys` to identify newly added grants. Drive page tokens are the primary cursor; if Drive rejects a stored token, the trigger raises `PollingTriggerError` without clearing state rather than silently re-baselining and dropping events. Limitation: truly ephemeral permissions (added and revoked between two polls without any other file modification in between) are not detected. Drive Activity API would catch those but requires an additional OAuth scope and a different payload contract.
Check API Health
Tool to check the health status of the E2B API. Use when you need to verify that the API service is operational and accessible.
File Updated
Triggers when a file's metadata or content changes in Google Drive.
Get Sandbox
Tool to retrieve detailed information about a specific sandbox by its ID. Use when you need to check sandbox status, metadata, or configuration details.
Google Drive Changes
Triggers when changes are detected in a Google Drive.
Get Sandbox Logs
Tool to retrieve logs from a specific E2B sandbox instance. Use when you need to debug or monitor sandbox execution by viewing its console output and system logs.
Connect any two apps with Notis in the middle.
Google Drive and E2b, or any other combination from 1,000+ integrations.
When this happens · Trigger
Do this · Action
Save your first hour today.
7-day trial of any paid plan, with 20$ of usage included.
No card. Works with personal or business E2b.