I’m having trouble connecting a Webhook to a Google Pub/Sub topic, directly from Shopify, not an app. I’m using the webhookSubscriptionCreate mutation in the Admin API to create the webook. I’m getting this error:
invalid url 'pubsub://aerobic-form-381218:ShopifyWebhooks'
I can create a webhook to an https:// endpoint with no problem.
I believe the format of the URI is supposed to be:
pubsub://project:topic
I assume those are the Google project ID (or name) and Google topic name? No matter what combinations of those I try I’m getting the same error message.
I believe the permissions are set correctly on the Google topic, see screen shot below.
Any ideas?
I got around this by using the deprecated pubSubWebhookSubscriptionCreate mutation. The documentation still refers to Google Pub/Sub as the recommended approach, so hope that means that only the pubSubWebhookSubscriptionCreate mutation is deprecated, not the facility itself.
Does anyone know for sure?
Hi Mitchell,
We’re in the process of consolidating all of the webhookSubsciption mutations: so to use Google Pub/Sub, up to the latest version (2025-07) you have to use pubSubWebhookSubscriptionCreate and then starting from the next versions (2025-10), you can use webhookSubscriptionCreate but with the uri field for the WebhookSubscriptionInput: the previous callbackUrl field is being deprecated ( not visible yet in the doc but we’re working on making it more obvious WebhookSubscriptionInput - GraphQL Admin)
I hope this helps!