Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8761689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:20:54+00:00 2026-06-13T15:20:54+00:00

I have a script that performs a CRM system on my company and I

  • 0

I have a script that performs a CRM system on my company and I am using Fusion table as a database. Every time i enter a new record, this record is saved on this fusion table. When the save action is performed, I use the follow code to make a copy of the data, that is passed to the database, in on spreadsheet so I have a backup of the data:

function AtualizarSpreadsheet(e)
{
  var app = UiApp.getActiveApplication();
  var planilha = SpreadsheetApp.openById(SPREADSHEET_ID);
  var sheet = planilha.getActiveSheet();

  var enviado = "NÃO";
  var id = e.parameter.id;
  var nomeDoReclamante = e.parameter.nomeDoReclamante;
  var telefone = e.parameter.telefone;
  var ddd = e.parameter.ddd;
  var prefixo = e.parameter.prefixo;
  var sufixo = e.parameter.sufixo;
  var email = e.parameter.email;
  var regiao = e.parameter.regio;
  var categoria = e.parameter.categoria;
  var produto = e.parameter.produto;
  var subcategoria = e.parameter.subcategoria;
  var versaoDeSoftware = e.parameter.versoDeSoftware;
  var dataDeInicio = e.parameter.dataDeInicio;
  var dia = e.parameter.dia;
  var mes = e.parameter.ms;
  var ano = e.parameter.ano;
  var tituloDoProblema = e.parameter.ttuloDoProblema;
  var descricao = e.parameter.descrio;
  var status = e.parameter.status;
  var prioridade = e.parameter.prioridade;
  var informarEngenharia = e.parameter.informarEngenharia;
  var dataDeRegistro = e.parameter.dataDeRegistro;
  var horaDeRegistro = e.parameter.horaDeRegistro;
  var historico = e.parameter.histrico;
  var ordem = e.parameter.ordem;
  sheet.s
  sheet.appendRow([enviado,
                   id,
                   nomeDoReclamante,
                   telefone,
                   ddd,
                   prefixo,
                   sufixo,
                   email,
                   regiao,
                   categoria,
                   produto,
                   subcategoria,
                   versaoDeSoftware,
                   dataDeInicio,
                   dia,
                   mes,
                   ano,
                   tituloDoProblema,
                   descricao,
                   status,
                   prioridade,
                   informarEngenharia,
                   dataDeRegistro,
                   horaDeRegistro,
                   historico,
                   ordem]);
  return app;
}

On the spreadsheet I perform a function onOpen() to send one email everytime the spreadsheet is oppened.
However when my fusion table script performs the command: SpreadsheetApp.openById(SPREADSHEET_ID); the onOpen() function is not being triggered. Even if I oppen the spreadsheet I cant have that function runned.
The onOpen() function is detailed bellow:

function onOpen() 
{
    MailApp.sendEmail("EMAIL", "SUBJECT", "BODY");
}

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:20:55+00:00Added an answer on June 13, 2026 at 3:20 pm

    You are attempting to call a service (MailApp) that is not supported in a simple trigger. You would need to call your onOpen() function something different, and attach an installable “on open” trigger to it instead.

    https://developers.google.com/apps-script/understanding_triggers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an script that adds products to a remote database using a RESTful
I have an Ant script that performs a copy operation using the 'copy' task
I have a program that performs very fast-paced calls to a Lua script using
I have a SQL 2008 job that does database backups using a Powershell script.
I have a script that reads a list of addresses from a table and
I have a custom shell script that runs each time a user logs in
I currently have a Perl script that runs an external command on the system,
I have a script that performs some simple editing which works fine, the problem
I have a ruby script that performs a lot of memory intensive work. The
I have writen a script below that performs a line feed behavior (see attached

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.