{"id":859,"date":"2022-01-18T13:27:03","date_gmt":"2022-01-18T13:27:03","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=859"},"modified":"2022-08-03T17:32:23","modified_gmt":"2022-08-03T17:32:23","slug":"get-file-contents","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/get-file-contents\/","title":{"rendered":"Get File Contents"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Returns the content of a file from the attachment field in Sugar.&nbsp;<\/p>\n\n\n\n<p>This operator works for csv, txt, log files. The operator doesn\u2019t output content of docx, xlsx, and PDF files.<\/p>\n\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#6888c9;\">ID<\/span> \u2013 provide ID of the Note with attachment or ID of the Document Revision with a file which content is needed.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Please note that starting from Sugar v11 attachments are stored each as a separate Note, related to the parent one.<\/p>\n<\/div>\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#6888c9;\">contents<\/span> \u2013 the content of the provided attachment. It may be used for the following parsing using <a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/check-if-string-matches-pattern\/\">Check If String Matches Pattern<\/a>\/<a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/split-string-into-collection\/\">Split String Into Collection<\/a> or to be sent into an external system like AWS S3 Bucket.<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-db574011fe624a9fbcc0b2662379e651.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-db574011fe624a9fbcc0b2662379e651-1024x210.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-4d07313c791144e5bc2506fff3265ed4-1024x274.png\" alt=\"\" class=\"wp-image-860\" width=\"766\" height=\"205\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-4d07313c791144e5bc2506fff3265ed4-1024x274.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-4d07313c791144e5bc2506fff3265ed4-300x80.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-4d07313c791144e5bc2506fff3265ed4-768x206.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/01\/img-98-4d07313c791144e5bc2506fff3265ed4.png 1393w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/figure>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_859' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-859\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-47f30aa9ef696' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-47f30aa9ef696'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='859' \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-47f30aa9ef696\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"859\" \n                               id=\"yasr-stats-dashicon-47f30aa9ef696\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-47f30aa9ef696\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-47f30aa9ef696\">0<\/span>  Average: <span id=\"yasr-vv-average-container-47f30aa9ef696\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-47f30aa9ef696' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-47f30aa9ef696' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Returns the content of a file from the attachment field in Sugar.&nbsp; This operator works for csv, txt, log files. The operator doesn\u2019t output content of docx, xlsx, and PDF files. inputs: ID \u2013 provide ID of the Note with attachment or ID of the Document Revision with a file which content is needed. Required: &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-file-contents\/\"> <span class=\"screen-reader-text\">Get File Contents<\/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-859","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\/859","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=859"}],"version-history":[{"count":4,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/859\/revisions"}],"predecessor-version":[{"id":2070,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/859\/revisions\/2070"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}