Shopify Legacy Integration

AI agents & LLMs: read this documentation as Markdown at nextblog.ai/docs/integration-shopify-legacy.md or browse the per-section Markdown index.

Shopify Legacy Integration

The Shopify Legacy integration allows you to publish blog posts to your Shopify store using Client ID and Client Secret credentials. This method exchanges your credentials for an access token on each request.
Setting up a new store? Use the current Shopify Integration guide instead.
Prerequisites
Before you begin, make sure you have:
  • A Shopify store with admin access
  • Permission to create custom apps in your Shopify store
  • Admin API access enabled

Step 1: Create Custom App in Shopify

1.1 Navigate to Apps Section
  1. Log into your Shopify admin dashboard
  2. In the left sidebar, click on "Apps"
  3. Scroll down and click "Develop apps" (or "App and sales channel settings" → "Develop apps")
1.2 Create New App
  1. Click the "Create an app" button
  2. Enter an app name: NextBlog Legacy Integration
  3. Enter your email address (optional but recommended)
  4. Click "Create app"
1.3 Configure API Scopes
  1. Click on "Configure Admin API scopes"
  2. Enable the following scopes:
    • write_content - To create blog articles
    • read_content - To read blog information
    • write_files - To upload images (optional)
    • read_files - To read file information (optional)
  3. Click "Save"
1.4 Install the App
  1. Click the "Install app" button at the top of the page
  2. Review the permissions and click "Install" to confirm
  3. Wait for the installation to complete
1.5 Get Your API Credentials
  1. Click on "API credentials" tab
  2. Copy your "Client ID"
  3. Copy your "Client secret"
  4. Important: Save both credentials securely. You'll need them to connect NextBlog to Shopify.

Step 2: Get Your Shopify Store URL

2.1 Find Your Store URL
Your Shopify store URL is in the format: yourstore.myshopify.com
You can find it:
  • In your browser's address bar when logged into Shopify admin
  • In your Shopify admin settings under "Store details"
  • It's the part before .myshopify.com in your store's URL

Step 3: Configure Shopify Legacy Integration in NextBlog

3.1 Navigate to Project Settings
  1. Log into your NextBlog dashboard
  2. Click on your project to open it
  3. Click on "Settings"
3.2 Enable Shopify Legacy Integration
  1. Scroll down to the "Shopify Legacy Integration" section
  2. Toggle the "Enable Shopify Legacy" switch to ON
3.3 Enter Shopify Credentials
Fill in the following fields:
  • Shop URL: Enter your store URL (e.g., mystore.myshopify.com - without https://)
  • Client ID: Paste the Client ID from Step 1.5
  • Client Secret: Paste the Client Secret from Step 1.5
  • Blog ID (Optional): Leave empty to use your store's default blog, or enter a specific blog ID if you have multiple blogs
3.4 Test Connection
  1. Click the "Test Connection" button
  2. Wait for the test to complete
  3. If successful, you'll see a green success message
  4. If it fails, check your credentials and try again
3.5 Save Changes
Click the "Save Changes" button to save your Shopify Legacy integration settings.

How It Works

The Shopify Legacy integration uses the client_credentials OAuth flow:
  1. Post Approval: When you approve a blog post in NextBlog, the Shopify Legacy integration is triggered
  2. Token Exchange: NextBlog exchanges your Client ID and Client Secret for an access token
  3. Content Conversion: The markdown content is converted to HTML format
  4. Article Creation: A new Shopify article is created with your post content
  5. Publishing: The article is published to your Shopify blog and is immediately live

Troubleshooting

Connection Test Fails
Common issues:
  • Incorrect store URL: Make sure you're using the format yourstore.myshopify.com (without https://)
  • Invalid credentials: Make sure you copied both Client ID and Client Secret correctly
  • Missing API scopes: Verify that you enabled the required scopes
  • App not installed: Make sure you installed the app after creating it
Posts Not Publishing
Check the following:
  • Make sure the Shopify Legacy integration is enabled in project settings
  • Verify the connection test passes
  • Check that you're approving posts (not just generating them)
  • Look for error messages in your NextBlog dashboard
  • Check Shopify admin for any failed article attempts

Next Steps

Now that your Shopify Legacy integration is set up:
  • Generate or create a blog post in NextBlog
  • Review and approve the post
  • Check your Shopify blog - the article should appear automatically!
  • Customize the blog appearance in your Shopify theme settings