This article demonstrates the process of converting the image content into an encoded base64 string format using Utilities by Quickwork.
What you'll need:
Skill level: Intermediate
Time required: 4 minutes
- Scheduler by Quickwork as a trigger--for triggering the journey
- Utilities by Quickwork: Action
- Appropriately categorized public image URL
How to pick up public image URLs
Utilities by Quickwork is an in-house app which means no authorization, connection, and permissions are required to perform its operations. It just requires raw user input data to start executing the intended action and give a response. For converting the content of the web images, there are some rules that need to be followed to use the Utilities by Quickwork app:
- Image URL must begin with
https://and not with
- Image URL must be in the
.gifor other appropriate formats.
- Images stored in your Amazon S3 bucket cannot be encoded.
- Avoid public images with lengthy URLs.
Violation of any of the above rules will result in an error.
Configuring the trigger
- Under the Event section, choose the Scheduler by Quickwork app from the drop-down menu in the Apps field present right below the New Trigger button.
- Select the trigger event, New scheduled event, from the drop-down menu in the Triggers field.
- Set the Interval as per your choice based on how many times you want the journey to run.
- Set the date and time of your choice in the Start At field and keep the Custom Payload field empty:
Configuring the Utilities by Quickwork action
- Under the Steps section, click on the Simple Action button and choose the Utilities by Quickwork app from the drop-down menu in the Apps field.
- Select the Convert file content action from the drop-down menu in the Action field.
- No authorization or connection creation is required since this app is created by Quickwork itself.
- In the File URL input field, specify the public image URL that satisfies the rules mentioned above, that you want to encode to base64 format. E.g., https://cdn.shopify.com/s/files/1/0464/1364/3927/products/byVilainRushhaircare2packwithbrush_500x.jpg?v=1616599351.
- Select the Method as GET as we want to get the base64 code:
Executing the journey
Save the changes of a journey and click the Save & Start button. You'll be taken to the History tab automatically. Click on the journey ID that just got executed. In the Steps section, click the Utilities by Quickwork action bar to expand and check the Output block:
The image content has been converted successfully to a base64 string format.