Here is an idea I developed to send Microsoft Dynamics NAV Jobs to Trello. It creates a board for a selected NAV Job and it will created cards for the posting type Job Tasks.
You can find the code on GitHub. Previously I blogged about Microsoft Flow, a great tool from Microsoft. You can do something similar with it but I wanted a few more options. If you would like to read the article about my first flow click here.
I added three field to the Jobs Setup table for the API Key, Token and the Base URL. To retrieve a key and token you must have an account on trello.com, after you logged in go to trello.com/app-key. On this page you will get your key and if you “click on manually generate Token” you will get a token as well.
Let’s see the changes on the Jobs Setup page. I added the new fields from the table in a new Fast tab and added a new action button to the Ribbon so the users can access the Lists. What is a list? On Trello you organise your cards into lists. The lists can determine the status of a task for example.
I created a custom table where you can define your standard lists and you can specify which one should be used as the initial list.
Sending a Job To Trello
Let’s see the changes on the Job Card and Job Tasks. I added three field for the Board URL, Board ID and Starting List ID. When the Board URL is populated you can click on the browse icon next to it and the board will open in your browser.
I added three action button to the ribbon:
- Send To Trello: This action will create a Board for the Job, create the pre-defined lists in the setup and create a card for the posting type job tasks.
- Send New Tasks To Trello: This action will look at the “Trello Card Created” field on the Job Tasks and create a card for those tasks where the value is “No”.
- Reset Trello Information: If you would like to start again with a board you can run this task and it will delete the Board URL, Board ID, Starting List ID and reset the Trello Card Created flag on the related Job Tasks.
When you run the Deploy To Trello action the application will send several requests to the Trello API and create a board for you.
I hope you like this idea, please let me know what you think in the comment section below.
For the communication with the Trello API I use the pattern created by Arend-Jan Kauffmann. If you would like to learn more about it check out his blog: http://www.kauffmann.nl/2015/11/26/web-services-examples-part-1-the-basic-pattern/