Jump to content

Run Script output to Post Notification


Recommended Posts

Hello,

 

I'm trying to build a fairly simple workflow that:

 

1. Finds all private SSH keys in the ~/.ssh director

2. Runs `ssh-add -K` on each of them

3. Sends the output of the commands run to a notification

 

Here is what I have:

 

211191676_AlfredPreferences2021-01-1717-18-32.png.f15e8257859a5dd2e88effb550742617.png

 

301192254_Monosnap2021-01-1717-18-56.png.362d05925c1be2c235f943650f5242d4.png

2136684754_Monosnap2021-01-1717-19-16.png.6bd1a0164f02ac4cf0ecd5ea4c43a6f1.png

The problem I'm having is that `{query}` appears to be blank after the script runs as the notification title says "ssh-add" as intended, but the text of the notification is blank. Can anyone help please?

 

Thank you.

 

Ben

Link to comment

@bwoodruff try adding a debug utility object before the Post Notification to see what {query} is actually set to (i.e. what you're actually getting out of your run script). You can show Alfred's workflow debugger with the little bug icon in the top right of the workflow editor.

 

It could be something simple like the output needing to be trimmed.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...