Posted: 2014-10-22
A lot of times, it would be beneficial to run daily reports from specific Podio Apps. Since By Date or Day flows are not attached to an App, these Items need to be found first before they can be used in an email or pdf Report.
For example: A daily email is sent to the Accounting Manager. This email should include Items from the Invoices App that are ageing at 30 days or greater. We would also like to include a link to the specific Podio item for quick viewing.
Here is the resulting email:
By using the Search for Item(s) collector, GlobiFlow can search for a specific value, whether contained in the field or by an exact match. This feature can only be preformed on single line text fields and on calculation fields. Using this search feature, we can set a By Date or Day flow to find Items to use from a specific App.
First some modifications need to be made to the Podio App template.
1. Add the field required to complete the Search. For this example, we added a single line Text field and called it Search Field. This field will be updated using a Flow in a later step.
2. Next, add a Calculation field to produce the link to the individual item. This field will be added to the Detail Table of Items in the Report. Using a custom Podio calculation, we created a link using the invoice number as the display. See Podio Help for more information on how to create your link.
Dont forget to do a Refresh from Podio in your GlobiFlow account after these changes have been made.
Open the My Flows Tab in your GlobiFlow Account.
1. The first flow we need to create is in the Invoice App that will trigger off the Invoice Due Date and set the search field (as created above) to “overdue†for invoices 30 days old. Since Date Field Triggered flows start after midnight in this timezone, we left this flow running at 12:15am. Then created a Custom Variable with a PHP IF Statement to check if the Outstanding amount was not equal to 0 and if true create “overdueâ€, otherwise leave blank. This Variable Token is then inserted into the Search field on an Update Item action.
2. For the sake of this example, we also need to create a flow in this Invoice App to run on Update of the Paid Amount, that will remove this “overdue†status and set the field to nothing, once an Invoice has been paid in full.
3. Now we can create the By Date or Day flow for the Email Report. Select New Flow and set the filters for the specific dates this Report should run. The time this flow runs can also be adjusted. For this example we set up the flow to run at 8:15am, Monday to Friday.
3a. First, add the Search for Item(s) collector to find the "overdue" Items in the source App. This is a search on the single line text field created above.
3b. Next, add the Detail Table collector to create a HTML table from the above collected items and select the fields to be used as columns in the table. Be sure to add the Calculation field created above for the Item's HTML link.
3c. Finally, add the Send Email action and compose the email template. Insert the token for the HTML Table into the body of the email.
The Accounting Manager will now receive an email every weekday at around 8:15am, that looks like the one below.