# Widget unable to view in Task screen

**URL:** <https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255>\
**Category:** API & Developers\
**Tags:** widget\
**Created:** [29 December 2022 08:16 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255 "2022-12-29T08:16:53Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [29 December 2022 08:16 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/1 "2022-12-29T08:16:53Z")

</div>

Dear Team,

Created one sample widget by using the below link, Added in the App Component and later by customizing the form added to the form as well, But unable to view into Task form.  
It will be great if you can help me.  
Thanks,  
Snaush  
Ref Link: [App component examples](https://developers.asana.com/docs/example-apps)

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [30 December 2022 16:51 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/2 "2022-12-30T16:51:22Z")

</div>

Hi,

> [@anon6878416](#):
>
> But unable to view into Task form

I don’t understand this part. You coded a form and a widget, what don’t you see and where did you expect it?

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [30 December 2022 16:55 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/3 "2022-12-30T16:55:03Z")

</div>

Hi Bastein,

My requirement to view only widget to the task form to display the details from another ticketing system. I have node.js which is internally will call our Rest API to fetch the record,

Thank you!

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [30 December 2022 17:00 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/4 "2022-12-30T17:00:13Z")

</div>

Ok your use of the wording “task form” was confusing, because AppComponents allow you to create a form as well. You need to go through the docs to create a widget, a task will display a widget if it has the appropriate attachment created on the task. When this attachment is found, your code will be called to render the widget. Does it make sense?

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [30 December 2022 17:07 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/5 "2022-12-30T17:07:34Z")

</div>

I created the widget as per the document. I don’t want to open any form pop any to the user.  
I just want when any task created in asana, widget automatically render by calling the another app server.  
I don’t want user to submit any form.

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [30 December 2022 19:07 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/6 "2022-12-30T19:07:36Z")

</div>

Getting exception when replacing the widget\_response with actual value

 ![image](https://us1.discourse-cdn.com/asana/original/3X/6/1/61048b355f45fddea0cf7bd7de2ca74ec7df9e94.png)  
 ![image](https://us1.discourse-cdn.com/asana/original/3X/6/1/61048b355f45fddea0cf7bd7de2ca74ec7df9e94.png)

Code snippet

app.get(“/widget”, (req, res) =\> {  
console.log(“Widget happened!”);  
var task= “Widgets creation for asana”;  
var url= xxxx + ‘xx/tickets?xx=summary="’ + task +‘"&fields=id,summary,company’;  
axios.get(url, {  
headers: {  
Authorization: token  
}  
})  
.then(response =\> {  
tikcteNumber=response.data[0].id;  
summary= response.data[0].summary;  
company=response.data[0].company.name;  
console.log(response.data[0]);  
debugger;  
var widget\_response = {  
template: “summary\_with\_details\_v0”,  
metadata: {  
fields: [  
{  
name: “Ticket”,  
type: “pill”,  
text: tikcteNumber,  
color: “none”,  
},  
{  
name: “Summary”,  
type: “text\_with\_icon”,  
text: summary,  
},  
{  
name: “Company”,  
type: “pill”,  
text: company,  
color: “hot-pink”,  
},

```
    ],
    footer: {
      "footer_type": "custom_text",
      "icon_url": "https://example-icon.png",
      "text": "I'm a footer"
    },
    num_comments: 2,
    subicon_url: "https://placekitten.com/16/16",
    subtitle: "I'm a subtitle",
    title: "I'm a Widget",
  },
};
console.log(widget_response);
console.log(widget_response1);
res.json(widget_response);

```

})  
.catch(error =\> {  
debugger;  
console.log(error);  
});

});

Can you please let me know what i am missing here!

Thank you!

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [31 December 2022 08:32 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/7 "2022-12-31T08:32:58Z")

</div>

> [@anon6878416](#):
>
> I just want when any task created in asana, widget automatically render by calling the another app server.  
> I don’t want user to submit any form.

I might be wrong but I think you’ll need some code to upload an attachment on each task.

> [@anon6878416](#):
>
> Getting exception when replacing the widget\_response with actual value

When you use the example response it does work? And then with your code it doesn’t?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [31 December 2022 17:41 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/8 "2022-12-31T17:41:44Z")

</div>

> [@Bastien\_Siebman](#):
>
> I might be wrong but I think you’ll need some code to upload an attachment on each task.

No, when the widget gets added correctly, it should automatically create the attachment. I guess it’s possible to hack things by creating the attachment oneself but that’s not the way it’s “supposed” to be done.

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [31 December 2022 19:00 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/9 "2022-12-31T19:00:59Z")

</div>

But the widget is added how then? As the result of a form being submitted? Because if you can’t use a form you have to fake it by uploading your own attachment don’t you?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [1 January 2023 15:50 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/10 "2023-01-01T15:50:14Z")

</div>

> [@Bastien\_Siebman](#):
>
> Because if you can’t use a form you have to fake it by uploading your own attachment don’t you?

Yes, good point, I think that’s right. Since @anon6878416 doesn’t want to a add a widget via a form, I guess they will have to create the attachment.

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [2 January 2023 13:00 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/11 "2023-01-02T13:00:56Z")

</div>

@Bastien_Siebman @Phil_Seeman any help how to create attachment, also how can i pass the current task name , taskid to widget API .

Thank you!

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [2 January 2023 13:12 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/12 "2023-01-02T13:12:39Z")

</div>

Yes it is working fine with sample html, not with dynamics actual value from another api response.

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [2 January 2023 14:58 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/13 "2023-01-02T14:58:30Z")

</div>

When an example works but not my code, I try to modify the example step by step until it matches what I need 😓

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [3 January 2023 16:18 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/14 "2023-01-03T16:18:38Z")

</div>

Team, Any help appreciated to create attachment via API. Thank you!

---

<div class="post-metadata">

**Author:** ![anon6878416](https://luna1.co/8d76cd.png) [@anon6878416](https://forum.asana.com/u/anon6878416)\
**Post date:** [3 January 2023 19:28 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/15 "2023-01-03T19:28:57Z")

</div>

Hey @Bastien_Siebman@Phil_Seeman ,

Any help or hack possible to create attachment for display the widgets.

Thank you!

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [4 January 2023 10:21 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/16 "2023-01-04T10:21:36Z")

</div>

I believe I used the upload attachment endpoint, and passed a `resource_name` and `resource_url`, the URL matching the pattern given in the app configuration.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:03 UTC](https://forum.asana.com/t/widget-unable-to-view-in-task-screen/290255/17 "2025-05-30T19:03:01Z")

</div>


