The QueueTrigger example in the Automatic triggers section doesn't work, it throws a FunctionIndexingException:
Error indexing method 'MyClass.Run'
Inner exception is InvalidOperationException:
Unable to resolve binding parameter 'myQueueItem'. Binding expressions must map to either a value provided by the trigger or a property of the value the trigger is bound to, or must be a system binding expression (e.g. sys.randguid, sys.utcnow, etc.).
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@thomaslevesque Thanks for the question! We are investigating and will update you shortly
But the issue is related to Azure docs... It gives an example that doesn't work.
The issue is that the sample code uses incorrect expression: "samples-workitems/{myQueueItem}". Here, the runtime cant resolve the "myQueueItem". If you take a look at the referenced article on binding expressions here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#trigger-metadata , you'll see that instead "myQueueItem" you should use "QueueTrigger", the full expression should be "samples-workitems/{QueueTrigger}". So this is exactly incorrect docs issue @SnehaAgrawal-MSFT.
@thomaslevesque Thanks for Clarification. My Apology for late response and inconvenience with this issue. Your feedback has been shared with the content owner for further review.
@andriysavin you are essentially correct. The Blob input binding is basically getting passed the queue trigger itself, not the binding parameter. This is a special case for Blob storage that supports a key storage pattern: queue triggering of blob processing. I'll get this fixed ASAP.
Most helpful comment
The issue is that the sample code uses incorrect expression: "samples-workitems/{myQueueItem}". Here, the runtime cant resolve the "myQueueItem". If you take a look at the referenced article on binding expressions here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#trigger-metadata , you'll see that instead "myQueueItem" you should use "QueueTrigger", the full expression should be "samples-workitems/{QueueTrigger}". So this is exactly incorrect docs issue @SnehaAgrawal-MSFT.