Getting column value when button is clicked? (Custom workflow block)

Hey fellas, how is it going?

I’m trying to build a simple custom workflow block to use in a sentence to send an email when a button is clicked.

I was able to setup a custom workflow block that I’m using in my recipe, and when I associate it with my button it gets triggered as expected.

However, I’m not getting the expected data in my server-side app.

I tried adding a number of combination of input fields but none seems to give me the email column value or the row id.

How can I get the email address stored in a column that is selected by the user?

Any help is appreciated.

Hello there @isaacsouza,

It looks like you are in the right track.

A few things to take into account:

After you add the input fields, you need to go to the recipe configuration page (in your app’s integration feature) and configure the itemId field. You might want to try creating the app again from scratch.

Regarding the email column, if you chose “column” as the input field, then the user will be able to choose any column (email column or any other type).

If you want to restrict it to only email columns, you can create a custom field of type list aimed at your endpoint (let’s call it “emailColumn”) to which you would need to add the BoardId dependency. Then you could add that to your input fields in your action (source: recipe sentence). When the user clicks on your custom field when adding the recipe to a board, your endpoint would be called and we would send you the boardId of the board in which the recipe is being added. Then you can use the API to query for the columns in your board, check which ones are of type “Email” and then show only those email columns in a list for the user to select from.

I hope that helps!

Cheers,
Matias