I have made this script that searches for replies to a automated email script, if it gets replied it will then put a timestamp to record it.
I'm almost there to make the script work but I'm running into some issues that I'm looking to get some help with.
So here is how it is set up:
I have a sheet that its just called "Sheet1" and in Col A I have email adresses. The script is going to be time triggered and when activated it will then take the emailadresses in Col A in my sheet and search my inbox for replies. When it finds replies it will then timestamp Col B to record it.
Here is what have done so far
I have written a code that that takes the email adress and look for a reply and timestamps only d4 (I have stated D4 just to try if the script in general works). It then searches for threads related to the email. I then have a IF statement that will trigger if the threads length is greater than which I think its a good way of doing it.
The challenges that I would appreciate some input on
I want the script to timestamp the same row as the email adress that matches the IF statement. I'm not that great on how you can declare the range so any input here is greatly appreciated, the timestamp part is not a problem.
I want the script to loop through every single row. I'm not sure if the script takes every email one by one in the search or if it only takes the first one, my guess is that since I only declared the Col to search in and did not include the row it will only take the first email that it gets in the search. Any input here is greatly appreciated.
Here is the code that I have written myself down below