Google sheets employee + https openrouter

:bullseye: What is your goal?

retrieve empoyee informations on google sheets , send to openrouter to ask some hr insight

:thinking: What is the problem & what have you tried?

Google sheets: get range values ( for reading all the table with employees informations )
Array aggregator: aggregated files are the column and i selected all
http post with this input: {
“model”: “openai/gpt-4o-mini”,
“messages”: [
{
“role”: “system”,
“content”: “Sei un HR analyst esperto. Analizza i dati e fornisci insight sintetici.”
},
{
“role”: “user”,
“content”: “Analizza questi dati: {{7.array}}”
}
]
}

:clipboard: Error messages or input/output bundles

Error in HTTPS is: The provided JSON body content is not valid JSON.
Expected ‘,’ or ‘}’ after property value in JSON at position 259

Input in http: ody contentLong String
{
“model”: “openai/gpt-4o-mini”,
“messages”: [
{
“role”: “system”,
“content”: “Sei un HR analyst esperto. Analizza i dati e fornisci insight sintetici.”
},
{
“role”: “user”,
“content”: “Analizza questi dati: {“0”:“CID”,“1”:“Matricola”,“2”:“Società”,“3”:“In Forza”,“4”:“Sesso”,“5”:“Nazione di Nascita”,“6”:“Cittadinanza”,“7”:“Età”,“8”:“Città”,“9”:“CAP”,“10”:“Città”,“11”:“Competence center”,“12”:“Data assunzione convenzionale”,“13”:“Data assunzione nel gruppo”,“14”:“Data cessazione”,“15”:“Qualifica”,“16”:“Tipo Contratto”,“17”:“Natura contratto”,“18”:“CCNL”,“19”:“Livello”,“20”:“Data scadenza”,“21”:“Tech area L1”,“22”:“Seniority”,“23”:“Job Profile”}, {“0”:“3980”,“1”:“10018”,“2”:“DGS”,“3”:“Sì”,“4”:“Femminile”,“5”:“Italia”,“6”:“Italia”,“7”:“64”,“8”:“Milano”,“9”:“20145”,“10”:”“,“11”:“CF - CORPORATE TRANSFORMATION”,“12”:“01/09/2025”,“13”:“01/09/2025”,“14”:”“,“15”:”“,“16”:“CO.CO.CO.”,“17”:“Parasubordinato”,“18”:”“,“19”:”",“20”:“31/08/2026”,“21”:null,“22”:null,“23”:null}, {“0”:“4528”,“1”:“0”,“2”: ecc.

:link: Create public scenario page

Hi @Lorenzo_D_Isita
the error is caused by your array data being injected directly into the JSON body, which breaks the JSON structure because the array itself contains quotes and special characters. Instead of inserting it directly into the raw JSON body, use the HTTP module’s structured body builder to map the content field, Make will handle the escaping automatically. or you can use Tools, Set Variable module to first convert your array into a clean string using the toString or join function before passing it into the HTTP body.

1 Like

Follow the solution he gave you as an expert his solution would prove valid from my years of experience on make.com

It seems doesent’ work . i got this error messagge in http : DataError

Bad Request

  • {“error”:{“message”:“Input required: specify \“prompt\” or \“messages\””,“code”:400},“user_id”:“user_3B5TlIjXVAbEQr9Nimotm8sX77e”}

This is the configuration : :frowning: help what’s wrong?

You’re using “Data structure” as the body input method, but OpenRouter expects a specific messages array format that a custom data structure won’t map correctly. Change the Body input method from “Data structure” to “Raw” and set the content type to JSON, then manually write the full JSON body with the model and messages fields, mapping your array data into the content field using the Make variable picker. That should resolve it.

What’s the feedback on this have you gotten it fixed or you still need help?

Thank you so much! Solved

1 Like