[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.

2 Likes

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!

8 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

Thank you for the help! It was a bubble bug and has been taken care of. I appreciate it.

benjamin

@ben4 What was the fix? I am actively having this error and losing business because of it. Please share.

Hey @chesmith11. I hate to say it, but I dont remember. I have a brain injury and dont remember the past anymore. can you create a loom video and show me what is happening, ill attempt to help you solve this. :slight_smile:

I got the fix and it worked out for me.

Hi guys,
I was trying to accomplish the same and run into following problem:

  • Once App1 sends data to App2 we receive an error message displaying “Error connecting to a Bubble app: Missing parameter for workflow wf_createOrganization: parameter wf_OrgName

Any suggestions @chesmith11 & @ben4 how to solve the problem?

Edit: noticed that workflow name and workflow key names should not contain special characters and needs to be all written in small characters to work.

@jamesbond Can you explain step 4 in more detail? I’m not understanding how you’re setting up the workflow to make the API. Furthermore, I’m not sure what you’re "creating " in the first green box. I tried to replicate the steps and nothing is happening, nor am I getting any errors.

Also what are you creating in the second part of that workflow? All of the references in the next part are saying “result of step 2”