Hi,
have a look at the Azure Event Grid output binding for Azure Functions document.
another alternative way is to use a CDE Webhook destination to fire the AEG Custom topic with a cloudevent schema and using the advanced filtering in the subscription.
Note, that the ce-id, ce-source, ce-specversion and ce-type headers must be added.
Thanks
Roman