Recursive webhook

i’m trying to create a webhook to retrieve all group members of the group and also the members of the subgroups. I only need the list of members, no need of the subgroups information. During the execution, there is a IF node to split a flow for groups and members. In case of a group is found, there is a http call to the same webhook to check the members of the subgroup.
The informations retrieved from google api, is stored in a google sheets.
It’s working but it’s not optimised. For example, a group containing 5 subgroups, will execute 18 webhook calls instead of 5 (number of subgroups).
Below a picture of the workflow. Any ideas wow can to optimise this workflow?

Thanks in advance!

Hi @mxp, based on the screenshot I am not sure which API endpoint exactly you’re calling. Are you calling{groupKey}/members (documented here)?

If so you could consider sending the includeDerivedMembership=true query parameter to also fetch members of nested groups without having to query these sub-groups individually through additional workflow executions.

1 Like

Hi MutedJam,
thank you, your solution solves my problem!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.