How do I negate a value?

I have a scenario that includes a HTTP module that makes an API call, and receives a JSON response.

One of the values in the response is an integer value. I want to negate that value and use it in a subsequent module.

For example, if the response is 12, I want to transform it to -12.

How do I do this?

I would have expected that I could do it with a Set Variable module and a math operation, but I’m struggling to find the right syntax.

Below is a screen shot of one of my (failed) attempts:

Welcome to the Make community!

I was able to negate using *-1

So, the issue is whether your mapped variable in blue is correct. For that you’ll have to provide more information about your scenario.


Please share screenshots of the module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:


Please export the scenario blueprint file to allow others to replicate the issue. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.


Uploading it here will look like this:

blueprint.json (12.3 KB)


Please provide the input/output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the contents as a bundle.json file, and upload it here into this discussion thread:


Following these steps will allow others to assist you here. Thanks!

Well, this is a little embarrassing - I just tried that again and now it works :man_facepalming:

I’m not sure why it didn’t work earlier. Oh well - thanks :slight_smile: