CMS Development

mdwagner
Member

Auto Generating numerical access codes in Email workflow

We are running an online training course followed with online exams to obtain a certification. Each user has a different access code per exam- I am wanting to automate or put some sort of rule in the workflow that each registrant is sent a different set of codes that are in accesending order. Example. Test 1: access code: 190001 ... the second registrant would be 190002... and so on? 

Any insight is extremely helpful.. or any better practices!

0 Upvotes
1 Reply 1
lscanlan
HubSpot Alumni
HubSpot Alumni

Auto Generating numerical access codes in Email workflow

Hi @mdwagner,

 

I'm not seeing an easy way of doing what you're trying to do. If you're sending contacts through a workflow, and if you have access to using webhooks in workflows (https://knowledge.hubspot.com/articles/kcs_article/workflows/how-do-i-use-webhooks-with-hubspot-work...), you could send a webhook to an external system. Or alternatively you could use the Webhooks API to subscribe to certain events, and then send the request to your external system. That system could hold the incrementing value, and then you could update a contact property with the Contacts API (https://developers.hubspot.com/docs/methods/contacts/update_contact) with that incrementing value.

 

If you have questions about those APIs, let me know.

 

Leland Scanlan

HubSpot Developer Support
0 Upvotes