Hey all!
Simeon here, one of the developers on Automation. Just writing a quick heads up that a new Swiss army knife style component is coming your way, the "Create Lookup table" action.
This was my Innovation week project that I've been dogfooding for while and am now ready to make available. It allows you create pairs of keys and their associated values that you can reference later on in other actions. I personally use it to map Jira project keys to Slack channels but you can do so much with it. The classic example that I've been using to explain it is shown below:
Now, you then use this in smart values like so:
{{departments.get("HR")}}
and the result you get out is:
Human Resources
This should hopefully go a long way towards reducing the complexity and number of If / else if blocks you need. And before you ask, yes, you can use smart values to create your values. They evaluated when the "Create lookup table" action runs and creates the table (not when you call .get). And, you can have the smart value store an object that you can access with dot notation (I might have nudged @Sam Harding to do the same thing for the Create Variable action, which should make lots of people happy) - it is pretty cool!
It does have one limitation; that the value you provide to .get must be a text value; numbers or anything else won't return a value even if they match what is in the key.
Finally a shout out to the eagled eye @Ryan Schamp who noticed this in our docs when we published a little early :D
It is rolling out over the next few days, so happy Automating folks!
Simmo
42 comments