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

Is it possible to automate exporting data to a JSON/EXCEL?

Matt Akers March 27, 2018

Is it possible to automate exporting data to a JSON/EXCEL?

In other words, is there a way of telling it to:

Create export file from the "Ad Hoc Board" each day at 6am and save it as:

"S:\EVERYONES_FOLDER\TRELLO_FILE.CSV"

thanks.

1 answer

0 votes
Mike
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2018

Hi Matt,

 

With Trello Business Class, you can export all of the boards for your organization via your organization's page in Trello. You can automate this process by using an undocumented API feature. If you're unfamiliar with the API, you can read more at https://developers.trello.com/. For a Python example of exporting your organization's data via the API, see https://github.com/bmccormack/trello-python-demo/blob/master/demo_bc_org_backup.py

You need to get a developer key and a user token like for any other API use.  The relevant routes are:

/1/organizations/:idOrganization/exports

This is used to begin an export.  It takes two arguments:

"attachments" should be either "true" or "false" (default: false); describes whether you want attachments in the export.

"attachment_age" should be a number between 0 and 3650 (default: 0); which attachments should be in the export.  If 0, gets all of them; if anything else, gets only attachments uploaded the past `attachment_age` days.

It returns a JSON object with the key "token".  You'll need to hold onto the token for the other routes.

/1/organizations/:idOrganization/exports/:token/status

Used to check the status of an export.  Returns a JSON object.  If it contains the key "complete", then the export has finished.  If it contains the key "error", then something went wrong and you should either try again or contact us.  You should not poll this URL more often than once per second; polling this URL at about once per minute is about right.

/1/organizations/:idOrganization/exports/:token/download

That should help get you started!

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2021

This response does not answer the original poster's question. The REST API endpoint described above does not produce a CSV export of the contents of a single board (IE all the board's cards and their fields). That REST API endpoint is used to trigger the creation of reports about boards, and those reports are the same three reports that can be generated from the Workspace Reports page, as described on this Automating Exports page.

There are numerous mistakes on that Automating Exports page, as it describes a URL:

https://trello.com/{workspaceName}/export

Which does not exist. The correct URL is:

https://trello.com/{workspaceName}/reports

It also describes how to access the reports via the REST API via a query to:

https://trello.com/1/organizations/{organizationNameOrId}/exports

But omits the required 'api.' at the start of the URL.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events