PipedreamHQ / PipedreamHQ/pipedream

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

Open
#10,342 4 comments 0 reactions 0 assignees View on GitHub
bug tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**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](https://github.com/PipedreamHQ/pipedream/assets/101526248/075dbcaa-c6db-4b24-9e39-2ddaa5d213d7)

**Desktop (please complete the following information):**
- OS: Windows 11 Home Single Language
- Version: 10.0.22621 N/A Build 22621
- Browser Edge
- Version 121.0.2277.112 (Official build) (64-bit)

**Additional context**
This occured when tackling [memphis.dev](https://pipedream.com/submit-an-app/memphis_dev?tab=auth-strategy)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.