{"id":844,"date":"2022-01-14T18:37:23","date_gmt":"2022-01-14T18:37:23","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=844"},"modified":"2022-08-03T15:26:19","modified_gmt":"2022-08-03T15:26:19","slug":"get-email-addresses","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/get-email-addresses\/","title":{"rendered":"Get Email Addresses"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Returns array of all Email Addresses related to the record. Each element of the collection is a set of attributes about the Email Address, like the email address itself, primary, opted-out, etc.<\/p>\n\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">entity<\/span> &#8211; input an entity which Email Addresses are needed<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#6888c9;\">email addresses<\/span> &#8211; the array of Email Addresses with their attributes<\/p>\n\n\n\n<p><span style=\"color:#9ed267;\">primary email address<\/span> &#8211; primary email address of the record (e.g. test@test.example.com)Let\u2019s say there is a Lead Record with the following Email Addresses:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-8e4670aff5a3465cb5c8e07d3dd9f6e5.png\" alt=\"\" class=\"wp-image-837\" width=\"509\" height=\"153\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-8e4670aff5a3465cb5c8e07d3dd9f6e5.png 918w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-8e4670aff5a3465cb5c8e07d3dd9f6e5-300x90.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-8e4670aff5a3465cb5c8e07d3dd9f6e5-768x231.png 768w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/figure>\n\n\n\n<p>If you use <span style=\"color:#ec8f45;\">Get Email Addresses<\/span> from this Lead:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-84e00af3754a47009ce7230f9173fa67.png\" alt=\"\" class=\"wp-image-838\" width=\"687\" height=\"199\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-84e00af3754a47009ce7230f9173fa67.png 1019w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-84e00af3754a47009ce7230f9173fa67-300x87.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-84e00af3754a47009ce7230f9173fa67-768x222.png 768w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/figure>\n\n\n\n<p>Output port <span style=\"color:#6888c9;\"><em>&nbsp;email addresses<\/em><\/span> &nbsp;contains the following data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Array\n\n(\n\n    &#091;0] =&gt; Array\n\n        (\n\n            &#091;email_address] =&gt; anastasiia.gubanovych@integroscrm.com\n\n            &#091;email_address_caps] =&gt; ANASTASIIA.GUBANOVYCH@INTEGROSCRM.COM\n\n            &#091;invalid_email] =&gt; 0\n\n            &#091;opt_out] =&gt; 0\n\n            &#091;date_created] =&gt; 2021-10-27 11:32:34\n\n            &#091;date_modified] =&gt; 2021-10-27 11:32:34\n\n            &#091;id] =&gt; 945e040c-3719-11ec-b821-000c29791bd4\n\n            &#091;email_address_id] =&gt; 94316e1a-3719-11ec-8e57-000c29791bd4\n\n            &#091;bean_id] =&gt; 945da0a2-3719-11ec-97aa-000c29791bd4\n\n            &#091;bean_module] =&gt; Leads\n\n            &#091;primary_address] =&gt; 1\n\n            &#091;reply_to_address] =&gt; 0\n\n            &#091;deleted] =&gt; 0\n\n        )\n\n    &#091;1] =&gt; Array\n\n        (\n\n            &#091;email_address] =&gt; lbsupport@integroscrm.com\n\n            &#091;email_address_caps] =&gt; LBSUPPORT@INTEGROSCRM.COM\n\n            &#091;invalid_email] =&gt; 0\n\n            &#091;opt_out] =&gt; 1\n\n            &#091;date_created] =&gt; 2021-10-27 11:32:34\n\n            &#091;date_modified] =&gt; 2021-10-27 11:32:34\n\n            &#091;id] =&gt; 945e4534-3719-11ec-bd31-000c29791bd4\n\n            &#091;email_address_id] =&gt; 9431a448-3719-11ec-94a3-000c29791bd4\n\n            &#091;bean_id] =&gt; 945da0a2-3719-11ec-97aa-000c29791bd4\n\n            &#091;bean_module] =&gt; Leads\n\n            &#091;primary_address] =&gt; 0\n\n            &#091;reply_to_address] =&gt; 0\n\n            &#091;deleted] =&gt; 0\n\n        )\n\n    &#091;2] =&gt; Array\n\n        (\n\n            &#091;email_address] =&gt; nastya@integroscrm.com\n\n            &#091;email_address_caps] =&gt; NASTYA@INTEGROSCRM.COM\n\n            &#091;invalid_email] =&gt; 1\n\n            &#091;opt_out] =&gt; 0\n\n            &#091;date_created] =&gt; 2021-10-27 11:32:34\n\n            &#091;date_modified] =&gt; 2021-10-27 11:32:34\n\n            &#091;id] =&gt; 945e6dfc-3719-11ec-b53f-000c29791bd4\n\n            &#091;email_address_id] =&gt; 9431c536-3719-11ec-ab68-000c29791bd4\n\n            &#091;bean_id] =&gt; 945da0a2-3719-11ec-97aa-000c29791bd4\n\n            &#091;bean_module] =&gt; Leads\n\n            &#091;primary_address] =&gt; 0\n\n            &#091;reply_to_address] =&gt; 0\n\n            &#091;deleted] =&gt; 0\n\n        )\n\n)<\/code><\/pre>\n\n\n\n<p>Output port&nbsp;<span style=\"color:#6888c9;\"><em>primary email address<\/em><\/span>&nbsp;contains only one primary address without attributes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>anastasiia.gubanovych@integroscrm.com<\/code><\/pre>\n\n\n\n<p><strong>Following Processing of Outputs<\/strong><\/p>\n\n\n\n<p>There are two options how to process results from email addresses output:<\/p>\n\n\n\n<p>Option 1: Use&nbsp;<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/for-each-element\/\">For Each Element<\/a>&nbsp;to get each Email Address and then&nbsp;<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-array-element\/\">Get Array Element<\/a> or <a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-array-elements-by-path\/\">Get Array Elements By Path<\/a>&nbsp;to get needed Email Address Attribute:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-06d72db301764923a257607634c34f7e.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-06d72db301764923a257607634c34f7e-1024x173.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Option 2: Use&nbsp;<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/for-each-element\/\">For Each Element<\/a>&nbsp;to get each Email Address and then newly added&nbsp;<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/cast-to-entity\/\">Cast To Entity<\/a>&nbsp;to treat Email Address as usual Entity:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-cfcfc82ba1974892ab5b4025fc877dd1.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-78-cfcfc82ba1974892ab5b4025fc877dd1-1024x181.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_844' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-844\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-69c8ad240e184' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-69c8ad240e184'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='844' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-69c8ad240e184\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"844\" \n                               id=\"yasr-stats-dashicon-69c8ad240e184\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-69c8ad240e184\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-69c8ad240e184\">0<\/span>  Average: <span id=\"yasr-vv-average-container-69c8ad240e184\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-69c8ad240e184' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-69c8ad240e184' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Returns array of all Email Addresses related to the record. Each element of the collection is a set of attributes about the Email Address, like the email address itself, primary, opted-out, etc. inputs: entity &#8211; input an entity which Email Addresses are needed Required: yes outputs: email addresses &#8211; the array of Email Addresses with &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-email-addresses\/\"> <span class=\"screen-reader-text\">Get Email Addresses<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-844","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=844"}],"version-history":[{"count":8,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/844\/revisions"}],"predecessor-version":[{"id":2184,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/844\/revisions\/2184"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=844"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}