# Activate Button with an automation rule

**URL:** <https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010>\
**Category:** Automations\
**Tags:** page-design, automation, button\
**Created:** [August 15, 2024, 3:41pm UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010 "2024-08-15T15:41:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franzi](https://forum.seatable.com/letter_avatar_proxy/v4/letter/f/71e660/32.png) [@Franzi](https://forum.seatable.com/u/Franzi)\
**Post date:** [August 15, 2024, 3:41pm UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/1 "2024-08-15T15:41:04Z")

</div>

Hello SeaTable Team,

currently I use a button to creat a PDF from pagedesign.  
Is it possible to write an JavaScript code, that “clicks the button” and build it in an automation, that is activated if the data meets a specific condition?  
If it is possible, what would the code look like? (I have limited knowledge in programming)

---

<div class="post-metadata">

**Author:** ![cdb](https://forum.seatable.com/user_avatar/forum.seatable.com/cdb/32/7_2.png) [@cdb](https://forum.seatable.com/u/cdb)\
**Post date:** [August 16, 2024, 8:35am UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/2 "2024-08-16T08:35:07Z")

</div>

That is not possible. Javascript is executed in the browser, python is executed on the server.  
Therefore, Javascript can not be executed by an automation.

---

<div class="post-metadata">

**Author:** ![Franzi](https://forum.seatable.com/letter_avatar_proxy/v4/letter/f/71e660/32.png) [@Franzi](https://forum.seatable.com/u/Franzi)\
**Post date:** [August 16, 2024, 9:17am UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/3 "2024-08-16T09:17:34Z")

</div>

Is it then possible to activate a button (click it) by using a Python script with an automation insead of JavaScript?

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [August 16, 2024, 10:34am UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/4 "2024-08-16T10:34:22Z")

</div>

No, there is no api endpoint for “clicking a button”. Generally, PDF generation is currently not supported via scripts/api.

---

<div class="post-metadata">

**Author:** ![cdb](https://forum.seatable.com/user_avatar/forum.seatable.com/cdb/32/7_2.png) [@cdb](https://forum.seatable.com/u/cdb)\
**Post date:** [August 16, 2024, 7:00pm UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/5 "2024-08-16T19:00:41Z")

</div>

Probably Gotenberg might be a Solution: [GitHub - gotenberg/gotenberg: A developer-friendly API for converting numerous document formats into PDF files, and more!](https://github.com/gotenberg/gotenberg)

It allows pdf Generation via API.

By the way: there will be a Talk on the [SeaDays](https://seatable.io/seadays2024) about this topic.

---

<div class="post-metadata">

**Author:** ![daniel.pan](https://forum.seatable.com/user_avatar/forum.seatable.com/daniel.pan/32/13_2.png) [@daniel.pan](https://forum.seatable.com/u/daniel.pan)\
**Post date:** [August 16, 2024, 11:29pm UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/6 "2024-08-16T23:29:12Z")

</div>

This is an automation rule, “Periodically run for records meeting condition” → “convert page to PDF”. Can this meet your need?

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [August 18, 2024, 11:29pm UTC](https://forum.seatable.com/t/activate-button-with-an-automation-rule/5010/7 "2024-08-18T23:29:55Z")

</div>

Closed on August 18, 2024, 11:29pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
