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.
Watch the walkthrough
Section titled “Watch the walkthrough”This video shows how to connect ChatGPT to the JsWorkflows MCP server with OAuth, then use ChatGPT to create a demo workflow in JsWorkflows.
What the assistant can do
Section titled “What the assistant can do”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.
Supported AI assistant options
Section titled “Supported AI assistant options”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
Connect with OAuth
Section titled “Connect with OAuth”Use this OAuth MCP URL when adding JsWorkflows to an AI assistant:
https://mcp.jsworkflows.com/oauth/mcpOAuth 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.
- Open the JsWorkflows setup page for the assistant you want to use.
- Add JsWorkflows as a custom MCP connector using the OAuth MCP URL.
- When the browser authorization page opens, generate a fresh one-time code in JsWorkflows.
- Paste the one-time code into the authorization page.
- Finish the authorization flow, then start a new AI conversation or restart the CLI session so the tools are loaded.
Codex CLI setup
Section titled “Codex CLI setup”Add JsWorkflows as a remote MCP server:
codex mcp add jsworkflows --url https://mcp.jsworkflows.com/oauth/mcpcodex mcp login jsworkflows --scopes workflows.manageIf 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.
Claude Code setup
Section titled “Claude Code setup”Add JsWorkflows as an HTTP MCP server:
claude mcp add --transport http jsworkflows https://mcp.jsworkflows.com/oauth/mcpClaude Code will open the browser authorization page. Paste a freshly generated JsWorkflows connection code when prompted.
Other MCP clients
Section titled “Other MCP clients”Use Streamable HTTP transport and the OAuth MCP URL:
https://mcp.jsworkflows.com/oauth/mcpIf the client supports OAuth, leave bearer token and custom authentication headers empty.
Add Shopify API tooling when available
Section titled “Add Shopify API tooling when available”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.jswith clear setup notes
Recommended workflow process
Section titled “Recommended workflow process”Use AI assistants as a generate-and-review workflow, not as an automatic activation system.
- Describe the automation you want.
- Ask the assistant to use JsWorkflows tools and Shopify tooling, when available.
- Review the generated workflow code, setup fields, notes, and required scopes in JsWorkflows.
- Add any required Shopify scopes shown by JsWorkflows.
- Run a test when the trigger supports testing.
- 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.
Good prompts
Section titled “Good prompts”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.What to review before activation
Section titled “What to review before activation”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.jsplaceholders 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.
Troubleshooting
Section titled “Troubleshooting”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.
The authorization code expired
Section titled “The authorization code expired”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.
The workflow needs store-specific IDs
Section titled “The workflow needs store-specific IDs”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.
The conversation becomes too large
Section titled “The conversation becomes too large”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.