Forum Documentation Showcase Pricing Learn more

[SOLVED] Create a "thing" in App2 from App1

So I’ve seen this topic a couple times, however, I’m still quite confused…

Essentially, I would like users in App1 to create a thing which stores data in both App1
and App2, however, I don’t know how to trigger this from App1. I’ve set up an api endpoint in App2 (which has a workflow set to create a “thing” in its database) and I’ve also set up an Api call action via the Bubble App Connector in App1. Would I need to use the "Schedule Api Workflow" in App1 or use the "Run App2" workflow in App1 to trigger creating a “thing” in App2? Perhaps I may need to set up another endpoint in App1 to connect to App2? I need further direction on how I can go about successfuly doing this.

1 Like

I’ve finally figured out how to achieve this and I’m going to be posting a comprehensive tutorial for anyone that is interested in achieving a similar thing.

[UPDATE - TUTORIAL]

So I basically wanted to create a “thing” in one Bubble app (App2) from another Bubble app (App1).

Step 1 Go to App2 (the app you want to create a new “thing”) then Settings > API. Then tick the checkbox “This app exposes a Workflow API” (see green arrow) - you might want to also tick the second checkbox below in case you would like to expose App2’s data to any other application - not just a Bubble app. This will then show the “API Workflows” page which is at the bottom of the page menu. Then as you can see by the other highlighted checkboxes, decide what data you would like to expose to App1 by ticking them.

Step 2 Create a new API Endpoint. The “Key” should be the field that is in the “thing” you are creating and the “Type” should be the type of data (i.e. text, number, date etc).

Step 3 Now go to App1 and use the Bubble App Connector plugin to make an API action call. Get your Private Key from Step 1’s API Token (haven’t shown it in the screenshot but it’s literally just below the checkboxes). Your app domain is your bubble app or if you’ve got a custom domain linked to your app you should use that. “Add an API Call” and find the name of your API Endpoint (the one you created in step 2). Set the “Use as” to “Action” and “Authentication” to “API key”

Step 4 This is the part I was confused with. Go to the page where you want to trigger the action and create a workflow that runs it. Start a workflow> Add an action by clicking “Plugin” > Run “(name of your app2)”, then fill in the inputs for the Keys you created in Step 2. That’s it your done!

5 Likes

Hey this was great, although I am still getting an error when following all of your instructions. I am getting: Workflow error - Sorry, we ran into a temporary bug and can’t complete your request. We’ll fix it as soon as we can; please try again in a bit!

Does this make sense, or would you like if it I made screenshots also?

I appreciate any help!!! Thank You!

Benjamin

Hey @ben4,

This seems like a Bubble bug, however, if you could dm me some screenshots so I can get a better understanding, it will help.

Regards
-James