How to retrieve the value of a custom field

There are some services that let you create custom fields while creating objects or records. When you integrate Built.io Flow with such services, it provides a 'Custom Fields' block that lets you pass values for the specified custom fields. In this guide, we will understand how to retrieve the values of these custom fields. 

Let's say you wish to retrieve the name (form field) and address (custom field) of a particular attendee of your 'EventMobi' account, and send it to a specific recipient by email. To do this, follow the steps given below: 

Step 1. Add Actions


Add 'EventMobi_Get Attendee Details' and 'Gmail_Send an Email' action to the canvas and connect them as shown below:

1.png

Step 2. Configure Get Attendee Details action


Configure the 'Get Attendee Details action as shown below:

Connect to EventMobi: Select the EventMobi connection from the drop-down list. If you have not created a connection yet, click on 'Add new' to create one.

Field data

Event Shortcode: Enter the event shortcode. If your event app URL is 'eventmobi.com/sample123', then 'sample123' will be the event shortcode. 

Attendee ID: Select/specify the ID of the attendee of whose name and address details you want to retrieve. 

1.PNG


Once you have entered the details, click on 'Next', test the action and the click on 'Done'. This will take you back to canvas. 

Step 3. Configure Send an Email action


Configure the 'Send an Email' action as shown below:

Authorize Gmail: Select the Gmail authorization from the drop-down list. If you have not created an authorization yet, click on 'Add new' to create one.

Field data

To: Enter the email ID of the recipient to whom you wish to send the attendee details. 

Subject: Enter a suitable subject line. 

Body: Since we need to send only the name and address of the attendee, we will include only those output parameters in the result. 

First, click on the 'name' key given on the right-hand side of the configuration window under 'Get Attendee Details' output parameters. This will retrieve the name of the attendee. 

The next parameter we need (i.e., Address key) is defined as a custom field and hence will be listed under the ' Items > custom_fields_values' key of 'Get Attendee Details' action. 

Locate the 'custom_fields_values' key and click on the '+' icon given beside it to expand it. You will see a list of properties for the specified custom field. Since we need only value of the custom field, click on the 'value' key. This will retrieve the address of the attendee. 

(If you are using 'Get Attendees' action, you can find the 'custom_fields_values' key listed under the 'Items' key of 'Get Attendee' action output parameters.)

3.png

Once you have entered the details, click on 'Next', test the action, and click on 'Done' to return on the canvas. Then click the 'Run" button located at the top right-hand side corner of the canvas to run the workflow. This will retrieve the name and address of the specified attendee from your EventMobi account and will send it to the specified recipient through Gmail.   

In case you have defined more than one custom fields, then you can retrieve the values of multiple custom fields, by simply changing the index value of the parameter. so, for instance, if you have defined three customs fields, then the index value of the first custom field will be ‘0’, the index value of the second custom field will be ‘1’, and the index value of the third custom field will be ‘2’. 

The parameters to be passed to retrieve the values of first and second custom fields are '{{$a23.custom_fields_values[0].value}}' and '{{$a23.custom_fields_values[1].value}}'

2.png