Adding "If" logic to card field

#1

Hello, I currently have a webhook returning a custom message for the user from a database. To be sent as a card.
The message text is taken from the JSON data, as is the message title etc.
I am wondering if there is a way to add a shortcut, link text, link or image dynamically if it exists in the database output.
For example if the database returns a shortcut field, then the card is sent to the user would have a shortcut, however if the database returns only a title and message and no shortcut field then the shortcut field is blank.
I know this could be accomplished with several filters, however each filter seems to add a half second to processing and adding several seconds to response time is not desirable.
Is there any way in the Card field “LinkText” for example to put an If?
Or some alternative which does not slow down the processing?

(Kellsey Shaw) #2

Hi there,

Actually, you shouldn’t be getting blank shortcuts on-screen. The shortcut should be skipped if there’s no text from the output that you are using.

I’ve taken a look and sadly, it’s not working as it should so I’ve raised it with our engineers who’ll look at getting that fixed. :thumbsup:

#3

Ok some further testing reveals all of the other fields will accept an empty data string and the card will still be sent.
One small issue though, is when you pass an empty string to the LinkUrl field the card comes back (within Telegram) with the word “More” in its body. (even though LinkText and LinkUrl are blank).
Perhaps your engineers could also fix that?

(Kellsey Shaw) #4

Hi there,

I’ve asked our engineers to take a look at this when they are reviewing the issue with the shortcuts.

I’ll let you know how they get on with these things :slight_smile:

#5

Thanks Kellsey, the support you guys give via community is fantastic!
Appreciated.

1 Like
(Kellsey Shaw) #6

Hi,

This issue has now been fixed :slight_smile:

#7

Excellent! I have tested the shortcut and working great.
Can you comment on the following:
One small issue though, is when you pass an empty string to the LinkUrl field the card comes back (within Telegram) with the word “More” in its body. (even though LinkText and LinkUrl are blank).
Perhaps your engineers could also fix that?

(Kellsey Shaw) #8

Hi,

That should be fixed too. Are you still seeing the same issue?

#9

I still see the same issue. Data is returned as follows:
[
{
“ResponsePath”: “_________________________”,
“ReplyType”: “card”,
“ReplyTitle”: “Welcome”,
“ReplyText”: “Hello, this is a test message.”,
“Shortcut1”: “test”,
“LinkUrl”: “”,
“LinkText”: “”,
“ImageUrl”: null
}
]

From this my flow puts together a card.
The card takes it’s LinkURL and Link Text from the data, and even though both are empty strings, the Telegram Card received has the word “More” where the link should be.
I was hoping when this was an empty string it would be ignored.
Thoughts?

(Sanjay Khivesra) #10

Couldn’t follow to integrate face book messenger e can log in through remote computer access like “team viewer” to add bots, integration on my Facebook messenger & twitter,@ mutual continent time, await your schedule to come online,

Sanjay whatsapp+919025288813

(Kellsey Shaw) #11

Hi Sanjay,

I’ve replied to your emails.

(Kellsey Shaw) #12

I’ve asked our engineers to take a look at this again for the link issue to see if we can stop that More text from being displayed. :slight_smile:

(Kellsey Shaw) #13

Hi,

Just to let me know that our engineers found this to be linked to something else making the issue more in depth than we first thought so it is taking longer than we would have liked to fix but we are working on it and we will let you know once it has been fixed.

(Kellsey Shaw) #14

Hey,

Thanks for bearing with us :slight_smile:

This is now fixed :smile:

#15

excellent. All tested. Working as expected now. Thanks for always looking into and dealing with.
Appreciated.

1 Like