Recently I did the same function and you can find the examples here. You need the function QueueTrigger-PowerShell. hth
$json = Get-Content $triggerInput | ConvertFrom-Json
Write-Output "PowerShell script processed queue message '$json'"
$title = "PowerShell Table Entity for message {0}" -f $json.id
$entity = [PSObject]@{
Status = 0
Title = $title
}
$entity | ConvertTo-Json | Out-File -Encoding UTF8 $outputTable
To control to which table to write data you can use function.json. For me row and partition keys were specified there:
{
"type": "table",
"name": "outputTable",
"tableName": "pancakeTable",
"connection": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"direction": "out",
"partitionKey": "some value",
"rowKey": "I don't remember what was here but it was some form of variable (guid) generated from the request by Azure"
}
This is my function.json, but originally it had partition and row key values hardcoded into it. Right now I'm using powershell to generate those (copy-pasted from another answer in this thread):
PartitionKey = $requestBody.room
RowKey = get-date -Format "yyyy-MM-dd H:m:s.ms"