How to format or remove duplicate data in Zap?

  • 25 July 2021
  • 2 replies


I’ve got a Zap connecting Docparser to Xero, the Zap uses all the data from an Invoice/Receipt that was sent to Docparser to create a Bill in Xero. There are Line-Items in my original ‘Invoice/Receipt’ and I’d like to use the first 2-words of each Line-Item as the ‘Bill Reference’ inside Xero.


Here’s the issue I need to solve: Sometimes the first 2 words of the various Line-Items are identical and end up repeating the same data in the ‘Bill Reference’. Is it possible to format this identical data to replace: ‘Item N, Item N, Item N, Item O’ and format it as: ‘3x Item N, Item O’?


Has anyone got a technique for this?

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

2 replies

Thank you for the response Troy, I suspected I might need to have it coded. 


Thanks again,

Userlevel 7
Badge +14


You’d likely have to use some custom Code such as JavaScript or Python to dedupe and transform the line item data.

This can be done using the Code app:

You may want to consider hiring a Zapier Expert to help: