Hi guys.
I am creating a workflow. In that workflow, I need to wait for a webhook to fire and if the workflow fires action 1 happens and if it doesn’t, action 2 happens.
How can I implement this?
I would appreciate it if anyone can help me.
Does step 1 of your workflow trigger the 2nd step (waiting for the webhook)? So is it creating something then you’re waiting the the webhook to see when it’s ready, or something like that?
Let me know because the use case makes a difference.
What I would do considering the limited information is just create two workflows. The webhook just try triggers a second workflow entirely. To check if it was received within a range I would use the n8n searching and ifs that i supplied. You will need to ideally have the external webhook come back with a reference to the execution ID that called it. That way you can more reliably check the time of the first execution without needing to filter get requests (which you could do with some other identifiable info like an ID in the last step of the first step workflow)
Note: this will work as is with two triggers in one workflow but referencing workflow executions will likely be easier if they are separate, since each trigger will show up as a separate execution but would share the same workflow id.
Thanks for your help and answer.
Here is the scenario that I want to happen for a user.
I have a course on my site and if a user finishes each lesson, a webhook can be called.
There are 3 lessons and I want to ensure users are reminded to watch each lesson.
This use case would be better suited for a workflow on a schedule
For examples sake, lets say you want to send reminder emails every morning and afternoon and you want to remind people if it’s been more than 2 days since they last completed something.
I would use this workflow
You will need to change a lot about this workflow depending on what your site/cms is like, if it’s even possible. If it is possible to query that info and you need help making it work in the workflow, then feel free to share the json it returns and i’ll help you make it work
You should probably also add in some logic to make sure you aren’t sending people the same email twice every day if it’s past two days, so keep that in mind