# GID of the custom fields in a task

**URL:** <https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127>\
**Category:** API & Developers\
**Created:** [15 May 2024 07:48 UTC](https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127 "2024-05-15T07:48:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eloi\_Oliveras](https://luna1.co/8d76cd.png) [@Eloi\_Oliveras](https://forum.asana.com/u/Eloi_Oliveras)\
**Post date:** [15 May 2024 07:48 UTC](https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127/1 "2024-05-15T07:48:40Z")

</div>

Hi! I’m trying to automate an Excel spreadsheet by extracting data from Asana with Microsoft Power Automate. I’ve managed to set up a flow so that when a task is closed in Asana, a row is generated in a cloud Excel file on OneDrive with the data from the task. However, I still need to get the data from the custom fields I’ve created, and for that I need to get the GID of the custom fields. I’ve tried to get them using the API but I can’t find a way. Can anyone help me?

---

<div class="post-metadata">

**Author:** ![John\_Baldo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/john_baldo/32/163575_2.png) [@John\_Baldo](https://forum.asana.com/u/John_Baldo)\
**Post date:** [15 May 2024 17:37 UTC](https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127/2 "2024-05-15T17:37:23Z")

</div>

Hi,

Sorry, I’m not familiar with Power Automate. But if you have access to make API calls, these calls should give you the custom field values on a specific task (possibly needing task id, but not custom field id).

[Get a single task by id](https://developers.asana.com/reference/gettask)  
`https://app.asana.com/api/1.0/tasks/{task_gid}`

[Get multiple tasks](https://developers.asana.com/reference/gettasks) (maybe not best for your case) and specify custom fields as an optional field with `opt_fields`.  
`https://app.asana.com/api/1.0/tasks?opt_fields=custom_fields`

Note that custom fields have a lot of information within. So if you know which fields you need, you can specify `custom_fields.display_value`, etc in a comma separated list. [Sample JSON here](https://developers.asana.com/reference/tasks).

---

<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:** [16 May 2024 02:52 UTC](https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127/3 "2024-05-16T02:52:09Z")

</div>

> [@John\_Baldo](#):
>
> if you know which fields you need, you can specify `custom_fields.display_value`,

@Eloi_Oliveras I would highly encourage you to take advantage of this capability if you can. It allows you to get the values of the custom fields you need right in the task call without having to do additional calls to retrieve values. It also avoids you having to deal with custom field `gids` at all - which is even more problematic in Excel as by default, Excel’s numeric precision typically chops off the rightmost digit in Asana `gids` (I figured out a way around that and it’s documented here in the forum but it’s a pain to deal with).

---

<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 18:59 UTC](https://forum.asana.com/t/gid-of-the-custom-fields-in-a-task/805127/4 "2025-05-30T18:59:32Z")

</div>

Closed on 30 May 2025 18:59 UTC


