<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to access data from a table in inbound action in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260530#M3035</link>
    <description>&lt;P&gt;I want to pick values from a multirow table.&amp;nbsp;&lt;/P&gt;&lt;TABLE width="238"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="119"&gt;SBU Head Email ID&lt;/TD&gt;&lt;TD width="119"&gt;XYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SBU&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to retrieve the value as XYZ for field SBU Head Email ID&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 11:40:28 GMT</pubDate>
    <dc:creator>SantanuKumar Sa</dc:creator>
    <dc:date>2025-05-12T11:40:28Z</dc:date>
    <item>
      <title>How to access data from a table in inbound action</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260530#M3035</link>
      <description>&lt;P&gt;I want to pick values from a multirow table.&amp;nbsp;&lt;/P&gt;&lt;TABLE width="238"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="119"&gt;SBU Head Email ID&lt;/TD&gt;&lt;TD width="119"&gt;XYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SBU&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to retrieve the value as XYZ for field SBU Head Email ID&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 11:40:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260530#M3035</guid>
      <dc:creator>SantanuKumar Sa</dc:creator>
      <dc:date>2025-05-12T11:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to access data from a table in inbound action</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260554#M3036</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/269401"&gt;@SantanuKumar Sa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you will have to use string manipulation for this&lt;/P&gt;
&lt;P&gt;What if the format changes later on? your script won't work then&lt;/P&gt;
&lt;P&gt;Please discuss with your customer on this format&lt;/P&gt;
&lt;P&gt;try something like this if you are using inbound email action&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itsm-forum/get-the-values-from-html-table-from-an-email-in-a-inbound-action/m-p/2925261" target="_blank" rel="noopener"&gt;Get the values from HTML table from an email in a Inbound Action&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/developer-forum/inbound-email-action-parse-data-from-table-in-email-to-create/td-p/3044596" target="_blank" rel="noopener"&gt;Inbound Email Action: Parse Data From Table in Email to Create Multiple Incidents&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itom-forum/inbound-email-action-extract-data-from-an-html-table/m-p/1033789" target="_blank" rel="noopener"&gt;Inbound Email Action: - Extract data from an html table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check this if you are using inbound flow&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itsm-forum/easiest-way-to-trigger-catalog-item-request-via-inbound-email/td-p/3229650" target="_blank" rel="noopener"&gt; Easiest way to Trigger Catalog Item Request via Inbound Email&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.servicenow.com/community/itsm-articles/how-to-read-body-text-in-inbound-email-flow/ta-p/2824794" target="_blank" rel="noopener"&gt;How to read body text in Inbound EMAIL Flow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 11:56:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260554#M3036</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-05-12T11:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to access data from a table in inbound action</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260555#M3037</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/269401"&gt;@SantanuKumar Sa&lt;/a&gt;&amp;nbsp; Are you expecting the data to come in tabular format from emails?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to :&amp;nbsp;&lt;A href="https://www.servicenow.com/community/itsm-forum/get-the-values-from-html-table-from-an-email-in-a-inbound-action/m-p/2925261" target="_blank"&gt;https://www.servicenow.com/community/itsm-forum/get-the-values-from-html-table-from-an-email-in-a-inbound-action/m-p/2925261&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark the answer helpful and correct if it resolves your issue. Happy Scripting &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Shantanu&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 11:58:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260555#M3037</guid>
      <dc:creator>shantanu_patel8</dc:creator>
      <dc:date>2025-05-12T11:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to access data from a table in inbound action</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260577#M3038</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/269401"&gt;@SantanuKumar Sa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please copy the &lt;STRONG&gt;findValue&lt;/STRONG&gt; function shown below into your Inbound Email Action script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function findValue(key) {
    var re = new RegExp('&amp;lt;td[^&amp;gt;]*&amp;gt;' + key + '&amp;lt;\/td&amp;gt;[^&amp;lt;]*&amp;lt;td&amp;gt;([^&amp;lt;]+)&amp;lt;\/td&amp;gt;');
    var matches = re.exec(email.body_text);
    if (matches &amp;amp;&amp;amp; matches.length === 2) {
        return matches[1];
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given an inbound email with an HTML table like yours it will return the values you are looking for:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var email = {
    body_text: '&amp;lt;p&amp;gt;some text&amp;lt;/p&amp;gt;' +
        '&amp;lt;table&amp;gt;' +
        '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;SBU Head Email ID&amp;lt;/td&amp;gt;\n&amp;lt;td&amp;gt;XYZ&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;' +
        '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;SBU&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ABC&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;' +
        '&amp;lt;/table&amp;gt;' +
        '&amp;lt;p&amp;gt;some other text&amp;lt;/p&amp;gt;'
};

gs.info(findValue('SBU Head Email ID'));
gs.info(findValue('SBU'));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;XYZ
ABC&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 12:12:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-access-data-from-a-table-in-inbound-action/m-p/3260577#M3038</guid>
      <dc:creator>Robert H</dc:creator>
      <dc:date>2025-05-12T12:12:11Z</dc:date>
    </item>
  </channel>
</rss>

