#UID has been generated

1 messages ยท Page 1 of 1 (latest)

somber vault
#

email sent or nah?

#

that is tragic

lean sluice
#

yup

#

however if I fire that bad boy manually

somber vault
#

perm issue then unfortunately

lean sluice
#

it spawns in normally

lean sluice
lean sluice
somber vault
#

actually sec

#

gimme a spoonful of time

lean sluice
#

any bypass or do I have to create a vercel server less script again

somber vault
lean sluice
#

oh I have to deal with sheets API again that sucks

lean sluice
#

valid point need to check it out

somber vault
#

sec trying to reproduce this while you do that

lean sluice
#

summin like this?

somber vault
#

yah

lean sluice
#

yeah thats there

#

Still aint going

somber vault
#

yeah your thing is tweaking

#

mines an editor add on

#

works fine

#

and your handler seems to fire

#

so wtf

lean sluice
somber vault
#

i have it happen when a dialog shows up

lean sluice
#

hmm

somber vault
#

sec, go to your overview

#

when you scroll, what scopes does it show there?

lean sluice
somber vault
#

** b r u h **

lean sluice
#

fr

somber vault
#

whats ur email quota

#

chances are its maybe ignored for manual runs

lean sluice
#

I need to check that im trying the Gmail library for now

#

even that does not work

proper elk
#

just writing a message to get the notificatons on this thread xD

somber vault
proper elk
#

I was looking for it ๐Ÿ’€

lean sluice
#

lmao

proper elk
#

Didn't see it and expected it to be in a more obvious place like ๐Ÿ˜ญ

lean sluice
#

im currently tweaking as to how he got it so fast and mines tweaking

proper elk
#

Anyways, I'm a bit busy today, but if you guys don't figure it out i'll try to look into this tomorrow

lean sluice
#

ok

#

thanks

proper elk
#

gl(hf?)

lean sluice
somber vault
#

sending code here again for reference

#
function onFormSubmit(e) {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  // Get the header row (assuming it's the first row)
  var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
  
  // Find the column numbers
  var phoneNumberCol = headers.indexOf("Your Phone Number") + 1;
  var nameCol = headers.indexOf("Your Name") + 1;
  var emailCol = headers.indexOf("Your Email Address ") + 1;
  var datesCol = headers.indexOf("Days You will Be Attending") + 1;
  var uidCol = headers.indexOf("UID") + 1;

  // Check if all required columns are found
  if (phoneNumberCol > 0 && nameCol > 0 && uidCol > 0 && emailCol > 0) {
    // Get the last row
    var lastRow = sheet.getLastRow();
    
    // Get the values from the last form response
    var phoneNumber = sheet.getRange(lastRow, phoneNumberCol).getValue();
    var name = sheet.getRange(lastRow, nameCol).getValue();
    var email = sheet.getRange(lastRow, emailCol).getValue();
    var dateAttend = sheet.getRange(lastRow, datesCol).getValue();
    
    // Take the first 3 letters of the name and email
    //.... logic for UID
    var uid = "MBS-D2024-" + (total % 256);
    
    // Write the UID back to the sheet in the "UID" column
    sheet.getRange(lastRow, uidCol).setValue(uid);
    var htmlTemplate = HtmlService.createHtmlOutputFromFile('Style').getContent()
    .replace(/{{259106725__COL\$D}}/g, name)
    .replace(/{{259106725__COL\$A}}/g, uid)
    .replace(/{{259106725__COL\$I}}/g, dateAttend)
    .replace(/{{259106725__COL\$G}}/g, phoneNumber);  
    MailApp.sendEmail({
      to: email,
      subject: "Mallapur Bangiya Sangha Durgotsav 2024 - Dandiya Nights Registration Confirmation",
      htmlBody: htmlTemplate,
      name: "Mallapur Bangiya Sangha", // Optional: Set the sender name
      bcc: "", // Optional: Add BCC recipients if needed
      replyTo: "",
    });
  } else {
    Logger.log("Phone Number, Name, or UID column not found.");
  }
}```
lean sluice
#

yup np

somber vault
lean sluice
#

Theirs is much more simpler than mine honestly

#

cause what I see is their code does not run at all

#

mine does. but its some selective ahh running

somber vault
#

that's probably not the issue

#

more likely is your code has an error somewhere

#

move send email to the first linje of the handler (with hardcoded stuff)

lean sluice
#

I plead to differ, it should not have worked when run manually then no?

somber vault
lean sluice
#

true

#

5 mins

#

ok

#

so

#

I was nerding about

#

This is what i find when its triggered:

#

and if I run it manually those values exist

#

so my code is tweaking when run on triggers

#

what the hell

#

scammers I tell you

#

I GOT IT TO WORK ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ

#

I REMOVED VARIABLES AND BASICALLY GOT IT TO GET VALUES THEN AND THERE AGAIN

#

I COOKED ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ๐Ÿ—ฃ๏ธ

#

HEHAW

#

I must thank you for spending a part of your day in helping me with this problem!

#

Could not have done it without the nudges

somber vault
#

๐Ÿ”ฅ

somber vault
#

so it was an env difference wtf

lean sluice
#

not only that

#

its tick rate

#

the varaibles were not allocated the memory by the time the email was sent

#

pretty sure thats why they return me a blank value

#

they are declared but never initialized

#

makes sense as to why manual runs works

#

honestly stupid but sure who cares if it works it works

lean sluice
#

???

somber vault
#

the whole script runs when manually executing it

lean sluice
#

Oh lmao

somber vault
#

but the handler uses the function as an entry point

#

so nothing ever happens

lean sluice
#

yeah its so goofy

somber vault
#

Damn

#

So now we know

#

Whenever you send the code yeah

#

Send the whole thing ๐Ÿ’ฏ

#

Censor out some values but keep the code structure intact ๐Ÿ—ฃ๏ธ

lean sluice
#

f

#

r

somber vault
#

Tragic fix I was lowkey hoping for a bug to be there on Googles end

lean sluice
#

bug bounties are nice

#

๐Ÿ˜”

somber vault
#

Only rewarded for security bugs afaik laugh