Skip to main content
Question

Issues with adding tasks and nested loops in Copilot

  • December 25, 2024
  • 9 replies
  • 21 views

I was talking with Copilot about adding tasks outside the loop (after it) but its instructions let me to add an extra nested loop.

 

Is this right? I think no, because Zapier blocks the option to add an additional loop from menu.

 

 

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7492 replies
  • January 2, 2025

Hi ​@mgomez4geeks, welcome to the Community! 🎉

I was talking with Copilot about adding tasks outside the loop (after it) but its instructions let me to add an extra nested loop.

Is this right? I think no, because Zapier blocks the option to add an additional loop from menu.

You’re correct, nested loops aren’t supported:

cd8b25cf311aa04efc2587682606154a.png

I suspect there may some sort of bug that’s allowing it to create that nested Looping action. 🤔 So I’d recommend reaching out to our Support team so this can be investigated further. You can get in touch with them here: https://zapier.com/app/get-help. And I’d also recommend deleting that nested Looping action as you won’t be able to turn the Zap on if there’s more than one Looping action.

In the meantime, I’d be happy to offer some help in getting the Zap set up. Can you share some further details about the workflow you’re trying to build? For example what tasks are you sending to the Sub-Zap? And what other tasks need to be run both before and inside the loop? If you can share some screenshots showing all the trigger and action steps in the Zap and in the Sub-Zap that will help to give us a bit more context on the current set up so we can help you. Make sure to blur or remove all personal information (names, emails, addresses etc.) from screenshots before sharing - you can use a tool like Zappy for that.

Looking forward to hearing from you! 🙂


  • Author
  • Beginner
  • 5 replies
  • January 2, 2025

Thanks for your reply.

Firstly, I want to clarify I was not trying to generate a double-loop I just noticed that, haha.

 

I am trying to process a list of students related to a cohort using a sub-zap that receives the cohort id, retrieves the students data from Notion and then, using a loop processes the students one-by-one, to create a new deal in an ActiveCampaign’s pipeline.  My original questions to copilot was oriented do figure out how to use the Return from sub-zap action when I have a loop in the workflow, like trying to continue the workflow after (and outside) the loop to put the return at the end, or add additional actions, also.

 

Currently, the solution I have found has been to have the Return action before the loop (and this is working) but I don’t know if there is a better approach.

 

 

Happy new year!


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7492 replies
  • January 3, 2025

Happy new year to you too, ​@mgomez4geeks! 😁

I am trying to process a list of students related to a cohort using a sub-zap that receives the cohort id, retrieves the students data from Notion and then, using a loop processes the students one-by-one, to create a new deal in an ActiveCampaign’s pipeline.  My original questions to copilot was oriented do figure out how to use the Return from sub-zap action when I have a loop in the workflow, like trying to continue the workflow after (and outside) the loop to put the return at the end, or add additional actions, also.

What actions does the Sub-Zap contain? If it’s just a search action it’s running to find the student’s details in Notion perhaps that search action could instead be added to the loop so that when the Zap runs through each student, it searches Notion to get the necessary student data and then creates a new deal in ActiveCampaign.

Currently, the solution I have found has been to have the Return action before the loop (and this is working) but I don’t know if there is a better approach.

That would be the correct way to do it as you can’t put a loop before a Return from Sub-Zap action:

883e7e7f6f1dd70fe3e9fadfb6c67c0b.png
That said, if you were to move the search action from the Sub-Zap directly into the loop then you wouldn’t need to use a Return from Sub-Zap action. 

Hope that helps! Let me know if you have any further questions.


  • Author
  • Beginner
  • 5 replies
  • January 3, 2025

The Sub Zap doesn’t need to return something back to the main Zap, that’s why that solution works for me. But, I wanted to send a last message to hour Slack account to confirm that everything was done successfully. That’s the only thing I have not been able to achieve due to the characteristics of the Zapier’s Loops.


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7492 replies
  • January 6, 2025

Thanks for clarifying that, ​@mgomez4geeks.

If you’re wanting to send out a Slack message on the last loop then you could add a filter and set it up to check that the Loop Iteration is Last field (from the Looping action) matches (Boolean) Is true.

For example:

a7b8cbf44e88b864f02020846695181c.png

That would ensure that the filter action would be run for every loop but would only pass on the last loop iteration and send the Slack message.

Can you give that a try and let us know how you get on?


  • Author
  • Beginner
  • 5 replies
  • January 7, 2025

Oh, great! A question about that: This filter at this point in the workflow, will be counted as a task in every iteration? O just the Slack message when it run it?


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7492 replies
  • January 8, 2025

Great question, ​@mgomez4geeks! I’m happy to confirm that filters, as well as looping actions, do not count towards your task usage at all. So even if the filter is passed it would only be the the Slack action that uses a task, not the filter as well.

You can see the full list of apps can don’t count towards your task usage here: What does not count toward task usage? 😁 


  • Author
  • Beginner
  • 5 replies
  • January 8, 2025

Thank you for everything :-) 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7492 replies
  • January 8, 2025

You are very welcome, ​@mgomez4geeks! 🤗