Doing bulk within a formula is a little difficult. Bulk by nature is an asynchronous job. While Formulas are a synchronous procedure. The trick to getting them to work together is webhooks.
There are two ways to know when a bulk job is completed. You can set the header Elements-Async-Callback-Url and receive a webhook when the job is done.
The proper way to do it, is to have two formulas. One to start the bulk job and set the Elements-Async-Callback-Url to manually trigger a second formula that downloads the results and sends them somewhere else.
Here are the example formulas. They will bulk download from one instance, and bulk upload to another.
IMPORTANT NOTE: for these formulas to work, you must use a common resource! You must be able to call
GET /MyCommonResource, copy a payload that gets returned and call
POST /myCommonResource to the other endpoint. I will include my example transformations.
2. Create the common resource by calling
POST /organizations/objects/MyContact/definitions with this payload: ObjectDefinition.json
3. Create transformations for Salesforce by calling
POST /organizations/elements/sfdc/transformations/MyContact with: MyContactSFDC.json
4. Create transformations for DynamicsCRM by calling
POST /organizations/elements/dynamicscrm/transformations/MyContact with: dynamicscrmMyContact.json
5. Create a formula instance for Bulk Step 2 and capture the ID of the created formula instance.
You will need to give the Bulk Step 1 formula the instance ID for the second formula. This will let the webhook trigger the correct formula instance
6. Create a formula instance for Bulk Step 1 using the formula instance id from step 5.