Shopify Integration Guide

Last updated:

Overview

The Shopify integration enables you to publish blog articles from tryMarketr directly to your Shopify store's blog using the Shopify Admin API. This is ideal for managing your store's content marketing from tryMarketr.

Prerequisites

  • Shopify store (any plan)
  • Admin access to your Shopify store
  • Ability to create custom apps
  • Existing blog in your Shopify store

Setup Guide

Step 1: Create a Custom App

  1. Log into your Shopify admin dashboard
  2. Navigate to Settings (bottom left)
  3. Click Apps and sales channels
  4. Click Develop apps (or "Develop apps for your store")
  5. If prompted, click Allow custom app development
  6. Click Create an app
  7. Enter app name: tryMarketr
  8. Click Create app

Step 2: Configure API Scopes

  1. In your newly created app, click Configuration tab
  2. Scroll to Admin API integration
  3. Click Configure
  4. Under Admin API access scopes, select:
    • read_content - Read blog articles
    • write_content - Create/edit blog articles
  5. Click Save

Step 3: Install App and Get Access Token

  1. Click Install app button
  2. Confirm the installation
  3. You'll see the Admin API access token
  4. Click Reveal token once
  5. Copy the token (starts with shpat_)

Important

The access token is shown only once. Save it immediately in a secure location. If you lose it, you'll need to uninstall and reinstall the app.

Step 4: Find Your Blog ID

  1. In Shopify admin, go to Online Store → Blog posts
  2. Click on your blog name (e.g., "News")
  3. Look at the URL in your browser
  4. The Blog ID is the number after /blogs/
  5. Example URL: https://admin.shopify.com/store/mystore/blog_posts?blog_id=123456789
  6. In this example, the Blog ID is 123456789

Step 5: Configure in tryMarketr

  1. In tryMarketr, navigate to Integrations
  2. Click Add Integration
  3. Enter a display name (e.g., "My Shopify Store Blog")
  4. Select Shopify as the platform
  5. Fill in the required fields:
    • Store URL: Your store URL (e.g., https://mystore.myshopify.com)
    • Admin API Access Token: From Step 3
    • Blog ID: From Step 4
  6. Click Create Integration
  7. Click Test Connection to verify

API Reference

Authentication

Shopify uses Access Token authentication via the X-Shopify-Access-Token header.

X-Shopify-Access-Token: shpat_...

API Endpoints Used

Validate Credentials

GET /admin/api/2024-01/shop.json

Verifies access token and retrieves shop information.

Create Blog Article

POST /admin/api/2024-01/blogs/{blog_id}/articles.json

Publishes a new article to your Shopify blog.

Update Blog Article

PUT /admin/api/2024-01/blogs/{blog_id}/articles/{article_id}.json

Updates an existing blog article.

Delete Blog Article

DELETE /admin/api/2024-01/blogs/{blog_id}/articles/{article_id}.json

Removes an article from your blog.

Required API Scopes

  • read_content - Required to read blog information
  • write_content - Required to create, update, and delete articles

API Version

tryMarketr uses Shopify Admin API 2024-01.

Troubleshooting

Error: "Invalid access token"

The access token is incorrect or has been revoked.

Solution: Verify you copied the complete access token. If the token was lost or revoked, uninstall and reinstall the custom app to generate a new token.

Error: "Insufficient permissions"

The app doesn't have the required API scopes.

Solution: Go to your custom app configuration and ensure both read_content and write_content scopes are enabled.

Error: "Blog not found"

The Blog ID is incorrect or the blog doesn't exist.

Solution: Double-check the Blog ID from your Shopify admin URL. If you deleted and recreated a blog, the ID will have changed.

Error: "Store URL invalid"

The store URL format is incorrect.

Solution: Use your full myshopify.com URL (e.g., https://mystore.myshopify.com). Do not use your custom domain.

Multiple Blogs

Shopify stores can have multiple blogs.

Note: Each integration in tryMarketr connects to one specific blog. To publish to multiple Shopify blogs, create separate integrations with different Blog IDs.

Advanced Features

SEO and Meta Tags

Shopify automatically generates SEO-friendly meta tags from your article title and content. You can customize these in Shopify after publishing.

Article Visibility

Articles are published immediately and visible to customers. Future updates may support draft status.

Featured Images

Hero images from tryMarketr are automatically set as the article's featured image in Shopify.

Custom Domains

For the Store URL field, always use your .myshopify.com URL, not your custom domain. The published articles will automatically use your custom domain if configured in Shopify.