Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,135
Community Members
 
Community Events
165
Community Groups

I was wondering how you can export a report and email it that shows custom fields and its values.

I am trying to create either a button or a weekly report that will show the name of the card, the people that are working on the card , the list its in and the value from a specific custom field (number)

 

I know how to show everything except the value from the custom field. 

Customer support informed me that the variables {customfieldvalue},{customfieldname} do not work in the report.

Hence i started exploring the response option. However I dont know how to call the specific information from the json file generated, so when the email is received it show "

(INVALID_JSON Fee:INVALID_JSON})]"

 

The command I use is"

 

put to url "https://trello.com/x/xxx/team-xxx/exports?key={x-x-x-x-x-x}&token={x-x-x-x-x-x-x} - -data 'attachments=true'" with payload "Payload", create a report in variable "CF" with all cards with custom field "Contractor Fees (£)" set to a number greater than 1 using pattern "[{cardname}]({cardlink}) ({cardmemberusernames}) - ({httpresponse}\n Fee:{httpresponse.{customfieldvalue}})]" group by due date, and send an email notification to "blabla@blabla.com" with subject "Contractor fees report" and message "\"Hello,\nPlease find the list with the outsourced projects and their fees below:\n\n{$CF}\n\nThank you

 

"

1 answer

1 accepted

0 votes
Answer accepted

Hi @Evan Venieris

I think you're over-complicating the report command. I don't think you need to use the Export API, and I'm pretty sure it won't work this way, because exports are asynchronous and can take many minutes to complete. They also produce an archive of board data, not a plain JSON response. There's also no PUT on "/exports" :)

Here's the command, creating the report you are describing:

create a report in variable "CF" with all cards with custom field "Contractor Fees (£)" set to a number greater than 1 using pattern "[{cardname}]({cardlink}) ({cardmemberusernames}) - Fee: {{%Contractor Fees (£)}}", and send an email notification to "email@example.com" with subject "Report!" and message "Hello,\nPlease find the list with the outsourced projects and their fees below:\n\n{$CF}\n\nThank you"

Note that to access the custom field value, you need to specify it slightly differently to other variables, as "{{%Contractor Fees (£)}}" in this case (the name wrapped in "{{%" and "}}"). This is documented here: https://support.atlassian.com/trello/docs/working-with-custom-fields/#custom-field-variables

The command above generates a report like this:

 

Screen Shot 2022-06-22 at 9.20.28 AM.png

Felix! you are a STAR! thank you so much for the answer. 

It is exactly what i needed. 

Indeed i overcomplicated it and i think i got confused because i should have created the report a bit differently and not format the email as i did.

Again huge thanks for your help.

 

Evan

Like Felix likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristján Geir Mathiesen for sharing the picture of Taco having fun with his new friend  B...

2,388 views 28 41
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you