triggers: - Recurrence: # Set the frequency of the Logic App frequency: 'Hour' interval: 1 actions: - AzureBlobStorage: # Get the documents from Blob Storage ListBlobs: blobPath: 'your-blob-path' - ForEach: # Loop through each document actions: - AzureCognitiveSearch: # Extract information from the document LookupDocument: documentKey: '@{items('ForEach').Name}' - HTTP: # Call the OpenAI API to generate a text summary Method: 'POST' Uri: 'https://api.openai.com/v1/engines/davinci-codex/completions' Headers: Authorization: 'Bearer your-openai-api-key' Body: '@{items('ForEach').Content}' - Office365: # Populate the Word template PopulateWordTemplate: fileId: 'your-word-template-id' contentControls: TotalPrice: '@{items('AzureCognitiveSearch').TotalPrice}' OrganizationNames: '@{items('AzureCognitiveSearch').OrganizationNames}' TextSummary: '@{items('HTTP').Body}'