Magic Text Not Working For File Links

Hi,

Sorry in advance for the long-winded explanation of what is going on. I just want to be as detailed as possible, since I have already troubleshooted a lot up to this point.

I have a custom action setup when a user uploads a file (it creates an item in a “Temp Files” Adalo collection with that file), then the custom action takes the file URL from that newly created file (in the Adalo collection) and uses that URL (via Magic Text) to upload the file to Cloudinary. However, the URL does not seem to be working with Magic Text. I have tried this a lot of different ways and cannot get it to work, except for when I run a “Run Test Request” inside of the custom action wizard, where it does correctly upload the file to Cloudinary using the Magic Text inside the custom action wizard.

I’ve done a lot of troubleshooting and if I put a normal file link into my custom action URL field, the custom action works correctly and uploads the file to Cloudinary via the URL. But, if I put a Magic Text in there (supposedly containing the file URL from the file that was just uploaded), the custom action seems to be skipped completely.

Attached is a video of what is happening. I’ve been troubleshooting this for about a week now. Cloudinary support has confirmed that when the custom action is skipped by Adalo (when there is Magic Text inside the custom action URL field), they are not getting any errors or anything, per their logs. They said if it was an error uploading or sending, they would have seen it, but nothing is being sent. I have also tried to create another collection with just a “File URL” field, so when a user uploads a file, it creates the new “Temp File” item, but then also puta the file URL into another collection just for URLs, to see if the custom action would accept that, which did not work either.

I am currently going back and forth with Adalo support and the last email they sent asked why I am not using an external collection for this and I explained that since I am just uploading and retrieving the link from Cloudinary, I don’t think an external collection is needed, since this SHOULD work. I also did try to see if I could setup an external collection for this, but Cloudinary is a file storage and CDN service, so I tried but kept getting errors.

Here is the link to the screen-recording: Screen Capture on 2022-04-07 at 22-04-06.mp4 - Droplr

Thanks and any help on this would be awesome!

One possible problem that it could be is that the create temp file action is not completing fast enough for that data to be available in the action that happens immediately after.

You could try adding another action before the Cloudinary custom action, in order to delay things.

Also you could play with putting the file url into a hidden text input, and using the text input as the source for the magic text in the cloudinary action - I find text inputs update much faster than database actions.

If you can implement a good enough delay, this may fix it or at least rule it out as an issue.

1 Like

Thanks for the tip! Do you have any suggestions for custom actions that just delay in between other actions?

  • Mike

Hi Mike,

I’ve set up a delay endpoint for you. It’s just temporary for your testing I’ll delete it later.

I’ve sent it you in a private message.

Let me know if that works.

1 Like

Hi,

Thanks for the tips! However, I just tried both of them and neither worked. You can see the screencapture of me setting up and attempting both here: Screen Capture on 2022-04-08 at 14-23-10.mp4 - Droplr

Thanks and let me know if you have any other ideas!

On your button, make sure the delay custom action is before the Cloudinary custom action. We want it as the second action on the list- after create TMP file, and before cloudinary action.

If you were interested in using Amazon S3 rather than a CDN, you could use www.adalify.com which is my service for uploading files, and avoids the Adalo database completely.

Hi,

Nope, that did not work either. I did lots of troubleshooting and it is looking more and more like it is a bug with the Magic Text, by the Magic Text not populating the URL, since if I put an actual URL where the Magic Text URL should go, it works fine, it is just when the Magic Text is in there, it does not work.

Thanks!