I'm pretty new to Jira automation, so hopefully this is easy. I would like to create an automation that would link stories and tasks together based on certain criteria, within an epic.
For example, in Epic 1, let's say Stories are created, "iOS Story 1", "iOS Story 2", and "iOS Story 3". I then create a task called "QA: iOS". I would like each of the iOS stories be linked to the QA iOS task (something like with the relationship of, "must be completed before", i.e. the stories must be completed before the QA task can begin).
Ideally, I'd like this to work both ways: if the above is all complete, and then someone adds an "iOS Story 4", the automation would run and link itself to the "QA: iOS" task.
I would also like this same automation to work for other epics going forward, so I can't link to any specific epic.
What I've tried so far:
- Branch > "For Stories (or other issues in epic)" - this seems to be what I want, but I can't get this to work at all.

- When I use the above, then create a task called "QA: iOS", nothing happens - it does not link to the other stories in the epic with "iOS" in the summary.
- Simply using the "Then: Link issue to" is much more straightforward; however, I don't know which issue to link it to. I'm not sure "Trigger issue" would make sense (wouldn't that link to itself?); I can enter in a specific issue key and that works, but I can't use that as I want this rule to apply to all epics going forward (but only run within one epic at a time). Is there a way to use JQL or other smart search to say, "find any issues in the same epic as the trigger issue, with 'iOS' in the summary"?
I would like it to look like this in the end, when creating either the "QA" task or any of the "iOS" stories:

I will be doing the same for other platforms, so it will always be "QA" in the task and then either "iOS," "Android", or "Web" to find the corresponding stories.