BocciaMan Posted January 30 Share Posted January 30 I have a workflow that works and the end action is a post notification. How do I get the end result of the script to appear in the search results? Similar to the attached screenshot. Is it a specific trigger or notification? Right now I have a: keyword trigger > Script > Post Notification Link to comment
Stephen_C Posted January 30 Share Posted January 30 In essence, you have to use a script filter and process the results in JavaScript (in effect creating an array and processing it with JavaScript). Sadly, that's about all the assistance I can provide for I find JavaScript an entirely impenetrable morass (notwithstanding the fact that, with considerable assistance from others, I have included it in a couple of my workflows: for example, my Search files by extension workflow). I think that to obtain much more useful help than I can provide you'd need to share your workflow on some file sharing site (transfer.sh, for example). Sorry not to be as helfpul as others who will doubtless contribute in due course! Stephen Link to comment
BocciaMan Posted January 30 Author Share Posted January 30 My workflow is much simpler than your example. Here is the link: https://drive.google.com/file/d/1fxqZD1UjC-Y1a0HyGsFc7HKIGdS6c6bD/view?usp=share_link Link to comment
vitor Posted January 30 Share Posted January 30 7 hours ago, Stephen_C said: process the results in JavaScript For reference, it doesn’t have to be JavaScript. While JSON did start from JavaScript, every major language nowadays handles it. At the end of the day it’s just text with a specific structure, you can even write it by hand. 6 hours ago, BocciaMan said: Here is the link In the dte Script Filter, delete the last line and add instead: cat <<EOF { "items": [{ "title": "$(get_day_of_week "$input")" }] } EOF For more information, see Script Filter JSON Format or the Getting Started example workflows (press + on the bottom left, in the workflow list). BocciaMan and Stephen_C 2 Link to comment
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