Giter VIP home page Giter VIP logo

alfrello's Introduction

  █████╗ ██╗     ███████╗██████╗ ███████╗██╗     ██╗      ██████╗    ██████████╗ 
 ██╔══██╗██║     ██╔════╝██╔══██╗██╔════╝██║     ██║     ██╔═══██╗   ██╔═██╔═██║ 
 ███████║██║     █████╗  ██████╔╝█████╗  ██║     ██║     ██║   ██║   ██║ ██║ ██║ 
 ██╔══██║██║     ██╔══╝  ██╔══██╗██╔══╝  ██║     ██║     ██║   ██║   ██║ ██████║
 ██║  ██║███████╗██║     ██║  ██║███████╗███████╗███████╗╚██████╔╝   ██████████║
 ╚═╝  ╚═╝╚══════╝╚═╝     ╚═╝  ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝    ╚═════════╝
Alfred Workflow for creating cards on a Trello board

What's New

  • NEW Made for Alfred 5
  • NEW Support for all Trello Labels and Custom Labels
  • NEW Assign a card to yourself and or other members
  • NEW Use natural language for due dates. Use terms like 'today', 'tomorrow', or 'next week'.
  • NEW Pick your Date format (m/d/Y or d/m/Y)
  • NEW Personalise the workflow and rearrange all fields based on how you use Trello!
  • NEW Use default overwrites so you don't have to type the same fields repeatedly.
  • NEW All settings are managed within the Workflow configuration
  • NEW Enable the Debug Log to see and record helpful error messages into log.txt and your clipboard
  • NEW Path Overwrite (for Custom PHP Installation)

How To Install

  1. Download the latest Alfrello Workflow from the release page.
  2. Double-click on the Alfrello Workflow to install it in Alfred

More information on installing Workflows in Alfred here.

Requirements

  • Alfred 5
  • PHP 8

More information here

Note

If, for any reasons you are having issues with your PHP installation and the workflow finding the PATH to your executables. You can define a custom PATH in the Workflow configuration.
For example: export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
Please be very careful when adding custom paths.

Alfrello Setup

Trello API key

  • Type into Alfred get trello api key to generate your unique Trello API key.

More information here.
Note Make sure to be logged in to Trello in your default browser before generating your API Key.

  • Copy your unique Trello API key to your clipboard

  • Open the Configure Workflow

  • Paste your API Key here:

Trello Token

  • After entering your api key, type get token in Alfred to authorise Alfrello to access your Trello data and perform actions like creating cards.

More information here.

  • Copy your token

  • Open the Configure Workflow and paste your token here:

Trello Board id

Choose the Trello board that you wish to use with Alfrello and copy the board id
You can get the board id by simply going to your board and adding .json at the end of the URL.

  • Open the Configure Workflow and paste your board id here:

For example, go to the Trello development Roadmap Board https://trello.com/b/nC8QJJoZ/trello-development-roadmap.
To view the board id add .json at the end of the URL https://trello.com/b/nC8QJJoZ/trello-development-roadmap.json
The Trello development Roadmap board id is 4d5ea62fd76aa1136000000c

Usage

General Usage

  1. Launch Alfred App.
  2. Enter the workflow keyword that triggers this workflow (The default is trello, but you can change it in the Configure Workflow).
  3. Write the fields you want to specify for your Trello card, separating each field with a semicolon ;.

The syntax looks like this: keyword {field1};{field2};{field3};....

For example, if the keyword is trello, a new Trello card with the title "Plan Meeting", description "Meeting with Team", no labels, due tomorrow, in the list "Upcoming", at the top position, with an attachment and assigned to a member, would look like this:

trello Plan Meeting; Meeting with Team;; tomorrow; Upcoming; top; https://example.com; @username

Note that we left the Labels field blank because we don't want to specify any labels.

Spaces between fields and the semicolons are optional. Both keyword {field1}; {field2} and keyword {field1};{field2} formats will work.

Available fields

  1. Card Title: The title of the new card.
  2. Card Description: The description for the new card.
  3. Labels: The labels you want to apply to the card. If you want to apply multiple labels, separate them by commas (,) within this field.
  4. Due Date: The due date for the card. This can be an exact date or a relative date like 'today', 'tomorrow', or 'next week'.
  5. List Name: The name of the list where you want to add the new card.
  6. Card Position: Where you want the card to appear within the list. Options are top or bottom.
  7. Attachment URL: If you want to attach a URL to the card, add it here.
  8. Assigned Member: To assign a member to the card, input their username. It can be prefixed with an @ sign, or you can type the username. You can also use me to assign a card to yourself.

Fields order

In the Alfrello workflow configuration, you have the ability to customise the order of your query fields. This allows you to define a default sequence in which you input your card's data, making the workflow better suit your personal habits or preferences.

By default, the order is set as:

name,desc,input_labels,due,list_name,position,url_attachment,assigned_member

This represents the Card Title, Card Description, Labels, Due Date, List Name, Card Position, Attachment URL, and Assigned Member.

If you'd prefer to input your data in a different sequence, you can rearrange these fields in the Trello Field Order variable in the Workflow configuration. Just make sure that a comma separates each field.

For instance, if you prefer to specify the Assigned Member first, followed by the Card Title, Card Description, and Due Date, you would set the 'Trello Field Order' to:

assigned_member,name,desc,due,input_labels,list_name,position,url_attachment

Please remember that the way you set this order should match how you input the data when you use the Alfred command, as the fields correspond to the positions defined here. So if you set 'assigned_member' as the first field when you input the command in Alfred, the first field after the keyword should be the Assigned Member's username.

By customising the Trello field order, you can further tailor the Alfrello workflow to your needs, boosting your productivity with Alfred and Trello.

Basic Usage

Card Title

trello Plan Meeting

will create a card on your board on the first list with the title Plan Meeting

Card Description

trello Plan Meeting; Meeting with Team

will create a card on your board on the first list with the title Plan Meeting and description Meeting with Team.

Labels

  • all (will add all the available labels)
  • green
  • yellow
  • orange
  • red
  • purple
  • blue
  • sky
  • lime
  • pink
  • black
  • Any custom labels by the name

You can add any number of labels by comma-separating them.

trello Plan Meeting; Meeting with Team; red, green, important, super important

will create a card on your board on the first list with the title Plan Meeting and description Meeting with Team with red, green, important and super important labels.

important and super important are custom labels

Due Date

The due date can be an exact date or a relative date like today, tomorrow, or next week.

You can define the date format in the Workflow configuration. For example, d/m/Y or d/m/Y.

trello Plan Meeting; Meeting with Team; red, green, important, super important; next monday

will create a card on your board on the first list with the title Plan Meeting and description Meeting with Team with red, green, important and super important labels. The due date will be set as next monday.

List Name

trello Plan Meeting; Meeting with Team; red, green, important, super important; next monday; Upcoming

will create a card on your board on the Upcoming list with the title Plan Meeting and description Meeting with Team with red, green, important and super important labels. The due date will be set as next monday.

Please note: List names are case sensitive

Card Position

Options are top or bottom.

trello Plan Meeting (bottom); Meeting with Team; red, green, important, super important; next monday; Upcoming; bottom

will create a card on your board on the Upcoming list with the title Plan Meeting (bottom) and description Meeting with Team with red, green, important and super important labels. The due date will be set as next monday. The card will be created at the bottom of the list

If you don't specify a card position, your new card will automatically be placed at top of the list.

URL Attachement

trello Plan Meeting; Meeting with Team; red, green, important, super important; next monday; Upcoming; top; https://www.alfredapp.com

will create a card on your board on the Upcoming list with the title Plan Meeting (bottom) and description Meeting with Team with red, green, important and super important labels. The due date will be set as next monday. The card will be created at the top of the list and have https://www.alfredapp.com attached.

Assigned Members

To assign a member to the card, input their username. It can be prefixed with an @ sign or just the username. You can also use me to assign a card to yourself.

trello Plan Meeting; Meeting with Team; red, green, important, super important; today; Today; top; https://www.alfredapp.com; me

will create a card on your board on the Today list with the title Plan Meeting and description Meeting with Team with red, green, important and super important labels. The due date will be set as Today. The card will be created at the top of the list and have https://www.alfredapp.com attached. The card will be assigned to me.

In the following example will be creating the same card by assigning it to myself (me) and another user (billgates1955).

trello Plan Meeting; Meeting with Team; red, green, important, super important; today; Today; top; https://www.alfredapp.com; me, billgates1955

Configure Workflow

api key: Your unique Trello API key. You can get this from Trello's Developer API Key page.

trello token: Your Trello token. This gives the workflow permission to access your Trello data and perform actions like creating cards.

Trello Board id: The unique identifier for the Trello board where you want to create cards. You can find this in the board's URL.

workflow keyword: The keyword you'll type into Alfred to trigger this workflow. Choose something easy to remember related to the task.

show notification: If this is enabled, macOS will display a notification each time a card is created.

play sound: If this is enabled, a sound will play after a card is posted.

show large type: If this is enabled, the result of posting a card will be shown in large text on your screen.

default due date: Sets a default due date for all new cards. You can input a specific date, or use terms like 'today', 'tomorrow', or 'next week'.

Default list name: Allows you to set a default list within the Trello board where new cards will be created.

default labels: Allows you to set default labels for all new cards. You can specify one or multiple labels, separated by commas. For example, 'green, red'.

Default position: Sets where new cards will appear within their list. Options are 'top' or 'bottom'.

default member: Here you can set the default member to be assigned to a card. It can be a username, 'me', or multiple usernames separated by commas.

date format: Allows you to define the date format. Examples are 'd/m/Y' or 'm/d/Y'.

Trello field order: Allows you to set the default order of your query. The default order is name,desc,input_labels,due,list_name,position,url_attachment,assigned_member. You can rearrange these fields separated by commas.

Debug: Enabling debug will record CURL, PHP, and Trello API errors to a log.txt file inside the workflow folder. This is useful for troubleshooting errors.

export PATH: If you have issues with the workflow not finding your PATH, you can define it here. For example: 'export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"'. Please be careful when adding custom paths.

License

MIT © Miko Magni

alfrello's People

Contributors

deanishe avatar gamell avatar geojunkie avatar mikomagni avatar tgrrr avatar vmitchell85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfrello's Issues

Fix PHP path for Alfred on Monterey

Because the /bin/bash node of the workflow directly calls php, the workflow breaks on Monterey with the following error:

/bin/bash: line 8: php: command not found

This is true even if the user has manually re-installed php via brew, per this guidance.

The fix I found in the Alfred forums was to add the PATH into the top of the script, like so:

Added at top of script (see screenshot):

export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"

Screen Shot 2022-01-06 at 10 01 29 PM

This fixed it, since Alfred's php upgrades don't reach into the script contents themselves.

Can you incorporate this into an updated version of workflow?

Unable to create Trello Card

Hi there, unable to create new cards after supplying valid token, api key, and board ID. The logs provided via Alfred. Using Alfred 3.8.1 Build 961 - reach out if you need any clarification.

Starting debug for 'Trello Worklfow for Alfred v.1.6.1'

[2019-04-04 14:20:34][input.keyword] Processing output of 'action.script' with arg 'this is a test'
[2019-04-04 14:20:35][action.script] Processing output of 'output.notification' with arg '
Warning: Invalid argument supplied for foreach() in /Users/jeffrep/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.CCFA8AA6-CC90-450A-9665-52139CC50589/trello.php on line 49
List not found'
[2019-04-04 14:20:35][action.script] Processing output of 'output.playsound' with arg '
Warning: Invalid argument supplied for foreach() in /Users/jeffrep/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.CCFA8AA6-CC90-450A-9665-52139CC50589/trello.php on line 49
List not found'

Different Board/Multiple Board?

For example, I have one board for my work and one for my personal project (Or even multiple board for multiple projects). Right now, everytime I need switch (Ex. Going to office from home) I have to edit the config file to edit the board ID.

I just woundering if its possible to put board ID into command or make it easier to change/switch

Newb - Invalid Token error (I think I fixed it though)

Miko,

I am an old school programmer that moved into management so I am new to the Github and web services paradigm. Love my Mac and love Alfred so your Alfred-for-Trello is very useful to me.

I kept getting an 'invalid token' error when I first started. After much poking and digging, it appears that the application key is required. I modified the bash script to include the application key (peeked into jello to find it), passed in as first parameter, and modified the PHP to include its use. Now it works for me!

The key could be hardcoded in the PHP but this approach lets the code be reused more easily for other applications.

PHP Mods:
$trello_key = $data[0];
$trello_member_token = $data[1];
$trello_board_id = $data[2];
$list_name = $data[3];
$name = (isset($data[4])) ? stripslashes(trim($data[4])) : 'Untitled card';
$desc = (isset($data[5])) ? stripslashes(trim($data[5])) : '';

BASH Addition:
key='1433c6977ccb78cd82e29a5455a24815'

BASH Mod:
php -f /Applications/tscript.php -- "${key};${token};${boardid};${listname};{query}"

Let me know if this makes sense or if I fixed something that wasn't broken (and I was the one who broke it). ;-)

Search?

Inline Trello search would've been awesome. :)

Not work for me

I install the workflow step by step, but it not work for me when I use 'trello' commend.
I'm sure the 'bin/bash' have configured。

Environmental information:
masOS mojave 10.14
Trello have logged in

Please give me some advice,TKS.

Workflow won't create any Cards in my Trello Board

Hey Miko, thanks so much for updating your trello workflow. Unfortunately I can´t get it to work: using a prompt like "Trello Testtask; this is a description" won´t create a card on my trello board. I won't get an error message either, nothing happens.

I set an api key, authorized the workflow and added the Trello Board-ID into the settings.

Do you have any idea how to fix that?

Best regards
Lars

Invalid Argument Error

Hmm... I did the basic install:
1 - download the workflow
2 - got the token from trello
3 - added my board ID

But I am still getting the invalid argument error. I am not sure if I am missing something obvious. Any thoughts?

screen shot 2014-11-14 at 9 24 02 am

Add assignment

Have you considered adding the ability to assign the card to a person?

For example, if I want to assign myself, I’d append ;me

Where me is my Trello username

I’d use this for sure.

I’d also like the ability to automatically assign the card to myself every time I make one.

Alternate parameters

Often I need to put an item to a specific list but don't need to put a label or due date. It would be nice to do card;description;list - but it always goes to the first list on the board.

Malformed input to a URL function

Hy there
I keep getting logs of the following error:
[ 07:36:14] Curl error: URL rejected: Malformed input to a URL function
[ 07:44:13] Curl error: URL rejected: Malformed input to a URL function
[ 08:32:07] Curl error: URL rejected: Malformed input to a URL function
I followed the instructions when setting up the workflow. (Using Alfred 5.1.1 [2138])
Any way to help with this?
Much appreciated!

Getting board id doesn't work

Hi! I'm trying to get the id for the board, but keep getting the 404 error. The board is private, tho. Does this work only for public boards?

Getting started guide assumes user knowledge

I'm struggling to understand how to install this with Alfred 2, the instructions seem to assume too much user knowledge. Could you tell me how or where I'm supposed to 'use the keyword Jello...' etc?

Thanks!
J

List not found

I can't seem to get this workflow to push to Trello. I have entered my personal token, and the boardid. However, I keep getting the "List not found." result. The only edits I've made to the file are those required in the /bin/bash.

Any thoughts?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.