The shortcut has two options:
Create webhook dictionary entry
Run dictionary entry (I say Run since I’ll be calling this shortcut from other shortcuts, primarily)
The dictionary is written in proper JSON to the TXT file when choosing Create, but when I choose run, instead of a list showing the entries, I get a long list of “Metadata” like this
i.e. it’s like you have created two isolated ditionaries in one file each containing a single key value pair, rather than creating a single dictionary containing two key value pairs.
It may be worth you validating any future data using something like JSONLinter, just to ensure you have your format correct.
Oh, now I see what’s wrong (problem with working on several points in same shortcut(s) workflow simultaneously😅) - when the shortcut creates a new dictionary input, it’s really a new dictionary that is then appended to the existing txt file that acts a the dictionary database.
I’ll have to do some heavy duty text separation and combination in the workflow, to append to the TXT file - but I’m getting there
Thank you for the help with this part of the workflow - hope I’ll have the IFTTT workflow running soon, as well - so I can post the shortcut here for easy reference for others, as well
Finally got this shortcut working thanks to your help @sylumer - you definitely saved my bacon
So, here’s the shortcut - it kinda grew on me, so what it does now is:
It checks for a specific file intended as the dictionary, and if missing creates the file with a dummy dictionary entry
Present a menu letting the user:
create an IFTTT Webhook entry into the dictionary - simple or with variables (variable option not working properly atm, though
Fetch value from dictionary
Print the dictionary to screen
Edit the dictionary in app by choice
Cancel use and exit shortcut
It’s intended to be used from other shortcuts but can run stand-alone though this does give some minor lag (will also lag if Show when run (I think it’s called in the English Shortcut app) is enabled when running within shortcut).
The reason I’m posting the shortcut here is that even though I made it for use with IFTTT it can be transformed into other dictionary use cases, so if anyone find this useful feel free to use it as you see fit
This is a work in progress as I’m intending to expand this with the option to create a working IFTTT Webhook from scratch to server side creation done as well through this shortcut (if that’s even possible )