<?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: Leveraging Python in Workato &amp;gt; Marketo in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11449#M4426</link>
    <description>&lt;P&gt;Since you're new to Workato, my honest opinion is you should try to do this using native Workato actions and not Python.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Dec 2025 04:53:11 GMT</pubDate>
    <dc:creator>gary1</dc:creator>
    <dc:date>2025-12-12T04:53:11Z</dc:date>
    <item>
      <title>Leveraging Python in Workato &gt; Marketo</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11428#M4423</link>
      <description>&lt;P&gt;Greetings, fairly new to Workato and I am struggling to figure out how to leverage Python to transform data in Marketo.&lt;BR /&gt;I have a simple script snippet meant to fetch a list of leads whose phone number begins with a '1' and remove it.&lt;BR /&gt;It works in an IDLE environment but I am unsure how to enable it in Workato.&lt;BR /&gt;Here is the script:&lt;BR /&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;# Load the CSV file&lt;BR /&gt;df = pd.read_csv('Test_Phone_Numbers.csv')&lt;/P&gt;&lt;P&gt;# Remove leading '1'&lt;BR /&gt;df['Phone Number'] = df['Phone Number'].astype(str).str.lstrip('1')&lt;/P&gt;&lt;P&gt;# Save the modified DataFrame back to CSV&lt;BR /&gt;df.to_csv('updated_file.csv', index=False)&lt;/P&gt;&lt;P&gt;print(df)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Dec 2025 16:58:51 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11428#M4423</guid>
      <dc:creator>ecamarillo</dc:creator>
      <dc:date>2025-12-10T16:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Leveraging Python in Workato &gt; Marketo</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11433#M4424</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/12910"&gt;@ecamarillo&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Python in Workato works different&lt;BR /&gt;please check the commented part in the code block for the reference and also pass your input content in the input section of the python code and access it in below code block.&lt;BR /&gt;&lt;BR /&gt;see below image for better understanding, the code should be written in Workato supported format.&lt;BR /&gt;Please let me know if you need further clarification&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-12-11 205753.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2477i55160B111FC457B5/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-12-11 205753.png" alt="Screenshot 2025-12-11 205753.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:30:12 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11433#M4424</guid>
      <dc:creator>Bhagya_pola</dc:creator>
      <dc:date>2025-12-11T15:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Leveraging Python in Workato &gt; Marketo</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11442#M4425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/12910"&gt;@ecamarillo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In workato, need to define python code in different way and also calling input data or values differently, here I am attaching the python code, recipe URL.&amp;nbsp;you can easily check perform your filtering.&lt;/P&gt;&lt;P&gt;recipeURL: &lt;A href="https://app.trial.workato.com/recipes/102642?st=ca94d6bc08138f5b91eb7313770f52c65f1b6497a3abe267532cb49c5a38ef4b" target="_self"&gt;Cleaning PhoneNumbers from CSV File using Python code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;import io&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def main(input):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; try:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Read the CSV content directly from the field Workato sends&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file_content = input['input_CSV_File']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Convert CSV text to DataFrame&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; toread = io.StringIO(file_content)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df = pd.read_csv(toread)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Convert phoneNumber to string&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df['phoneNumber'] = df['phoneNumber'].astype(str)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # &lt;span class="lia-unicode-emoji" title=":fire:"&gt;🔥&lt;/span&gt; Delete rows where phoneNumber starts with "1"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df = df[~df['phoneNumber'].str.startswith('1')]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Convert back to CSV&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updated_csv = df.to_csv(index=False, header=True)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'output_CSV_File': updated_csv&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; except Exception as e:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'error': str(e)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-12-11 235108.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2484i4CF1864AE726BDF6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-12-11 235108.png" alt="Screenshot 2025-12-11 235108.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-12-12 001223.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2485iC948AC0D5B69F85B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-12-12 001223.png" alt="Screenshot 2025-12-12 001223.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-12-12 001318.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2486i0B710230064A56EC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-12-12 001318.png" alt="Screenshot 2025-12-12 001318.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-12-12 001447.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2487i4912826CAF112E80/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-12-12 001447.png" alt="Screenshot 2025-12-12 001447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Further, if you have doubts, please keep posted, will discuss here.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;J Rajesh Kumar.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 18:53:57 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11442#M4425</guid>
      <dc:creator>rajeshjanapati</dc:creator>
      <dc:date>2025-12-11T18:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Leveraging Python in Workato &gt; Marketo</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11449#M4426</link>
      <description>&lt;P&gt;Since you're new to Workato, my honest opinion is you should try to do this using native Workato actions and not Python.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 04:53:11 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11449#M4426</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2025-12-12T04:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Leveraging Python in Workato &gt; Marketo</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11460#M4428</link>
      <description>&lt;P&gt;Yeah, this is the route I landed on. A simple formula with the 'phone' data pill.&lt;BR /&gt;&lt;BR /&gt;My issue now is I cannot update the Marketo leads with the new trimmed phone numbers.&lt;BR /&gt;&lt;BR /&gt;I think that this may be because our Marketo instance is configured to use a combination of two fields to ID a unique lead record (email AND company). Not sure how to get around that. =(&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 21:57:08 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/leveraging-python-in-workato-gt-marketo/m-p/11460#M4428</guid>
      <dc:creator>ecamarillo</dc:creator>
      <dc:date>2025-12-12T21:57:08Z</dc:date>
    </item>
  </channel>
</rss>

