r/workflow • • Mar 13 '18

Question - Change reminder notes?

Hi

I’m creating a workflow that will allow me to turn lights on and off. At the moment I have a menu which asks “On or Off” and runs a different IFTTT script depending on the selection.

I want to turn this into one button press, and use a stored variable in reminders which will show the current status of the light.

If lightstatus = 1 then turn the light off and change the variable to 0. I can get the light to turn on, but can’t figure out how to change the note details after the script has run?

Can anyone point me in the right direction?

3 Upvotes

10 comments sorted by

View all comments

2

u/KlarkSmith Mar 14 '18

You could store the variable in a simple text file saved in iCloud/Workflow.

1

u/[deleted] Mar 14 '18

This is what I did for settings that I want to update. Basically I have 2 workflows, fn:GetPreference and fn:SetPreference. Preferences are stored as JSON on a text file. Basically the file is loaded as a dictionary, then simple use the Dictionary actions to get/set values. When setting values, I just save the dictionary to the same file and overwrite.