Unable to Pass Dynamic Text (Job Description & Resume) to OpenAI Plugin – Always Returns Generic Response

Hi everyone,

I’m integrating OpenAI’s GPT-4 API using Bubble’s API Connector (Plugin), and I’m facing an issue where dynamic parameters (job_description and resume_text) are not being recognized properly when passed through the request body.


:wrench: Setup Summary:

  • API method: POST to https://api.openai.com/v1/chat/completions
  • Headers:
    • Authorization: Bearer sk-...
    • Content-Type: application/json
  • Plugin is set up with two dynamic body parameters:
    • job_description (text)
    • resume_text (text)
  • JSON body:

json

CopyEdit

{
  "model": "gpt-4-turbo",
  "messages": [
    {
      "role": "system",
      "content": "You are an AI interviewer. Generate relevant questions using the provided information."
    },
    {
      "role": "user",
      "content": "**Job Description:**\n\n<job_description>\n\n**Candidate Resume:**\n\n<resume_text>\n\nUse this information to generate tailored interview questions."
    }
  ],
  "max_tokens": 700
}

:white_check_mark: What works:

  • The backend workflow runs successfully.
  • Job description and resume text do show up in the server logs as expected.
  • OpenAI receives the request and responds.

:cross_mark: The issue: Despite passing both parameters, the GPT-4 response is always generic — saying something like:

“Please provide a job description and resume to generate tailored questions…”

It’s as if <job_description> and <resume_text> are not being substituted at runtime, or are being received as empty or null values by OpenAI, even though logs show values exist.


:red_question_mark:What I’ve tried:

  • Ensured Content-Type is application/json
  • Used <parameter> syntax properly inside the JSON body
  • Tried removing and re-adding parameters
  • Made sure body parameters are not marked as “private” or “allow blank”
  • Verified that long text inputs are well under token limits
  • Tested in both backend workflow and API Connector test call

:sos_button: What I need help with:

  • Is this a Bubble bug with plugin dynamic variable resolution?
  • Is there a better way to pass multi-line long-form text dynamically to OpenAI via a plugin?
  • Any tricks to force evaluation of <dynamic_value> inside JSON without it being treated literally?

Appreciate any guidance from the community :folded_hands:

Hey @fatema.dhankot :waving_hand:

What does your API Connector look like? Also, what does your workflow action look like? I am sure there is something simple that will fix this for you. :blush:

Have you tried to use Debugger if the actions are happening in the frontend, or logs if the actions are happening in the backend? As the API error message said, for some reason, it is not receiving the text to be analyzed. Also, I recommend always finding and replacing “Breakline” to “\n” and " " " to " ’ ’ "