If you have noticed, SmrtPhone will start charging for storage of your audio recordings starting in November 2019. Since I have a legal requirement to keep certain records for the long term, I had to explore a different way to maintain the files for long term.
My goal therefore is to selectively export the audio recordings to an alternative back up, without leaving the files within Podio or SmrtPhone service. I chose Google Drive since I know how to move the files from Google Drive to a CD or other storage media fairly easily.
At the same time, I have to “play nice” with everyone, as the communications app is huge and the audio files are also huge. I need to process items in a trickle, otherwise everyone would complain, PLUS I would blow my processing limits in ProcFu.
Required tools to perform this work:
- Podio
- GlobiFlow
- ProcFu
- Google Account
- Back up and Sync from Google (Sync’s Google Drive to your computer)
Steps to perform this work:
Add fields to Communications App
The Communications app needs some additional fields to make this process work. You will need one calculation field, one category field and one text field.
The calculation field is hidden, called Date Stamp, and is used to generate a unique file name that can be easily found by a human. It uses the podio item’s sequence number at the end of the URL (which is generated in sequence), plus the time stamp of the phone call. Since I am located in the Toronto Time Zone, I forced the time zone to match my view, but you can change it to be what you use.
The other two fields are a hidden category field, to indicate that the recording has been copied and a single line text field (hidden if empty) to display the final generated file name.
Add a view to the Communications App
Now you need a global view in the Communications App (that is, not private) that you use to select the items that need exporting. This step is necessary to create the Trickle Feed of items for processing.
I filtered on the Created On Date, plus the new Category Field.
Note that I will be changing the view to be sequentially different months, so that I can delete that month’s recording in SmrtPhone when that sequence has been finished.
My standard for Views which are used in GlobiFlow is to name them with a Tilde at the start, then put the view at the bottom of the public views. In this case, I called this view, “~Older Recordings for Copying”
Create the Google Drive Folder where the recordings will be stored
In Google Drive, you need to create a folder which you can store the recordings. Since it is my intent to have a separate folder per month, this isn’t a huge problem.
You will notice in the URL, after drive/folders/ there is a sequence of charaters. That is your folder ID, that you need later.
GlobiFlow Script for Communications App
Next I need a manual script which will process and extract the recording from the selected item. If you notice, there are two potential fields that may have a recording. It is also impossible for a text message to have a recording, but I will be selecting these as well.
My flow name is “Manual: Extract Audio Recording” and it has no filters. Everything is processed.
First, set up the Google Folder ID in a variable, and set the initial status field. I use the variable status for debugging purposes if something fails later. Note that the Google Folder ID is in quotes.
Next is the flow to copy call recordings. This part of the script grabs the audio file from the URL, renames the file, then attaches it to the podio item. Do you remember that Time Stamp that we generated earlier? Here it is:
Next is the flow to copy voice mail recordings. Essentially the same, but I modified the file name so that I know that it is for voice mail. Please note that a Communications App item will only have either a Voice Mail or a Call Recording, but not both.
Now that I have the recording attached to the Podio Item, I want to move it from Podio over to Google Drive. Then I want to delete the item, as I don’t want it left in Podio, as I have a back up running on the Podio system and don’t want that back up filling up with useless audio files.
Notice that the If (Sanity Check) uses a compound boolean check, so that it picks up either of the previous two parts, but only if there was no error in ProcFu.
I will also point out that the Update block is silent with a hook event. I only care if there is a problem in the flow, otherwise it can run in the background.
Now that we have copied the recording over to Google Drive, AND we deleted the file off the item so that it is no longer in Podio, we also need to set the category field to YES. Note that we do not check for an error here, since this If block will only run if the prior If blocks did not run.
The update is again silent and hooked.
The purpose of this is to remove this item from the view, so that it will not be selected again.
Finally, what if there was an error in the calls to ProcFu? We have to deal with that. Remember that Status variable that I kept changing? Here it is again. Also, unlike the other items, this comment is NOT silent. I want to know about this problem!
So, now that we have our flow to perform the work, how does it get fired? This is Andreas Huttenrauch’s excellent trickle method of dripping items for processing into Podio/GlobiFlow. (At least, I think it was Andreas who came up with this trick. I have used it since as a fool proof way to ensure that a flow fires, even if Podio’s firing system crashes.)
Daily Flow to Select and Process Items
The final part is to select individual items, in a controlled volume, to be processed in the prior GlobiFlow. For this, you need a Daily (or even Hourly) GlobiFlow.
Right now, I am using a script that runs just after Midnight, but I will probably up the volume to run hourly. Again, since this has a linked view, I preface the flow name with a Tilde.
The next part is to use the view to select a few items for processing. The flow is still in a test mode, so I am only selecting 4 items. I also run a count of the number of items I actually pick up.
If there are items picked up, then send them to the processing flow in the Communication App.
Otherwise, send the programmer (me) a message that it is time to change the view and the Google Folder. (When doing this, you need to disable the timed flow, so that it does not accidentally fire while you are editing things.)
Hope you liked this article.
You must be logged in to post a comment.