Gmail Custom icon

Gmail Custom

Interact with Gmail API with auto-refreshing token

Actions12

Message → Delete

AI-generated

Summary

Delete a specific Gmail message by its ID using the Gmail API with either automatic token refresh or manual bearer token authentication.

Inputs

  • Authentication (required) — Choose authentication method: 'Refresh Token (Auto-Refresh)' to use credentials with auto-refresh or 'Bearer Token (Manual)' to provide a manual token.
  • Custom Refresh Token — Optionally override the refresh token from credentials when using auto-refresh authentication.
  • Message ID (required) — The ID of the Gmail message to delete.

Output shape

a single JSON object indicating success and echoing the deleted message ID

The output is an object containing { success: true, messageId: '' } on successful deletion. Errors will throw unless 'Continue On Fail' is enabled, in which case an error object will be returned for that item.

Examples

Example 1: Delete a Gmail message with automatic token refresh

Set Authentication to 'Refresh Token (Auto-Refresh)', provide the Message ID, and optionally specify a custom refresh token if needed.

Example 2: Delete a Gmail message with manual bearer token

Set Authentication to 'Bearer Token (Manual)', provide the Message ID, and supply the bearer token in credentials.

Discussion