# Server-Side Plugin Action

**URL:** <https://forum.bubble.io/t/server-side-plugin-action/240980>\
**Category:** Plugin builders\
**Created:** [January 11, 2023, 10:32am UTC](https://forum.bubble.io/t/server-side-plugin-action/240980 "2023-01-11T10:32:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh.gain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@josh.gain](https://forum.bubble.io/u/josh.gain)\
**Post date:** [January 11, 2023, 10:32am UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/1 "2023-01-11T10:32:47Z")

</div>

Wondered if anyone can help me with my first effort into plugin building!

I am trying to create a plugin that enables me to use the Zoom Meeting SDK so that we can host meetings directly inside of our app.

So far I have installed the SDK via CDN, defined the group in which I want the player to come through but then I’m stuck.

I have to run some script on a server-side node event which I have got the code working in playground and returning the expected signature, but I can’t seem to get this to run successfully within bubble and it seems to return no values when I call it from a client side workflow.

I am sure it will be very basic but can’t for the life of me figure it out?

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [January 11, 2023, 11:12am UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/2 "2023-01-11T11:12:11Z")

</div>

> [@josh.gain](#):
>
> seems to return no values when I call it from a client side workflow.

These don’t return values exactly.

Can you share your server side code that’s not working?

---

<div class="post-metadata">

**Author:** ![josh.gain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@josh.gain](https://forum.bubble.io/u/josh.gain)\
**Post date:** [January 11, 2023, 11:58am UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/3 "2023-01-11T11:58:33Z")

</div>

![Screenshot 2023-01-11 at 11.56.32](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4a498aafd9f1d8e7eefda7af9ed4ecd23490e4ed.png)

Here’s the code that works and outputs the signature I need on playground. Then when I put that into a server side action on plugin struggling to retrieve the signature I need to then be put into a client side action that let’s them join the Zoom meeting.

---

<div class="post-metadata">

**Author:** ![josh.gain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@josh.gain](https://forum.bubble.io/u/josh.gain)\
**Post date:** [January 11, 2023, 1:40pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/4 "2023-01-11T13:40:35Z")

</div>

@jared.gibb So for complete clarity:

In playground I have the following:

 ![Screenshot 2023-01-11 at 11.56.32](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4a498aafd9f1d8e7eefda7af9ed4ecd23490e4ed.png)

In this environment it successfully generates me a signature (what I am trying to create):

 ![Screenshot 2023-01-11 at 13.31.55](https://us1.discourse-cdn.com/bubble/original/3X/8/f/8fcaa597fb200c7a35b246c1891d88ae1a9b9847.png)

I am then taking that code and installing it into a Server Side Action in the Bubble plugin editor between the required function(prop…) {}, installing the correct node package and setting a Returned Value of sdkJWT:

 ![Screenshot 2023-01-11 at 13.34.04](https://us1.discourse-cdn.com/bubble/original/3X/2/6/267d795fb50e6610265727c7653a83fcdb31f28d.png)  
 ![Screenshot 2023-01-11 at 13.36.01](https://us1.discourse-cdn.com/bubble/original/3X/2/7/27f5f38d7cf47c0568eea84b75897ba5c1fc59eb.png)  
 ![Screenshot 2023-01-11 at 13.37.34](https://us1.discourse-cdn.com/bubble/original/3X/e/4/e4f104673f0893296cc967fe9d79a0768d0ed8be.png)  
 ![Screenshot 2023-01-11 at 13.37.51](https://us1.discourse-cdn.com/bubble/original/3X/1/a/1a89d1c8b2c8f7d5865d75d4bc08f9d3419f426e.png)

I am then setting up the front-end workflow to trigger this action on button click with a second workflow step that sets the state of the page with the sdkJWT returned output:

 ![Screenshot 2023-01-11 at 13.39.17](https://us1.discourse-cdn.com/bubble/original/3X/3/a/3a10c8df13488db0b8e557a8e56245facf4a80dd.png)

This keeps returning blanks…

Any ideas?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 11, 2023, 1:55pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/5 "2023-01-11T13:55:52Z")

</div>

There is no env variables in SSA. Actually I’m not sure if you have `process` at all.  
If you need to pass secrets yoou need to use the “additional keys” in the “shared” section of the plugin. You can choose to have the key public or private and you can access them like this `context.keys.yourkey`.  
Also you need to return something from the action.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 11, 2023, 1:56pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/6 "2023-01-11T13:56:46Z")

</div>

You cannot return directly a value. You need to return the parameter value using something like:  
`return {"sdkJWT": sdkJWT}`

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 11, 2023, 1:59pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/7 "2023-01-11T13:59:02Z")

</div>

It looks like it’s returning a value from the internal function `generateSignature`, but nothing from the action.

---

<div class="post-metadata">

**Author:** ![josh.gain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@josh.gain](https://forum.bubble.io/u/josh.gain)\
**Post date:** [January 11, 2023, 4:31pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/8 "2023-01-11T16:31:58Z")

</div>

This was it! Thanks Jici!

---

<div class="post-metadata">

**Author:** ![josh.gain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@josh.gain](https://forum.bubble.io/u/josh.gain)\
**Post date:** [January 11, 2023, 4:32pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/9 "2023-01-11T16:32:45Z")

</div>

Thanks Dorilama, yep you were write - had to define the variable from the function and then return it in the way Jici shared

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 11, 2023, 4:42pm UTC](https://forum.bubble.io/t/server-side-plugin-action/240980/10 "2023-01-11T16:42:50Z")

</div>

tip for the future: bubble actually tells you what should it be the return object for backend actions, updated with your return fields. It’s visible when you click “show documentation” 🙂  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/8/b86e5f5a9aa83fe7c15c9493c9227d1ed0f3b80e.png)
