Floating.Point Posted July 15, 2024 Posted July 15, 2024 Hello Alfred peeps, I know you can use a snippet to trigger a workflow… but I want to go the other way around… I want to trigger the insertion of a snippet from within my workflow. I can't work out how to do this, anyone have any tips for me? Thanks ☺️
vitor Posted July 15, 2024 Posted July 15, 2024 You can use the {snippet:} dynamic placeholder. Floating.Point 1
Floating.Point Posted July 15, 2024 Author Posted July 15, 2024 Ah so neat and simple and Alfred-like! Thanks this is perfect! vitor 1
Floating.Point Posted July 16, 2024 Author Posted July 16, 2024 Ah okay so I just tried this out and I'm running into a hurdle with my desired outcome. I want to set the name of the snippet being referenced via an incoming query. Something like this: {snippet:{query}} But this doesn't expand the snippet, the resulting text output being "{snippet:my-query-text}". Is there any way around this?
vitor Posted July 16, 2024 Posted July 16, 2024 As the docs point out, expansion isn’t recursive. But if you add another Arg and Vars Utility it will expand that result. Floating.Point 1
Floating.Point Posted July 16, 2024 Author Posted July 16, 2024 Okay thank you, I did read the docs but didn’t fully comprehend them, I had no idea this is what was meant- thanks so much for your help 🙏
Floating.Point Posted July 16, 2024 Author Posted July 16, 2024 Actually, in my defence “Note Alfred does not recursively embed snippets. If the snippet you are including also contains a {snippet:} placeholder, this secondary placeholder will not be resolved.” I don’t think this actually explains what you have taught me here very well. The statement reads as though it is only relevant to situations where one would put a snippet inside another snippet- which in my case wasn’t required. I understand the depths of Alfred require some prior knowledge, but this one escaped me.
vitor Posted July 16, 2024 Posted July 16, 2024 To be clear, the previous comment wasn’t a dig or anything like that. I.e. I never mention it in the sense of “you should’ve read the docs” but always as “you can read the docs if you want/need a more in-depth explanation of what I explained”. I just want that to be crystal clear, especially because I know you do read the documentation. Also, I agree that explanation isn‘t as clear to the situation as I initially thought. I’ll ruminate on it. Thank you for pointing that out.
Floating.Point Posted July 16, 2024 Author Posted July 16, 2024 You’re always so helpful Vitor, I didn’t detect any malice in your comment. I just felt a bit sensitive or “pride-hurt” worrying I should have been able to work it out for myself having read the link- but swifly rallied when I re-read the passage and it still wasn’t clear. I shouldn’t have used the term ‘in my defence’ and rather just pointed out the text I struggled with. You’re one of my favourite internet strangers, and I appreciate your work so much, thank you for everything! Vero and vitor 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now