We do our best to ensure that the code in these articles works as advertised, but please be aware that Zapier Support does not officially help with code steps due to their advanced nature. Feel free to comment on the article or ask in the Zapier Community, where we have code-savvy users.
The Purpose
To manipulate text by slicing from the start and/or end.
How to Configure
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/daa7f292-6aee-454b-85b7-4694b57332e6.png)
Copy the Code
let Text = inputData.Text;
let Text1 = Text.slice(4); // slice off the first 6 characters (0-5)
let Text2 = Text.slice(-6); // slice off the last 6 characters
let Text3 = Text.slice(0,5); // slice only the first 6 characters (0-5)
let Text4 = Text.slice(3,-4); // slice from after first 4 characters (0-3) and before the last 4 characters
// NOTE: First character position starts at 0
output = t{Text, Text1, Text2, Text3, Text4}];
The Results
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/fa820e6e-cb55-43ae-a461-69d0bbc20273.png)
Contribution by Troy Tessalone
Troy is a Certified Zapier Expert who automates workflows with no-code and low-code apps to help clients save time and make money.