Flow changed and broke and how we fixed it

I don’t know if it was a one off on our flow or not. But we had a flow that in the end was set to update a structured metafield on a company. it’s a simple integer type and had been working fine.

Today we went to test it again (had used it before and worked perfect) and it was erroring. By the error, Shopify flow was attempting to post the value as a list of integers (though it was a single integer in the data, and in the metafield definition)

After a bunch of testing found the solution was to edit the actions to update the metafield and change it to aa different metafield (did an unstructured in our case). Saved the whole flow, then went back and edited the tasks again to update the original metafield. And now it works.

In the end it’s identical to what it was, but something on the Shopify/Plus side had started trying to update with the wrong type and resetting it fixed it.

Just wanted to post in case it helps anyone else out if we aren’t alone.

Something’s not adding up here. If you had a structured metafield, Flow isn’t sending the type (list of ints) at all just the value. And the value is controlled by whatever you put in the field. It would help to see a video of this to better understand what’s happening.

I’m on a plane but will try to post if I can later if I can still get to the logs. The error showed it was trying to send a list type and the log showed the posted data with it as a list type. But the metafield is and always was a single int type.

It was very weird for sure as this is the first I’ve seen this.

Will be landing and getting to my Airbnb for editions and will see what I can get from the error logs and post

@paul_n I’m landed. So looking at the logs (this flow had been dormant for maybe a month as it’s a new store migrating to Shopify Plus). The first recent run was last night and here’s what the log shows.

And here’s the action as it was (and as it is now)

So the action knew it was an integer, the value in the box is an integer, it submitted an integer, but it shows submitting with a list type.

Now when I finally got fixed but setting to a different field and then setting back, here’s the same log entry for the completed one (has a different value as I didn’t do the one last night and so was testing a different company).

So it seems, and maybe I’m wrong but the log shows it submitting a type with the metafield and in the borked runs it had the type wrong. No idea how it changed since we hadn’t modified it and don’t think we even could in that way.

I can’t really do a video since I now have it fixed, and not sure what I’d video since the main issue is all reporting in the run logs.

@paul_n don’t think I can DM it so here you go: https://admin.shopify.com/store/blaircandy/apps/flow/activity/01JWA92K6P0M5G61R51040W004:0195b437-465f-7339-8cb6-a2d7f31fa33e:v2

I see that the type was previously set to “list of ints” in Flow (before the changes today). So it technically was configured wrong in Flow. When you switched it to choose the metafield from the list, it resets the type. It’s possible there was a slight behavior change that happened when Flow updated the metafield tasks recently, where if you had the wrong type the behavior would be different going forward.

I think I would just do what you are doing now. It should just work.

Yeah and it is. It’s just weird as it was working before, then broke. I don’t think we set the type before but yeah something got off. And seemed to have to change it, save and then change back to reset. Just picking another and changing back didn’t do it (though i was trying from bad airplane internet). Just glad it’s working now and wanted people to know you could reset.