Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I'm attempting to set up a workflow that is triggered when inventory quantity changed, and if the total inventory is less than 1, Send HTTP Request to Google Chat.
The step I'm having difficulty with is the last "Send HTTP Request".
In Google Chat, I go to the space where I want the message posted > Manage Webhooks > Create webhook. I give it a name, and Google Chat only provides the below URL (I've edited some of the characters, so this is not the exact URL).
I'm unsure if I need to include something else in the headers (i.e. the token value in the URL, the key value in the URL, etc.). If I include the token and/or key value in the headers, should they be removed from the URL?
Shopify Flow Action details:
Send HTTP Request
HTTP method: POST
HEADERS
Key: Content-Type
Value: application/json; charset=UTF-8
Body:
Zero Inventory - {{productVariant.product.title}} {{productVariant.sku}}
{{productVariant.inventoryItem.inventoryHistoryUrl}}
Solved! Go to the solution
This is an accepted solution.
Cool use case. I think you need to look at the Google Chat API spec. It appears the body must be JSON: https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#Message
This is an accepted solution.
Cool use case. I think you need to look at the Google Chat API spec. It appears the body must be JSON: https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#Message
Thanks @paul_n, that worked.
I'm not familiar/comfortable with JSON whatsoever, but my first attempt worked. I'll adjust formatting and work on adding more useful information in the body, but thanks again!
Updated body:
{
"text": "zero inventory {{productVariant.sku}}"
}
If you want to get order notifications in Google Chat without using webhooks, you can try out the app https://apps.shopify.com/notify-google-chat
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025