Published: April 2026 | Category: Shopify - AI Tools - Tutorials
Product documentation matters. If you sell technical products - gear, electronics, supplements, machinery - a PDF spec sheet on the product page is one of the highest-leverage things you can add. It reduces support questions, increases buyer confidence, and gives the customer something to refer back to after the purchase.
The problem is that adding a PDF to a Shopify product page the traditional way is tedious. You upload a file, copy the URL, paste it into the product description as a link, format it, and repeat for every product. If you want it to look good and be manageable from the theme editor, you are looking at custom Liquid code, metafield setup, and a theme edit.
I did all of that with a single prompt to Ninja AI, Molin's AI store manager. It created the PDF, uploaded it to Shopify's CDN, set the metafield on the product, modified the theme to display a download button, and confirmed the file was live. The whole thing took about four minutes.
You can see the result here:

What Ninja Does
For this task, Ninja handles the entire pipeline programmatically via the Shopify Admin API:
Creates a professionally formatted product spec sheet PDF (or uses a file you provide)
Uploads it to Shopify's CDN via the staged upload API
Sets a file_reference metafield (custom.product_pdf) on the product
Adds a custom_pdf block type to your theme's main-product.liquid section
Updates the product.json template to render the block below the description
Verifies the file is live and the button appears on the storefront
No manual file uploads. No copying CDN URLs. No editing Liquid by hand. No touching the theme editor.
The Prompt That Does It
You can be brief or specific. Both work:
Minimal:
Connect to my Shopify store and add a PDF file to the product page at [product-page-url].
With your own file:
Connect to my Shopify store and attach this PDF to the product page at /products/[handle]. Display it as a download button below the description.
With custom button label:
Add a PDF to the product page. Label the button: Download Technical Specifications.
Bulk:
Add a product spec PDF to every product in the Snowboards collection on my Shopify store.
TIP: If you see something that you like you can upload a screenshot to Ninja and it will create a design like on the picture.
Ninja will handle authentication, generate the PDF if you have not provided one, do the upload, set the metafield, and modify the theme. If it needs to authenticate with your Shopify account, it walks you through a device login flow that takes under a minute.
How Ninja Builds the PDF Download
Step 1: Create the PDF
If you do not supply a PDF, Ninja generates one using the product data already in your store, or it can search for the information on the internet. For a snowboard, it produces a spec sheet with technical specifications, a size chart, care instructions, and warranty information. The PDF is clean, structured, and professional.
If you already have a PDF (a supplier spec sheet, a manufacturer document, a brochure), just attach it to your message and tell Ninja to use that file instead.

Step 2: Upload to Shopify Files
Ninja uses Shopify's stagedUploadsCreate mutation to get a signed upload URL, then uploads the PDF directly to Shopify's Google Cloud Storage staging bucket. Once uploaded, it runs the fileCreate mutation to register the file in your Shopify Files library and get the permanent CDN URL.
The file ends up at a stable, permanent Shopify CDN URL. It does not expire, it is fast globally, and it counts against your Shopify Files storage.
Step 3: Set the Product Metafield
Ninja sets a file_reference metafield on the product using the following structure:
Using a file_reference type (rather than storing the URL as plain text) tells Shopify this metafield points to a managed file. Shopify tracks the relationship, so if you delete or replace the file, it knows which products were using it.
Step 4: Modify the Theme
This is where most people get stuck when trying to do it manually. Ninja pulls your live theme, adds a new block type called custom_pdf to sections/main-product.liquid, and adds the block to the product's template JSON.
The Liquid block reads the metafield and renders a styled download button with a PDF icon. The button appears below the product description by default, but because it is a proper theme block, you can reposition it in the Shopify theme editor without touching code.
The theme changes go to your live theme. Ninja uses a targeted push - only the two modified files are uploaded, not the entire theme.
What You Get
When the task is complete:
The PDF is hosted on Shopify's CDN with a permanent URL
The product has a file_reference metafield pointing to the file
The product page shows a Download Product PDF button below the description
The button is a proper theme block - repositionable from the theme editor
The button label is customizable from the theme editor settings panel
The file status progresses through UPLOADED then READY. Ninja waits for READY before linking it to the product, so there is no risk of attaching a file that has not finished processing.

How to Set It Up
1. Connect your Shopify store to Ninja
Go to molin.ai/shop-ai/setup and connect your Shopify store. The free plan is sufficient. Connecting the store gives Ninja direct API access to your product catalog, files, themes, and metafields.
2. Authenticate with Shopify (first time only)
The first time you run a theme-editing task, Ninja will prompt you with a Shopify device authorization URL. You visit the URL, confirm access in your browser, and Ninja completes the token exchange automatically. Your credentials are stored in an encrypted vault and reused for all future tasks.
3. Send Ninja the prompt
Use the prompt format from above. The minimal version is enough for most cases:
Connect to my Shopify store and add a PDF file to the product page at [product page url].
Ninja will confirm what it is doing at each step and show you the final CDN URL when complete.
Frequently Asked Questions
Does this work with all Shopify themes?
Yes. The task targets the main-product.liquid section and the product.json template, which exist in all Shopify 2.0 themes. If you are on a legacy Liquid-only theme, Ninja can inject the download link directly into the product description as a fallback.
Can I use my own PDF instead of a generated one?
Yes. Attach the PDF to your message before sending the prompt. Ninja will upload your file instead of generating one. This is the recommended approach if you already have supplier spec sheets, manufacturer documents, or branded brochures.
Can I add a PDF to multiple products at once?
Yes. You can ask Ninja to add PDFs to all products in a collection, or provide a list of product handles. Ninja will process them sequentially, creating a separate file entry for each product.
Will this affect my other products?
The theme change adds a new block type to main-product.liquid but does not add it to any product template by default. Ninja adds it only to the specific product's template. Other products using a different template are not affected.
Can I change the button label later?
Yes. Because the button is a proper theme block, you can edit the label from Shopify's theme editor without touching code. Go to Online Store, Themes, Customize, navigate to the product page, find the PDF Download block in the sidebar, and change the label there.
Does Ninja work with all Shopify stores?
Yes. Any Shopify store can connect via the Molin app at molin.ai/shop-ai/setup. It takes about two minutes and the free plan is sufficient.
Summary
Generate product spec sheet PDF - AI-generated - Automatic
Upload PDF to Shopify CDN - Shopify Files API - Automatic
Set file_reference metafield on product - Shopify Admin GraphQL - Automatic
Add PDF download block to theme - Liquid + theme push - Automatic
Update product template JSON - Shopify theme API - Automatic
Total: One prompt, under 4 minutes
Try Ninja: ninja.new
Tags: add pdf to shopify product page, shopify product pdf download, shopify pdf metafield, shopify file reference metafield, shopify theme liquid pdf, shopify product documentation, shopify cdn file upload, shopify admin graphql tutorial, ninja ai shopify, molin ai, shopify product page customization, shopify 2.0 theme blocks