简体   繁体   中英

Twitter Connector Tweet issue in Azure Logic App

I have started playing with Azure Logic and I'm using the Twitter Connector.

What I have done is I'm searching for tweets with a specific #Tag and then try to tweet the found item in the next step.

It works all fine when I put this in the Tweet step:

@first(body('twitterconnector')).TweetText

Now what I need is to add a fix string to this tweet and whatever i try it gives me this error:

Save logic app failed

{"error":{"code":"InvalidTemplate","message":"The template validation failed: 'The template action 'twitterconnector0' at line '1' and column '1709' is not valid: \"Unable to parse template language expression 'first(body('twitterconnector')).TweetText Via': expected token 'EndOfData' and actual 'Identifier'.\".'."}}

I have tried:

@first(body('twitterconnector')).TweetText @Via

and

@first(body('twitterconnector')).TweetText + "Via"

and

@first(body('twitterconnector')).TweetText + Via

and

@first(body('twitterconnector')).TweetText Via

And none of these seem to work and all fail with the above error. Any ideas?

You can use @concat function to concat two strings like this:

@concat(first(body('twitterconnector')).TweetText, "test string")

Take a look at this "Logic App Workflow Definition Language" for your reference and should be easy enough to do string manipulations like this:

https://msdn.microsoft.com/en-us/library/azure/dn948512.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM