Hi!
There's a lot to tackle so I'll try my best.
-- Storing the file --
If you want people to have files in CRM to be processed for this case, I'd set up a new queue called "Files to Process" or something. When you have a file to process, create a Task and attach your file as a note, then assign it to the queue. When your code is processing files, it'll look for Open tasks assigned to that queue and close (or delete) them after its been processed. This will let you track the files to import in CRM, as well as the ones that have already been completed (in case you need to reference them in the future).
-- Scheduling --
Having a recurring workflow seems like its been the most common feature request for years. There are a few hackey ways to do it, and a couple that are more reliable.
Option 1 - Windows service
If you're using CRM on premise and have access to the server, you can create a windows service to run and either trigger the workflow at the right time, or process the file directly. This is very reliable because the service will be running as long as your service is up - you won't need to worry about a single workflow failing and having cascading issues. I use this technique all the time and it's my preference.
Option 2 - SSIS
If you're storing the file to process in CRM then this probably isn't the way to go. It would make sense if you had it on a server or database, but not already in CRM.
Option 3 - Workflows initiating workflows
This is a hackey way to have one workflow kick off another that runs at a later time. I don't like this because one workflow could fail and that would break the whole process.
-- Processing --
This depends partly on how long the file will take to process. In workflows and in plugins, there's a two minute timeout and anything longer than that will fail. If the file will take longer than you need to do the actual processing outside of CRM (directly in the windows service, most likely).
If the file processing will be quick, you can write it as a custom workflow assembly. Here's a good write-up on creating a custom workflow step. msdn.microsoft.com/.../gg334455.aspx
Wherever you code actually runs, processing it will be the same. You'll find annotations and the documentbody field will have the content of the uploaded document as the string representation of the bytes of the file. To convert it to a byte[] for proper processing, you'd convert it like this:
byte[] fileContent = Convert.FromBase64String(theDocumentBodyField);
I think that covers everything. If I missed anything or I need to clarify I'd be happy to. As always, I'd appreciate if you could mark any helpful answers as Verified.
Thanks,
Aiden