Dynamic Endpoint Reply

Hi there,

I am trying to make a dynamic QR Code redirect application that allows a webhook with query parameters to redirect to different websites based upon the query parameters. Currently, the webhook is structured as follows: https://[webhookURL]?variable=1. Based on the variable number, the workflow grabs a row from a table with a redirect URL.

The workflow works with a hardcoded redirect URL without a data node:


The issue I have come across is that placing any Data node prior to the Endpoint Reply node causes the workflow to timeout and the webhook to never redirect:

Does anyone know of possible causes or explanations?

Hi @Ryan_Logsdon and welcome to the Losant Forums.

First, I see you are using an Endpoint Reply Node instead of a Webhook Reply Node; luckily the two are actually interchangeable minus some extra helpers we add to the config. That said I would still recommend switching to the Webhook Reply Node for your own readability.

As to your issue, my best guess is that the Reply Node cannot find the replyId on your payload. I bet you are either …

  • Overwriting the entire payload, or the entire data object (where the replyId exists as a property), with the result of your Table: Get Nows Node, in which case the Reply Node cannot find that necessary unique ID at its default path of data.replyId. Or …
  • You are configuring the Reply Node to find the Reply ID at a path on the payload where it does not actually exist.

If the first thing I mentioned is the culprit, I recommend storing your result at a different path; whenever I develop workflows, I try to leave the initial payload intact - in this specific case, the data object - and do any extension or enhancement of the payload under a different root-level property (usually working).

Let me know if that resolves your issue, and once again, welcome to Losant!

Overwriting the data path in the payload was the issue, thank you!