Hi all ,
We’re in the process of developing a custom app and we’re wondering if our intended app flow is possible within the constraints of Asana’s app components.
App Flow:
- The entry point is a button that brings up a modal form.
- In the form, the user makes a selection that brings up an updated dynamic form. We have several branching paths with different forms here, all resulting in the user eventually submitting their chosen form.
- At this point, our app server takes over and affects changes in Asana (and across a bunch of other systems) via API. No further interaction with or modification of app components is desired.
- Users should be able to initiate the app flow again, starting by interacting with the aforementioned entry point.
And here’s where our concerns come in, as it seems that the last two bullet points might not be possible as envisioned.
In the documentation for app components, it says:
Once a form is submitted, the information is sent to the app server and Asana will perform different functions depending on what the server responded with.
And in the documentation for handling the On submit callback
for modal forms, the schema shows that Asana expects the app server to return an AttachedResource
response which it will then attach to the task on which the app flow was run.
I haven’t been able to find a definition or schema for the AttachedResource
object, but looking through the example apps, it seems that it’s possible to return a minimal response consisting of just two fields (resource_name
and resource_url
), as shown here.
This brings me to a couple of questions that I would love to get your insight on:
- Is it possible to end the app flow after form submission and have Asana not perform any follow-on actions? Most apps tend to display a widget with information from third-party sources. Is it possible to avoid this?
- For example, can we respond to the
On submit callback
without returning anAttachedResource
response or by returning an empty response that will not result in the creation of an attachment to the task where the app flow was run? - Alternatively, what would if we don’t return a reponse to the
On submit callback
at all? What happens when the 10-second timeout is reached?
- For example, can we respond to the
- Are there any examples / definitions for what
AttachedResource
objects can look like? - Is the idea that the entry point app component must always be replaced by the
AttachedResource
being returned? As mentioned above, we’d like for the entry point to return to its normal ready state after form submission.
Thanks so much for your help!