Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda