Hi HubSpot community!
Looking for some code savvy contributor that can support.
I’m trying to sync a birthday custom property from Shopify into HubSpot. Since custom property sync is not supported in the Shopify-HubSpot integration, I built a workflow with a custom code action to extract the birthday value from the Shopify Tags property and store it in a HubSpot custom single-line text property called “Cumpleaños”. The birthday is stored in the tags in the format Birthday: YYYY-MM-DD. However, I keep fixing the code and cant find to make it work even if when I test I get success and green little dot but for some reason the tag is not being found and not working propertly.
I’ll share the code below and screenshot of the workflows
Here’s the code:
exports.main = (event, callback) => {
console.log(“event.inputFields:”, event.inputFields);
const tags = event.inputFields[“ip__shopify__tags”] || “”;
console.log(“DEBUG - Tags value:”, tags);
const birthdayTag = tags
.split(“,”)
.map(t => t.trim())
.find(t => t.toLowerCase().startsWith(“birthday:”));
let extractedDob = “”;
if (birthdayTag) {
extractedDob = birthdayTag.split(“:”)[1].trim();
}
console.log(“DEBUG - Extracted birthday:”, extractedDob);
callback({
outputFields: {
extractedDob: extractedDob
}
});
};
Hi @CarolinaDeMares ,
Thanks for sharing the details — you’re definitely on the right track trying to use custom code in a workflow to extract the birthday from Shopify tags. However, parsing a value from a tag string (like “Birthday: YYYY-MM-DD”) and reliably mapping it to a HubSpot property can be tricky, especially when formatting or spacing isn’t always consistent.
If you’re only trying to pull the tag and save it as a text string, the custom code might work with enough tweaking. But converting that into a clean, date-formatted value for reporting or automation purposes inside HubSpot is where things can get messy.
That’s why I’d recommend using a middleware solution like Zapier or Make.com (even their free tier can handle this). With those tools, you can:
- Directly extract the Shopify birthday property
- Match via Email fields to update a same contact
- Push it into the custom Cumpleaños (date) property in HubSpot — no custom code needed
If you’re still keen on solving it via custom code, happy to review your code snippet and provide one-time support to debug it further!

Hey, @CarolinaDeMares
Great question.
Have you tried:
- In your custom code action settings, under Property to include in code, remove the cumpleanos property
- Click Add property and search for your “Tags” property - `ip__shopify__tags`
I think the root issue is, your code is trying to find the birthday in the `ip__shopify__tags` property, but you’ve configured the action to include the `cumpleanos` property instead.
Talk soon! — Jaycee