The 'DateTime Formatter' action from the Data Formatter App by Integration Glue allows you to transform and format date and time values within a HubSpot workflow. This action is designed to convert date and time properties into a consistent format that can be used across your CRM and automations.
By selecting the appropriate format type and specifying the relevant date or datetime property, the action will automatically adjust the date and time values based on your configuration. This ensures that all dates and times are formatted correctly, whether for reporting, triggering workflows, or sending notifications.
The DateTime Formatter action can handle both date-only and datetime values, making it flexible for various use cases. You can choose from predefined formats or create a custom date-time format, such as YYYY-MM-DD HH:mm:ss
. It is particularly useful for standardizing date-time data, handling time zone conversions, or extracting specific components (e.g., day, month, or year).
This action is beneficial when you need to ensure consistent and accurate handling of dates and times in HubSpot workflows, especially when working with external systems, creating custom reports, or triggering actions based on time-sensitive criteria.
- Format Type Specifies how the date and time should be formatted.Options might include standard formats (e.g., ISO 8601, Unix timestamp) or custom formats.
- Property Containing Datetime Format The property from the enrolled HubSpot record that holds the datetime value to be formatted.
- Property to Save Formatted Datetime The property where the newly formatted datetime value will be saved
- Custom Format (optional) A field where you can define a custom datetime format if none of the predefined formats meet your needs. Example: "MMM DD, YYYY" for a date like "Jan 14, 2025."
- Timezone Property (optional) A property from the enrolled record that contains the timezone information for formatting the datetime.
- Default Timezone (Used if timezone property is empty) (optional) A fallback timezone that will be used if no timezone property is provided in the record.
- Use Portal Timezone (optional) If enabled, the app uses the timezone set for your HubSpot portal to format the datetime, regardless of the specified timezone property or default timezone
Step 1: Create a New Workflow
- In your HubSpot account, navigate to the Automation tab and select Workflows.
- Click on the Create workflow button.
- Choose a workflow type (e.g., Contact-based, Deal-based, Company-based, or Custom Object-based) based on your use case.
- Set your workflow’s trigger criteria (e.g., when a deal is closed, a contact is created, etc.).
Step 2: Add the 'Datetime Formatter' Action
- After setting up your triggers, click the + button to add an action.
- In the action sidebar, scroll down and select Data Formatter App.
- From the list of actions, choose Datetime Formatter.
Step 3: Configure the Action
-
Format Type
- Select the desired datetime format (e.g., Custom, Readable format, ISO 8601).
- Example: Choose "Readable format" for a user-friendly date output like "January 14, 2025."
-
Property Containing Datetime Format
- Select the property that contains the datetime value you want to format.
- Example: Use "Last Modified Date" or "Close Date."
-
Property to Save Formatted Datetime
- Specify the property where the newly formatted datetime will be saved.
- Example: Create or select a property like "Formatted Close Date."
-
Custom Format (Optional)
- If you selected "Custom" as the format type, define the datetime format pattern here.
- Example: Enter
dd/MM/yyyy HH:mm
to get a format like "14/01/2025 15:30."
-
Timezone Property (Optional)
- Choose a property that specifies the timezone for formatting the datetime.
- Example: Use "User Timezone" for dynamic timezone adjustments.
-
Default Timezone (Optional)
- Set a fallback timezone if the Timezone Property is empty.
- Example: Specify "UTC" or "America/New_York" as the default.
-
Use Portal Timezone (Optional)
- Enable this option to use the HubSpot portal’s timezone, overriding other timezone settings.
Step 4: Review and Save
- Review all settings to ensure accuracy.
- Click Save to finalize the action configuration.
Step 5: Test the Workflow
- Trigger the workflow by performing an action that matches the enrollment criteria.
- Verify that the datetime value has been formatted correctly and saved in the specified property.
Step 6: Use the Formatted Data
- Utilize the formatted datetime in subsequent workflow actions, reporting, or CRM processes.