How to trigger automation job only when there is data in table - spotfire

I have made an automation which sends email of a visualization . Now i want to trigger email only when there is data in that visualization . Is it possible to do so if yes and then please let me know.

There is a way in which this is possible but it's fairly convoluted.
Create an Automation job file which has the 'Open analysis from Library' step (link)
Schedule it however you/your organization usually schedule Spotfire automations. Here's how to schedule it using Windows Task Scheduler: link
Once you have this set up, create an IronPython script within Spotfire which checks the underlying datatable: data check
If data exists, send email: HTML email
Since you're working with a visualization, you might have to google a bit to modify the code to export the image and then create a MIMEImage object which will then be sent with the email.

Related

Send an email (using flow) when the text field changes in PowerApps

I have a PowerApps App which is linked to a SharePoint List. When the user makes some changes to the text field in the app; I want the flow to send the user an email regarding the update.
I've been trying to track the SharePoint List entry and see if the entry is modified, then send an email. But so far I'm unable to do so.
I've been able to send an email when a text field changes to a specific text; but I'm looking for something where a particular entry in the list is changed.
When an item is created or modified > Condition (Column is equal to Yes) > Send email based on the condition
You don't need Powerapps for the same, what I mean is you need Flow for this.
Create and Run your flow on SharePoint directly.
In your flow check whatever your field is changed, if changed then you can send the user email.
You do not need to depend on Powerapps, Flow can alone work for this scenario.
Ensure you are using the Sharepoint When an item is created or modified Trigger in Power Automate (the tool formerly known as Flow)
Add a Trigger Condition for the column in question. Something along the lines of #triggerBody()?.Status,'Pending')
Trigger Conditions are not very well documented at the moment, but provide a powerful way to control when a Power Automate runs.

subscription service - email sending

Am looking for some help in a subscription service email sending from domino using Xpages.
scenario : Paul Goodman is a building contractor and he would like to subscribe to his category named "Buildings and Road”.
When someone asks question about his category "Buildings and Road” he and everyone else that have the same subscription , should get email. I have a LS Agent that goes thought a view to send these emails but I would like
to have his done as soon as the message is saved and it has to send one at the time to void spam filters. I know I could execute the LS agent onSave but do you see another solution maybe with JavaScript ? I have only seen some .NET & PHP solutions here.
You have a series of options here:
Extract your logic into a LS library, so it can be used by several agents. Then have on that runs on save (and another one on a new subscription)
Use a DOTs task to listen to documents save - you can write your logic in Java then
Call an ?OpenAgent URL from your client side JavaScript
Put it into your XPage for new articles
Since you have the agent already, I'd go with the first one

Trigger event from gmail new mail

Is there an API or events that can be trapped within gmail so that I can initiate a workflow or even fire a python script.
I am trying to automate a job which will extract a csv attachment from an email that has arrived in gmail. It will then ETL the csv into BigQuery.
Any thoughts ?
Recently did this integration:
Turn on watching for message events: https://developers.google.com/gmail/api/v1/reference/users/watch
When you get a new incoming messageId (messagesAdded history type) you ask for its information (in full format): https://developers.google.com/gmail/api/v1/reference/users/messages/get
In metadata you look for a payload.parts[i] where it has body.attachmentId and get an attachment using its id: https://developers.google.com/gmail/api/v1/reference/users/messages/attachments/get
Im not sure within gmail itself,
but one thing you try is to write a python script utilising IMAP lib to read gmail messages and load it to bigquery using googleclient python. Set it using cron to run every x minutes to check the gmail account.
This should give you a starter code to read gmail messages:
https://gist.github.com/baali/2633554
If you want just new messages, just replace the search param 'ALL' with 'UNSEEN'.
More info:
https://docs.python.org/2/library/imaplib.html
Example python to load it to BigQuery:
https://developers.google.com/bigquery/loading-data-into-bigquery
I am still waiting for IFTTT https://ifttt.com/wtf to provide the API for users to create their own channel or custom action. i.e. Google BigQuery channel.
Hope that helps.

How to create action hotspot in UI document

I've got some nice little LotusScript that I can put into the Click event of an Action Hotspot in a rich text field when I'm sending an email manually. Is there a way to programmatically create that in the UI?
My script determines the user's home server and then opens a specific document in the replica of a training database on their home server. I could create these messages with hotspots manually and provide them to the folks who want to email them out. Of course, time being money and the task being boring, I'd rather automate it. I know that I could do this by using a stored form, but am wondering if the greater capability exists, as I can see further applications for it.
One trick I used in the past was to create a profile document in a database, and store some rich text in a field on that profile doc. Then when I needed to programmatically send an email, I could get that rich text field from the profile doc and use AppendRTItem to get it into the body of an email. That should work with any type of rich text, including hotspots.
Note: this won't work in the UI to populate a new email. It does work if you are generating the emails completely in code, though.

Setting up a weekly digest in Sharepoint

I'm currently working on a MOSS 2007 site and i need to set up a "system" which will e-mail all the changes in all the lists and libraries in the site.
I'm new to the Sharepoint world, i wonder if it is possible.
P.S. I have no access to the Central Administration panel. (If it has anything to do with my purpose)
Thanks
You can write custom timer job to do this task.
You could do it in this way:
Create custom timer job feature, set timerjob schedule.
On FeatureActivated event add that timerjob to SharePoint and have a [Persisted] property like SiteUrl in timerjob, which you could pass in constructor to let timerjob determine with which site to work with.
Use SPWeb.SiteUsers to get all users in SharePoint.
Loop each user, open new SPSite impersonated as each user.
On SPSite.RootWeb (SPWeb) execute GetSiteData (read community comments for some great examples and explanation on how to use it). Use Query that queries items where Modified field has value greater than (follow link for important info to query correctly) what you want.
Generate html out of your data and SPUtility.SendMail.
There is a scheduled reminder job feature available. However it works only on 1 List scope. But you can download source code, open RmdJobDefinition class and just see how it works to assist you writing your own class.
Good luck.
I'm afraid you can only setup the alert on a list (or item) basis. In the list you go to Actions => Alerts => When to send alerts => Weekly. I didn't check the Central Admin since you don't have access in your scenario.

Resources