Pass a URL into a Doppelganger task via API

Hello - very impressed with doppelganger! :clinking_beer_mugs:

TL;DR
I’m running Activepieces (self-hosted) and triggering a task/agent in my self-hosted Doppelganger instance via POST /tasks/:id/api using an API key. Platform-to-platform communication/auth works fine (I get 200 responses and logs back), but I cannot get a dynamic target URL to pass through correctly so the agent navigates to it.

Goal:
send something like https://example.test.io/page/123 from Activepieces → Dopplerganger so the agent opens that link and runs actions.

What I’ve tried:

  • Created a Variables (Injectable) entry in the task (ex: url and query)

  • Sent request bodies using both formats:

    • { "variables": { "url": "https://example.test.io/page/123" } }
    • { "taskVariables": { "url": "https://example.test.io/page/123" } }
  • Tried multiple template syntaxes in the task URL / navigation target:

    • {{url}}, {url}, {{variables.url}}, {{.variables.url}}

What happens:

  • The agent fails with Playwright navigation errors because it tries to navigate to the literal string (ex: "{{url}}", "{url}", "{{variables.url}}") instead of the actual link.
  • In some runs it navigates to a blank/newline URL ("\n") or ends at about:blank, and then all selectors fail due to no page content.

Ask:
What is the correct way to pass a URL into a Doppelganger task via API and reference it inside the task so page.goto() uses the injected value? Is there a specific supported template syntax or required request body format for overriding task variables used in navigation?

Hey there! It’s great to see you’re enjoying Doppelganger and getting some good use out of the platform.

Regarding your question on the forum, it looks like the issue is just a slight syntax mix-up. For referencing injected variables in your task navigation or steps, you should use the {$var} syntax. Using the double curly braces {{var}} is likely why the agent is attempting to navigate to the literal string rather than the value you’re passing through the API.

Try updating your navigation target to {$url} and see if that clears up those Playwright errors!

1 Like

Ah yes… a syntax tax.
Paid in full. {$url} works immediately :joy:
Appreciate you!

The ‘syntax tax’ gets the best of us! Happy to help. Looking forward to seeing what else you build with Doppelganger.