ResumeWebhookURL with state from user selection choices in email

I want to execute a decision tree that is like the following:

  1. Trigger based on kafka events (destructive high winds reported by user)

  2. Check nearby sensors and see if it is likely true.

    a) If the sensors indicate that it is likely true then call an endpoint

    b) if the sensors indicate that it is not likely true send an email to that user and ask one question with three answers (x,y,z). The user would click on the answer and then distinct branches of the workflow would be executed for each option.

I realize that you can trigger a work flow from kafka as well as wait for a webhook url to be called (say from an email) but I want to know if you can offer choices which can then be set into the state and then perform if/switch type decisions in the workflow based on responses.

So basically the question comes down to can resumeWebhookUrl carry state back to the app based on the choice of a user.

Hi @Bradley_Asztalos, welcome to the community :tada:

Yes, you can pass on information to $execution.resumeUrl. The simplest way would probably be the use of query parameters, like so:

This workflow sends a message like this (obviously you can make this much nicer using proper email templates if you want):

image

The Wait node webhook would then receive a query parameter of “answer” when one of the links is clicked:

This parameter is then processed by the subsequent IF node.

1 Like