PLAID API Setup Help

Yes

Assuming your Group will be called "group", in the JSON Data field of your API Action you type:

{{ group.toJSON() }}

@Apple This is great, I went ahead and put that into a GROUP and the JSON DATA and I believe it's working.

Now one of the 'Set Value's is getting an error to be an 'ARRAY' but I have it set as this and does not seem to fix it:

"country_codes must be an array of strings"

You need to use the .split formatter to convert a string to an array, splitted at a comma:

{{ $_ENV.PLAID_COUNTRY_CODES.split(',') }}

Glad you got it working now!

@Apple Thanks, only with the help of this community haha.

I am getting another user.client_user_id must be a non-empty string - but as you can see in previous screenshot's the string is not empty, it is actually pulling the variable correctly. Is there a specific parameter that would need to be set for that?

As I can see in the previous screenshot, the variable is not a non-empty string, but rather an integer (a number, not a text containing a number). Carefully compare what you send in Postman with what you have

123 is different from "123"

@Apple I see that I have it set as Text in the properties. But this is the particular Group, within the main Group for the user name. If this makes a difference.

Oh, unfortunately that's just metadata that doesn't affect the execution. I probably opened a feature request that went ignored.

You can probably find a formatter to convert to string

@Apple Looks like I figured it out, finding this screen here to convert to string.

Regarding the 'Repeat' action inside a API Action Flow, I am trying to insert the variables from the multiple different 'accounts' the come through but, the database only generates the auto-create 'account_id' variable (primary). Which tells me that I may be using the wrong variable for the repeat?

Does anything look wrong here?.

2 things here.
Can you show the tree view? It's easy for some of us here..
Also, can you tick output on the repeat and test it? Check network and inspect what the api throws on "repeat"

@franse Here is the tree view. I have Output for it on. It always comes back with the successful payload of the accounts and the fields within.

Here is an example response with the current setup. I do notice no 'repeat' mention in the payload, but it does list the accounts and the fields I want to capture.

On your repeat expression join values with comma ,

Please remove (or disable it) the response and try gain

@famousmag That was for testing purposes. All of those have been removed. I wanted to make sure each action was going through successfully and they are. But good try!

@franse Is this what you mean? This makes the output fields empty with nothing to choose. But can try...

@famousmag So I ended getting the full payload, didn't realize I had one more 'Response' in the flow.

I found the 'repeat1' at the bottom of the payload. But the variables still not working.

No, you need to convert the set value into an array

But the repeat is throwing 2 results, and not only one, you have 2 items on {{accounts}} what is not working?

@franse Yes the payload is correct. If you look what happens to my database inserts, it is not getting the variables. Only creating the integrated #, which tells me its working but the variables are wrong or in the wrong format.

How do I do this? You think Wappler would know that most payloads are array(s)?

Don't worry, it seems your repeat works fine.
On the insert table, just send {{name}} {{type}} {{mask}} etc.
All without repeat.1
And see how it goes

1 Like

@franse Thanks for the help with that. I am now further down my API flow and I am now on my next speed bump, this is refering to 'start_date' and 'end_date' fields. I have them set as inputs and have the set with the 'SET VALUE' tool in the flow, but still getting error_message": "the following required fields are missing: end_date, start_date I have even edited them with the properties. Do you see here why I may be getting this error?

That formatting looks really weird, just saying (or maybe I'm not used to it)

Can you show the exact expression?