Page 1 of 2

Read aloud today's meetings

Posted: 20 Mar 2014 09:08
by Joost van Gils
Adjust the trigger to the applicable time and have today's meetings read to you (see attachment)...

Re: Read aloud today's meetings

Posted: 21 Mar 2014 12:24
by andosgandos81
Hi, very nice, exactly what i have been looking for, a long time, good job!

Re: Read aloud today's meetings

Posted: 23 Jun 2014 13:23
by angelatwork
Hi, now when we have gotten the new update of AM, I tried your flow. But I got the same error as I got when I didn't have the update."Could not evaluate expression 'titles=split(event_titles,",");". Do you have any clue to what I am doing wrong?

Re: Read aloud today's meetings

Posted: 28 Jun 2014 13:16
by angelatwork
Got it working. Took away the ID in the flow. Great flow!

Re: Read aloud today's meetings

Posted: 29 Jun 2014 10:58
by angelatwork
Found the bug! If you have no meetings the condition does not catch it as true and that makes AM through an exception that it cannot split the meetings. If you change the condition to:

//matches(event_titles,"");
length(event_titles)<1;

Then the flow works :-).
I think you should move the flow to the flow area again, now when the functions are implemented in the official AM. It it's an excellent flow you have made, thank you :-)

Re: Read aloud today's meetings

Posted: 04 Mar 2016 10:08
by seb
I have been using this workflow for a while now and just discovered today that if you have a comma in one of the events, then it fails.

It is expected to parse a string like this "event1,timestamp1,event2,timestamp2,..."

If event1 contains commas it becomes "event1,thing1,thing2,timestamp1,..." and it complains it can't divide thing1 by 1000.

Any idea how to change separators by, say, a # sign?

Thanks :)

Re: Read aloud today's meetings

Posted: 04 Mar 2016 15:33
by lueq
I'm sure there are multiple approaches. One of them would be:
In your "Query Content Provider" action, read the "begin" before the "title" and change the result type to "Text".
Then the individual calendar entries are separated by a newline character, which cannot occur within the calendar entry title or time.

Where you format the entries, split them into a list by newline:
entries = split(event_titles,"\\n")
Now the first comma in each entry separates the time from the title, and you just ignore additional commas in an entry.

And you don't have to keep a counter, if you use
for (entry in entries)
{
process your entry here
}
AM cycles through the entries in the list one at a time, putting the current one into the variable entry.
This should also work if the list is empty because there are no entries.

Re: Read aloud today's meetings

Posted: 04 Mar 2016 17:56
by seb
Awesome, I'll try this approach :-)

Thanks!

Re: Read aloud today's meetings

Posted: 14 Jul 2016 01:34
by mhermanus.za
Hi

I get the error below when executing flow what must I change;

Error while calling function getElement (Expression: getElement(titles,counter)[line 5], Cause: Invalid index 1, size is 1)

Re: Read aloud today's meetings

Posted: 14 Jul 2016 14:25
by MURTUMA
This is because indexes are zero based: first index is 0, second is 1 and so on.