Roblox to Trello Guide

The pcall did not work, it still stops over an error, it’s because of the api module, but thanks for your help!

1 Like

The error function here will actually stop the entire script from there, perhaps a warn or a print might be better if you want the script to continue running.

Tried that too, didn’t work. :frowning:

Completely forgot about that, thanks for the reminder! :slight_smile:

Hello, I sent you message. Sorry about that, but it could be a private.

Hm, can you help me, so the card description is the ban reason?

2020, is it still fixed yet? Literally, I’m getting an error from the API, Line 693. Anybody else?

1 Like

If you guys prefer the V1 before, it’s this one…TrelloAPI-V1.rbxm (14.6 KB)

1 Like

Hey guys, this tutorial is a bit outdated and doesn’t have many options that are available within the Trello API. I’ve knocked up a quick module that pretty much allows you to submit any request method (though not the best way). I’m willing to alter this tutorial to using this module instead if it presents a better alternative.


Module Script

-- https://developers.trello.com/reference#introduction
--[[
	GetEnveloped
	March 13, 2020
	Trello API
--]]

local API = {}
API.__index = API

---

local HttpService = game:GetService("HttpService")

---

function API.Connect (key, token)
	local NewConnection = {}
	setmetatable(NewConnection, API)
	
	NewConnection.Key = key
	NewConnection.Token = token
	
	return NewConnection
end

---

function API:Request(url, method, filters)
	local Token = self.Token
	local Key = self.Key
	
	local addon = "?key="..Key.."&token="..Token
	
	for i,v in pairs(filters) do
		addon = addon .. "&"..i.."="..v
	end
	
	local response = HttpService:RequestAsync(
		{
			Url = url..addon,
			Method = method
		}
	)
	
	if response.Success then
		return HttpService:JSONDecode(response.Body)
	else
		warn("The request failed:", response.StatusCode, response.StatusMessage)
		return nil
	end
end

---

return API

Example Script

-- Example Code
local TrelloModule = require(script:WaitForChild("TrelloAPI"))
local Trello = TrelloModule.Connect("key","token")

-- tabl response
local Response = Trello:Request(
	"https://api.trello.com/1/boards/boardid/lists", -- url request
	"POST", -- method (POST, GET, PUT, DELETE)
	{
		name = "test list",
		pos = "top"
	} -- any filters or inputs etc
)

You can view the Trello API documentation here: Redirecter

In the example script, the url request should be the url at the bottom left of the image. The method should be what you see to the left of the url, in this case being “GET.”
image

Your filters or input requests are the ones in query parameters. This would go in the table within the example script after typing out your method.


If you would like this main thread to be edited to a much more detailed guide on requests, let me know and I’ll do that. Additionally, I can provide built-in requests within the module (i.e. Trello:GetBoardID(“board name”) like the previous module along with keeping the :Request() option for other api requests.


  • Re-write tutorial and include built-in requests in module
  • Re-write tutorial and don’t include built-in requests in module
  • Don’t re-write tutorial

0 voters

19 Likes

Yes, we need a new tutorial. Please I really appreciate your work!

i thought about creating my own new version for the public to include more features. you should have built in functions as not everyone knows what they are doing.

1 Like

Receiving some ever so lovely errors.


https://gyazo.com/105de5fa6abc4939f9cb1f9e57b538f2

This may be occurring because the data being sent or received is too large for Roblox to process. Many people don’t know that JSONEncode/Decode can fail and should be wrapped in a pcall.

I cannot stress enough that trello is not a database; if your dealing with datasets so large it can’t be processed, it may be time to get a database.

1 Like

local TrelloAPI = require(game.ServerScriptService.Training:WaitForChild("TrelloAPI"))

print("Yes")

local BoardID = TrelloAPI:GetBoardID("SB Trainings Board 14418")

print("Yes")

local ListPolisID = TrelloAPI:GetListID("Police", BoardID)

print("Yes")

local PolisCards = TrelloAPI:GetCardsInList(ListPolisID)

print("Yes")

Players.PlayerAdded:Connect(function(Plr)

print("PlrAdded")

Plr.CharacterAdded:Connect(function()

print("CharAdded")

end)

end)``` Why won't this work?
1 Like

What is not working exactly? The only issue I see is that you have not defined the Players variable unless you defined it and did not include it in your reply.

1 Like

I did, sorry. I just forgot to include it.

Your lack of context is what’s driving me mad. Why just post code and not incldue any detail whatsoever about an issue you’re having?

1 Like

Basically, it gets up to the point of the second yes (local ListPolisID = TrelloAPI:GetListID("Police", BoardID) and then just doesnt print anything after that.

Can you display the error it gives…? Because it won’t simply just do nothing, something gets printed in error.

As well, do you mind providing us with an URL to the Trello board?