Google Forms is an excellent tool for intake requests, such as bug reports, IT helpdesk tickets, or customer inquiries. However, managing those requests inside a static Google Sheet is cumbersome. If your team uses Trello to track projects and tasks using a Kanban board, manually copying form submissions into new Trello cards is a massive waste of time. Fortunately, you can automate this entire process using a simple Google Apps Script. Every time someone submits your Google Form, a new card will instantly appear in your designated Trello list.
Step 1: Get Your Trello API Credentials
To allow Google Forms to create cards in Trello, you need an API Key and an API Token.
- Log in to your Trello account in a web browser.
- Navigate to
https://trello.com/app-key. - Copy the long string of characters listed under Personal Key. Paste this into a temporary notepad document.
- On that same page, click the hyperlink that says generate a Token.
- Click Allow to grant permission, then copy the resulting Token. Paste it into your notepad next to your Key.
Step 2: Find Your Trello List ID
You must tell the script exactly which column (List) the new card should drop into.
- Open the Trello board where you want the cards to appear.
- Add
.jsonto the end of the URL in your browser’s address bar and press Enter (e.g.,https://trello.com/b/xyz123/my-board.json). - You will see a massive wall of text. Press Ctrl + F (or Cmd + F on Mac) and search for the name of your specific List (e.g., “Incoming Tickets”).
- Look directly before the name of the list for the
"id":field. Copy the 24-character alphanumeric ID string associated with that list.
Step 3: Add the Apps Script to Google Forms
Now, we inject the automation code into your form.
- Open your Google Form in edit mode.
- Click the three vertical dots (More menu) in the top right corner and select Script editor.
- Delete any existing placeholder code and paste the following:
function onSubmit(e) {
var trelloKey = "PASTE_API_KEY_HERE";
var trelloToken = "PASTE_API_TOKEN_HERE";
var listId = "PASTE_LIST_ID_HERE";
var formResponse = e.response;
var itemResponses = formResponse.getItemResponses();
var cardName = itemResponses[0].getResponse(); // Uses the first question as the card title
var cardDesc = "";
for (var i = 0; i < itemResponses.length; i++) {
cardDesc += "**" + itemResponses[i].getItem().getTitle() + ":**\n" + itemResponses[i].getResponse() + "\n\n";
}
var url = "https://api.trello.com/1/cards?idList=" + listId + "&key=" + trelloKey + "&token=" + trelloToken + "&name=" + encodeURIComponent(cardName) + "&desc=" + encodeURIComponent(cardDesc);
var options = {
"method": "post",
"muteHttpExceptions": true
};
UrlFetchApp.fetch(url, options);
}- Replace the placeholder text with your actual API Key, Token, and List ID (keep the quotation marks).
- Click the Save icon (the floppy disk).
Step 4: Create the Trigger
- In the Apps Script editor, click the Triggers icon (the alarm clock) on the left menu.
- Click + Add Trigger.
- Set the function to onSubmit, and the event type to On form submit.
- Click Save. Authorize the script when prompted by Google.
Your integration is complete! Submit a test response to your form, and a new Trello card will instantly populate with the answers neatly formatted in the description.