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:
I give the action a name and a “create” type
I give it a API Base URL from Zapier and post method, I give it inputs and the body JSON.
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?
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
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
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
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.
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:
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?
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.