Connection variable does not work in RPC

My {{connection.apiKey}} variable works perfectly inside my module action, but the exact same variable does not work inside the RPC functions.

Note: I have selected the same ‘Connection’ for both, but when looking at my API server logs, I can clearly see that for the RPC function, my api_key field is sending an empty value, while in the actual action, it’s sending the api_key value.

Screenshot showing my variable and connection (this one is working):

And here’s my first RPC function, which is not sending the api_key:

{
  "url": "/get_steps/",
  "method": "GET",
  "qs": {
    "api_key": "{{connection.apiKey}}"
  },
	"response": {
		"iterate": "{{body}}",
		"output": {
			"label": "{{item.name}}",
			"value": "{{item.id}}"
		}
	}
}

I’ve tested hard-coding my key and everything worked perfectly, so I’ve really isolated it to just not being able to access the connection variable inside these RPC functions.

Thanks for any help!

Hi,

I’m encountering the same issue you described earlier.

In my module, when I make a GraphQL mutation call, it successfully picks up the Authorization header from the base configuration and it can use my apiKey. However, when using an RPC, the {{connection}} variable appears to be null.

Have you found any solutions or made progress on this issue?

Thank you in advance for any insights!

Hi! After speaking with Make support, I discovered what the problem was.

I had chosen to use the Static Fields instead of Mappable Fields because in my case, the field was an ID the user had to enter.

I was informed that for some reason, the ‘Static Fields’ are essentially a ‘legacy’ feature and don’t support certain features (although not documented).

In my case, simply changing the fields from static fields to mappable fields solved my issues, including the connection variable not carrying over.

I hope this helps!