Shopify Flow Trigger Extension - Turn On WorkFlow Error

Topic summary

A developer encountered persistent errors when attempting to activate a Shopify Flow trigger extension, despite successful deployment and proper configuration. The trigger appeared correctly in the Flow interface and app settings, but consistently failed with an error message when trying to turn on the workflow.

Key troubleshooting attempts:

  • Verified TOML configuration with multiple field types
  • Tested with minimal configuration (single field)
  • Deleted and regenerated extensions from scratch
  • Confirmed built-in Shopify triggers worked normally

Root cause identified:
The issue stemmed from a trigger discovery webhook extension not being properly configured. When activating a trigger, Shopify calls this webhook and only activates if it receives the correct response from the app.

Resolution:
Developers need to properly implement the trigger discovery webhook as documented in Shopify’s lifecycle events tracking guide. Another user reported the same error and confirmed this solution worked.

Additional recommendations:

  • Avoid changing extension handles after running shopify app dev
  • Use customer resource types instead of hard-coded customer_id fields for better merchant usability
  • Delete and re-add triggers in workflows after making changes to ensure version compatibility
Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

I have created a Shopify Flow Trigger app extension.
My toml file looks like this:

[[extensions]]
name = "Subscription Paused"
type = "flow_trigger"
handle = "subscription-paused"
description = "Your description"

[settings]

   [[settings.fields]]
 type = "single_line_text_field"
 key = "Metric"

 [[settings.fields]]
 type = "single_line_text_field"
 key = "Customer First Name"

  [[settings.fields]]
 type = "single_line_text_field"
 key = "Customer Last Name"

  [[settings.fields]]
 type = "single_line_text_field"
 key = "Customer Email"

  [[settings.fields]]
 type = "single_line_text_field"
 key = "Customer Phone"

  [[settings.fields]]
 type = "single_line_text_field"
 key = "Customer Id"

  [[settings.fields]]
 type = "single_line_text_field"
 key = "Subscription Id"

   [[settings.fields]]
 type = "single_line_text_field"
 key = "Pause Reason"

   [[settings.fields]]
 type = "single_line_text_field"
 key = "Pause Details"

 [[settings.fields]]
 type = "number_decimal"
 key = "Total Subscription Orders"

   [[settings.fields]]
 type = "single_line_text_field"
 key = "Subscription Paused Date"

All the extension commands have worked properly with both the npm run dev, and the npm run deploy commands, and i got no errors.

On the app settings page, I can see the extension with the proper handle in the extension settings page.

In the Shopify Flow app I can see the trigger just fine as well, but when I try to create a test action based off the trigger, in this case using Flows “Log Output” action to just log a basic message (I also can see all the variables as options I can log from what I provided in my config)

But when I go to create the Workflow to make it active so I can actually test it I get this error over and over again.

To sanity check I tried creating a flow with one of the built in Shopify Triggers/actions, and it built the workflow just fine.

Im really at a loss here, and have run out of ideas to debug, as it appears im doing everything by the books, and that I expect this to be working. Ive been testing all of this on a Dev Shop as well.

Thanks

2 Likes

Did you change your handle after you ran shopify app dev? If so, you may want to try generating another extension and copy your configuration over to that, but with a different handle.

Also, you may want to think a bit more about the trigger fields you are adding there. Adding a hard-coded customer_id is generally not a good idea as it’s hard to use. If you specify that as customer resource, then merchants can immediately access data from the Shopify API related to that customer.

You can also create objects for each of the resource types, which might eliminate the need to say “Customer first name”, etc. Something like

  • Customer
    • id
    • first name
    • last name
    • email
    • phone

That said, are you sending new customer data that is different from Shopify? If not, then you could just pass the customer_id as a “commerce object” into Flow and all of that data (and more) will be already accessible.

I did not, and just to test it I did try generating it brand new from scratch and am getting the same error.

Thanks, that makes sense. I was going to tweak that data portion more once i get the workflow to actually work, there is additional custom data that our app will be sending as well though, so its not just shopify specific data.

1 Like

Did you try deleting the trigger out of the workflow and re-adding the latest? What happens is that once you add a trigger to the workflow, it fixes the version. So if you change that trigger and come back, it will no longer work. Definitely a rough edge of the DevX right now.

Weird - didn’t run into this when setting up my recent triggers. I doubt the indentation would be an issue in your toml file. Might be worth removing all but one of those fields just as a simpler test.

Maybe, I assumed that was copy and paste artifact. I’m not sure how TOML handles indentation. But I suspect the issue is a version mismatch, which is hard to spot because Flow doesn’t show the version in the UI

Yeah, pretty strange. Alright so I removed all of the settings fields except for one, and fixed indentation as well, and I am still not able to turn on the workflow. I should note that the end goal on my side is to have 11 different triggers, and I went ahead and created them all at once, even though I am only testing the one trigger currently. I wonder if it could have something to do with other triggers being broken, and disrupting this one. Either way I’m going to start completely fresh on these trigger extensions and see if i can get just one trigger with just one settings field to work.

Alright really at a loss here. I deleted every trigger extension entirely. Restarted everything, double checked my app settings > extensions to confirm everything was deleted. Double checkted Flow, confirmed all triggers for my app were gone. Then i generated one Flow extension, I changed nothing on the toml at all, except for editing the default single_line settings.field they start you with, and I changed the key on it to “Metric”.

[[extensions]]
name = "Pause trigger"
type = "flow_trigger"
handle = "pause-trigger"
description = "Your description"

[settings]

  [[settings.fields]]
  type = "customer_reference"

  [[settings.fields]]
  type = "single_line_text_field"
  key = "Metric"

Again I can see this trigger perfectly in my app settings > extensions, and I can see it perfectly in Shopify Flow, when i go to choose a trigger. I choose the new one I created, and I set it up to do the Action of “Log Output” from the built in Flow Actions available to me, and I have it log out the customer email.

When I then choose “turn on workflow” I get the exact same error.

Can you DM me your email address or contact us at flow-connectors-dev@shopify.com ?

I get same error. Did you resolve this issue?

Did you change your handle after running dev or deploy? That can cause problems as it’s the ID for the task.

To fix, I’d suggest deleting the task out of the editor and then replacing it with the new task. This is basically because you workflow is referencing something that doesn’t exist any more.

Yes, I did many time, but not working

Thanks, that console/network tells the issue. You have a trigger discovery webhook extension set up, but you likely don’t have it correctly configured. So when you try to activate this trigger, it calls that webhook and only activates if it gets the right response from your app.

1 Like

https://shopify.dev/docs/apps/build/flow/track-lifecycle-events

Thanks you very much!

1 Like