Forum Discussion
Mike,
One of the issues I had with QR codes from Quickbase is that the URL is often super long, which means that the QR code has to be relatively large on the paper to fit all the information in a way that the camera can read it (forget a 150x150 code - too small!). I figured out how to use the API with TinyURL to get a much shorter URL for the long Quickbase ones, which lets me print smaller QR codes. TinyURL's free plan lets you do 600 URLs per month and their paid plans don't cost that much.
If you need to shrink the size of your URLs, let me know and I can walk you through the TinyURL API.
------------------------------
Edward Hefter
www.Sutubra.com
------------------------------
Nice tip Edward!
------------------------------
Keith Jusas
------------------------------
- MikeTamoush2 years agoQrew Commander
Hi Edward,
I know this thread is a bit old, but wondering if you were still available to walk me through how to use tiny URL api to shorten the link?
Thanks.
------------------------------
Mike Tamoush
------------------------------- EdwardHefter2 years agoQrew Cadet
No problem, I put the YAML for it underneath my description:
When a record is created, there is a long URL generated that does what I want with the QR code (in this case, it is adding a record to a different table). The creation of the record triggers the Pipeline, which does a FETCH from TinyURL and "iterates" the return (there is only one record returned) over the record from step A. The information in step C is just some sample data from the first time I ran it so I could get the pattern for the rest.
Let me know if this helps!
# MPB - Get a TinyURL for the Task QR Code
#
# Account slugs:
# - quickbase[XXXXXXXX]: MPB App <None>
---
- META:
name: MPB - Get a TinyURL for the Task QR Code
tag_names:
- MPB
enabled: true
- TRIGGER quickbase[XXXXXXXX] record on_create -> a:
inputs-meta:
export_fields: '"URL for Temp Table Scan, TinyURL for Scan In/Out URL" <35,
49>'
table: '"MCAS - Midwest Panel Builders: Tasks" <XXXXXXXX>'
- ACTION json-handler json_source fetch_json_blob -> b:
inputs-meta:
authentication_schema: no-auth
body: "{ \"url\":{{a.url_for_temp_table_scan|to_json}},\n \"domain\": \"tinyurl.com\"\
,\n \"alias\": \"\",\n \"tags\": \"\"}"
headers: 'content-type: application/json'
json_url: https://api.tinyurl.com/create?api_token=YourOwnTokenGoesHere
method_type: POST
- b<>QUERY json-handler json_object search -> c:
inputs-meta:
json_schema_sample: "{\n \"data\": {\n \"url\": \"https://sutubra.quickbase.com/db/XXXXXXXX/(_DBID_TEMP_TABLE_FOR_CLOCKING_IN_AND_OUT)?a=API_AddRecord&_fid_7=559&_fid_8=Now&apptoken=YourOwnAppToken&rdr=https%3A%2F%2Fsutubra.quickbase.com%2Fdb%2FXXXXXXXX%2F(_DBID_TIMECARDS)%3Fa%3Dq%26qid%3D8\"\
,\n \"domain\": \"tinyurl.com\",\n \"alias\": \"XXXXXXXX\",\n \"\
tags\": [],\n \"tiny_url\": \"https://tinyurl.com/XXXXXXXX\"\n },\n \"\
code\": 0,\n \"errors\": []\n}"
- c<>LOOP:
- DO:
- a<>ACTION quickbase record update -> d:
inputs:
tiny_url_for_scan_in_out_url: '{{c.data_0.tiny_url}}'
...
------------------------------
Edward Hefter
www.Sutubra.com
------------------------------