Can Asana accept Hubspot deal start and end dates in custom fields? Custom fields work if dates are left blank
I have an Asana project that has 2 custom Date fields.
I want to put the HUBSPOT DEAL START DATE in one
and the HUBSPOT DEAL END DATE in the other.
but I can’t get it to work?
Does anyone know how to get Asana to read this / accept these dates
(currently formatting it into DD/MM/YY)
Asana isn’t accepting the input, which also causes it to not update the other custom fields
(i.e. the other custom fields work if i leave the dates blank)
Page 1 / 1
Hi there @Mark J,
Before we dive deeper, it's worth checking if Asana has specific requirements for date formats that need to match the format in your Asana app. Could you kindly confirm whether the date format you're trying to send matches the one specified in your Asana app?
Please keep us posted!
Great Question @ken.a
I was thinking the same.. that it might be the date format.
All I could find online was that it only accepts MM-DD-YYYY
but I tried that and it still wouldn’t work.
Hi @Mark J
Good question.
Generally app APIs use this format for dates: YYYY-MM-DD
Give that a try and let us know.
Thanks for responding Tony appreciate your help.
The Default date format coming out of hubspot looks to already be in YYYY-MM-DD
and unfortunately that doesn’t work.
@Mark J
Try passing in this value format: {“date”:“YYYY-MM-DD”}
Wanted to share since I hadn’t seen this anywhere yet. For the new Date custom field type, when reading a date value via the API you receive “date_value”: { “date”: “2022-08-18”, “date_time”: null } For a date. If the value was a datetime, then you would have “date”:null and “date_time” would have an appropriate value.
When updating a custom field in a task, instead of simply specifying the value for the field as “2022-08-18” like you might for a text field, you have to pass an object with either (but not both) a “date” key or a “date_time” key. These dates then follow the same formatting as due_on and due_at.
So to update a date custom field, the call would look something like: “custom_fields”: { “4578152156”: {“date”:“2022-08-18”} },
I didn’t see this in the API docs yet and I didn’t find it when trying to search the forums.
If you use the wrong format, the API returns an error saying your object isn’t formatted correctly or that it was expecting an object, but it took a little trial and error to get it right. Hope this helps someone else.
thanks Troy, tried your suggestion. and once again all custom fields are blank.
{“date”:“1. Deal informatio…: Deal End Date:2023-06-25”}
I made a task on the project, entered the dates and then added a find task step to the zap to test the results
and it looks like yes the date format is YYYY-MM-DD (SEE BELOW)
I even tried reformatting to the display value - that didn’t work
and then tried using another existing property value with that same formatting - again no avail
Haven’t used API calls before. so thanks for posting the links. (appreciated)
copy and past of the find task “end date” custom property field data.
name
End Date
description
created_by
gid
1200509354043476
name
Sally Nicholson
resource_type
user
id
1200509354043476
display_value
2023-07-31T00:00:00.000Z
resource_subtype
date
resource_type
custom_field
date_value
date
2023-07-31
date_time
null
is_formula_field
false
is_value_read_only
false
type
date
id
1204585168369917
@Mark J
Unsure if this will make a different, but try adjusting the double quotes to not be slanted, but instead straight vertical. " (yes there are 2 types of double quotes)
well I didn’t know that there was two types.
typed it in (instead of copy and paste) and looked to be straight quotes… no luck
even tried adding _value just incase that worked - NOPE
@Mark J
Did you try it with “date” instead of “date_value”?
100% @Troy Tessalone tired that first as you suggested
it was only when that didn’t work did I try adding in the _value ( in some vain hope )
To do that, you’ll first need to get the Asana Workspace ID.
You can get this manually from an Asana Zap step where you select the Workspace. (see example below)
OR
You can use the AsanaAPIExplorer: Workspaces > GET /workspaces (make sure to select all checkboxes for Include Fields and adjust other settings as necessary)
Then you can use the AsanaAPIExplorer to get the WorkspaceCustomFields: Custom Fields > GET /workspaces/:workspace_gid/custom_fields (make sure to select all checkboxes for Include Fields and adjust other settings as necessary)
@Troy Tessalone you absolute LEGEND.!!!!!
Followed those instructions and BOOM! start dates and end dates are now on the test task.!!
There’s no way I would have been able to figure that out on my own.
massive thanks man.!!
(Didn’t need to put in a workspace Id)
Just wanted to pop in and mention Troy really is the .
Love seeing such an excited end to a thread and appreciate you swinging back around to let us all celebrate with you!