How to send clientid or topic in rules

We’ve set up EMQX 5.0 in a kubernetes cluster running in GCP. We managed to create a data bridge with a rule that takes everything in a topic like /devices/# and we to create a rule to republish that into our webserver. The ${payload} works fine but we cannot work with the ${clientid} or ${topic}. What can be happening?

How is your SQL written? If you don’t use the form SELECT * FROM ..., then you need to select it manually, such as SELECT clientid, username FROM xxx

The strange thing is that I’ve tried with both * and the specific select like

SELECT clientid FROM “t/#”

When doing both, I managed to get the ${payload} nothing else works.

Hi, it is best to provide detailed configuration. Some variables only exist in specific events. For example, the payload variable only exists in the message.publish event.