Collect items by exact date and create PDF



  • Automations Bot

    Hi Roman, Here's a robust solution for your problem:

    References: For simplicity, let's call your application where an entry is made every 45 minutes as "A" and other app where you want to attach those items as "B"

    Goal: Pick up items on the basis of date from app A and attach them to the current item in app B (in a relationship field named Related Items from app A).


    Basic idea behind this is to simply create a static view in your app A where an entry is made every 45 minutes, and filter that view on the basis of date field(date of inspection) date range like (From Date)2022-09-27 00:00:00 to (To Date) 2022-09-27 23:59:00 [Don't worry about the date range for now, you can add any date range, make sure you add a date range in that view initially for this to work properly]

    Now here are 2 ways you can go with:

    1. If you want to grab all items created today | yesterday | this week, simply update the view for date of inspection to be today.
    2. Alternative could be to have a custom date range according to which you want to grab items from your application A, say last X days or so.

    If you choose step 1, it's very simple from here, create an on create flow in app B, use action "Get View" and select the view you set up -> Run a for each loop and store all podio_item_ids in a variable, once done, update the relationship field with the variable you created so it'll attach all collected items from given view using 'update this item' action and you'll be able to see all attached items on the basis of date of inspection for today.

    If you choose step 2, it's a little tricky, you'll have to make an update view API call to Podio API where you update the view's date range on the basis of whatever date interval you want and this way the view will show the eligible items in that view, after that API call succeeds, do the same as mentioned above to attach items (on create flow in app B -> get view -> store podio item ids in a variable and update that relationship field in app B by 'update this item' action)


    End goal: once you get all items attached to your app B item -> creating a PDF is easy -> collect the items using a get reference action -> forward reference to app A -> run a for each loop and display data in a variable -> once variable is prepared populate the variable in PDF, that's it!

    If you need any support regarding this solution, email me on and I can set that up for you!

    Hope that makes sense, please reply back here if you have any questions!


    Comment actions Permalink
  • Bavo De Cooman

    A possibility could be the following:

    • In your first app, create a hidden calculation field that codifies your date into searchable text

      var date = @created on
      var dateStamp = moment(date).format('yyyymmdd')

      'code' + dateStamp

      ==> output will be code20220929
    • I've added some text value before the date (here 'code' but could be any word or code you wish) , because Podio search can show difficulties when searching a completely numerical value.
    • Now in your flow, first define a variable that creates exactly the same code

      'code' . date('Ymd', strtotime(DATE TOKEN))
    • Then perform your search: where [Podio Code Field] equals [Flow Variable with same code]
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk