API call to pull submitted data and push to form media

Is there a way to chain API call on server to:

  1. Pull submitted data as CSV
  2. Push the CSV as media to one or more existing forms

The general answer is yes. I have already done that but via remotely hosted server using API key auth.

However, can it be (3)scheduled or (4)scripted to to run in event of a new submission or (5) combination of 3&4 on local server e.g. in digital ocean?