Handling Empty Datetime Variable in Custom Action to Prevent Failure | Community
Skip to main content
Question

Handling Empty Datetime Variable in Custom Action to Prevent Failure

  • March 24, 2026
  • 5 replies
  • 120 views

I’m using a Custom Action with some Datetime elements.

Whenever I have empty element I send the response back to Intercom using something like this:

"0000-00-00T00:00:00+04:00",

When I test the Custom Action, the “Test response” brings back exactly this Datetime format, and it gives me a 200 OK.

Same for “Data transformation” and “Object Mapping”, all OK.

However, in production, we are getting several errors. The Intercom Logs of this Custom Action suggest the Mapping is not happening (when the request and response are 200 OK). The only different data I saw between a Log with a mapping and a Log without the mapping was an “empty” Datetime, like the one above.
 
What’s the proper way of sending an Empty Datetime?

 

5 replies

Cédric V
Innovator ✨
Forum|alt.badge.img+3
  • Innovator ✨
  • March 26, 2026

Hi ​@Rosa M,

Actually i think that the actual issue could be because the date “0000-00-00T00:00:00+04:00” is invalid. because 0000-00-00 represents year 0, which doesn't exist in the Gregorian calendar (or ISO 8601 standard), valid years start from 0001.

Intercom's datetime parser expects strictly valid dates. When it encounters this fake "zero date" (a MySQL legacy hack for NULL), it either silently fails or rejects the value entirely, breaking the Custom Action mapping even if HTTP returns 200 OK.

May I ask, have you try to not put any date or to use “null” ?

It could be an idea to try to use “9999-01-01” rather than “0000-00-00”. Or to use the UNIX timestamp `253402300799` (9999-01-01) that you can filter out in workflows.

→ If it doesn’t work, you can try with : “2099-01-01” (UNIX timstamp : 3208643200) (because there might be a time limit)

Would be glad if you keep me in touch,

Hope it’ll help !  


  • Author
  • New Participant
  • March 27, 2026

  • Author
  • New Participant
  • March 31, 2026

Hi Cedric!

I hear you, the thing is when I use a “null” value, the mapping fails: it gives an error of wrong format and invites you to undo the relations of the fields that fails.

That’s the reason why I search for other options
 

However, I have tried the Data Connector by placing “null” whenever I don’t have the data and it works, just as “0000-00-00T00:00:00+04:00” works.

 

PD: At the end we decided go a different way and simply not send the field at all. Thank you for your insight!

I will monitor it to see whether the “null" option gives me less alerts/failures “live” or not when mapping.

I’ll keep you posted it. 

 

 

Hi ​@Rosa M,

Actually i think that the actual issue could be because the date “0000-00-00T00:00:00+04:00” is invalid. because 0000-00-00 represents year 0, which doesn't exist in the Gregorian calendar (or ISO 8601 standard), valid years start from 0001.

Intercom's datetime parser expects strictly valid dates. When it encounters this fake "zero date" (a MySQL legacy hack for NULL), it either silently fails or rejects the value entirely, breaking the Custom Action mapping even if HTTP returns 200 OK.

May I ask, have you try to not put any date or to use “null” ?

It could be an idea to try to use “9999-01-01” rather than “0000-00-00”. Or to use the UNIX timestamp `253402300799` (9999-01-01) that you can filter out in workflows.

→ If it doesn’t work, you can try with : “2099-01-01” (UNIX timstamp : 3208643200) (because there might be a time limit)

Would be glad if you keep me in touch,

Hope it’ll help !  

 

 


You shouldn’t send an “empty” datetime as "0000-00-00T00:00:00+04:00"—that’s not a valid ISO 8601 value and can break parsing in production systems like Intercom (Read More).

The proper approach is to send null for empty datetime fields, or omit the field entirely from the payload. Both are standard and safely handled in most APIs and mappings.


  • New Participant
  • April 14, 2026

You shouldn’t send an “empty” datetime like 0000-00-00T00:00:00+04:00—it’s not a valid ISO format and often breaks mappings in production (More Information). Instead, send null or omit the field entirely. Most systems, including Intercom, handle null values correctly for empty datetime fields.