Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save HubSpotHanevold/b46d48a15e3d31500c896b544ed60f06 to your computer and use it in GitHub Desktop.
Save HubSpotHanevold/b46d48a15e3d31500c896b544ed60f06 to your computer and use it in GitHub Desktop.
{% set this_time = request.query_dict.this_time %}
{% set todays_time = unixtimestamp(datetime.now()) %}
{% if todays_time - this_time > 172800000 %}
<h2>
LINK EXPIRED
</h2>
<p>The value of this_time is: {{ this_time }}</p>
<p>
today's time is: {{ todays_time }}
</p>
{% else %}
<script src="https://js.hsforms.net/forms/embed/21420236.js" defer></script>
<div class="hs-form-frame" data-region="na1" data-form-id="15be0479-990b-44e1-8593-720cc2c9d627" data-portal-id="21420236"></div>
{% endif %}
@HubSpotHanevold
Copy link
Author

Use this CCA in workflow:
exports.main = async (event, callback) => {
let time_right_now = Date.now();

callback({
outputFields: {
time_right_now: time_right_now
}
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment