Hi Community!
Today I've had an interesting challenge which I failed to solve.
A customer wanted to send Slack messages to people who did not track the expected amount of time on the day before. I managed to create a simple automation rule using Clockwork API and a schedule to do that for one user, but we wanted to scale this without creating a separate rule for every user.
Now I've never used Lookup Tables before, but I figured I'd try.
The setup was this: Jira Account ID was provided as the Key and Slack MemberID was provided as the Value. We could introduce all users manually to the rule this way.
The lookup table was called {{theUsers}}
Then came the Loop: For Each of {{theUsers}} as {{theUser}}, do stuff (send a web request with the account ID as a request parameter, then if conditions met send a Slack message with the MemberID of the same user to ping them in a shared channel. I tried referring to the MemberID with {{theUser.value}}.
This didn't work. The rule kept running without a result for minutes to come.
I understand that lookup tables are designed to work with the .get() function, but I don't want to call any specific account ID. I want to go through all of them one by one. Is this even possible?
@Bill SheboyI know you have experience with this stuff, can you help?
Thank you!
Hi @Wojciech Wardaszko _HeroCoders_
In this updated article about lookup tables: https://community.atlassian.com/t5/Automation-articles/Update-Create-lookup-table-action-improvements/ba-p/2427798
It shows the entries function to return the rows as a list. Your advanced branch could use:
And the references inside of the branch would be:
{{varUser.key}} and {{varUser.value}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.