<?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>topic Re: How to pass a newline when setting a multi-line property via the API? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470776#M45513</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/220472"&gt;@davidk&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;You also need to escape the backslash with this /\\n/ or use replace(/\\\\n/g, \&amp;quot;\\\\n\&amp;quot;) .Also you can do the string escaping online for any other type of string that you need to pass through json.&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:829,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;You also need to escape the backslash with this /\n/ or use replace(/\\n/g, "\\n") .Also you can do the string escaping online for any other type of string that you need to pass through json.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 13:35:08 GMT</pubDate>
    <dc:creator>webdew</dc:creator>
    <dc:date>2021-08-02T13:35:08Z</dc:date>
    <item>
      <title>How to pass a newline when setting a multi-line property via the API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/469939#M45497</link>
      <description>&lt;P&gt;Is it possible to include newlines in multi-line property fields, set via API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting the value via API seems to strip or ignore newlines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if the JSON is any of:&lt;/P&gt;&lt;P&gt;"my_multi_line_type_property" : "Line 1\nLine 2"&lt;/P&gt;&lt;P&gt;"my_multi_line_type_property" : "Line 1\\nLine 2"&lt;/P&gt;&lt;P&gt;"my_multi_line_type_property" : "Line 1&amp;lt;br&amp;gt;Line 2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the resulting property looks like&lt;/P&gt;&lt;P&gt;Line 1\nLine 2&lt;/P&gt;&lt;P&gt;Line 1\\nLine 2&lt;/P&gt;&lt;P&gt;Line 1&amp;lt;br&amp;gt;Line 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to achieve&lt;/P&gt;&lt;P&gt;Line 1&lt;/P&gt;&lt;P&gt;Line 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There was prior discussion about this here on &lt;A title="thread&amp;nbsp;19092" href="https://community.hubspot.com/t5/APIs-Integrations/Newline-on-NOTE-in-Engagement-API/m-p/240196/thread-id/19092" target="_blank" rel="noopener"&gt;thread&amp;nbsp;19092&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 20:19:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/469939#M45497</guid>
      <dc:creator>davidk</dc:creator>
      <dc:date>2021-07-30T20:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a newline when setting a multi-line property via the API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470776#M45513</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/220472"&gt;@davidk&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;You also need to escape the backslash with this /\\n/ or use replace(/\\\\n/g, \&amp;quot;\\\\n\&amp;quot;) .Also you can do the string escaping online for any other type of string that you need to pass through json.&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:829,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;You also need to escape the backslash with this /\n/ or use replace(/\\n/g, "\\n") .Also you can do the string escaping online for any other type of string that you need to pass through json.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 13:35:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470776#M45513</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-08-02T13:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a newline when setting a multi-line property via the API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470802#M45519</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/220472"&gt;@davidk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first version should work...I tested on my end.&amp;nbsp; Please see screengrab and code snippet I used&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Property_Editor.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/47372i22AE1E7E66566CC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Property_Editor.png" alt="Property_Editor.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "properties": {
        "multi_line": "if i send it back...what about this?\nif we make it multiline?\ndoes it work"
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is using the &lt;STRONG&gt;crm/v3/objects/contacts&lt;/STRONG&gt;/&lt;STRONG&gt;&lt;SPAN class="lia-emoticons-autosuggestions"&gt;&lt;SPAN class="lia-emoticons-search-term"&gt;:contactid&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; with the &lt;STRONG&gt;patch&lt;/STRONG&gt; method&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 14:06:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470802#M45519</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-08-02T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a newline when setting a multi-line property via the API?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470805#M45520</link>
      <description>&lt;P&gt;Thanks for your answer, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510"&gt;@webdew&lt;/a&gt;&amp;nbsp;!&amp;nbsp; I'd like to clarify:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I'm new to hubspot. I RTFM'd and don't see regex or replace functions in hubspot. Can you point me at it?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;are you saying the JSON value should be:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"my_multi_line_type_property" : "Line 1/\n/Line 2"&amp;nbsp; ???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&amp;nbsp;replace(/\\n/g, "\\n")&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;Doesn't that just replace "\\n" with "\\n" ? or, with the escaped slach,&amp;nbsp; \n with \n?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;you write&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;I need to escape the backslash with /\n/&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I'm not following. Are you saying that "/" escapes the back slash or.. that paired slashes act like quotes in hubspot fields?&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot! I'll experiment with your pointers and see if it works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 14:11:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-a-newline-when-setting-a-multi-line-property-via-the/m-p/470805#M45520</guid>
      <dc:creator>davidk</dc:creator>
      <dc:date>2021-08-02T14:11:02Z</dc:date>
    </item>
  </channel>
</rss>

