globiws

procscript_find_bad_pwa_flow_apps

Jan 8th, 2026
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. // find_bad_pwa_apps
  2. // find all apps in PWA where hooks still point to globiflow
  3.  
  4. $tree = pwa_tree_get();
  5. $appIds = [];
  6. foreach ( $tree as $app ) {
  7.     if ( sizeof($app["flows"]) == 0 ) {
  8.         // we don't care about apps with no flows
  9.         continue;
  10.     }
  11.     $appIds[] = $app["appId"];
  12. }
  13.  
  14. $badApps = [];
  15. foreach ( $appIds as $appId ) {
  16.     $hooks = podio_hooks_get_raw("app", $appId);
  17.     foreach ( $hooks as $hook ) {
  18.         if ( ! stristr($hook["url"], "globiflow.com") ) {
  19.             continue;
  20.         }
  21.         if ( in_array($appId, $badApps) ) {
  22.             continue;
  23.         }
  24.         $badApps[] = $appId;
  25.         print "https://workflow-automation.podio.com/flows.php?app="+$appId;
  26.     }
  27. }
  28. print "done";
  29.  
Advertisement
Add Comment
Please, Sign In to add comment