update_auto_forwarding
Configure automatic email forwarding in Gmail by setting forwarding address, enabling/disabling the feature, and specifying what happens to original messages after forwarding.
Instructions
Updates automatic forwarding settings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | Whether all incoming mail is automatically forwarded to another address | |
| emailAddress | Yes | Email address to which messages should be automatically forwarded | |
| disposition | Yes | The state in which messages should be left after being forwarded |
Implementation Reference
- src/oauth2.ts:49-65 (helper)Shared helper function that handles OAuth2 authentication, client creation, and executes the Gmail API call provided by the tool handler.const oauth2Client = new OAuth2Client({ clientId: credentials?.clientId, clientSecret: credentials?.clientSecret, redirectUri: `http://localhost:${AUTH_SERVER_PORT}/oauth2callback` }) if (credentials?.refreshToken) oauth2Client.setCredentials({ refresh_token: credentials.refreshToken }) return oauth2Client } catch (error: any) { return null } } export const launchAuthServer = async (oauth2Client: OAuth2Client) => new Promise((resolve, reject) => { const server = http.createServer()