Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
blank gravity form entries with API

I'm trying to create an entry in a Gravity form via API post in Google Apps script.

An entry gets created but the values are showing blank. any insight of where I'm possibly going wrong would be appreciated.

Below is my code:

function gravityForms(){

const url = 'https://example.com/wp-json/gf/v2/forms/18/entries';

const payload = [{"2":"My name"}];

const options = {
    "method" : "post",
    "payload" : JSON.stringify(payload),
    "muteHttpExceptions" : true
  };
  
    options.headers = {    
    "Content-Type" : "application/json",
    "Authorization" : "Basic " + Utilities.base64Encode("ck_xxxxxxxxxxxx:cs_xxxxxxxxxxxxxxxxxx")
  };

const res = UrlFetchApp.fetch(url, options);

console.log(res.getContentText());

}

This is the response I get back in the logger

{"0":{"2":"My name"},"form_id":18,"id":3320}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I removed the [] from the entry object and it worked. funny since the examples show to add them.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda