Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] How to run workflow multiple times for different users? #416

Open
mwysocki-smartrecruiters opened this issue Feb 21, 2025 · 3 comments
Labels
question Further information is requested

Comments

@mwysocki-smartrecruiters

How to run workflow multiple times for different users?

I have a Schedule Trigger which runs a Workflow for particular, hardcoded user.
I would like to run it for all the users from the array of user ids.

I have tried to create non parametric Workflow which iterates over users by adding steps dynamically but steps run serially and steps intended for different users block each other.

I have also tried to create an array of triggers in the Trigger definition file but addition of trigger creates only the first one.

Thanks for support

@mroy-seedbox
Copy link

Just trigger a separate workflow via webhook trigger for each user.

@mroy-seedbox
Copy link

As for the triggers, modules only support one default export, therefore there can only be one trigger per file (and one file is required per trigger).

But it you have one file with your list of triggers, you could do something like this in the other files:

import triggers from "./many_triggers.ts";

export default triggers.one_of_them;
// Or: export default triggers[0];

@WilliamBergamin WilliamBergamin added the question Further information is requested label Feb 21, 2025
@WilliamBergamin
Copy link
Contributor

@mroy-seedbox thank you for answering 💯 🥇 , @mwysocki-smartrecruiters let us know if this resolves your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants