globiws

gf_pf_search_all_flows

Dec 9th, 2021 (edited)
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. // GF search all flows for given string
  2.  
  3. input "string to search for" search_val
  4.  
  5. print "searching for " + search_val
  6.  
  7. flows = gf_get_flows_list()
  8. results = 0
  9.  
  10. // iterate through all flows
  11. foreach ( flows as flow ) {
  12.     flow_id = flow.pkFlows
  13.    
  14.     raw = gf_get_flow(flow_id, 0)
  15.     json = json_encode(raw)
  16.    
  17.     // if we find a hit
  18.     if ( stristr(json, search_val) ) {
  19.         results = results + 1
  20.         line = "Flow " + flow_id + ' (<a'+' href="https://workflow-automation.podio.com/flows.php?node=' + flow_id + '" target="_blank">link</a>)'
  21.         print line
  22.     }
  23. }
  24.  
  25. print "DONE. Found " + results + " hits"
  26.  
  27.  
Add Comment
Please, Sign In to add comment