3

I am trying to add a submission date to column 1 whenever a new row is automatically added through Zapier. Is this possible? E.g.,

 C1                              C2              C3
 (DATE STAMP WHEN SUBMITTED)     John            Smith
 (DATE STAMP WHEN SUBMITTED)     Sam             Hardy

2 Answers 2

3

If you want to include the time your Zap runs in your Zap (or use that as an approximation of when the trigger occurs), you can use the following field in your Zap: {{zap_meta_human_now}}

Just enter that text with the curly braces into the field instead of selecting something from the dropdown.

For more information, see: https://zapier.com/help/advanced-tips/#time-stamps

1
  • Wonderful! Didn't know these existed. Thanks @Kurt! Oct 26, 2020 at 14:07
1

I think this requires a script (Tools > Script Editor), such as the following: it checks for blank A cells where there is data in B, and puts today's date there. If you use it, be sure to change the timezone ("GMT" in the example) to yours (here's a list of timezone names).

One way to have this run is to add a trigger (Resources > Current project's triggers in the script editor) that will execute this "on change".

function fillDate() {
  var sh = SpreadsheetApp.getActiveSheet();
  var range = sh.getRange("A2:B");       // assuming A is the date column
  var values = range.getValues();
  for (var i=0; i<values.length; i++) {
    if (!values[i][0] && values[i][1]) {
      range.getCell(i+1, 1).setValue(Utilities.formatDate(new Date(), 'GMT', 'yyyy-MM-dd'));
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.