Recently I was working with AI agents in Azure AI Foundry and built a workflowRecently I was working with AI agents in Azure AI Foundry and built a workflow
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Recently I was working with AI agents in Azure AI Foundry and built a workflow where an agent can generate documents and store them automatically.
When a user requests a document, the agent generates the file name and content, then triggers an Azure Logic App (registered as an agent action). The Logic App then stores the document in Azure Blob Storage inside a folder specified by a folderId.
While implementing this, I ran into an interesting issue.
You cannot simply create a blob with a .docx extension and expect it to behave like a real Word document. Doing so results in a corrupted file that Word cannot open.
The workaround was to first generate a temporary Word file using the “Create a Microsoft Word document with the given content” action in OneDrive.
But that introduced two additional challenges:
• The action returns a download URL instead of the file content, so an HTTP GET request was needed to retrieve the actual file data. • The file ID required for deletion wasn’t directly returned, so the flow had to list files in OneDrive and filter by file name to obtain the ID before deleting the temporary file.
After retrieving the file content, it’s converted from Base64 to binary and stored in Azure Blob Storage.
Final flow:
AI Agent → Logic App → Word generation → Blob Storage
A small but practical pattern for integrating AI-generated content with document storage workflows.
Post image
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started