Why are these steps triggering multiple times?

@emmanuel or @josh, I’m trying to better understand workflows running as part of APIs, so I’ve created steps to help log the start and end of the workflows. I’ve noticed that the “log” steps are firing three times in a row, but do not understand why.

Should Bubble understand that it’s already fired that step in the workflow?

My only other thought is that the workflow that’s calling the “create emails” endpoint is calling it three times, but that shouldn’t happen either – and I’ve also logged those steps and only see it being called once.

image

Here’s the workflow.

Strange. Just for troubleshooting, can you call createEmails directly to eliminate a variable?

1 Like

That only creates one “log”, so it must be something in the Parent workflow that calls this “create emails” endpoint.

Step 3 is what is triggering the “create emails” endpoint, but I only see it triggering once in the “logs”.

You have several actions that potentially could call the createEmails, each for a list of things…so it would seem either a) the list in step 3 has three values or b) step 9, 11 or 16 are also getting triggered or c) some combination of these things.

2 Likes

Those other steps (9,11, or 16) were not running/triggered based on the logs. They have “only when” conditions that keep them from firing.

I did find my issue and it was self inflicted. I copied one of the “log” steps from the “create emails” workflow to the “create email images” workflow and forgot to change the log text.

The same image appeared in multiple, related emails, so it’s CID was the same.

1 Like

Copy/paste giveth and taketh away! Been there, done that.

2 Likes