HTTP POST from Google Sheet to Trello Dropdown List (Adding and Option)

I am attempting to Add Option to Custom Field dropdown in Trello from a new row created in a Google Sheet. Would sincerely appreciate some help wrapping this one up! I am sure it’s my lack of experience…But I have been trying different method and instructional videos for a week now…

I have a successful flow from Trello to a new row in google sheets.

I have another Flow that is partially successful…(I can get a new option added but only one that I manually type in. I can not figure out how to reference the trigger and pass that to the Custom Field Drop Down Menu.)See image below…

1st Step: Trigger= Google Sheets - New Row Added
2nd Step: HTTP Request Configuration (that I am wanting the New Row added text to be sent as an option in the dropdown in Trello)

Trigger:
~steps.trigger {2}

  • context {15}
  • event {4} ~newRow [1]

0: Postman 3 Inc. (<------That is the result I need sent to Trelllo custom field drop down as an option)

range: Sheet1!1:1012

HTTP POST Headers look like this:

  • User-Agent — Pipedream1
  • Content-Type — application/json
  • key — private
  • token — private
  • id —(My customfield id)
  • idModel — (My board id)

Body That works if I manually enter the text… This is where I am messed up… Not sure how to properly reference the Trigger and pass that through to Trello in order to add the option to the custom field dropdown. You can see that I can pass through “CrazyTop” just fine… Just can’t get the right things in place to pass through the new row text from the Trigger… Help???

Hi @rickwyatt

First off, welcome to the Pipedream community. Happy to have you!

I can see you’re so so so close.

You’ve actually already figured out the hardest part which is authenticating the request.

Now what you’re looking for is using the dynamic data from your trigger. Instead of static text.

You can do this by using double brackets in the body field.

Static text example:

{"value": "I am the same exact text every execution"}

Dynamic example with Javascript evaluation:

{"value": "{{ steps.trigger.event.newRow[0] }}" }

The double brackets ('{{ …path in here… }}`) tell Pipedream to evaluate that path as Javascription.

The path to the trigger data can be found at steps.trigger.event.

I assume your newRow data is an array, and the first value is the first column.

It’s not for a Google Sheet trigger specifically, but this video shows you how to use your data from the trigger in downstream steps:

I found the the following was missing the variable “text”: before the Dynamic Data from the Trigger…
After adding that everything here runs successfully! Thank you @pierce !!

The successful end result is: “value”: {“text”: “{{ steps.trigger.event.newRow[0] }}”}

Here are the steps I followed to get a successful Flow…

PipeDream: Successful Flow from Google Sheets To Trello Custom Field Drop Down Menu
(Add Option)

First Step = The Trigger was simply a new row added to Google Sheets…
Second Step = HTTP / Webhook

HTTP Request Configuration

METHOD: POST

// Use Your Custom Field id in URL:
URL: https://api.trello.com/1/customFields/640709f7dc516fec0ca484bb/options

CONTENT TYPE: application/json

BODY:

{

“value”: {

“text”: “{{ steps.trigger.event.newRow[0] }}”

},

“idModel”: “your_board_id”,

“modelType”: “board”,

“idCustomField”: “your_custom_field_id”,

“customFieldItem”: {

“value”: {

“text”: “New menu option”

}

},

“key”: “You_Key_Here”,

“token”: “Your_Token_Here”

}

KEY VALUE PAIRS:

key - You_Key_Here

token - Your_Token_Here

idCustomField - your_custom_field_id

idModel - your_board_id

modelType - board


Hope this helps anyone looking to add an option to a drop down menus within Trello!
Huge Thanks to Pierce and the Pipedream folks for all of the videos and help!

1 Like