Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Weekly Report for Cards without Comments in a List

Jeremy Choi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2026

I would like to create a weekly report, and in this report, I have cards in 3 lists.  Each of these lists, has about 50 cards.  I would like to generate a report that looks at all these cards in the list and send an email (with the card link) for all the cards that have NOT had any comments in the last 7 days.

I see the Inactive (but that tracks moving of the card, description changes, etc.) - I do not want that.  I only want to track COMMENTS activity.

I have tried Dashcard (didn't seem to be able to do this), and I've tried doing schedule automation, but unable to find a way to do this properly either.

Does anyone have any ideas on how to do this properly?

2 answers

1 accepted

0 votes
Answer accepted
Jeremy Choi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2026

Thanks, I figured as much.  I was able to code something in Python talking to Trello's API.  So if anyone else needs that solution, here are the quick steps below... hope it helps others that need this (I changed mine to 14 days):

What you need:

  • GitHub Account (Free)
  • Trello Standard or Higher Account (Admin Power Up: https://trello.com/power-ups/admin)
  • Email Sending Account (SendGrid / ElasticMail, etc.) -- We use ElasticMail, so it referenced in the code below.

Get Security Keys/API Keys/List IDS

  • In Trello, you need to create your own Power Up, give it any name you want, all we're looking for is to setup and get the API key and Token.  Note those two aside as you'll need them later.
  • In Trello, you need to get the List ID of the lists of cards you want to get.  
  • Elastic Mail - You will need to get their API key as well

Getting the List IDs:

  • Navigate to a card in the list you want, and in the URL, change it and add .json behind it and then hit enter/return.  You will get a bunch of code.  Do a CTRL + F (to find), and look for "idList" -- after it, should be like a 16-24 digit code like "65f...abc".  Copy that, and put that aside in a notepad for the time being, you'll need this in the code below where it asks for the idList.

Step 1: Setup Github Files: Reporting File

  1. Create a new repo, give it any name you want, a description, visibility (private or public), then create.
  2. Add file > Create New File.  Name is trello_report.py and insert the code block below:
    import os
    import requests
    from datetime import datetime, timedelta
    
    # --- CONFIGURATION ---
    API_KEY = os.getenv('TRELLO_API_KEY')
    TOKEN = os.getenv('TRELLO_TOKEN')
    ELASTIC_API_KEY = os.getenv('ELASTIC_EMAIL_API_KEY')
    
    # Replace the idList number with yours
    LIST_IDS = ['idList1', 'idList2', 'idList3'] 
    DAYS_THRESHOLD = 14
    
    def get_stale_cards():
        report_content = ""
        now = datetime.utcnow()
        cutoff_date = now - timedelta(days=DAYS_THRESHOLD)
        found_stale = False
        
        for list_id in LIST_IDS:
            # 1. Fetch List Name with error handling
            list_url = f"https://api.trello.com/1/lists/{list_id}?key={API_KEY}&token={TOKEN}"
            resp = requests.get(list_url)
            
            if resp.status_code != 200:
                print(f"Error fetching list {list_id}: {resp.text}")
                continue
                
            list_name = resp.json().get('name', 'Unknown List')
            
            # 2. Fetch Cards with Member details expanded
            cards_url = f"https://api.trello.com/1/lists/{list_id}/cards?key={API_KEY}&token={TOKEN}&members=true&member_fields=fullName"
            cards_resp = requests.get(cards_url)
            
            if cards_resp.status_code != 200:
                print(f"Error fetching cards for {list_id}: {cards_resp.text}")
                continue
                
            cards = cards_resp.json()
            
            stale_in_list = []
            for card in cards:
                # 3. Fetch the most recent comment action
                actions_url = f"https://api.trello.com/1/cards/{card['id']}/actions?key={API_KEY}&token={TOKEN}&filter=commentCard&limit=1"
                actions_resp = requests.get(actions_url)
                
                if actions_resp.status_code != 200:
                    continue
                    
                actions = actions_resp.json()
                
                is_stale = False
                if not actions:
                    # No comments ever recorded
                    is_stale = True
                else:
                    # Check if the most recent comment is older than 7 days
                    last_comment_time = datetime.strptime(actions[0]['date'], '%Y-%m-%dT%H:%M:%S.%fZ')
                    if last_comment_time < cutoff_date:
                        is_stale = True
                
                if is_stale:
                    # Extract and format member names
                    member_names = [m['fullName'] for m in card.get('members', [])]
                    members_display = f" — <em>{', '.join(member_names)}</em>" if member_names else " — <em>(No members)</em>"
                    
                    stale_in_list.append(f"<li><a href='{card['url']}'>{card['name']}</a>{members_display}</li>")
    
            if stale_in_list:
                found_stale = True
                report_content += f"<h3>List: {list_name}</h3><ul>" + "".join(stale_in_list) + "</ul>"
    
        return report_content if found_stale else None
    
    def send_email(content):
        url = "https://api.elasticemail.com/v2/email/send"
        params = {
            "apikey": ELASTIC_API_KEY,
            "subject": "WEEKLY REPORT: Trello Cards without Comments",
            "from": "name@verifieddomain.com", 
            "fromName": "Trello Automator",
            "to": "your@email.com",
            "bodyHtml": f"""
            <html>
                <body style='font-family: Arial, sans-serif; line-height: 1.6; color: #333;'>
                    <h2 style='color: #d9534f;'>Trello Inactivity Report</h2>
                    <p>The following cards in your tracked lists have not received a comment in the last 14 days:</p>
                    <hr>
                    {content}
                    <br>
                    <p style='font-size: 0.8em; color: #777;'>This is an automated weekly report.</p>
                </body>
            </html>
            """,
            "isTransactional": True
        }
        
        response = requests.post(url, data=params)
        print(f"Elastic Email Response: {response.text}")
    
    if __name__ == "__main__":
        if not all([API_KEY, TOKEN, ELASTIC_API_KEY]):
            print("CRITICAL ERROR: Missing GitHub Secrets (API_KEY, TOKEN, or ELASTIC_API_KEY).")
        else:
            report_body = get_stale_cards()
            if report_body:
                send_email(report_body)
                print("Report generated and email sent.")
            else:
                print("Success: No stale cards found.")
  3. Change the subject line, name, from name, email to, and all the Trello idLists fields.  Commit that Change.

 

Step 2: Setup Github Files: Workflow File (main.yml)

  1. Add File > Create New.  This time, type in .github/workflows/main.yml - as you type in the / it will create the folders for you.  So basically it creates a folder called .github, and a sub folder called workflows.  Then in there, for the main.yml, you and use this code below.  This is the workflow that does it on a weekly basis for me at 5am EST.
name: Weekly Trello Report
on:
  schedule:
    - cron: '0 10 * * 1' # 10:00 AM UTC = 6:00 AM EDT
  workflow_dispatch: # Allows you to click "Run Workflow" manually

jobs:
  run-report:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4 # Updated version
      - name: Setup Python
        uses: actions/setup-python@v5 # Updated version
        with:
          python-version: '3.11' # Using a slightly newer Python version
      - name: Install Requests
        run: pip install requests
      - name: Execute Script
        env:
          TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }}
          TRELLO_TOKEN: ${{ secrets.TRELLO_TOKEN }}
          ELASTIC_EMAIL_API_KEY: ${{ secrets.ELASTIC_EMAIL_API_KEY }}
        run: python trello_report.py

Save and commit that file. 

Step 3: Create all the Secret Variables

This step is important because you want to store secret keys in github in their private keys area so that it is never saved in the code itself.  This is for security risk.  Once you copy and paste it into these keys, you can't get the keys again, cause if you edit it, it will erase the keys.  So just copy and paste, then leave it. 

  1. Go to Settings > Secrets and Variables > Actions
  2. In the Secrets tab, click on New Repository Secret.  Here you create one by one, but you need to create a TRELLO_API_KEY and you will paste in the API key from Trello's Admin Power Up that you created. 
  3. Create a second key called: TRELLO_TOKEN, and in here you need to go to your admin power up that just created, go to API Key and beside it you will see verbage that says something like "If you are looking to build an application for yourself, or are doing local testing, you can manually generate a Token."  The word Token would be underlined, click that link and generate a token.  You copy that TOKEN into the TRELLO_TOKEN key that you are creating in Github.
  4. Create the last key: ELASTIC_EMAIL_API_KEY, and put in your ElasticMail API key.

Step 4: Confirm & Test

By now, everything is now completed.  It's time for you to test run it.  

  1. In GitHub, go to Actions.  You'll see your Weekly Trello Report action that you created earlier (you can rename it or whatever), that's what I called mine.  Click on it.
  2. On the right side, you'll see a drop down that says Run workflow > Run workflow.
  3. Within 5-10 mins, you should be able to see an email to you.  If there are errors, you'll need to debug, however, it should all work if you have anything setup properly.

Summary

On a weekly basis on Monday at 5am.  This will send me an email with all the cards that have not have any comments on it within the last 14 days in 3 of my lists.  In the email, it'll categorize the list, and then display the cards (with it hyperlinked already) so its easier to access to, and who is responsible (ie. members assigned to that card) in italics next to each card.

This allows me, and my team to see which clients we need to touch base with. 

0 votes
Arkadiusz Wroblewski
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 Champions.
April 9, 2026

Hello @Jeremy Choi 

I do not believe Trello supports this natively in the exact way you need.

The main reason is that Trello’s native activity/inactivity signals are broader than comments only. A card can be “active” because of several types of changes, so that is not the same as saying there has been a comment in the last 7 days.

That distinction matters here:

  • Inactive card = broader Trello activity
  • No comments in the last 7 days = much more specific requirement

From what I know, Trello does not have a native report or filter built specifically for comment inactivity. The closest built-in option is Activity → Comments, but that is just a manual activity view, not a scheduled exception report.

If you need an exact result such as cards in these 3 lists with no comments in the last 7 days

then I would look at either:

  • a Power-Up / external reporting app
  • the Trello API or webhooks, since comment actions can be tracked there much more precisely

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events