Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a url in an email created by an IFTTT macro?

Jonathan Vorndamme July 28, 2023

I would like to be able to send an email via IFTTT that contains a url, but I'm not able to do so, because it is directly converted to a link. I would like to keep the url as plain text, is there a way to achieve this?
The background is that I try to create rest api link allowing me to update the entry that was causing the email and therefore I need to use [etrny.id] and other replacement which obviously cannot work at the time I edit the form. I was trying to put the url into a different field, but as it contains ampersands that does not seem to be possible either.

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
July 28, 2023

Best option is to use HTML macro to create a HTML link

Especially if you want to have a dynamically created web link

Jonathan Vorndamme July 31, 2023

Thanks for your answer, that seems like the perfect solution. But I'm not able to find the HTML macro, unfortunately. Where is it?

Jonathan Vorndamme August 1, 2023

Is it possible that my organisation disabled it?

Alex Medved _ConfiForms_
Community Champion
August 1, 2023
Jonathan Vorndamme August 1, 2023

Our Admins are very cautious, so I'm pretty sure they didn't enable it. Is there another option? I currently set the url to a field using % instead of & and change that back using replaceWith virtual function, but a direct method to achieve this would be very nice. E.g. if it was possible to use a virtual function on text that is not in a field.

Alex Medved _ConfiForms_
Community Champion
August 1, 2023

May be the best option then would be to set up an autolink field

Jonathan Vorndamme August 2, 2023

Thanks, works perfectly for new entries. Old entries can be updated the following way using an IFTTT macro: set link using % (or any other unused sign/string) instead of & and set it to itself replacing % with & afterwards (can be done in one ifttt).

Alex Medved _ConfiForms_
Community Champion
August 2, 2023
Jonathan Vorndamme August 2, 2023

That's great, could you provide me with an example of the command (curl if possible)/url to do this? Documentation is a bit sparse on this side.

Alex Medved _ConfiForms_
Community Champion
August 2, 2023

curl to make a PUT on /rest/confiforms/1.0/updateFieldValue/{pageId}/{formName} ?

What is "sparse in the documentation"!? 

Jonathan Vorndamme August 2, 2023

Yes, exactly. I would like to once see a full command including everything that I need to call the API. The documentation seems to assume that I am very familier with http request (which I'm not) so it's very hard for me to deduce the exact syntax and components needed to generate one successfully. A full example command for each API-endpoint would be very helpful, at least for me.

Alex Medved _ConfiForms_
Community Champion
August 2, 2023

Honestly, this is too much to expect - really if you are looking on how to use curl then head to “curl” documentation… 

ConfiForms specific details are provided in our docs

Jonathan Vorndamme August 2, 2023

Ok, so let's stay confiforms specific: If I want to set multiple fields at once how would I do that? Comma seperated list? Also, are the formulars and autolinks recalculated without specifying them in the request?

Alex Medved _ConfiForms_
Community Champion
August 2, 2023

This specific method is about updating ONE field... not multiple... it is also called -"Update ConfiForms Field value by filter"

"no comma separated list"...

There is absolutely no need to specify formulas or auto-link fields - these are calculated for you on record create/update

Jonathan Vorndamme August 2, 2023

Sorry, I missed the difference between "update entry" and "update field value". While formulars are being updated when the related fields change, I cannot observe the same for auto-links, so I have to update them explicitly using e.g. REST-API, right?

Jonathan Vorndamme August 2, 2023

If I try that using command

curl -H "Authorization: Bearer <PAT Token>" -X PUT <our-url>/rest/confiforms/1.0/updateFieldValue/<pageID>/<FormName> -d "fv=<filedname>:test"

I get the following error message:

{"result":"Backend exception. Caused by Cannot read the array length because \"fieldAndValues\" is null"}

Do you have an idea, what's wrong with the command?

Alex Medved _ConfiForms_
Community Champion
August 3, 2023

Not sure where that comes from, but the URL to call according to the documentation is

/rest/confiforms/1.0/updateFieldValue/{pageId}/{formName}?fv={fieldName}:{fieldValue}

Setting the values for  {pageId}, {formName}, {fieldName} and {fieldValue}

Jonathan Vorndamme August 3, 2023

Ok, apparently this works:

curl -H "Authorization: Bearer <PAT Token>" -X PUT <our-url>/rest/confiforms/1.0/updateFieldValue/<pageID>/<FormName>?fv=<MyField>:<MyValue> -d ""

without any data (the conent doesn't actually matter), the request is rejected. I must admit that now that I know how it works, I can see how I was supposed to read that from the documentation, but it's a bit unintuitive that a PUT is used to put nothing and instead submit the content as a query parameter. Couldn't that confusion have been avoided by just using a GET instead?

What is also confusing is that the first entry to the table in the documentation states what you need to POST in the column of query parameters which kind of hides that we are talking about query parameters in that column.

I'd like to suggest to add an additional column to the table describing the PUT/POST Parameters and in the heading of the query parameters column add something like "set as <REST-API-url>?<param1>=<value1>&<param2>=<value2>...".

Jonathan Vorndamme August 3, 2023

Thanks for your reply, I just saw it. The reason for the error is that the parameter fv is not set because I tried to set it as PUT data instead of a query parameter.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events