Skip to main content
Best answer

Issues converting text to number for API Payload

  • May 12, 2025
  • 5 replies
  • 46 views

Forum|alt.badge.img

Hello Everybody.

 

I am trying to create a Zap that moves data from a Fundraiseup trigger (enabled when a donation is received) and sends it to an API endpoint. 

Below is a partial overview of the ZAP. 

The first step captures the details of the donation, which include ID, time stamps and several fields associated to the amount of the donation, like donation amount, tax, shipping costs, etc. 

Then I am trying to setup a POST using webhooks, but I keep receiving an error saying that all the fields that should be numeric are being received as TEXT. 

I added steps to format these numbers but that does not seem to be working. 

 

 

Each formatter step above has the following attributes:

Action Event = Text

Then I select the Text field I need to convert to number and the Transform action is Extract Number.

Then, in the last step I use the output from the formatted steps:

 

 

However, you can see in the error message that the end point still seems to be receiving a TEXT value and not a number :  (I also need to find a way to create an array, but that will be reviewed in a separate post) 

Can you please help me find a way to convert text to number in preparation to creating a json data set for an API end poin t?

Thanks in advance for any suggestions. 

Best answer by JGRolon

Thanks for the replies. We were able to complete the ZAP, and making word, using the Custom Request option and making sure the Json structure was properly formatted. 

 

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

5 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34072 replies
  • May 12, 2025

Hi ​@JGRolon 

Try this Zap action: Webhook - Custom Request

Then you can use raw JSON in the Body for the API request.


Forum|alt.badge.img
  • Author
  • Beginner
  • 5 replies
  • May 13, 2025

Hello ​@Troy Tessalone 

 

I will try to create the JSON structure, to validate this option works.

But still need to create the JSON structure using the data from the triggering step. 

So in the JSON below, is there a way to replace all the bolded items as variables/fields from the triggering step or any other steps prior to the Webhook - Custom Request action?

{

"order_id": "DCGECFRF",

"time_of_purchase": "2025-05-12T14:30:00Z",

"customer_id": "SAWPBREL",

"customer_email":"test.test@heart.org",

"customer_name": "test test",

"currency": "USD",

"purchase_total": 21.3 ,

"tax": 0,

"products": [

{

"id": "DCGECFRF",

"name": "Donation",

"quantity": 1,

"price": 21.3

}

]

}

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34072 replies
  • May 13, 2025

@JGRolon 

Yes, the Body field of the Custom Request allows you to insert/map dynamic variables.


Forum|alt.badge.img
  • Author
  • Beginner
  • 5 replies
  • Answer
  • May 19, 2025

Thanks for the replies. We were able to complete the ZAP, and making word, using the Custom Request option and making sure the Json structure was properly formatted. 

 


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 3527 replies
  • May 20, 2025

Wow! Thank you for confirming that Troy’s resolution got the Zap running. This will significantly help our Community members to have as a reference for the same issue.