Skip to content

Create Workflows With AI Assistants

JsWorkflows can connect to AI assistants through MCP, the Model Context Protocol. After connecting, an assistant such as ChatGPT, Claude, Codex CLI, or Claude Code can use JsWorkflows tools to help create and maintain workflows.

This is useful when you want to describe an automation in plain language and have the assistant write the workflow code, validate it, and create or update the workflow in JsWorkflows for review.

The AI assistant connects to the JsWorkflows app. It does not connect directly to your Shopify store through the JsWorkflows MCP connector.

This video shows how to connect ChatGPT to the JsWorkflows MCP server with OAuth, then use ChatGPT to create a demo workflow in JsWorkflows.

With the JsWorkflows MCP connector, an AI assistant can:

  • search JsWorkflows documentation and API guidance
  • list supported workflow trigger topics
  • inspect sample webhook payloads
  • write workflow code from a merchant or developer request
  • validate workflow code before saving
  • create new inactive workflows
  • update existing workflows for review
  • preserve existing trigger resources when updating an existing workflow
  • list, read, and delete workflows when you ask it to

The assistant should still leave activation under your control. Review the workflow, required setup values, and any extra Shopify access scopes before turning it on.

You can connect JsWorkflows to:

  • ChatGPT
  • Claude Desktop or Claude.ai
  • Codex CLI
  • Claude Code
  • other MCP-capable clients that support Streamable HTTP with OAuth

The in-app setup pages are available from:

  • Create workflow → AI assistants
  • Settings → AI integrations

Use this OAuth MCP URL when adding JsWorkflows to an AI assistant:

https://mcp.jsworkflows.com/oauth/mcp

OAuth is the recommended connection method. Use the OAuth MCP URL exactly as shown. When the assistant or MCP client supports OAuth, leave bearer token and custom header fields empty.

  1. Open the JsWorkflows setup page for the assistant you want to use.
  2. Add JsWorkflows as a custom MCP connector using the OAuth MCP URL.
  3. When the browser authorization page opens, generate a fresh one-time code in JsWorkflows.
  4. Paste the one-time code into the authorization page.
  5. Finish the authorization flow, then start a new AI conversation or restart the CLI session so the tools are loaded.

Add JsWorkflows as a remote MCP server:

Terminal window
codex mcp add jsworkflows --url https://mcp.jsworkflows.com/oauth/mcp
codex mcp login jsworkflows --scopes workflows.manage

If Codex opens the browser authorization page during the add command, generate the JsWorkflows connection code at that time. If you authorize again later, generate a new code.

Add JsWorkflows as an HTTP MCP server:

Terminal window
claude mcp add --transport http jsworkflows https://mcp.jsworkflows.com/oauth/mcp

Claude Code will open the browser authorization page. Paste a freshly generated JsWorkflows connection code when prompted.

Use Streamable HTTP transport and the OAuth MCP URL:

https://mcp.jsworkflows.com/oauth/mcp

If the client supports OAuth, leave bearer token and custom authentication headers empty.

Many JsWorkflows workflows call Shopify Admin APIs or need exact store resource IDs such as collection IDs, product IDs, publication IDs, location IDs, market IDs, or inventory item IDs.

For those workflows, the best result comes from using a Shopify connector or Shopify API tooling in the same AI assistant session, when available.

Official Shopify setup links:

  • Connecting AI tools to Shopify explains Shopify’s AI tool options, including the Shopify apps for ChatGPT and Claude and the Shopify CLI connector for local AI tools.
  • Shopify AI Toolkit Dev MCP server explains how to add Shopify’s Dev MCP server for Shopify API documentation and schema-aware development help.

Use Shopify tooling to:

  • inspect the current Shopify Admin GraphQL schema
  • avoid deprecated Shopify API fields
  • validate final Shopify GraphQL queries and mutations
  • resolve live store resource IDs from merchant-provided names, handles, SKUs, tags, or order numbers
  • determine the explicit Shopify OAuth scopes required by the workflow

If Shopify tooling is not available, the assistant should not invent Shopify GIDs. Use one of these fallbacks instead:

  • provide the exact Shopify GIDs yourself
  • let the assistant create an inactive workflow with visible setup values in the workflow configuration
  • keep placeholders in config.js with clear setup notes

Use AI assistants as a generate-and-review workflow, not as an automatic activation system.

  1. Describe the automation you want.
  2. Ask the assistant to use JsWorkflows tools and Shopify tooling, when available.
  3. Review the generated workflow code, setup fields, notes, and required scopes in JsWorkflows.
  4. Add any required Shopify scopes shown by JsWorkflows.
  5. Run a test when the trigger supports testing.
  6. Turn on the workflow only after review.

For existing workflows, ask the assistant to update the existing workflow. It should not create new trigger resources such as new webhook subscriptions, new HTTP endpoints, or new email trigger addresses when applying an update to an existing workflow.

Start with a precise prompt that tells the assistant what should happen, when it should run, and what data it should change or report.

Examples:

Create a JsWorkflows scheduled workflow that emails a daily summary of paid orders over $500.
Create a JsWorkflows Shopify webhook workflow that tags a product when all variants are out of stock. Use Shopify schema validation before creating it.
Review this existing JsWorkflows workflow for deprecated Shopify GraphQL fields, fix the code, validate it, and update the workflow.
Create a JsWorkflows email-trigger workflow that reads an attached CSV file and updates inventory in batches.
Create a JsWorkflows scheduled workflow that imports inventory from a public CSV URL and updates inventory in batches.
Use the Shopify connector to find the collection named Sale, then create a JsWorkflows workflow that adds matching products to that collection. Do not invent IDs if the connector is unavailable.

Before turning on an AI-created workflow, check:

  • the trigger type and trigger topic
  • whether the workflow is inactive until you approve it
  • any configuration values exposed in the setup form
  • any config.js placeholders that still need real values
  • additional Shopify scopes shown by JsWorkflows
  • Shopify GraphQL queries and mutations, especially mutations that change store data
  • retry and batching behavior for imports or large updates
  • logs from a test run, when testing is available

For Shopify webhook workflows, duplicate webhook deliveries can happen. Use api.dedupe() when duplicate processing would cause duplicate writes, duplicate emails, or repeated side effects.

For HTTP-triggered workflows, dedupe is optional. Use it only when the incoming payload has a stable ID or when duplicate HTTP requests would be harmful.

The assistant cannot see JsWorkflows tools

Section titled “The assistant cannot see JsWorkflows tools”

Reconnect the MCP connector, complete OAuth again, then start a new conversation or restart the CLI session. Some assistants load tools only when a new session starts.

Generate a new one-time code in JsWorkflows and paste it into the authorization page again.

The assistant guesses Shopify GraphQL fields

Section titled “The assistant guesses Shopify GraphQL fields”

Tell it to use Shopify schema validation or Shopify API tooling before saving. If Shopify tooling is unavailable, ask it to leave placeholders or setup notes instead of guessing.

Use an authorized Shopify connector to look up the IDs, or provide exact Shopify GIDs yourself. If neither is available, create an inactive workflow with clear setup fields or placeholders.

Start a fresh focused conversation for the workflow. For code-heavy work, Codex CLI or Claude Code can be useful because they can work from your local project files and keep the prompt focused on the workflow task.