Custom Action Error

Custom Action Support

I’m attempting to render data from an API and send that data to an email address when the user clicks send email on the item details screen

I do this using custom actions and Zapier

On the Zapier side, everything works fine. I use a catch hook and Gmail integration on a premium plan. This sends my test data to my email without a problem.

The live app has some issues. It doesn’t send the data. Zapier doesn’t even receive the request I believe because my Zap history is empty.

In Adalo:

  1. I give the action a name and a “create” type
  2. I give it a API Base URL from Zapier and post method, I give it inputs and the body JSON.
  3. I run the test request and it is successful

Again, when I run the app live, it is not sending to Zapier. Where did I go wrong?

Here’s the app: No Code Sports League

Attached images to show successful tests…


Attached screenshots of the inspector…
On the API request for the list data (even though it renders)…


On the request to Zapier to send the data of that list item…

Recording…

Hi,

What you can do to troubleshoot this yourself is to create a new collection internally in Adalo, name it whatever you want, then add all the properties that are also being sent to the custom action. Now, add a Create action after your custom action that records all the same details as the custom action itself.

You can then review the record created in Adalo to see if any data is wrong or missing entirely and then troubleshoot further why that might be the case

Thank Colin,

I’ve made an update to the ticket.

I’m receiving the data from the API.

Zapier is not receiving the request from Adalo.
The data of a particular item needs to be sent from Adalo to trigger a workflow

Is there any multi line text in your data going to the API request? Multi line can break the json body.

No,

The API request works in development during configuration but not production. I updated the ticket to show that with images.

I don’t have access to your tickets, just pointing out a problem i’ve seen before.

I can see your app and it very much looks like multi line data. Title is 2 lines, body is 6. You have many line breaks.

It might be worth testing if your zap works with single line data, to eliminate this as a possible issue.

Zapier is not even receiving the request from Adalo while live.

During setup, it works

That’s why I don’t understand what you’re suggesting. When I set it up it’s fine. When I test live Zapier doesn’t even receive the request.

If what you’re saying was the case why would the tests pass for both Zapier and Adalo in development.

Because your live data is usually different to your test data. I can’t see your test data, so just giving you an idea.

I’m exclusively using the API for data.

The same data is being used for test and prod. I’ve now added a recording.

The retrieving works fine. It’s send data to Zapier that’s a problem.

So you have a big multi line description when setting up custom action? Because if I try that, it says invalid JSON body.

So if you set up your custom action with a simple example phrase, but then on live try to send in lines of data, can you see why it might not work?

It would take you 30 seconds to change the data on your database to check if this is the issue.

Also I think an unrelated issue, but the data for title and description is different between the main list page and the details page after you click onto view details.

My workaround was to create a collection native to adalo. Instead of automating a zapier workflow directly from a button. It sends the data to the collection. Any new record added to the collection triggers the workflow in zapier

1 Like

Hi all,

Some time ago I’ve faced similar issue with data working from test setup, but not working from the actual app.
In my case it was a QR code content comprised of several lines. The effect was the same - Integromat (in my case) didn’t receive anything and Adalo didn’t report any errors.

Moreover, it seemed to work with one “multiline” values and didn’t work with another ones. I didn’t have a lot of time to dig in deeper - which character causes this problem, I ended up getting the data the other way.

It would be nice to have some debugging capabilities in Adalo for such cases…

Just my 2 cents and for future searches, if someone stumbles upon similar problem :slight_smile:

Best regards, Victor.

Hey Victor,

It seems there’s a bug with the custom actions feature. My workaround was to send the data to an internal collection inside Adalo and trigger a Zapier workflow that way. Any time a new record was recognized in the collection, an email would be sent.

Hope it helps a little

To start with - glad you’ve found a workaround.

Reg JSON - as for me it’s difficult to say whether it is a bug or a feature.

By the standard, JSON does not allow line breaks inside it; line breaks should be replaced with “\n”.
So, from one point of view, custom action not working when JSON contains line breaks (which as I see happened in your case) is kind of “expected behaviour”.

For example, this custom action of email sending doesn’t work:

And this custom action works:
Screenshot 2021-05-17 at 13.15.58

From other perspective, it could be a good idea to replace line breaks with \n automatically. There is no easy way to do that from the app builder, unfortunately.

@theadaloguy have you submitted any ticket reg. this? I didn’t find anything on Canny, you think it is worth a feature request?

Best,
Victor

1 Like

@Victor I didn’t submit a ticket this has been an issue for a long time particularly when people are trying to do emails e.g. Sendgrid.

I’m thinking to create a solution for it, but a feature request might be good.

I was struggling my self for hours to understand why my custom action wasn’t working until I found this post.
I made an inspection on the flow of data from beginning to the end, and I found 1 space that was adding a new line in the end of string content and nothing more, that was blocking the custom action, probably as @Victor said above:

By the standard, JSON does not allow line breaks inside it; line breaks should be replaced with “\n”.
So, from one point of view, custom action not working when JSON contains line breaks (which as I see happened in your case) is kind of “expected behaviour”.

I took it out and everything worked smoothly. In my case a “string function like TRIM” would treat the value and would make it work. But I understand TRIM function will not cover all cases as you can have break-lines in the middle of string content.

1 Like