Return values from terminal

Hello
When I use the terminal to create a such command :slight_smile:
ngrok http https://127.0.0.1:8081, wich is a command to create a tunnelto expose a port of my machine to the web, with ngrok, then the terminal is cleared and some datas are displayed dynamycally, like this :slight_smile:

ngrok by @inconshreveable                                       (Ctrl+C to quit)
                                                                                
Session Status                online                                            
Account                       mike (Plan: Free)                                 
Version                       2.3.27                                            
Region                        United States (us)                                
Web Interface                 http://127.0.0.1:4040                             
Forwarding                    http://12345678.ngrok.io -> https://127.0.0.1:8081
Forwarding                    https://12345678.ngrok.io -> https://127.0.0.1:808
                                                                                
Connections                   ttl     opn     rt1     rt5     p50     p90       
                              0       0       0.00    0.00    0.00    0.00

This status window willbe displayed as long as I dont do a CTRL-C command.

If I try to send the same command lin via an 'exec' node, I just get a reply with the PID, no matter wich option I select in the exec node, I just get this PID value.
How can I do to get the content of the return window wich is displayed in the terminal?

The goal of my question is to be able to intercept the line :slight_smile:
Forwarding https://12345678.ngrok.io
Is this possible?

Connect a debug node to the bottom output of the exec node. And run the exec node in spawn mode.

Did you consider using ngrok API to read the tunnel data ? You just need an http request node configured as below:

ngrok-api-tunnels

Yes, using the API gives all the wanted result. Very good solution
Thanks a lot

1 Like