Question

How do I refer to an external asset?

  • 19 October 2023
  • 2 replies
  • 38 views

I’m building an integration that will merge data into a (presumably static) template, and I’m trying to figure out how to let the user point my app to the template.  I’ve considered these approaches:

 

  1. When the user configures my action, he clicks an Upload Template input field, which opens a standard file dialog and lets him upload a local file.  The Zap stores this file and makes it available to my code as some dehydrated reference.  Unfortunately an inputField of type “file” doesn’t open such a dialog, so this doesn’t seem to work.
     
  2. The input field instead says “Choose Template” and provides a way for the user to select a file from Google Drive or whatever other Connections he has configured in Zapier.  Unfortunately the input widget offers Google Drive only when the Zap uses it as a trigger or a prior action; simply having set up a Connection isn’t enough.  Even if he adds an action he wouldn’t otherwise need, this seems an ugly workaround.
     
  3. The input field is instead a string field where the user can paste in the URL of a template hosted wherever he pleases.  This burdens the user with a file hosting problem: he has to make the template public or deal with some terrifying additional authorization config.
     
  4. The user leaves Zapier and logs in to a UI I build elsewhere.  It has the button described above in (1) which lets him upload a local file to my API’s storage.  When he goes back to Zapier, the Choose Template input queries my API and lets him choose among templates he has uploaded.  I’m confident this would work, but it’s an extra burden for us both.  I don’t really want to build, and the user doesn’t really want to use, another file management UI.

 

Are there options I’m missing?  These all seem pretty ugly, and this scenario of configuring a Zap with an external asset seems like it would be very common.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 2
Badge +1

These seem like reasonable options! Zapier is at its best when it is passing snippets of information around directly and referring to assets that exist elsewhere. You could add an action to add a given asset to your library of assets of course, but its a little clunky. 

I don’t really know what the template looks like (a text file? A big binary that is created elsewhere?) so its hard to gauge how to manage the upload. But I think the idea of having the upload exist on your site for a one-time cost and then having your automations manage the recurring action that uses that template feels very reasonable. 

The email exampls are also handy for examples of direct templated text and HTML managed directly in Zapier. They’re not huge documents, but they are a very frequent use case that’s probably about as verbose as this system is good at handling.

Zapier would prefer to manage a hundred duck-sized horses than a single horse-sized duck! 

Thanks, Raydeck.  The template is a binary PowerPoint file, so I can’t ask the user to type it in the way I could for an email template.  If hosting it on my site were a one-time operation I might go that direction, but I have yet to meet a truly one-time business process.  The template will get modified, perhaps frequently.  Perhaps forked into a library of templates.  Perhaps by multiple people.

I don’t really see this as an upload problem.  The concept of an asset--an opaque media file authored offline--is a routine one.  An asset has its own rich lifecycle.  It needs a home on the boulevard of standard storage platforms, not a shack on my proprietary cul-de-sac.

Upload is just one of the many the many features available on the boulevard.  Browsers all offer it via an HTML <input> field of type “file”.  Surely there must be a way to offer such a thing through Zapier?