To achieve this workflow in Azure Logic Apps, you can follow these general steps:
- Trigger on Service Bus Queue: Set up a trigger that fires when a message is received from the Service Bus Queue.
- Batch Processing: Since you want to process 500 records at a time, you'll need to implement a batch processing mechanism in your Logic App. Azure Logic Apps can be configured to process messages in batches using iterations or loops.
- Convert to CSV: Inside the loop or iteration, you'll need to accumulate the received messages and format them into CSV format. You can use the "Data Operations - Create CSV table" action in Logic Apps to format the data into CSV.
- Concatenation: After processing all the messages in the batch, you may need to concatenate the CSV files if you are uploading them as a single file to SFTP.
Upload to SFTP: Once you have the final CSV file, you can use the SFTP connector in Logic Apps to upload the file to your SFTP server.