Google sheets song request

hi all basically i’m using google sheets
for song requests, now i have a popup box that says
Requested:song| artist

but when someone requests a song there name don’t popup?
so i would like a box within the popup

for people to place there name
and a dedication

here is the code


<!DOCTYPE html>

  <!--Import Google Icon Font-->
  <link href="" rel="stylesheet">
  <!--Import materialize.css-->
  <link rel="stylesheet" href="">

  <!--Let browser know website is optimized for mobile-->
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <div class="container">
    <div class="row">
      <div class="col s12 m6">
        <div class="card blue-grey darken-1">
          <div class="card-content white-text">
            <span class="card-title" id="title"></span>
            <p id="song"></p>
          <div class="card-action">
            <button class="btn waves-effect waves-light" type="button" value="run" id="btn" onClick="requestSong()">Request
            <i class="material-icons right">music_note</i>
            <p id="check"></p>
  <!--JavaScript at end of body for optimized loading-->
  <script src=""></script>
    window.setInterval(function() {;
    }, 700);

    var artist = document.getElementById("title")
    var song = document.getElementById("song")
    var artistValue;
    var songValue;

    function requestSong(){
      console.log('Pressed button')
      const data = {
        artist: artistValue,
        song: songValue

    function getCrrentRowData() {
        .withSuccessHandler(function (result) {
          artist.innerText = result.artist;
          song.innerText =;
          artistValue = result.artist;
          songValue =;


const playlistSheet = 'playlist'
const email = ''

function showSidebar(){
  const ui = SpreadsheetApp.getUi()
  const html = HtmlService.createHtmlOutputFromFile("index.html")
  html.setTitle("Request song")

function onOpen(e) {
    .addItem('Open', 'showSidebar')

function sendEmail(obj){
  const {artist, song} = obj
  const time = Utilities.formatDate(new Date(), Session.getScriptTimeZone(), "HH:MM:SS")
  const body = `New request:\n\nArtist: ${artist}\nSong: ${song}`
  GmailApp.sendEmail(email, `New request: ${time}`, body)
  SpreadsheetApp.getUi().alert(`Requested: Artist: ${artist} | Song: ${song}`)

function getCrrentRowData(){
  const ss = SpreadsheetApp.getActiveSpreadsheet()
  const activeSheet = ss.getActiveSheet()
  if(activeSheet.getName() != playlistSheet) { return }

  const row = activeSheet.getActiveRange().getRow()
  const [ artist, song ] = activeSheet.getRange(row,1,1,2).getValues().flat()
  return {artist, song}


function sleep(){

Request music_note

I have edited it these few mistakes in it kindly check again.
credits : subwoolfer melocoton

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.