In this challenge, you create a new Logic App for your data export workflow. This Logic App will execute periodically and call your ExportLicensePlates
function, then conditionally send an email if there were no records to export.
TollBoothLogic
ExportLicensePlates
// TODO 5: Retrieve a List of LicensePlateDataDocument objects from the collectionLink where the exported value is false.
licensePlates = _client.CreateDocumentQuery<LicensePlateDataDocument>(collectionLink,
new FeedOptions() { EnableCrossPartitionQuery=true,MaxItemCount = 100 })
.Where(l => l.exported == false)
.ToList();
// TODO 6: Remove the line below.
// TODO 7: Asyncronously upload the blob from the memory stream.
await blob.UploadAsync(stream, true);
FUNCTIONS_V2_COMPATIBILITY_MODE
with a value of true
in the application settings.