Error - sending duplicate emails

Options

I imported a flow successfully. I tested it and it sent many many emails. The first email sent exactly what I expected and then each subsequent email added those gifts again and again and again. And it was never ending. I then recreated the flow using the tutorial for that import so that I would know exactly which actions I was using, because the import had renamed a bunch of things. Unlike my first attempt, in which each email repeated a group of gifts, on my second attempt, email 1 contained gift 1, email 2 contained gift 1 and 2, etc. It kept adding one gift until it got through all 16 gifts that I expected. What am I missing? Where did I go wrong?

6333731271eeed58e70b8711475a4b2c-huge-fl
2c1c4d7744c5a4bf999ac66c72aaac3e-huge-fl
093702646388c3ae5f2136695a99fc4c-huge-fl
dee2b45044d38dddf1c6c96f7263dd49-huge-fl

Comments

  • Hey @Chelsea Hanson, you just need to add an action at the end of your Apply to Each loop to reset your array variable to an empty array. Right now, you're appending each gift to the array variable through each loop. Use the Set Variable action and set the array to [].

  • Thanks, @Matt Thacker. I think I did this correctly, but I still got multiple emails - each with one gift instead of one email with all the gifts. How do I get one email?

    da8f017597957a9b2191cf6bd84cf42a-huge-im

  • @Chelsea Hanson- I believe the Set Variable goes inside your loop. So put it right after the Append to Array variable. This way it will reset each time it loops around each gift.

    Everything else looks correct.

Categories