Testing Workflows with `urlParams`

Problem

I want to be able to test my workflow in the Retool Editor with urlParams

This is the startTrigger but it only provides a method for setting data
startTrigger

Also, referencing the startTrigger doesn't even hint that urlParams is a property we can use :frowning:
missing

Current Method

As far as I know, this is the only way to test your workflow with urlParams

  1. Set the trigger as webhook
  2. Copy the cURL
  3. Append the test params
  4. curl -X POST --url "https://api.retool.com/v1/workflows/<GUID>/startTrigger?taco=bell
  5. Inspect in the Editor the last run
    taco

Proposed Solution

Add some key/value boxes, or another JSON input field to let us add test urlParams values for validating the behavior of our workflow while staying in the Editor.

Hi @khill-fbmc,
You are correct in that the startTrigger doesn't even hint that urlParams is a property. However, when I tested it as startTrigger.urlParams, it still worked!

You can see in my test workflow we do get the intended taco bell!

which is actually the urlParams you see in the run history.

Correct, but how did you test that? did you use curl?

I tested it via an external http request in make.com.

This is confirming my original post, that there is no native way in Retool to test a workflow with urlParams.

I feel like it would reduce friction and benefit users to keep testing a workflow all in Retool. No using an external tool, or service, or pasting in copied curls...

My Dream

I would love a way in the editor, to set startTrigger.urlParams for test runs, the same way you can set values for tests in startTrigger.data. Then we click Run and test.

2 Likes

Ok, got it. That would save time for sure.

I will +1 that if you put in a feature request. :slight_smile:

1 Like

I just logged this feedback internally - a feature like this would definitely be convenient. :+1:

I'll provide an update here as soon as I have news to share!

1 Like

YOU BEAUTIFUL PEOPLE! :tada:

2 Likes

You beat me to it, @khill-fbmc! We rolled this out with the release of version 3.193.0 - there's a quick blurb about the feature here. Definitely let us know if you run into any issues!

Hello there,

I followed the discussion, but I still have issues with this.

I can test correctly using pathParams in the Workflow editor, but when I test the public endpoint and add a URL parameter (i.e., ?id=13 appended to the URL), the pathParams object turns empty, and the hidden urlParams gets the correct value.

Here is the log by invoking the URL:

So, testing in the editor is possible if the code references pathParams while the published endpoint works by referencing urlParams.

As a workaround, I use something like {{ startTrigger?.pathParams?.id || startTrigger?.urlParams?.id }} in the code/query that needs to reference it.

Is it expected behavior?
Or am I missing something?

Many thanks.