How To Return Data From Backend API Workflows (no manual API connector)

Thwy can be triggered IN THE api workflow

In not finding the ‘Run (appname) (workflowname)’ action on the normal workflow, does any one knows why?

Have you added the call in the App Connector settings?

do you mean the App Connector plugin set up process?


no run option

Change the “Use As” dropdown from data to action.
Data APIs can only be used in dynamic expressilns, action APIs are workflow blocks

1 Like

solved!

a million thanks :pray:
wish i would of found this post sooner.

This very much helped me–thanks!

Really appreciate this mate. Do you know if there is a way to make the data types the same? In the backend workflow a parameter is set to type User. However when I try and use that data in the front end it is type Appname’s User.

You’ll have to Do a search for User:unique ID = Appname’s User’s unique ID:first item to convert it back to a data type (because the API connector doesn’t ‘know’ that this is a data type rather than any other API)

The issue with that is that then I would have to make the user data type public as the user isn’t logged in when this needs to happen (it’s part of the login process)

If you’re checking if a user exists with a certain email, a backend workflow that returns a yes/no is sufficient (userExists = yes/no). It would take the user email as a parameter, and return data from API as Do a search for user where email = BE workflow’s email:first item is not empty.

Otherwise you need to manually specify how each field is used when you’re using it (you can’t reference User’s X, you have to reference the API call’s X).

Really appreciate the help! However I need to assign a temp password to the user. I just realised now that I could do this in the backend and just return the password to log the user in. I’m not at my laptop now but I’ll update in case anyone else is having a similar issue

Okay, just have caution with security as you’ll run into the same security issue as here:

Great post, its really helpful.
I am using my flow for signup/login with an API. So what I decided to do is send the tokens retrieved on the front end to the backend workflow. Then make the call to get the email on the backend (I figured this is the security as it is almost impossible to guess these tokens), then assign the user with the email from the call a temp pw. Then send the pw back to the front end to log the user in. I was going to log the user in on the backend but realised that didn’t work.
Really appreciate the help.

2 Likes

Someone just pointed me to this post and my mind is blown, I’d never heard of this App Connector method.

Going to save me so much time setting up and updating via the API connector, thanks so much for sharing @georgecollier!

1 Like

Thanks for this @georgecollier. It seems like I may have hit an edge case as I am trying to set this up in my app with multiple branches but the App connector only seems to be able to reference workflows present in the live and main environments and can’t see workflows I create in a new branch. Have you experienced this?

You can actually send the ID of the user to the User field.

image

image

image