How to get 'action url'?

It seems like there are actions that can be navigated. I’m aware of only two types. Actions and comments:

  • https://trello.com/c/<card id>/<card title>#action-<action id> and
  • ...#comment-<comment-id>.

I just noticed that #action- and #comment- work interchangeably.

I’m using members/me/actions to get action objects, and create the link to the action if the action is associated with card, use https://trello.com/c/<card id>#action-<action-id>. But there are types of actions that doesn’t highlight any actions in the “activity” section of the cards such as “Moved lower”.

So, I have to make a url instead of just retrieving from the action object. I’m also wondering if there are any more actions that can be navigated. I need an official solution to opening things (boards, cards, or any other Trello stuff) from an action object.

You’re correct that #action- and #comment- can be used interchangeably. It appears that what we’re really looking for is whether there is a valid action ID that is also an action ID present on the card’s history.

From my testing, all of the following actions created link-able action IDs: moving cards between lists, adding attachments to cards, comments on cards, archiving cards, unarchiving cards, adding a checklist, deleting a checklist.

I need an official solution to opening things (boards, cards, or any other Trello stuff) from an action object.

You should be able to open boards and cards from any action object that contains the object (which should be every action). For instance, we can grab this action off of a public Trello board:

https://trello.com/1/actions/5d76b6f73f42a56ed02dc425

We can see that it has a data object which contains keys for board and organization but not card. So we can assume that this is a board-level action. In which case we can link to the board on which the action was taken by grabbing the ID from the board value: 5b6893f01cb3228998cf629e. To generate a URL, we need only to put the ID into the URL: https://trello.com/b/5b6893f01cb3228998cf629e. The same works for the shortLink.

The same can be done for a card but the URL will be: https://trello.com/1/c/{idOrShortLink}

1 Like