Question

Python in Zapier

  • 10 September 2022
  • 1 reply
  • 22 views

Userlevel 1

ello :)

 

I am trying to create clean data to go into air table. I have successfully used the HTML Mark Down, Regex, and Split Text functions to get to here. Which allows me to pull out key data for the fields I need. This has successfully posted to AirTable.

Now i would like to see if i can clean the data more, mainly removing the ‘|’ and the ‘>’ and ‘---|---’ from the fields. I figured this would be easiest in the Python Code tool however, the simple replace function I am used to using doesn’t seem to be working any advice?

 

Item 1

Company

Item 10

| Hourly GBP £15.00

Item 11

Location

Item 12

| London, UK

>

Item 13

Address

Item 14

| Ground Floor Burgess Business Park, Parkhouse St, London SE5 7TJ

Item 15

Note

Item 16

|

> Shift Details!

>

> |

Item 2

| Ground Floor Burgess Business Park

> ---|---

>

Item 3

Job Name

Item 4

| TEST JOB

>

Item 5

Shift

Item 6

| Day

>

Item 7

Schedule

Item 8

| 09:00 - 18:00 on 2022-08-25

>

Item 9

Pay


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @sp2222 

Good question.

If you are trying to handle line items within a Code step, then you can use a FOR loop.

 

The JavaScript .replace() method can be used to replace values: https://www.w3schools.com/jsref/jsref_replace.asp