N8n AI Agent Returns Wrong Shopify Order Data (ManyChat Integration) – Need Help Debugging

Hi everyone,

I built a workflow in n8n that integrates ManyChat with Shopify to allow users to check their order status automatically.

The workflow asks the user for an order number, then the AI agent searches Shopify and returns the order details.

However, I am facing an issue where the workflow executes successfully but returns incorrect information.

Here is what happens:

  • The user sends an order number in ManyChat.

  • The workflow runs successfully in n8n.

  • But the AI agent responds that it cannot find the order, even though the order exists.

Interestingly, the same order number worked correctly one week ago, and the workflow returned the correct order details.

When I checked the execution logs:

  • The workflow runs successfully.

  • It fetches some orders from Shopify.

  • But it does not return the specific order that the user provided.

It looks like the system may be:

  • Fetching only a limited number of recent orders

  • Or not filtering correctly based on the order number.

I have attached a Loom video showing the full workflow execution and the issue.

I would really appreciate any suggestions on:

  • What might be causing this issue

  • Whether this could be a limit in the Shopify node

  • Or if the AI filtering logic is incorrect

Thank you in advance for your help!

1 Like

Hi @Samar_Abbas this can happen because of the Shopify node likely only fetching limited set of recent orders and without actually filtering orders, what i would do instead of using AI agent is that, just query shopify directly for a specific order number using HTTP node to call Shopify API and just by passing the exact order ID and then there would be no need for an AI agent.

1 Like

Hi @Samar_Abbas,

Anshul is right, the AI agent is likely fetching a paginated list of recent orders and then trying to match from that limited set, which breaks for older orders.

Skip the AI filtering entirely and query Shopify directly with an HTTP Request node

The name parameter searches by the order number the customer sees (e.g. #1234). Add status=any to include fulfilled and closed orders. without it Shopify only returns open orders, which is likely why orders that worked a week ago are now “not found” (they’ve since been fulfilled).

1 Like

@Anshul_Namdev @houda_ben Thank you for your reply and the helpful explanation. It would be very helpful if you could share a short Loom video, a YouTube video link, or any documentation showing how to set this up. That would help me understand the exact steps and implement it correctly on my side.

1 Like

@Samar_Abbas this would be a great job opportunity in the below section: