@daveguderian in an ideal world, you wouldn't need to do this, but the "Path to file URLs in HTTP response body" field does not accept an array of values except for string arrays. We have in the backlog to enhance this field to accept JSONPath, but not date on when that would be done.
So in the meantime, there are a couple ways to solve this.
- You could create a connection to Cognito Forms and have it set with 0 authentication since these urls are public. From there, you could have a one-to-many on a lookup step to fetch the blob. IMO, this isn't ideal because it costs you an additional endpoint.
- We use integrator.io's mirror api as a tool to accomplish this. The mirror endpoint simply gives you a response back with the exact thing you send to it. So in this case, we will send the attachment link to it, get that same response back, then use the "Path to file URLs in HTTP response body" feature because we've manipulated the data ahead of time to be compatible with this field's limitations.
Going with #2, I would first add a transform step to your export to get a single array of all the attachments. In this case, attachments is mapped to:
$.EandOAttachment[*],$.W9Attachment[*],$.LicenseAttachment[*]
Under the field map settings, use the copy object feature for each of the object tabs:
Then on your lookup step, choose "attachments" as the one-to-many path. In the post body, just post this:
{
"Attachment": "{{{record.Attachment}}}"
}
Then for the "Path to file URLs in HTTP response body" use "Attachment". In the below screenshots, you can see we send just the attachment link and after we set the "Path to file URLs in HTTP response body" field, we get the link back, but also get fileMeta and a blobKey. The blobKey is what you need for your google drive step.
Result mapping of lookup:
Google drive step: