Custom links

Hello I would like to create a field with custom links as you have by default with linkedin (or X?). For example, I want to add a link to pitchbook. The link is in this format : https://my.pitchbook.com/profile/623705-68/ And I want to see only the company id (623705-68). Today I see the first part (my.pitchbook.com). Is it possible to create this kind of behaviour? Same for cbinsights : https://www.cbinsights.com/company/rainforest -> "rainforest"
7 Replies
Prastoin
Prastoin2mo ago
Not possible atomically using the link field metadata You could either create a workflow that will extract the id out of the link field and populate a custom column on record creation
greg [iero]
greg [iero]OP2mo ago
Thanks prastoin So in fact, a way to solve this would be to create a serverless function in a workflow triggered by "Pitchbook" field udated. I have to find how to get the pitchbook.primaryLinkUrl value and how to update the pitchbook.primaryLinkLabel ie : data: {pitchbook: {primaryLinkUrl: "https://my.pitchbook.com/profile/623705-68/", primaryLinkLabel: "623705-68"}}
Prastoin
Prastoin2mo ago
Yes you should have a workflow listening to records mutation, on custom link field update extract the path params you want using js and update the record's row, for example, a dedicated field pitchbookLabel You won't be able to add the primaryLinkLabel in the existing link field It's not a known property I woudl recommend storing that in a custom field text It could be configured as unique too
greg [iero]
greg [iero]OP2mo ago
Done and it works. If anybody want to do something equivalent, here is the workflow with the 4 steps (filter to not relaunch the workflow after update).
No description
No description
No description
No description
greg [iero]
greg [iero]OP2mo ago
Here is the Action code: export const main = async (params: { pitchbook: { primaryLinkUrl: string; primaryLinkLabel?: string; }; }): Promise<object> => { const { pitchbook } = params; // Clean URL let url = pitchbook.primaryLinkUrl; url = url.replace(/\/company\/profile\/?$/, ''); // Extract ID const match = url.match(/profile\/([^\/\?]+)/); const pitchbookId = match ? match[1] : ''; // Return "update" if update needed, empty string otherwise const shouldUpdate = pitchbook.primaryLinkLabel !== pitchbookId ? "update" : ""; return { shouldUpdate, pitchbook: { primaryLinkUrl: url, primaryLinkLabel: pitchbookId } }; };
greg [iero]
greg [iero]OP2mo ago
The result : id as a label
No description
Prastoin
Prastoin2mo ago
Nice well done ! and thanks for sharing

Did you find this page helpful?