Skip to main content

Hello,

 

I use zapier to create my invoices with the corresponding payment link through the Mollie intergration.

Now I need to use the US number notation. So 1,200.50 instead of the Dutch 1,200.50.

I had solved this by replacing the , with a dot, this works when the number stays below 1000. So 150,00 becomes 150.00.

Above 1000 this is not going to work because then you have both a , and a .. Do any of you know how I can modify this so that correct payment links are created? Now amounts above 1000 are created incorrectly.

 

 

 


 


Hi there @Waggie,

It looks like we’re going to need the Code by Zapier step for this to be possible. I asked ChatGPT about the code that we’re going to use and here’s how to achieve this:

  1. Add the Code by Zapier action step.
  2. Choose the “Run Javascript” event.
  3. Type “Number” in the “Input Data” field and map the number to the right field.
  4. Copy and paste this code to the “Code” field:
    const originalNumber = inputData.number; // Assuming 'number' is the field with your amount // Replace Dutch format with US format // First remove the period used for thousands, then replace the comma with a period let formattedNumber = originalNumber.replace(/\./g, '').replace(/,/g, '.'); output = ({formattedNumber}];
    a3db31017fd8b65c6d917b24238eaa68.png
    (view larger)
     
  5. Here’s the result:
    89c406e2172f3ca435004e851e7f6e5f.png
    (view larger)

Hopefully, this helps!


Hello Ken.A,

 

Thx for your response! I just found a easier way to do this. See printscreen, now it works!

 

Action you need to change to Format number and then you can choose to switch a Comma for grouping and period for decimal!

 

 


That’s really awesome @Waggie! You’re definitely correc! Using Numbers in Formatter by Zapier is easier.

Also, thank you for sharing your solution here. I really appreciate it!

Happy Zapping! ⚡️