Gmail Custom icon

Gmail Custom

Interact with Gmail API with auto-refreshing token

Actions12

Label → Create

AI-generated

Summary

Create a new label in the authenticated user's Gmail account with a specified name.

Inputs

  • Authentication (required) — Choose between auto-refreshing using a refresh token or manually providing a bearer token.
  • Custom Refresh Token — Optionally override the refresh token from credentials when using refresh token authentication.
  • Label Name (required) — Specify the name for the new label to be created.
  • Options — Additional optional parameters, including another custom refresh token override.

Output shape

a single JSON object representing the newly created Gmail label

The created label object is returned in the output JSON. Errors will cause the node to fail unless 'Continue on Fail' is enabled, in which case errors are returned as JSON in the output.

Examples

Example 1: Create a label named 'Important' using OAuth2 refresh token authentication to organize Gmail messages.

Authentication set to 'Refresh Token', 'Label Name' set to 'Important', 'Custom Refresh Token' left empty or supplied as needed.

Discussion