title: batchUpdate cell value and background color at same time in Node and Google Sheets v.4
body: <p>I am trying to update the background color of cells using google sheets v4 api but keep running in circles. I am able to update the cells value on each iteration but when I try changing the background color,</p>
  
  <pre><code>"cell": {
                              "userEnteredFormat": {
                                  "backgroundColor": {
                                      "red": 1.0,
                                      "green": 0.4,
                                      "blue": 0.4
                                  }
                              }
                          },
  </code></pre>
  
  <p>in the below code I keep getting the error - <code>GaxiosError: Invalid JSON payload received. Unknown name "cell" at 'data[0]': Cannot find field.</code></p>
  
  <pre><code>                function updateClientFeedbackCells(auth) {
                      var sheets = google.sheets({ version: 'v4' });
  
                      authorize(function () {
                          var request = {
                              spreadsheetId: process.env['GOOGLE_SHEET_ID_' + envString],  // 
                              valueInputOption: 'RAW',
                              resource: {
  
                                  "data": [
                                      {   
                                          "range": "N" + ucfSelectedRowIndex,
                                          "majorDimension": "COLUMNS",
                                          "cell": {
                                              "userEnteredFormat": {
                                                  "backgroundColor": {
                                                      "red": 1.0,
                                                      "green": 0.4,
                                                      "blue": 0.4
                                                  }
                                              }
                                          },
  
                                          "values": [
                                              [
                                                  true
                                              ],
                                          ]
                                      },
                                  ],
                              },
                              auth,
                          };
                          sheets.spreadsheets.values.batchUpdate(request, function (err, response) {
                              if (err) {
                                  console.error(err);
                                  return;
                              }
                              else {
                                  console.info(response);
                                  console.log("Client Feedback Sent Col Values updated");
                              };
                          });
                      });
                      function authorize(callback) {
                          //   'https://www.googleapis.com/auth/drive'
                          //   'https://www.googleapis.com/auth/drive.file'
                          //   'https://www.googleapis.com/auth/spreadsheets'
                          var auth = "https://www.googleapis.com/auth/drive";
                          if (auth == null) {
                              console.log('authentication failed');
                              return;
                          }
                          callback(auth);
                      }
                  }
  
  </code></pre>
  
  <p>I've been going through the following documentation but cant seem to figure out what I'm doing incorrectly as there is so much different info. Please, is my problem with my scope or with the api type or in my syntax?</p>
  
  <ul>
  <li><a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells" rel="nofollow noreferrer">https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells</a></li>
  <li><a href="https://developers.google.com/sheets/api/samples/formatting" rel="nofollow noreferrer">https://developers.google.com/sheets/api/samples/formatting</a></li>
  <li><a href="https://developers.google.com/sheets/api/guides/batchupdate#example" rel="nofollow noreferrer">https://developers.google.com/sheets/api/guides/batchupdate#example</a></li>
  <li><a href="https://developers.google.com/sheets/api/guides/conditional-format" rel="nofollow noreferrer">https://developers.google.com/sheets/api/guides/conditional-format</a></li>
  </ul>