create excel attachments

Robert Komorowsky January 24, 2021

Hello!

I want to upload an excel file (.xlsx) into a card as an attachment. However, if I open the card, I can only download an attachment with the type application/octet-stream. How can I upload the file so that a card user (not necessarily me) can see the contents of the excel file?

I wrote the following code:

import requests

key = "cf96243c3494a8473e5caccd2d0f906c"
token = "c1b7ca7996e4cf4f007c014b4acf7451613af6207bb5d98ce41be50a1aed5a27"

query = {
'key': key,
'token': token,
'file': '10228-PA.xlsx',
'name': '10228-PA.xlsx'

response = requests.request(
"POST",
url = "".join(("https://api.trello.com/1/cards/", 'NU6mdURG', "/attachments")),
params=query
)

1 answer

1 accepted

0 votes
Answer accepted
Vero Rivas
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.
January 24, 2021
Robert Komorowsky January 24, 2021

Any info on how to upload excel files as attachments via python code?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events