Configure Gmail push notifications with Google PubSub
Automated Setup: If you ran inbox-zero setup-google, the Pub/Sub topic and subscription were created automatically. Skip to the “For local development” section below.
Complete Google OAuth first.PubSub enables real-time email notifications so Inbox Zero is notified immediately when new emails arrive.
Gmail needs permission to send notifications to your topic. This is the step that allows Google’s servers to push email events into your Pub/Sub topic.
Click your topic name to open it.
Go to the Permissions tab (you may see it labeled “Info Panel” on the right side — look for the “Permissions” section).
Click Add Principal.
In the “New principals” field, enter: gmail-api-push@system.gserviceaccount.com
In the “Role” dropdown, select Pub/Sub Publisher.
Click Save.
gmail-api-push@system.gserviceaccount.com is Google’s service account that sends Gmail push notifications. This is not your account — it’s a Google-managed service account used by the Gmail API. See the official docs for more details.
3. Create a push subscription
In your topic, go to the Subscriptions tab.
Click Create Subscription.
Set the Delivery type to Push.
Set the Endpoint URL to: https://yourdomain.com/api/google/webhook?token=TOKEN
Click Create.
4. Update your environment variables
Set these in your .env file:
GOOGLE_PUBSUB_TOPIC_NAME — the full topic name (e.g., projects/your-project-id/topics/inbox-zero-emails)
GOOGLE_PUBSUB_VERIFICATION_TOKEN — the value of TOKEN you used in the webhook URL above
If your deployment protects /api/google/webhook with upstream authentication, you can set GOOGLE_PUBSUB_VERIFICATION_TOKEN to an empty string to intentionally disable query-parameter verification. Leaving it unset is treated as a misconfiguration.
For local development
Use ngrok to expose your local server:
ngrok http 3000
Then update the webhook endpoint in the Google PubSub subscriptions dashboard to use your ngrok URL (e.g., https://abc123.ngrok.io/api/google/webhook?token=TOKEN).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Inbox Zero Documentation","colors":{"primary":"#2563eb","light":"#60a5fa","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/inboxzero/DdfmrevgGKRNBfeU/logo/light.svg?fit=max\u0026auto=format\u0026n=DdfmrevgGKRNBfeU\u0026q=85\u0026s=81151059779000ba0fadf8efae6d3ae3","dark":"https://mintcdn.com/inboxzero/DdfmrevgGKRNBfeU/logo/dark.svg?fit=max\u0026auto=format\u0026n=DdfmrevgGKRNBfeU\u0026q=85\u0026s=6fe089ef0fc981122cb19493db6de4b9"},"favicon":"https://mintcdn.com/inboxzero/wagtDAhDWuhi4Pvs/favicon.png?fit=max\u0026auto=format\u0026n=wagtDAhDWuhi4Pvs\u0026q=85\u0026s=eaad4618bb3e0339dbd09779b3e1687c","api":{"openapi":"openapi.json"},"navbar":{"links":[{"href":"mailto:support@getinboxzero.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://www.getinboxzero.com/welcome"}},"footer":{"socials":{"twitter":"https://www.getinboxzero.com/twitter","github":"https://www.getinboxzero.com/github","linkedin":"https://www.getinboxzero.com/linkedin"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"},{"anchor":"Community","icon":"discord","href":"https://getinboxzero.com/discord"},{"anchor":"Blog","icon":"newspaper","href":"https://www.getinboxzero.com/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"inboxzero","hasAudioNarration":false,"actualSubdomain":"inboxzero","customDomains":["docs.getinboxzero.com"],"gitSource":{"type":"github","owner":"elie222","repo":"inbox-zero","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b059432c0d388d6513523c6","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"Developers","count":36},{"language":"default","tag":"Documentation","count":32},{"language":"default","tag":"API","count":11},{"language":"default","tag":"Self-Hosting","count":8},{"language":"default","tag":"Assistant \u0026 Automation","count":6},{"language":"default","tag":"Setup Guides","count":6},{"language":"default","tag":"Channels \u0026 Integrations","count":4},{"language":"default","tag":"Early Access","count":4},{"language":"default","tag":"Safety \u0026 Help","count":4},{"language":"default","tag":"AWS Deployment","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"hosting/google-pubsub","slug":"/hosting/google-pubsub","pageMetadata":{"title":"Google PubSub","description":"Configure Gmail push notifications with Google PubSub","href":"/hosting/google-pubsub"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Configure Gmail push notifications with Google PubSub\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Automated Setup:`}),` If you ran `,_jsx(_components.code,{children:`inbox-zero setup-google`}),`, the Pub/Sub topic and subscription were created automatically. Skip to the “For local development” section below.`]})}),`\n`,_jsxs(_components.p,{children:[`Complete `,_jsx(_components.a,{href:`/hosting/google-oauth`,children:`Google OAuth`}),` first.`]}),`\n`,_jsx(_components.p,{children:`PubSub enables real-time email notifications so Inbox Zero is notified immediately when new emails arrive.`}),`\n`,_jsx(Heading,{level:`3`,id:`1-create-a-topic`,children:`1. Create a topic`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to the `,_jsx(_components.a,{href:`https://console.cloud.google.com/cloudpubsub/topic/list`,children:`Pub/Sub Topics page`}),` in Google Cloud Console.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create Topic`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Enter a topic ID (e.g., `,_jsx(_components.code,{children:`inbox-zero-emails`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-grant-gmail-publish-access`,children:`2. Grant Gmail publish access`}),`\n`,_jsx(_components.p,{children:`Gmail needs permission to send notifications to your topic. This is the step that allows Google’s servers to push email events into your Pub/Sub topic.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Click your topic name to open it.`}),`\n`,_jsxs(_components.li,{children:[`Go to the `,_jsx(_components.strong,{children:`Permissions`}),` tab (you may see it labeled “Info Panel” on the right side — look for the “Permissions” section).`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Add Principal`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In the “New principals” field, enter: `,_jsx(_components.code,{children:`gmail-api-push@system.gserviceaccount.com`})]}),`\n`,_jsxs(_components.li,{children:[`In the “Role” dropdown, select `,_jsx(_components.strong,{children:`Pub/Sub Publisher`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`}),`.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`gmail-api-push@system.gserviceaccount.com`}),` is Google’s service account that sends Gmail push notifications. This is not your account — it’s a Google-managed service account used by the Gmail API. See the `,_jsx(_components.a,{href:`https://developers.google.com/gmail/api/guides/push#grant_publish_rights_on_your_topic`,children:`official docs`}),` for more details.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`3-create-a-push-subscription`,children:`3. Create a push subscription`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In your topic, go to the `,_jsx(_components.strong,{children:`Subscriptions`}),` tab.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create Subscription`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set the `,_jsx(_components.strong,{children:`Delivery type`}),` to `,_jsx(_components.strong,{children:`Push`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set the `,_jsx(_components.strong,{children:`Endpoint URL`}),` to: `,_jsx(_components.code,{children:`https://yourdomain.com/api/google/webhook?token=TOKEN`})]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`4-update-your-environment-variables`,children:`4. Update your environment variables`}),`\n`,_jsxs(_components.p,{children:[`Set these in your `,_jsx(_components.code,{children:`.env`}),` file:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GOOGLE_PUBSUB_TOPIC_NAME`}),` — the full topic name (e.g., `,_jsx(_components.code,{children:`projects/your-project-id/topics/inbox-zero-emails`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GOOGLE_PUBSUB_VERIFICATION_TOKEN`}),` — the value of `,_jsx(_components.code,{children:`TOKEN`}),` you used in the webhook URL above`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If your deployment protects `,_jsx(_components.code,{children:`/api/google/webhook`}),` with upstream authentication, you can set `,_jsx(_components.code,{children:`GOOGLE_PUBSUB_VERIFICATION_TOKEN`}),` to an empty string to intentionally disable query-parameter verification. Leaving it unset is treated as a misconfiguration.`]}),`\n`,_jsx(Heading,{level:`3`,id:`for-local-development`,children:`For local development`}),`\n`,_jsx(_components.p,{children:`Use ngrok to expose your local server:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ngrok`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3000`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Then update the webhook endpoint in the `,_jsx(_components.a,{href:`https://console.cloud.google.com/cloudpubsub/subscription/list`,children:`Google PubSub subscriptions dashboard`}),` to use your ngrok URL (e.g., `,_jsx(_components.code,{children:`https://abc123.ngrok.io/api/google/webhook?token=TOKEN`}),`).`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Google PubSub","description":"Configure Gmail push notifications with Google PubSub","href":"/hosting/google-pubsub"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Create a topic","slug":"1-create-a-topic","depth":3,"children":[]},{"title":"2. Grant Gmail publish access","slug":"2-grant-gmail-publish-access","depth":3,"children":[]},{"title":"3. Create a push subscription","slug":"3-create-a-push-subscription","depth":3,"children":[]},{"title":"4. Update your environment variables","slug":"4-update-your-environment-variables","depth":3,"children":[]},{"title":"For local development","slug":"for-local-development","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"inboxzero","siteName":"Inbox Zero Documentation","title":"Google PubSub - Inbox Zero Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-03T11:17:44.002Z","originalFileLocation":"hosting/google-pubsub.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Configure Gmail push notifications with Google PubSub\">\u003cmeta data-mint-head name=\"application-name\" content=\"Inbox Zero Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Google PubSub - Inbox Zero Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure Gmail push notifications with Google PubSub\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Inbox Zero Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getinboxzero.com/hosting/google-pubsub\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://inboxzero.mintlify.site/_mintlify/api/og/v2?division=Setup+Guides\u0026amp;title=Google+PubSub\u0026amp;description=Configure+Gmail+push+notifications+with+Google+PubSub\u0026amp;theme=4663a26da0160d9209c6eb4e\u0026amp;signature=7f43d204e867e173b14fbf55483329d8a57649050a6883111ac65bddc25e8da2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Google PubSub - Inbox Zero Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure Gmail push notifications with Google PubSub\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://inboxzero.mintlify.site/_mintlify/api/og/v2?division=Setup+Guides\u0026amp;title=Google+PubSub\u0026amp;description=Configure+Gmail+push+notifications+with+Google+PubSub\u0026amp;theme=4663a26da0160d9209c6eb4e\u0026amp;signature=7f43d204e867e173b14fbf55483329d8a57649050a6883111ac65bddc25e8da2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/inboxzero/IQcRpnjUMR6zhHwi/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Inbox Zero Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getinboxzero.com/hosting/google-pubsub\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/hosting/google-pubsub.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getinboxzero.com/#organization\",\"name\":\"Inbox Zero Documentation\",\"url\":\"https://docs.getinboxzero.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/inboxzero/DdfmrevgGKRNBfeU/logo/light.svg?fit=max\u0026auto=format\u0026n=DdfmrevgGKRNBfeU\u0026q=85\u0026s=81151059779000ba0fadf8efae6d3ae3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getinboxzero.com#website\",\"name\":\"Inbox Zero Documentation\",\"url\":\"https://docs.getinboxzero.com\",\"publisher\":{\"@id\":\"https://docs.getinboxzero.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getinboxzero.com/hosting/google-pubsub#webpage\",\"url\":\"https://docs.getinboxzero.com/hosting/google-pubsub\",\"name\":\"Google PubSub\",\"description\":\"Configure Gmail push notifications with Google PubSub\",\"dateModified\":\"2026-04-03T11:17:44.002Z\",\"isPartOf\":{\"@id\":\"https://docs.getinboxzero.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getinboxzero.com/hosting/google-pubsub#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getinboxzero.com/hosting/google-pubsub#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Setup Guides\",\"item\":\"https://docs.getinboxzero.com/hosting/setup-guides\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Google PubSub\",\"item\":\"https://docs.getinboxzero.com/hosting/google-pubsub\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.getinboxzero.com/hosting/google-pubsub#article\",\"headline\":\"Google PubSub\",\"name\":\"Google PubSub\",\"description\":\"Configure Gmail push notifications with Google PubSub\",\"url\":\"https://docs.getinboxzero.com/hosting/google-pubsub\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getinboxzero.com/hosting/google-pubsub#webpage\"},\"dateModified\":\"2026-04-03T11:17:44.002Z\",\"publisher\":{\"@id\":\"https://docs.getinboxzero.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getinboxzero.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Inbox Zero Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Inbox Zero Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/hosting/google-pubsub.md","siteName":"Inbox Zero Documentation","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"},{"anchor":"Community","icon":"discord","href":"https://getinboxzero.com/discord"},{"anchor":"Blog","icon":"newspaper","href":"https://www.getinboxzero.com/blog"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/introduction"}]},{"anchor":"Developers","icon":"code","groups":[{"group":"Quick Start","pages":[{"title":"Quick Start","href":"/hosting/quick-start"},{"title":"Self-Hosting Setup CLI","icon":"terminal","href":"/hosting/setup-cli-reference"}]},{"group":"Setup Guides","pages":[{"title":"Overview","href":"/hosting/setup-guides"},{"title":"Google OAuth","description":"Configure Google OAuth credentials, scopes, and required APIs","href":"/hosting/google-oauth"},{"title":"Google PubSub","href":"/hosting/google-pubsub"},{"title":"Microsoft OAuth","description":"Configure Azure app registration and Microsoft Graph permissions","href":"/hosting/microsoft-oauth"},{"title":"Enterprise SSO and SCIM","href":"/hosting/sso"},{"title":"LLM","href":"/hosting/llm-setup"}]},{"group":"Self-Hosting","pages":[{"title":"Docker/VPS Deployment Guide","href":"/hosting/self-hosting"},{"title":"Environment Variables","href":"/hosting/environment-variables"},{"title":"Production Operations","icon":"server","href":"/hosting/production-operations"},{"title":"Security Hardening","icon":"lock","href":"/hosting/security-hardening"},{"title":"Vercel Deployment","href":"/hosting/vercel"},{"title":"Kubernetes Deployment","href":"/hosting/kubernetes"},{"title":"Troubleshooting","href":"/hosting/troubleshooting"},{"title":"Image Proxy","href":"/hosting/image-proxy"}]},{"group":"AWS Deployment","pages":[{"title":"AWS Deployment","href":"/hosting/aws"},{"title":"EC2 Deployment","href":"/hosting/ec2-deployment"},{"title":"Terraform Deployment","href":"/hosting/terraform"},{"title":"Copilot Deployment","href":"/hosting/aws-copilot"}]},{"group":"GCP Deployment","pages":[{"title":"GCP + Cloudflare Tunnel","href":"/hosting/gcp-cloudflare-tunnel"}]},{"group":"Contributing","pages":[{"title":"Contributing","href":"/contributing"}]},{"group":"Integrations","pages":[{"title":"Slack Integration Setup","href":"/slack/setup"},{"title":"Microsoft Teams Integration Setup","href":"/teams/setup"},{"title":"Telegram Integration Setup","href":"/telegram/setup"}]},{"group":"API","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"CLI","href":"/api-reference/cli"},{"title":"MCP server","href":"/api-reference/mcp"},{"title":"Get stats by period","openapi":"GET /stats/by-period","href":"/api-reference/endpoint/get-statsby-period"},{"title":"Get stats response time","openapi":"GET /stats/response-time","href":"/api-reference/endpoint/get-statsresponse-time"},{"title":"List rules","openapi":"GET /rules","href":"/api-reference/endpoint/get-rules"},{"title":"Create rule","openapi":"POST /rules","href":"/api-reference/endpoint/post-rules"},{"title":"Get rule","openapi":"GET /rules/{id}","href":"/api-reference/endpoint/get-rules-id"},{"title":"Update rule","openapi":"PUT /rules/{id}","href":"/api-reference/endpoint/put-rules-id"},{"title":"Delete rule","openapi":"DELETE /rules/{id}","href":"/api-reference/endpoint/delete-rules-id"},{"title":"Unsubscribe sender","openapi":"POST /senders/unsubscribe","href":"/api-reference/endpoint/post-senders-unsubscribe"}]}]}]},"basePath":"","title":"Google PubSub - Inbox Zero Documentation","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":[],"chunks":[]}