Blog

September 9, 2025·Product

Implement Product Feed for Meta and Google

Shahed Nasser

Shahed  avatar

Shahed Nasser

Learn how to implement a product feed that uploads your products to Meta and Google, and ensures your product data is synced across platforms.

Image modal

Businesses that want to sell on social media platforms like Meta (Instagram and Facebook) and Google need to upload their product catalog from their commerce platform to their social media accounts. They must also keep this data in sync, ensuring correct prices and inventory availability are shown across platforms.

Medusa gives you a digital commerce platform with a built-in Framework for customization. Medusa facilitates building complex workflows and exposing the logic of these workflows to external systems, which is ideal for keeping products in sync with social media platforms.

Implement Product Feed in Medusa

Follow this step-by-step guide

Get Started

How it works under the hood

You can sync your Medusa products to social media platforms using:

1) A workflow that turns your Medusa products into an XML feed. In the workflow's steps, you can retrieve product variant prices, inventory availability, and other custom data like brands and product condition. Then, you can turn that data into the XML format requested by Meta and Google.

import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk"
import { getProductFeedItemsStep } from "./steps/get-product-feed-items"
import { buildProductFieldXmlStep } from "./steps/build-product-field-xml"
type GenerateProductFeedWorkflowInput = {
currency_code: string
country_code: string
}
export const generateProductFeedWorkflow = createWorkflow(
"generate-product-feed",
(input: GenerateProductFeedWorkflowInput) => {
const { items: feedItems } = getProductFeedItemsStep(input)
const xml = buildProductFieldXmlStep({
items: feedItems,
})
return new WorkflowResponse({ xml })
}

2) An API route that exposes the XML product feed to external services. Your Meta and Google business accounts will periodically invoke this API route to update your social media catalogues.

Tutorial: Implement Product Feed in Medusa

This tutorial in our documentation will guide you through building a product feed for social platforms:

  1. Build a workflow that generates an XML product feed.
  2. Expose the XML product feed using an API route.
  3. Set up social media platforms like Meta to pull the products from the XML feed.

Share this post

Ready to build your custom commerce setup?