Hello. I'm new to Power Automate and I have been tasked with making a recurring "Out of office" flow. I successfully made a system that replies to message on indicated days. Unfortunately, donotreply addresses and the like cause infinite loops when they also respond with an automated message. Is there any way to keep an array of the addresses I have replied to that persists between times the flow is triggered? Is there a way I could connect to an Excel workbook and store the data there?
TLDR; Need to store an array between flow instances.
Solved! Go to Solution.
Hey,
that's possible, I hope I understood correctly. This is how I would do it:
In your Excel file, make sure you have a "real" table. (Insert -> Table). In my example, it's called Table1 and it has a row called E-Mail and one called RespondedAt. The Excel is saved in my OneDrive and I saved it as Flow_EmailResponses.xlsx.
In my flow, I then use the action List rows present in a table at the top to get all rows.
Add an Apply to each action to loop the rows. In the * Select an output from previous steps field enter the Dynamic content value from the Excel action.
Inside the Apply to each, add a Condition action to check the E-Mail Address from the trigger (From) with the E-Mail row value in the Excel table.
In the If yes section, you don't do anything because in that case, it found the E-Mail address in the file.
In the If no section you can add your logic / reply.
At the end of the If no section, use the Add a row into a table action to add the E-Mail address and maybe a timestamp to the Excel file.
Next time this person sends you an E-Mail, the flow will go to the If yes section, because the E-Mail address is in the File.
cheers
Hey,
that's possible, I hope I understood correctly. This is how I would do it:
In your Excel file, make sure you have a "real" table. (Insert -> Table). In my example, it's called Table1 and it has a row called E-Mail and one called RespondedAt. The Excel is saved in my OneDrive and I saved it as Flow_EmailResponses.xlsx.
In my flow, I then use the action List rows present in a table at the top to get all rows.
Add an Apply to each action to loop the rows. In the * Select an output from previous steps field enter the Dynamic content value from the Excel action.
Inside the Apply to each, add a Condition action to check the E-Mail Address from the trigger (From) with the E-Mail row value in the Excel table.
In the If yes section, you don't do anything because in that case, it found the E-Mail address in the file.
In the If no section you can add your logic / reply.
At the end of the If no section, use the Add a row into a table action to add the E-Mail address and maybe a timestamp to the Excel file.
Next time this person sends you an E-Mail, the flow will go to the If yes section, because the E-Mail address is in the File.
cheers
This is exactly what I was looking for but I couldn't quite work out how to manipulate Excel. Thank you very much.
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
38 | |
24 | |
21 |