Skip to main content

Overview

This use case monitors a user’s Gmail inbox for emails with attachments, saves them to Google Drive, and logs metadata to a Google Sheet. It runs automatically whenever a matching email arrives.

Folder structure

config.ts highlights

Trigger definition (service event)

No inputSchema — service events do not accept user input per execution.

Deployment parameters

Users configure these at install time:

Integration requirements

Each user must connect their own Google accounts. Credentials are per-user via USERCRED placeholders.

Output schema

Workflow pattern

Codika Init (service event mode)

Because this is a service event trigger (not HTTP), Codika Init creates the execution by calling the platform API:

INSTPARM usage in Code nodes

USERCRED credentials

Key patterns demonstrated

  1. Service event trigger — automatic execution on external events
  2. USERCRED — per-user OAuth credentials (each user’s own Gmail/Drive/Sheets)
  3. INSTPARM — deployment parameters configured at install time
  4. Codika Init API mode — creates execution record for non-HTTP triggers
  5. Multiple Google integrations — coordinating Gmail, Drive, and Sheets