If following this doc Extend Azure IoT Central with custom rules using Stream Analytics, Azure Functions, and SendGrid I noticed from the screenshots you changed some parameters.
Your function code should look like this:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have tried mirosoft doc for iot central for getting device id from telemetry data but it's giving null value.
i have tried through stream analytics job as they described through Event Hub but it's not working. i am attaching the screenshot for more information
If following this doc Extend Azure IoT Central with custom rules using Stream Analytics, Azure Functions, and SendGrid I noticed from the screenshots you changed some parameters.
Your function code should look like this: