So I’m currently working to collect Engine hours from Samsara, then find the corresponding Meter in my MaintainX system, and update the hours for each meter.
I have succeeded in pulling the meters as a list, filtering for Forklifts only. I have also pulled the engine seconds given by Samsara and scaled them to hours and stored the name and hour values in a list. The issue I’m having is trying to get my Flow to scan through the Meters list to find a match for the Samsara index’s name value, then when/if a match is found send the hours for said index match forward. When the match occurs I would also need the Meter ID which is inside the Meters list. I tried using an Eval and now an If block to no real avail. Any help is greatly appreciated.
Top Flow line is for Samsara, and bottom is for MaintainX, both end in Collect blocks with the appropriate lists.
Added note, the For Loop on the bottom section throws an error, but all the data collected is correct and valid. Ignore the error as it does not impact the end result I’m looking for.
First off, THANK YOU! I have been getting beaten by this all day and this solution worked! Only have one hang up now, for some reason the Samsara data of eH (the engine hours) is passed into everything in orange text and is treated as a number/int the whole time until I use the provided MaintainX API POST to send it in. I keep getting an error stating that it “must be a number”, and the fail output on that block shows it in green like a string. Do I need to define the value type in the body text or something?
Okay, wow. So yes, I did have quotes around that variable in the body. Leftovers from before it was a variable. You are the best Thank you @flows-daniel
Thank you for sharing this flow, there are lots of worthwhile observations for us for areas we can improve. I’m happy Daniel helped you resolve the issues. Please continue to share you feedback with us, we’re listening and taking notes on how to make things easier.