Missed Team ’24? Catch up on announcements here.

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

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

Evan Venieris June 21, 2022

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
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2022

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

Evan Venieris June 22, 2022

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
AUG Leaders

Atlassian Community Events