Trello Boards Integration on Workpeer

Priyav K Kaneria
Workpeer
Published in
3 min readMay 20, 2021

Using FastAPI and python HTTP requests

Introduction

Workpeer is an app in development phase which is made for other companies willing to shift their mode of work online. Workpeer will allow the company users to perform all the company related tasks on a single app rather than the user switching between apps to do different tasks.

Assigning tasks to different employees and keeping track of things done or not done is very important for an organisation. For the purpose of all the boards' related tasks, the app has features to choose between many board services. One of the services is Trello boards. This article defines how the Trello boards integration was done and what are the features available in our app.

Trello Logo

A basic understanding of python coding and the http requests from python will be necessary to follow the article

The first step for the integration is to go through an Oauth authentication routine.

Authentication flow

For authentication by Oauth, first an Oauth app must be made on trello app console. On making the authentication app, api key and secret keys are provided by the app using which authentication is done.

Here are the steps for authentication:

Step1: A popup window asks the user for permission to act on his behalf.

Step2: If the user gives permission by clicking allow, a code is received to the app.

Step3: Using the code received the app must request for an access token.

Step4: The access token is received and that must be saved somewhere for future use.

Step5&6: Now the access token is used for interacting with Trello boards so it is to be passed as an authorization header and the Trello servers will provide data as a response.

body={‘grant_type’ : ‘authorization_code’ , ‘code’ : code , ‘redirect_uri’ : redirect_uri }header={ ‘Authorization’ : ‘Basic ‘ + encoded }response=rq.post(‘https://trello.os/oauth/token',data = body, headers=header)response=response.json()accessToken=response[‘access_token’]

Features of Trello Boards on app

For a company to work online, it becomes very important to have a clear and well-defined structure to monitor the work done. For this purpose, the boards are very good choices.

In the app, the user can create any number of boards. The members of the board can also be selected. the members can be individually added or all the members of a team can be added at once. The board names must be unique.

Inside the boards, 3 basic lists are provided by default. If the users need more lists, they can add as many lists on a board. The new list name must be unique. Lists represent the status of the tasks like doing done or on hold.

Cards can be added by the user to any board he has access to. the cards are basically tasks for a user or a group of users. Card name is taken from the user, which must be unique and also card description can be added by the user. The list to which card will be added can also be selected.

Changing cards from one list to another list within the same board is also possible. The shifting represents the progress in the card task.

Author : Sarthak Agarwal

--

--