PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.76k stars 5.26k forks source link

[BUG] Submit an app UI doesn't evalute custom expressions when you add raw JSON in the request body #10342

Open sergio-eliot-rodriguez opened 7 months ago

sergio-eliot-rodriguez commented 7 months ago

Describe the bug

Entering raw JSON instead of key/value pears in a request config doesn't evaluate expressions containing custom fields. The custom field expression is sent instead "as is" instead of the values held by the custom field variables.

To Reproduce Steps to reproduce the behavior:

  1. Go to the submit an app UI.
  2. Fill the Basic Info tab, and define at least one custom field in section "Custom Fields"
  3. In "Authentication Strategy", select Oauth strategy prepare an access token request that uses the POST http method. In the "body" tab, hit "Edit Raw JSON"
  4. In the text area, enter JSON where one of the properties uses a the custom field from 2) such as
    {
    "username": "{{custom_fields.username}}"
    }
  5. Hit "Test", and in the custom field enter "hello" Expected behavior The resulting payload should be { "username": "hello" } But notice that instead you get { "username": "{{custom_fields.username}}" } Screenshots image

Desktop (please complete the following information):

Additional context This occured when tackling memphis.dev

dylburger commented 7 months ago

This should be completed! Please let us know if you see any issues

dannyroosevelt commented 7 months ago

@sergio-eliot-rodriguez can you give this another try? We shipped a fix yesterday!

sergio-eliot-rodriguez commented 7 months ago

Yes, it's working now. Thanks!

malexanderlim commented 3 weeks ago

It looks like the bug has regressed - this appears to work for OAuth still, but fails for key-based apps.