Jump to content

Snippet trigger does not work as a placeholder


Recommended Posts

Hello,
I have created a workflow so that with a Snippet it generates me textually the next month taking as reference today.
I wanted to attach the workflow but it only allows me to attach images. 

 

I tried to do it this way, because from the Snippets section, the defined placeholders did not give the result I needed.

 

image.png.3c81a839f49a64f0ee14ede706c98aff.png

image.png.bf11848b4730e617d8c3698f2c3f2531.png

image.png.d0a4aa60ad96d508154e171830f41a0f.png

image.png.f301380631063a3e083d9c6411d556da.png

image.png.e6d33d3795b08714afacbdb32498b657.png

 

Now, I go to "Snippets" and I want to create, together with another text string, the result of this workflow. I add images as well:

 

image.png.31947fd08efc789f4ee816d935785331.png

 

If I type the snippet "\\MM" in any text field, it executes without problems. But if I run the snippet ">nb" it doesn't return the value.
I have tried other snippets I have using the placeholder {snippet:keyword} and they work correctly.
I have no conflicts using the same name with other snippets and I always use prefixes.

 

I hope you can help me, thank you very much.

 

 

image.png

Link to comment

@Miltrin Welcome to the forum!

 

It's not possible to use a Snippet Trigger in a workflow embedded within a standard snippet due to their complex and open ended nature.

 

Think of Snippet Triggers in a workflow as a trigger to run a workflow to do anything at all, but from a typed phrase in any app. It just so happens that you can also paste this back to macOS using a Copy to Clipboard, essentially making a scripted snippet in your case.

 

To achieve what you'd like to do, set the snippet trigger to what you'd like to use (e.g. "nb" in your example), then place the "jrnl bujo -contains --change-time {query}" in the Paste to Clipboard output object.

 

It's also worth noting that you don't need the "Arg and Vars" object.

 

Let us know how you get on or if you need any further help with the workflow :) 

Link to comment

Hi, @Vero

Thank you very much for your answer, I think I understood you well and I will share my result with you. Because I would like to ask you, if you would know why I get a line break at the end.

 

image.png.c6dc82d6eab5acd053139ad7129de50c.png

 

image.png.acff70a41c05693099445a4663ed1dff.png

 

image.png.b9829d9453892705dcd63dbcf1de6186.png

 

image.png.c5110a31bc3bc9c7a6f2d516c03ad1a7.png

 

Forget the "APIs/" thing, it's an autocomplete given by Warp. But when executing the snippet it makes that line break.

 

Thank you again for your help.

 

 

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...