So, some assumptions here since I don’t know the Excel layout. Accounts.xls has usernames in column A and passwords in column B with a title row, so the first username/password is in row 2. Same assumption for emails.xls, email subject line is in column A and the body is in column B, and the day 1 email is in row 2, day 2 in row 3, etc.
last assumption is that you want to start sending the first email on May 1. If this isn’t the case, adjust everywhere I have 4/30/2022 to the day before you want to start and it should work.
you said you can get it to work if you point directly at the cells, so I’m just going to focus on the logic for getting it out of Excel and into a variable that you can use.
‘First, get the number day we are on:
Get Current DateTime
subtract dates (CurrentDateTime - 04/30/2022) and save this variable as %EmailNumber%
’Next, get the email for the day:
Launch Excel emails.xls
Read from Excel A & %EmailNumber + 1% to %Subject%
Read from Excel B & %EmailNumber + 1% to %Body%
’Now, start looping through, or going through your 5 email process. I assume you are using 5 different providers, so the UI process is different for each website. If it were me, each provider (gmail, msn, yahoo, etc) would be a different subflow, and then you could use a ‘Switch-Case’ to move between the subflows. A switch allows you to take different roads in your flow based on the condition of a single variable. If you are used to Excel VBA, it serves the same function as a ‘Select-Case’.
’so first, get the email data
Launch Excel accounts.xls
Loop starting at 2 ending at 6, increment of 1
Read from Excel A & %LoopIndex% to %UN%
Read from Excel B & %LoopIndex% to %PW%
Switch using %UN%
‘Example cases of your switch:
Case %UN% contains “msn.com”
Run Subflow MSN
‘Use %Subject% and %Body% as needed inside these provider subflows.
Case %UN% contains “yahoo.com”
Run Subflow YAHOO
End (Switch)
End (Loop)