# Custom Coded Workflow Action: Parsing a PDF

**URL:** <https://community.hubspot.com/t/custom-coded-workflow-action-parsing-a-pdf/137484>\
**Category:** CRM\
**Tags:** workflows, sales\
**Created:** [August 5, 2025, 3:20pm UTC](https://community.hubspot.com/t/custom-coded-workflow-action-parsing-a-pdf/137484 "2025-08-05T15:20:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![McBainKD](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcbainkd/32/78471_2.png) [@McBainKD](https://community.hubspot.com/u/McBainKD)\
**Post date:** [August 5, 2025, 3:20pm UTC](https://community.hubspot.com/t/custom-coded-workflow-action-parsing-a-pdf/137484/1 "2025-08-05T15:20:01Z")

</div>

Hey team,

Wondering if someone can help me with building out a custom coded workflow action to support parsing a PDF when uploaded and extracting information to other properties, without the need to use a third party application.

When I try to use const pdf = require(‘pdf-parse’);, it doesn’t seem to implement properly so I’m wondering if this isn’t something that’s possible with this action, but wondering if anyone has experienced anything differently?

---

<div class="post-metadata">

**Author:** ![Victor\_Becerra](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@Victor\_Becerra](https://community.hubspot.com/u/Victor_Becerra)\
**Post date:** [August 5, 2025, 8:34pm UTC](https://community.hubspot.com/t/custom-coded-workflow-action-parsing-a-pdf/137484/2 "2025-08-05T20:34:03Z")

</div>

Hi @McBainKD  
Thank you for reaching out to the Community!  
I’d like to invite some community members who are subject matter experts to join this conversation.  
@karstenkoehler @OBetzalel [@Alex\_Elborn](https://community.hubspot.com/t5/user/viewprofilepage/user-id/73663) - Would you be able to share any insights on this? Your expertise would be greatly appreciated.  
Best,  
Victor

---

<div class="post-metadata">

**Author:** ![Victor\_Becerra](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@Victor\_Becerra](https://community.hubspot.com/u/Victor_Becerra)\
**Post date:** [August 21, 2025, 9:46pm UTC](https://community.hubspot.com/t/custom-coded-workflow-action-parsing-a-pdf/137484/3 "2025-08-21T21:46:03Z")

</div>

Hi @McBainKD ,

After doing some research I found that you’re correct, that pdf-parse won’t work in custom code actions. HubSpot only supports a [specific set of libraries](https://developers.hubspot.com/docs/reference/api/automation/custom-code-actions)in their serverless environment, and pdf-parse isn’t included.

Your best option is to create an external service that handles the PDF parsing, then call it from your workflow action using the actionUrl or a PRE\_ACTION\_EXECUTION function. Your external service can use any PDF parsing library you need.

Alternatively, since aws-sdk and googleapis are supported, you could use AWS Textract or Google Document AI for the parsing.

Check out the [Custom Workflow Actions documentation](https://developers.hubspot.com/docs/reference/api/automation/custom-code-actions) for implementation details.

Hope this helps!
