Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Automation : How to send an email to an Asset object

Hi community, 

I need a little bit help for an automation with asset and smart value. I think it's basic but I am new in automations with asset. 

So I have an ObjectSchema called "Organisation" in this there is an ObjectType called "Fournisseurs" wich contains an Object called "Toto". The Toto attribute called "Courriel" is the email address of Toto

In my issue I have an asset customfield called "Fournisseur" that allow the assigne of the issue to select one object in the ObjectType "Fournisseurs". 

I want to send an email of the Object selected in the field "Fournisseur" (Toto in this example).

I am facing two problems. 

First the AQL request in lookupObject can't find the object : 

Lookup_Object_request.png

And second problem if I replace "{{issue.Fournisseur}}" by "Toto" (the value in the customfield Fournisseur). The object is found but Automation failed to get the value of the attribute "Courriel".

Lookup_Object_Attribute_Courriel.png

Here is the log : 

Automation_Error_Log.png

I use a lookup syntax found here : https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/#SmartvaluesInsight-Lookupobjects

Bonus question : Is it possible to add issue attached filed in the mail send by automation ? 

Sorry for this very long message and thank you for your help :)

1 answer

1 accepted

0 votes
Answer accepted
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 20, 2023

Hi @Mario GELES 

For your lookup try the syntax as

(lookupObjects. (Courriel)})

Hi @Tom Lister ,

I tried it and it doesn't work.

The log say that it was impossible to send the mail because the "To" field was empty. 

Error_Log_Tom_solution.png

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 20, 2023

Hi @Mario GELES 

Could you add some log actions to your workflow to see the direct output of the syntax?

There are some other examples here

https://community.atlassian.com/t5/Jira-Service-Management/Using-automation-how-do-I-lookup-an-Asset-attribute-value-use/qaq-p/2365382

Like Bill Sheboy likes this

@Tom Lister 

As you said I add some log actions and it seems that the lookupObjects doesn't work, there is no value

Lookupobjects_failed_log.png

I forgot to mention that The objectType "Fournisseurs" is child of the ObjectType "Gestion" but when I create the customfield "Fournisseur" I didn't have to mention the parent ObjectType for my AQL to work. 

Maybe in automation it's mandatory ? 

Thank you @Tom Lister  with the help of the audit log I was able to resolve each problem one by one.

So the good AQL was : 

ObjectType=Fournisseurs AND Nom = "{{issue.customfield_10161.label}}"

 

And the proper way to call the attribute of my object was : 

{{lookupObjects.Courriel}}

 

Everything is working fine now. 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events